VirtualBox

Changeset 82685 in vbox


Ignore:
Timestamp:
Jan 9, 2020 10:05:26 AM (5 years ago)
Author:
vboxsync
Message:

Dev/E1000: (bugref:9615) GSO and VLAN buffer allocation fixes.

File:
1 edited

Legend:

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

    r82368 r82685  
    38493849            return VINF_SUCCESS;
    38503850        }
     3851        if (fGso && pThis->GsoCtx.u8Type == PDMNETWORKGSOTYPE_INVALID)
     3852        {
     3853            E1kLog3(("Invalid GSO context, won't allocate this packet, cb=%u %s%s\n",
     3854                     pThis->cbTxAlloc, pThis->fVTag ? "VLAN " : "", pThis->fGSO ? "GSO " : ""));
     3855            /* No valid GSO context is available, ignore this packet. */
     3856            pThis->cbTxAlloc = 0;
     3857            return VINF_SUCCESS;
     3858        }
    38513859
    38523860        PPDMINETWORKUP pDrv = pThisCC->CTX_SUFF(pDrv);
     
    44224430            pThis->cbTxAlloc = RT_MIN(pThis->u32PayRemain,
    44234431                                       pThis->contextTSE.dw3.u16MSS)
    4424                                 + pThis->contextTSE.dw3.u8HDRLEN
    4425                                 + (pThis->fVTag ? 4 : 0);
     4432                                + pThis->contextTSE.dw3.u8HDRLEN;
     4433            /* Do not add VLAN tags to empty packets. */
     4434            if (pThis->fVTag && pThis->cbTxAlloc > 0)
     4435                pThis->cbTxAlloc += 4;
    44264436            rc = e1kXmitAllocBuf(pThis, pThisCC, false /* fGSO */);
    44274437        }
     
    52765286                cbPacket :
    52775287                RT_MIN(cbPacket, pThis->contextTSE.dw3.u16MSS + pThis->contextTSE.dw3.u8HDRLEN);
    5278             if (pThis->fVTag)
     5288            /* Do not add VLAN tags to empty packets. */
     5289            if (pThis->fVTag && pThis->cbTxAlloc > 0)
    52795290                pThis->cbTxAlloc += 4;
    52805291            LogFlow(("%s e1kLocateTxPacket: RET true cbTxAlloc=%d cbPacket=%d%s%s\n",
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