VirtualBox

Ignore:
Timestamp:
Apr 27, 2010 2:05:25 PM (15 years ago)
Author:
vboxsync
Message:

IntNet,VBoxNetFlt: Cleaned up the locking protocol between IntNet and NetFlt. Eleminated the out-bound trunk lock that IntNet always took when calling NetFlt.

File:
1 edited

Legend:

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

    r28800 r28830  
    619619     * Active? Retain the instance and increment the busy counter.
    620620     */
    621     RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    622     RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    623     const bool fActive = ASMAtomicUoReadBool(&pThis->fActive);
    624     if (fActive)
    625         vboxNetFltRetain(pThis, true /* fBusy */);
    626     RTSpinlockRelease(pThis->hSpinlock, &Tmp);
    627     if (!fActive)
     621    if (!vboxNetFltTryRetainBusyActive(pThis))
    628622        return;
    629623
     
    840834                             * Report MAC address, promiscuous mode and capabilities.
    841835                             */
    842                             Assert(pThis->pSwitchPort);
    843                             pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
    844                             pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false); /** @todo Promisc */
    845                             pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
    846                             pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
     836                            if (vboxNetFltTryRetainBusyNotDisconnected(pThis))
     837                            {
     838                                Assert(pThis->pSwitchPort);
     839                                pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
     840                                pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false); /** @todo Promisc */
     841                                pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     842                                pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
     843                                vboxNetFltRelease(pThis, true /*fBusy*/);
     844                            }
    847845
    848846                            LogFlow((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface successfully attached over '%s'\n", pThis->szName));
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