netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net/ipv6 misc
@ 2018-05-07  7:45 Tariq Toukan
  2018-05-07  7:45 ` [PATCH net-next 1/2] net: ipv6: Fix typo in ipv6_find_hdr() documentation Tariq Toukan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tariq Toukan @ 2018-05-07  7:45 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Tariq Toukan

Hi Dave,

This patchset contains two patches for net/ipv6.

Patch 1 is a trivial typo fix in documentation.
Patch 2 by Eran is a re-spin. It adds GRO support for IPv6 GRE tunnel,
this significantly improves performance in case GRO in native interface
is disabled.

Series generated against net-next commit:
90278871d4b0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Thanks,
Tariq.


Eran Ben Elisha (1):
  net: ipv6/gre: Add GRO support

Tariq Toukan (1):
  net: ipv6: Fix typo in ipv6_find_hdr() documentation

 net/ipv6/exthdrs_core.c |  2 +-
 net/ipv6/ip6_gre.c      | 37 +++++++++++++++++++++++++++----------
 2 files changed, 28 insertions(+), 11 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next 1/2] net: ipv6: Fix typo in ipv6_find_hdr() documentation
  2018-05-07  7:45 [PATCH net-next 0/2] net/ipv6 misc Tariq Toukan
@ 2018-05-07  7:45 ` Tariq Toukan
  2018-05-07  7:45 ` [PATCH net-next 2/2] net: ipv6/gre: Add GRO support Tariq Toukan
  2018-05-08  3:50 ` [PATCH net-next 0/2] net/ipv6 misc David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Tariq Toukan @ 2018-05-07  7:45 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Tariq Toukan

Fix 'an' into 'and', and use a comma instead of a period.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
 net/ipv6/exthdrs_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
index b643f5ce6c80..ae365df8abf7 100644
--- a/net/ipv6/exthdrs_core.c
+++ b/net/ipv6/exthdrs_core.c
@@ -161,7 +161,7 @@ int ipv6_find_tlv(const struct sk_buff *skb, int offset, int type)
  * if target < 0. "last header" is transport protocol header, ESP, or
  * "No next header".
  *
- * Note that *offset is used as input/output parameter. an if it is not zero,
+ * Note that *offset is used as input/output parameter, and if it is not zero,
  * then it must be a valid offset to an inner IPv6 header. This can be used
  * to explore inner IPv6 header, eg. ICMPv6 error messages.
  *
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next 2/2] net: ipv6/gre: Add GRO support
  2018-05-07  7:45 [PATCH net-next 0/2] net/ipv6 misc Tariq Toukan
  2018-05-07  7:45 ` [PATCH net-next 1/2] net: ipv6: Fix typo in ipv6_find_hdr() documentation Tariq Toukan
@ 2018-05-07  7:45 ` Tariq Toukan
  2018-05-08  3:50 ` [PATCH net-next 0/2] net/ipv6 misc David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Tariq Toukan @ 2018-05-07  7:45 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Tariq Toukan, Eric Dumazet

From: Eran Ben Elisha <eranbe@mellanox.com>

Add GRO capability for IPv6 GRE tunnel and ip6erspan tap, via gro_cells
infrastructure.

Performance testing: 55% higher badwidth.
Measuring bandwidth of 1 thread IPv4 TCP traffic over IPv6 GRE tunnel
while GRO on the physical interface is disabled.
CPU: Intel Xeon E312xx (Sandy Bridge)
NIC: Mellanox Technologies MT27700 Family [ConnectX-4]
Before (GRO not working in tunnel) : 2.47 Gbits/sec
After  (GRO working in tunnel)     : 3.85 Gbits/sec

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
CC: Eric Dumazet <edumazet@google.com>
---
 net/ipv6/ip6_gre.c | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 04c69e0c84b3..b511818b268c 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1314,6 +1314,7 @@ static void ip6gre_dev_free(struct net_device *dev)
 {
 	struct ip6_tnl *t = netdev_priv(dev);
 
+	gro_cells_destroy(&t->gro_cells);
 	dst_cache_destroy(&t->dst_cache);
 	free_percpu(dev->tstats);
 }
@@ -1381,11 +1382,12 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
 		return -ENOMEM;
 
 	ret = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
-	if (ret) {
-		free_percpu(dev->tstats);
-		dev->tstats = NULL;
-		return ret;
-	}
+	if (ret)
+		goto cleanup_alloc_pcpu_stats;
+
+	ret = gro_cells_init(&tunnel->gro_cells, dev);
+	if (ret)
+		goto cleanup_dst_cache_init;
 
 	tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
@@ -1405,6 +1407,13 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
 	ip6gre_tnl_init_features(dev);
 
 	return 0;
+
+cleanup_dst_cache_init:
+	dst_cache_destroy(&tunnel->dst_cache);
+cleanup_alloc_pcpu_stats:
+	free_percpu(dev->tstats);
+	dev->tstats = NULL;
+	return ret;
 }
 
 static int ip6gre_tunnel_init(struct net_device *dev)
@@ -1751,11 +1760,12 @@ static int ip6erspan_tap_init(struct net_device *dev)
 		return -ENOMEM;
 
 	ret = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
-	if (ret) {
-		free_percpu(dev->tstats);
-		dev->tstats = NULL;
-		return ret;
-	}
+	if (ret)
+		goto cleanup_alloc_pcpu_stats;
+
+	ret = gro_cells_init(&tunnel->gro_cells, dev);
+	if (ret)
+		goto cleanup_dst_cache_init;
 
 	tunnel->tun_hlen = 8;
 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
@@ -1773,6 +1783,13 @@ static int ip6erspan_tap_init(struct net_device *dev)
 	ip6gre_tnl_link_config(tunnel, 1);
 
 	return 0;
+
+cleanup_dst_cache_init:
+	dst_cache_destroy(&tunnel->dst_cache);
+cleanup_alloc_pcpu_stats:
+	free_percpu(dev->tstats);
+	dev->tstats = NULL;
+	return ret;
 }
 
 static const struct net_device_ops ip6erspan_netdev_ops = {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 0/2] net/ipv6 misc
  2018-05-07  7:45 [PATCH net-next 0/2] net/ipv6 misc Tariq Toukan
  2018-05-07  7:45 ` [PATCH net-next 1/2] net: ipv6: Fix typo in ipv6_find_hdr() documentation Tariq Toukan
  2018-05-07  7:45 ` [PATCH net-next 2/2] net: ipv6/gre: Add GRO support Tariq Toukan
@ 2018-05-08  3:50 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-05-08  3:50 UTC (permalink / raw)
  To: tariqt; +Cc: netdev, eranbe

From: Tariq Toukan <tariqt@mellanox.com>
Date: Mon,  7 May 2018 10:45:25 +0300

> This patchset contains two patches for net/ipv6.
> 
> Patch 1 is a trivial typo fix in documentation.
> Patch 2 by Eran is a re-spin. It adds GRO support for IPv6 GRE tunnel,
> this significantly improves performance in case GRO in native interface
> is disabled.
> 
> Series generated against net-next commit:
> 90278871d4b0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Series applied, thanks Tariq.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-08  3:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-07  7:45 [PATCH net-next 0/2] net/ipv6 misc Tariq Toukan
2018-05-07  7:45 ` [PATCH net-next 1/2] net: ipv6: Fix typo in ipv6_find_hdr() documentation Tariq Toukan
2018-05-07  7:45 ` [PATCH net-next 2/2] net: ipv6/gre: Add GRO support Tariq Toukan
2018-05-08  3:50 ` [PATCH net-next 0/2] net/ipv6 misc David Miller

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).