Return-Path: Received: from mail-by2nam01on0124.outbound.protection.outlook.com ([104.47.34.124]:1120 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933489AbeCCWjQ (ORCPT ); Sat, 3 Mar 2018 17:39:16 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Felix Manlunas , Satanand Burla , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 045/115] vxlan: vxlan dev should inherit lowerdev's gso_max_size Date: Sat, 3 Mar 2018 22:31:15 +0000 Message-ID: <20180303223010.27106-45-alexander.levin@microsoft.com> References: <20180303223010.27106-1-alexander.levin@microsoft.com> In-Reply-To: <20180303223010.27106-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Felix Manlunas [ Upstream commit d6acfeb17d030bb3907e77c048b0e7783ad8e5a9 ] 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 Signed-off-by: Satanand Burla Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/vxlan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index dab3bf6649e6..e4ff1e45c02e 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2834,6 +2834,11 @@ static int vxlan_dev_configure(struct net *src_net, = struct net_device *dev, needed_headroom =3D lowerdev->hard_header_len; } =20 + if (lowerdev) { + dev->gso_max_size =3D lowerdev->gso_max_size; + dev->gso_max_segs =3D lowerdev->gso_max_segs; + } + if (conf->mtu) { err =3D __vxlan_change_mtu(dev, lowerdev, dst, conf->mtu, false); if (err) --=20 2.14.1