summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Manlunas <felix.manlunas@cavium.com>2017-03-29 17:56:43 -0700
committerDavid S. Miller <davem@davemloft.net>2017-04-01 11:43:38 -0700
commitd6acfeb17d030bb3907e77c048b0e7783ad8e5a9 (patch)
treebc55d69df60f67f2590cb13fee72437ad859ce52
parent6c7c98bad4883a4a8710c96b2b44de482865eb6e (diff)
downloadlinux-d6acfeb17d030bb3907e77c048b0e7783ad8e5a9.tar.gz
linux-d6acfeb17d030bb3907e77c048b0e7783ad8e5a9.tar.bz2
linux-d6acfeb17d030bb3907e77c048b0e7783ad8e5a9.zip
vxlan: vxlan dev should inherit lowerdev's gso_max_size
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/vxlan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 1e54fb5c883a..714f74fb823a 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;