Changeset 68727 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Sep 12, 2017 4:21:58 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r67974 r68727 4366 4366 4367 4367 uint16_t u16MaxPktLen = pThis->contextTSE.dw3.u8HDRLEN + pThis->contextTSE.dw3.u16MSS; 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 }4378 4368 4379 4369 /* … … 4977 4967 { 4978 4968 pThis->contextTSE = pDesc->context; 4979 pThis->u32PayRemain = pDesc->context.dw2.u20PAYLEN; 4980 pThis->u16HdrRemain = pDesc->context.dw3.u8HDRLEN; 4981 e1kSetupGsoCtx(&pThis->GsoCtx, &pDesc->context); 4969 uint32_t cbMaxSegmentSize = pThis->contextTSE.dw3.u16MSS + pThis->contextTSE.dw3.u8HDRLEN + 4; /*VTAG*/ 4970 if (RT_UNLIKELY(cbMaxSegmentSize > E1K_MAX_TX_PKT_SIZE)) 4971 { 4972 pThis->contextTSE.dw3.u16MSS = E1K_MAX_TX_PKT_SIZE - pThis->contextTSE.dw3.u8HDRLEN - 4; /*VTAG*/ 4973 LogRelMax(10, ("%s Transmit packet is too large: %u > %u(max). Adjusted MSS to %u.\n", 4974 pThis->szPrf, cbMaxSegmentSize, E1K_MAX_TX_PKT_SIZE, pThis->contextTSE.dw3.u16MSS)); 4975 } 4976 pThis->u32PayRemain = pThis->contextTSE.dw2.u20PAYLEN; 4977 pThis->u16HdrRemain = pThis->contextTSE.dw3.u8HDRLEN; 4978 e1kSetupGsoCtx(&pThis->GsoCtx, &pThis->contextTSE); 4982 4979 STAM_COUNTER_INC(&pThis->StatTxDescCtxTSE); 4983 4980 }
Note:
See TracChangeset
for help on using the changeset viewer.