netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] vxlan: vxlan dev should inherit lowerdev's gso_max_size
@ 2017-03-30  0:56 Felix Manlunas
  2017-04-01 18:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Manlunas @ 2017-03-30  0:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, satananda.burla, stephen

vxlan dev currently ignores lowerdev's gso_max_size, which adversely
affects TSO performance of liquidio if it's the lowerdev.  Egress TCP
packets' skb->len often exceed liquidio's advertised gso_max_size.  This
may happen on other NIC drivers.

Fix it by assigning lowerdev's gso_max_size to that of vxlan dev.  Might as
well do likewise for gso_max_segs.

Single flow TSO throughput of liquidio as lowerdev (using iperf3):

    Before the patch:    139 Mbps
    After the patch :   8.68 Gbps
    Percent increase:  6,144 %

Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
---
 drivers/net/vxlan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 1e54fb5..714f74f 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2926,6 +2926,11 @@ static int vxlan_dev_configure(struct net *src_net, struct net_device *dev,
 		return -EINVAL;
 	}
 
+	if (lowerdev) {
+		dev->gso_max_size = lowerdev->gso_max_size;
+		dev->gso_max_segs = lowerdev->gso_max_segs;
+	}
+
 	if (conf->mtu) {
 		int max_mtu = ETH_MAX_MTU;
 

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

* Re: [PATCH net-next] vxlan: vxlan dev should inherit lowerdev's gso_max_size
  2017-03-30  0:56 [PATCH net-next] vxlan: vxlan dev should inherit lowerdev's gso_max_size Felix Manlunas
@ 2017-04-01 18:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-04-01 18:48 UTC (permalink / raw)
  To: felix.manlunas; +Cc: netdev, satananda.burla, stephen

From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Wed, 29 Mar 2017 17:56:43 -0700

> vxlan dev currently ignores lowerdev's gso_max_size, which adversely
> affects TSO performance of liquidio if it's the lowerdev.  Egress TCP
> packets' skb->len often exceed liquidio's advertised gso_max_size.  This
> may happen on other NIC drivers.
> 
> Fix it by assigning lowerdev's gso_max_size to that of vxlan dev.  Might as
> well do likewise for gso_max_segs.
> 
> Single flow TSO throughput of liquidio as lowerdev (using iperf3):
> 
>     Before the patch:    139 Mbps
>     After the patch :   8.68 Gbps
>     Percent increase:  6,144 %
> 
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>

Ok, since this location is exactly when we associate the lowerdev
this is the right way to fix this.

Applied, thank you.

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

end of thread, other threads:[~2017-04-01 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30  0:56 [PATCH net-next] vxlan: vxlan dev should inherit lowerdev's gso_max_size Felix Manlunas
2017-04-01 18:48 ` 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).