Skip to contentSkip to conversation

vxlan: vxlan dev should inherit lowerdev's gso_max_size

PATCH Applied Felix Manlunas 2 participants 2 messages Mar 30, 2017 – Apr 1, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 %

---
 drivers/net/vxlan.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/vxlan.c +5 -0
index 1e54fb5..714f74f 100644
@@ -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;
 
maintainer Applied
#1 lore raw

From: Felix Manlunas <[email protected]>
Date: Wed, 29 Mar 2017 17:56:43 -0700

Quoted 8 lines

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.

Quoted 8 lines

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 %

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

Applied, thank you.