VirtualBox

Changeset 28723 in vbox for trunk


Ignore:
Timestamp:
Apr 25, 2010 9:50:56 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60595
Message:

IntNet/NetFlt: Added INTNETTRUNKSWPORT::pfnReportGsoCapabilities and enabled ring-0 transmission for linux hosts and wires.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/intnet.h

    r28711 r28723  
    519519     * @param   fDst                The destination mask (INTNETTRUNKDIR_XXX).
    520520     *
    521      * @remarks May take a spinlock or two.
     521     * @remarks Does not take any locks.
    522522     */
    523523    DECLR0CALLBACKMEMBER(void, pfnReportGsoCapabilities,(PINTNETTRUNKSWPORT pSwitchPort, uint32_t fGsoCapabilities, uint32_t fDst));
     524
     525    /**
     526     * Reports the no-preemption-xmit capabilities of the host and wire.
     527     *
     528     * This is supposed to be used only when creating, connecting or reconnecting
     529     * the trunk.  It is assumed that the GSO capabilities are kind of static the
     530     * rest of the time.
     531     *
     532     * @param   pSwitchPort         Pointer to this structure.
     533     * @param   fNoPreemptDsts      The destinations  (INTNETTRUNKDIR_XXX) which it
     534     *                              is safe to transmit to with preemption disabled.
     535     * @param   fDst                The destination mask (INTNETTRUNKDIR_XXX).
     536     *
     537     * @remarks Does not take any locks.
     538     */
     539    DECLR0CALLBACKMEMBER(void, pfnReportNoPreemptDsts,(PINTNETTRUNKSWPORT pSwitchPort, uint32_t fNoPreemptDsts));
    524540
    525541    /** Structure version number. (INTNETTRUNKSWPORT_VERSION) */
     
    731747
    732748/** The UUID for the (current) trunk factory. (case sensitive) */
    733 #define INTNETTRUNKFACTORY_UUID_STR     "7eb192c8-6ee3-4d0a-96fb-f51ce7381354"
     749#define INTNETTRUNKFACTORY_UUID_STR     "5d347cb7-98e3-411f-916a-67c4becae09b"
    734750
    735751/** @name INTNETTRUNKFACTORY::pfnCreateAndConnect flags.
  • trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp

    r28722 r28723  
    42854285/** @copydoc INTNETTRUNKSWPORT::pfnReportGsoCapabilities */
    42864286static DECLCALLBACK(void) intnetR0TrunkIfPortReportGsoCapabilities(PINTNETTRUNKSWPORT pSwitchPort,
    4287                                                                   uint32_t fGsoCapabilities, uint32_t fDst)
     4287                                                                   uint32_t fGsoCapabilities, uint32_t fDst)
    42884288{
    42894289    PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
     
    42994299    if (fDst & INTNETTRUNKDIR_WIRE)
    43004300        pThis->fWireGsoCapabilites = fGsoCapabilities;
     4301}
     4302
     4303
     4304/** @copydoc INTNETTRUNKSWPORT::pfnReportNoPreemptDsts */
     4305static DECLCALLBACK(void) intnetR0TrunkIfPortReportNoPreemptDsts(PINTNETTRUNKSWPORT pSwitchPort, uint32_t fNoPreemptDsts)
     4306{
     4307    PINTNETTRUNKIF pThis = INTNET_SWITCHPORT_2_TRUNKIF(pSwitchPort);
     4308    Assert(!(fNoPreemptDsts & ~INTNETTRUNKDIR_VALID_MASK));
     4309
     4310    pThis->fNoPreemptDsts = fNoPreemptDsts;
    43014311}
    43024312
     
    47274737        pTrunk->SwitchPort.pfnReportPromiscuousMode   = intnetR0TrunkIfPortReportPromiscuousMode;
    47284738        pTrunk->SwitchPort.pfnReportGsoCapabilities   = intnetR0TrunkIfPortReportGsoCapabilities;
     4739        pTrunk->SwitchPort.pfnReportNoPreemptDsts     = intnetR0TrunkIfPortReportNoPreemptDsts;
    47294740        pTrunk->SwitchPort.u32VersionEnd              = INTNETTRUNKSWPORT_VERSION;
    47304741        pTrunk->FastMutex3                = NIL_RTSEMFASTMUTEX;
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp

    r28714 r28723  
    966966            pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, vboxNetFltDarwinIsPromiscuous(pThis));
    967967            pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,  INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     968            pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
    968969        }
    969970    }
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c

    r28714 r28723  
    579579    pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, vboxNetFltFreeBsdIsPromiscuous(pThis));
    580580    pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     581    pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
    581582
    582583    return VINF_SUCCESS;
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r28714 r28723  
    13781378        pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
    13791379        pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, vboxNetFltLinuxPromiscuous(pThis));
     1380        pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
    13801381    }
    13811382    else
     
    16631664     * Report the GSO capabilities of the host and device (if connected).
    16641665     */
     1666    /** @todo duplicate work here now? Attach */
    16651667#if defined(VBOXNETFLT_WITH_GSO_XMIT_HOST)
    16661668    pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort,
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c

    r28714 r28723  
    26202620            pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false);
    26212621            pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,  INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     2622            pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
    26222623
    26232624            /*
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c

    r28714 r28723  
    848848                            pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false); /** @todo Promisc */
    849849                            pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
    850 
     850                            pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
    851851
    852852                            LogFlow((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface successfully attached over '%s'\n", pThis->szName));
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c

    r28714 r28723  
    32823282                                pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,
    32833283                                                                             INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     3284                                /** @todo We should be able to do pfnXmit at DISPATCH_LEVEL... */
     3285                                pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
    32843286                            }
    32853287                            return;
Note: See TracChangeset for help on using the changeset viewer.

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