VirtualBox

Changeset 68727 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Sep 12, 2017 4:21:58 PM (7 years ago)
Author:
vboxsync
Message:

Dev/E1000: (bugref:8979) Fixed regression caused by r116797, tweaking MSS obtained from guest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r67974 r68727  
    43664366
    43674367    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     }
    43784368
    43794369    /*
     
    49774967    {
    49784968        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);
    49824979        STAM_COUNTER_INC(&pThis->StatTxDescCtxTSE);
    49834980    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette