Changeset 28160 in vbox
- Timestamp:
- Apr 11, 2010 12:16:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r28159 r28160 96 96 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18) 97 97 /** Indicates that the linux kernel may send us GSO frames. */ 98 # define VBOXNETFLT_WITH_GSO 198 # define VBOXNETFLT_WITH_GSO 1 99 99 100 100 /** This enables or disables the transmitting of GSO frame from the internal 101 101 * network and to the host. */ 102 # define VBOXNETFLT_WITH_GSO_XMIT_HOST 1102 # define VBOXNETFLT_WITH_GSO_XMIT_HOST 1 103 103 104 104 # if 0 /** @todo This is currently disable because it causes performance loss of 5-10%. */ 105 105 /** This enables or disables the transmitting of GSO frame from the internal 106 106 * network and to the wire. */ 107 # define VBOXNETFLT_WITH_GSO_XMIT_WIRE 1107 # define VBOXNETFLT_WITH_GSO_XMIT_WIRE 1 108 108 # 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 109 113 110 114 #endif … … 226 230 * 227 231 * 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 a232 * net_device_ops (2.6.28). It has been shown to give us a 229 233 * performance boost of 60-100% though. So, we have to find some less hacky way 230 234 * of getting this job done eventually. … … 237 241 * The overridden net_device_ops of the device we're attached to. 238 242 * 239 * Requires Linux 2.6. 30 or something.243 * Requires Linux 2.6.28 or later. 240 244 * 241 245 * This is a very dirty hack that was create to explore how much we can improve … … 812 816 #endif 813 817 814 #ifdef VBOXNETFLT_WITH_GSO 818 #ifdef VBOXNETFLT_WITH_GSO_RECV 815 819 816 820 /** … … 1047 1051 } 1048 1052 1049 #endif /* VBOXNETFLT_WITH_GSO */1053 #endif /* VBOXNETFLT_WITH_GSO_RECV */ 1050 1054 1051 1055 /** … … 1101 1105 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", 1102 1106 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 1103 1108 if ( (skb_shinfo(pBuf)->gso_type & (SKB_GSO_UDP | SKB_GSO_TCPV6 | SKB_GSO_TCPV4)) 1104 1109 && vboxNetFltLinuxCanForwardAsGso(pThis, pBuf, fSrc, &GsoCtx) ) 1105 1110 vboxNetFltLinuxForwardAsGso(pThis, pBuf, fSrc, &GsoCtx); 1106 1111 else 1112 # endif 1107 1113 { 1108 1114 /* Need to segment the packet */
Note:
See TracChangeset
for help on using the changeset viewer.