- Timestamp:
- Nov 17, 2011 11:21:13 AM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r39332 r39344 3206 3206 if (cbFrame > 16 && pState->fVTag) 3207 3207 { 3208 E1kLog3(("%s Inserting VLAN tag %08x\n", 3208 /* 3209 * We should have 'adjusted' pvSeg earlier to make room for four 3210 * additional bytes at the beginning of buffer. Now we move it back. 3211 */ 3212 uint32_t *pSrc = (uint32_t*)pSg->aSegs[0].pvSeg; 3213 uint32_t *pDst = pSrc - 1; 3214 pSg->aSegs[0].pvSeg = pDst; 3215 *pDst++ = *pSrc++; /* Copy destination address */ 3216 *pDst++ = *pSrc++; /* Copy destination and source addresses */ 3217 *pDst++ = *pSrc++; /* Copy source address */ 3218 *pDst++ = RT_BE2H_U16(VET) | (RT_BE2H_U16(pState->u16VTagTCI) << 16); 3219 E1kLog3(("%s Inserted VLAN tag %08x\n", 3209 3220 INSTANCE(pState), RT_BE2H_U16(VET) | (RT_BE2H_U16(pState->u16VTagTCI) << 16))); 3210 memmove((uint8_t*)pSg->aSegs[0].pvSeg + 16, (uint8_t*)pSg->aSegs[0].pvSeg + 12, cbFrame - 12);3211 *((uint32_t*)pSg->aSegs[0].pvSeg + 3) = RT_BE2H_U16(VET) | (RT_BE2H_U16(pState->u16VTagTCI) << 16);3212 3221 } 3213 3222 /* Update the stats */ … … 3734 3743 /** @todo Is there any way to indicating errors other than collisions? Like 3735 3744 * VERR_NET_DOWN. */ 3745 /* 3746 * If allocate a bigger buffer we need to move pvSeg 3747 * accordingly, leaving room in front. 3748 * 3749 * Note that e1kTransmitFrame not necessarily moves it back. In 3750 * case of multi-descriptor packet with TSE we won't know if 3751 * VLAN tag has to be inserted until the last descriptor is 3752 * fetched. If it has not we simply leave pvSeg as it is (+4) 3753 * and send the packet without inserting VLAN tag. 3754 */ 3755 if (cbVTag) 3756 { 3757 Assert(cbVTag == 4); 3758 pState->CTX_SUFF(pTxSg)->aSegs[0].pvSeg = 3759 (uint8_t*)(pState->CTX_SUFF(pTxSg)->aSegs[0].pvSeg) + cbVTag; 3760 } 3736 3761 } 3737 3762 … … 3824 3849 /** @todo Is there any way to indicating errors other than collisions? Like 3825 3850 * VERR_NET_DOWN. */ 3851 /* 3852 * If allocate a bigger buffer we need to move pvSeg 3853 * accordingly, leaving room in front. Also see the comment 3854 * in data descriptor processing. 3855 */ 3856 if (cbVTag) 3857 { 3858 Assert(cbVTag == 4); 3859 pState->CTX_SUFF(pTxSg)->aSegs[0].pvSeg = 3860 (uint8_t*)(pState->CTX_SUFF(pTxSg)->aSegs[0].pvSeg) + cbVTag; 3861 } 3826 3862 } 3827 3863 -
trunk/src/VBox/VMM/VMMR0/VMMR0.def
r39332 r39344 98 98 nocrt_memcpy 99 99 memcpy=nocrt_memcpy ; not-os2 100 nocrt_memmove101 100 nocrt_memset 102 101 memset=nocrt_memset ; not-os2 -
trunk/src/VBox/VMM/VMMRC/VMMRC.def
r39332 r39344 86 86 nocrt_memcpy 87 87 memcpy=nocrt_memcpy ; not-os2 88 nocrt_memmove89 88 nocrt_memset 90 89 memset=nocrt_memset ; not-os2
Note:
See TracChangeset
for help on using the changeset viewer.