VirtualBox

Ignore:
Timestamp:
Aug 13, 2010 2:38:49 PM (14 years ago)
Author:
vboxsync
Message:

vboxnetflt: qdisc stability fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r31627 r31654  
    352352{
    353353    PVBOXNETQDISCPRIV pPriv = qdisc_priv(sch);
    354 
    355     ++sch->qstats.drops;
    356     --sch->q.qlen;
     354    unsigned int cbLen;
     355
    357356    if (pPriv->pChild->ops->drop)
    358         return pPriv->pChild->ops->drop(pPriv->pChild);
     357    {
     358        cbLen = pPriv->pChild->ops->drop(pPriv->pChild);
     359        if (cbLen != 0)
     360        {
     361            ++sch->qstats.drops;
     362            --sch->q.qlen;
     363            return cbLen;
     364        }
     365    }
    359366
    360367    return 0;
     
    607614# endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) */
    608615#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) */
     616        /* Synch the queue len with our child */
     617        pNew->q.qlen = pPriv->pChild->q.qlen;
    609618    }
    610619    else
     
    22322241int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis)
    22332242{
     2243#ifdef VBOXNETFLT_WITH_QDISC
     2244    vboxNetFltLinuxQdiscRemove(pThis, NULL);
     2245#endif /* VBOXNETFLT_WITH_QDISC */
    22342246    /*
    22352247     * Remove packet handler when we get disconnected from internal switch as
     
    22752287    vboxNetFltLinuxUnhookDev(pThis, NULL);
    22762288#endif
    2277 #ifdef VBOXNETFLT_WITH_QDISC
    2278     vboxNetFltLinuxQdiscRemove(pThis, NULL);
    2279 #endif /* VBOXNETFLT_WITH_QDISC */
    22802289
    22812290    /** @todo This code may race vboxNetFltLinuxUnregisterDevice (very very
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