Changeset 67974 in vbox for trunk/src/VBox/Devices/Network/DevE1000.cpp
- Timestamp:
- Jul 14, 2017 1:50:51 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r67971 r67974 3725 3725 pThis->fVTag ? "VLAN " : "", 3726 3726 pThis->fGSO ? "GSO " : "")); 3727 pThis->cbTxAlloc = 0;3728 3727 } 3729 3728 else … … 3741 3740 pSg->aSegs[0].cbSeg = sizeof(pThis->aTxPacketFallback); 3742 3741 } 3742 pThis->cbTxAlloc = 0; 3743 3743 3744 3744 pThis->CTX_SUFF(pTxSg) = pSg; … … 4366 4366 4367 4367 uint16_t u16MaxPktLen = pThis->contextTSE.dw3.u8HDRLEN + pThis->contextTSE.dw3.u16MSS; 4368 Assert(u16MaxPktLen != 0); 4369 Assert(u16MaxPktLen < E1K_MAX_TX_PKT_SIZE); 4368 if (RT_UNLIKELY(u16MaxPktLen <= pThis->contextTSE.dw3.u8HDRLEN)) 4369 { 4370 E1kLog(("%s Transmit packet is too small: %u <= %u(min)\n", pThis->szPrf, u16MaxPktLen, pThis->contextTSE.dw3.u8HDRLEN)); 4371 return VINF_SUCCESS; // @todo consider VERR_BUFFER_UNDERFLOW; 4372 } 4373 if (RT_UNLIKELY(u16MaxPktLen > E1K_MAX_TX_PKT_SIZE || u16MaxPktLen > pThis->CTX_SUFF(pTxSg)->cbAvailable)) 4374 { 4375 E1kLog(("%s Transmit packet is too large: %u > %u(max)\n", pThis->szPrf, u16MaxPktLen, E1K_MAX_TX_PKT_SIZE)); 4376 return VINF_SUCCESS; // @todo consider VERR_BUFFER_OVERFLOW; 4377 } 4370 4378 4371 4379 /* 4372 4380 * Carve out segments. 4373 4381 */ 4374 int rc ;4382 int rc = VINF_SUCCESS; 4375 4383 do 4376 4384 { … … 4406 4414 } 4407 4415 4408 return false;4416 return VINF_SUCCESS; // @todo consider rc; 4409 4417 } 4410 4418 #endif /* E1K_WITH_TXD_CACHE */
Note:
See TracChangeset
for help on using the changeset viewer.