diff options
author | David S. Miller <davem@davemloft.net> | 2013-10-19 19:37:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-19 19:37:06 -0400 |
commit | 53481da372851a5506deb5247302f75459b472b4 (patch) | |
tree | f56596d0aa56f97a2a54cd18749805ae2c4becc8 /net/ipv4/ipip.c | |
parent | b917eb155c56bbb766140b406979820e719e3f55 (diff) | |
parent | 117401ee1df6517203454637fbc3e7e660ce45f6 (diff) |
Merge branch 'ipip_gso'
Eric Dumazet says:
====================
net: Implement GSO/TSO support for IPIP
This patch serie implements GSO/TSO support for IPIP
David, please note it applies after "ipv4: gso: send_check() & segment() cleanups"
( http://patchwork.ozlabs.org/patch/284714/ )
Broadcom bnx2x driver is now enabled for TSO support of IPIP traffic
Before patch :
lpq83:~# ./netperf -H 7.7.9.84 -Cc
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 7.7.9.84 () port 0 AF_INET
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB
87380 16384 16384 10.00 3357.88 5.09 3.70 2.983 2.167
After patch :
lpq83:~# ./netperf -H 7.7.9.84 -Cc
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 7.7.9.84 () port 0 AF_INET
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB
87380 16384 16384 10.00 8532.40 2.55 7.73 0.588 1.781
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 7f80fb4b82d3..fe3e9f7f1f0b 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -220,17 +220,17 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
220 | if (unlikely(skb->protocol != htons(ETH_P_IP))) | 220 | if (unlikely(skb->protocol != htons(ETH_P_IP))) |
221 | goto tx_error; | 221 | goto tx_error; |
222 | 222 | ||
223 | if (likely(!skb->encapsulation)) { | 223 | skb = iptunnel_handle_offloads(skb, false, SKB_GSO_IPIP); |
224 | skb_reset_inner_headers(skb); | 224 | if (IS_ERR(skb)) |
225 | skb->encapsulation = 1; | 225 | goto out; |
226 | } | ||
227 | 226 | ||
228 | ip_tunnel_xmit(skb, dev, tiph, tiph->protocol); | 227 | ip_tunnel_xmit(skb, dev, tiph, tiph->protocol); |
229 | return NETDEV_TX_OK; | 228 | return NETDEV_TX_OK; |
230 | 229 | ||
231 | tx_error: | 230 | tx_error: |
232 | dev->stats.tx_errors++; | ||
233 | dev_kfree_skb(skb); | 231 | dev_kfree_skb(skb); |
232 | out: | ||
233 | dev->stats.tx_errors++; | ||
234 | return NETDEV_TX_OK; | 234 | return NETDEV_TX_OK; |
235 | } | 235 | } |
236 | 236 | ||
@@ -275,6 +275,7 @@ static const struct net_device_ops ipip_netdev_ops = { | |||
275 | #define IPIP_FEATURES (NETIF_F_SG | \ | 275 | #define IPIP_FEATURES (NETIF_F_SG | \ |
276 | NETIF_F_FRAGLIST | \ | 276 | NETIF_F_FRAGLIST | \ |
277 | NETIF_F_HIGHDMA | \ | 277 | NETIF_F_HIGHDMA | \ |
278 | NETIF_F_GSO_SOFTWARE | \ | ||
278 | NETIF_F_HW_CSUM) | 279 | NETIF_F_HW_CSUM) |
279 | 280 | ||
280 | static void ipip_tunnel_setup(struct net_device *dev) | 281 | static void ipip_tunnel_setup(struct net_device *dev) |