VirtualBox

Changeset 28160 in vbox


Ignore:
Timestamp:
Apr 11, 2010 12:16:44 AM (15 years ago)
Author:
vboxsync
Message:

VBoxNetFlt-linux.c: Made the receive GSO stuff configurable as well.

File:
1 edited

Legend:

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

    r28159 r28160  
    9696#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
    9797/** Indicates that the linux kernel may send us GSO frames. */
    98 # define VBOXNETFLT_WITH_GSO  1
     98# define VBOXNETFLT_WITH_GSO                1
    9999
    100100/** This enables or disables the transmitting of GSO frame from the internal
    101101 *  network and to the host.  */
    102 # define VBOXNETFLT_WITH_GSO_XMIT_HOST    1
     102# define VBOXNETFLT_WITH_GSO_XMIT_HOST      1
    103103
    104104# if 0 /** @todo This is currently disable because it causes performance loss of 5-10%.  */
    105105/** This enables or disables the transmitting of GSO frame from the internal
    106106 *  network and to the wire. */
    107 #  define VBOXNETFLT_WITH_GSO_XMIT_WIRE   1
     107#  define VBOXNETFLT_WITH_GSO_XMIT_WIRE     1
    108108# endif
     109
     110/** This enables or disables the forwarding/flooding of GSO frame from the host
     111 *  to the internal network.  */
     112# define VBOXNETFLT_WITH_GSO_RECV           1
    109113
    110114#endif
     
    226230 *
    227231 * The current code uses a very ugly hack and only works on kernels using the
    228  * net_device_ops (2.6.30 or something).  It has been shown to give us a
     232 * net_device_ops (2.6.28).  It has been shown to give us a
    229233 * performance boost of 60-100% though.  So, we have to find some less hacky way
    230234 * of getting this job done eventually.
     
    237241 * The overridden net_device_ops of the device we're attached to.
    238242 *
    239  * Requires Linux 2.6.30 or something.
     243 * Requires Linux 2.6.28 or later.
    240244 *
    241245 * This is a very dirty hack that was create to explore how much we can improve
     
    812816#endif
    813817
    814 #ifdef VBOXNETFLT_WITH_GSO
     818#ifdef VBOXNETFLT_WITH_GSO_RECV
    815819
    816820/**
     
    10471051}
    10481052
    1049 #endif /* VBOXNETFLT_WITH_GSO */
     1053#endif /* VBOXNETFLT_WITH_GSO_RECV */
    10501054
    10511055/**
     
    11011105        Log3(("vboxNetFltLinuxForwardToIntNet: skb len=%u data_len=%u truesize=%u next=%p nr_frags=%u gso_size=%u gso_seqs=%u gso_type=%x frag_list=%p pkt_type=%x ip_summed=%d\n",
    11021106              pBuf->len, pBuf->data_len, pBuf->truesize, pBuf->next, skb_shinfo(pBuf)->nr_frags, skb_shinfo(pBuf)->gso_size, skb_shinfo(pBuf)->gso_segs, skb_shinfo(pBuf)->gso_type, skb_shinfo(pBuf)->frag_list, pBuf->pkt_type, pBuf->ip_summed));
     1107# ifdef VBOXNETFLT_WITH_GSO_RECV
    11031108        if (   (skb_shinfo(pBuf)->gso_type & (SKB_GSO_UDP | SKB_GSO_TCPV6 | SKB_GSO_TCPV4))
    11041109            && vboxNetFltLinuxCanForwardAsGso(pThis, pBuf, fSrc, &GsoCtx) )
    11051110            vboxNetFltLinuxForwardAsGso(pThis, pBuf, fSrc, &GsoCtx);
    11061111        else
     1112# endif
    11071113        {
    11081114            /* Need to segment the packet */
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