From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>
Subject: [PATCH v2 net-next 2/4] vxlan: GRO support at tunnel layer
Date: Mon, 3 Aug 2015 10:11:16 -0700 [thread overview]
Message-ID: <1438621878-1113072-3-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1438621878-1113072-1-git-send-email-tom@herbertland.com>
Add calls to gro_cells infrastructure to do GRO when receiving on a tunnel.
Testing:
Ran 200 netperf TCP_STREAM instance
- With fix (GRO enabled on VXLAN interface)
Verify GRO is happening.
9084 MBps tput
3.44% CPU utilization
- Without fix (GRO disabled on VXLAN interface)
Verified no GRO is happening.
9084 MBps tput
5.54% CPU utilization
Signed-off-by: Tom Herbert <tom@herbertland.com>
---
drivers/net/vxlan.c | 9 +++++++--
include/net/vxlan.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 60b5b42..ef30037 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1208,7 +1208,7 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
stats->rx_bytes += skb->len;
u64_stats_update_end(&stats->syncp);
- netif_rx(skb);
+ gro_cells_receive(&vxlan->gro_cells, skb);
return;
drop:
@@ -2436,6 +2436,8 @@ static void vxlan_setup(struct net_device *dev)
vxlan->dev = dev;
+ gro_cells_init(&vxlan->gro_cells, dev);
+
for (h = 0; h < FDB_HASH_SIZE; ++h)
INIT_HLIST_HEAD(&vxlan->fdb_head[h]);
}
@@ -2880,6 +2882,7 @@ static void vxlan_dellink(struct net_device *dev, struct list_head *head)
hlist_del_rcu(&vxlan->hlist);
spin_unlock(&vn->sock_lock);
+ gro_cells_destroy(&vxlan->gro_cells);
list_del(&vxlan->next);
unregister_netdevice_queue(dev, head);
}
@@ -3088,8 +3091,10 @@ static void __net_exit vxlan_exit_net(struct net *net)
/* If vxlan->dev is in the same netns, it has already been added
* to the list by the previous loop.
*/
- if (!net_eq(dev_net(vxlan->dev), net))
+ if (!net_eq(dev_net(vxlan->dev), net)) {
+ gro_cells_destroy(&vxlan->gro_cells);
unregister_netdevice_queue(vxlan->dev, &list);
+ }
}
unregister_netdevice_many(&list);
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index eb8d721..21f1ff5 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -161,6 +161,7 @@ struct vxlan_dev {
struct timer_list age_timer;
spinlock_t hash_lock;
unsigned int addrcnt;
+ struct gro_cells gro_cells;
struct vxlan_config cfg;
--
1.8.5.6
next prev parent reply other threads:[~2015-08-03 17:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 17:11 [PATCH v2 net-next 0/4] gro: Fixes for tunnels and GRO Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 1/4] gro: Fix remcsum offload to deal with frags in GRO Tom Herbert
2015-08-03 17:11 ` Tom Herbert [this message]
2015-08-03 17:11 ` [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads Tom Herbert
2015-08-07 0:15 ` Jesse Gross
2015-10-16 15:23 ` Eric Dumazet
2015-10-20 2:04 ` Eric Dumazet
2015-10-20 3:40 ` [PATCH net-next] ipv6: gro: support sit protocol Eric Dumazet
2015-10-20 3:51 ` Tom Herbert
2015-10-22 2:37 ` David Miller
2015-11-03 12:57 ` Wolfgang Walter
2015-11-03 13:07 ` Eric Dumazet
2015-11-03 21:14 ` Tom Herbert
2015-11-04 12:19 ` Wolfgang Walter
2015-11-04 12:40 ` Eric Dumazet
2015-11-04 14:09 ` Wolfgang Walter
2015-11-04 15:13 ` Eric Dumazet
2015-11-04 17:05 ` Wolfgang Walter
2015-10-20 9:21 ` [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads Wolfgang Walter
2015-08-03 17:11 ` [PATCH v2 net-next 4/4] fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks Tom Herbert
2015-08-07 1:55 ` [PATCH v2 net-next 0/4] gro: Fixes for tunnels and GRO David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438621878-1113072-3-git-send-email-tom@herbertland.com \
--to=tom@herbertland.com \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).