Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2645892pxx; Sun, 1 Nov 2020 05:20:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlEy5PMFbx98rYqMEaRk4LkABriXKLWZ2ScZaYGm4VqE5Mkop+h+sOIVrKiMnwG7l/Gqe1 X-Received: by 2002:a17:906:e42:: with SMTP id q2mr11139595eji.261.1604236800831; Sun, 01 Nov 2020 05:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604236800; cv=none; d=google.com; s=arc-20160816; b=aJWqjSnHZ25tT5nyZ5W2PQNHz5hiN0f6Q/HfRrF6ArH09XXiZZT44rc38l2utws0w5 sVqRc4fO6A7P5wfkDnKzd4sPVc2TNi0hM0OYP2L1SqZyBnBSZgyl35zOr0Xacebvtobz GdhM2F/8FBFDtghlAbzEFv0lcv1x0n0idjuMaRZv9z2/j5x8qqu9m9pAzlD9vR18D8vZ M1qX1C+n6jyaIbLZaOregHZ8S3Of8zFtPiGDZKXbo9wHne2/r6SJX5muA6KRjGZEs1Ls bMrMhcy8ZnlwEThBfZYZm39wWh/jnnCBkUnWwUu4udI2qHsxTEHPu7Lrd5Awfkl0YRIQ euQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=PSBlUKp+w471ygVSGKtOZR8/NBsm90EQYMDdsaYJehU=; b=InJYHvtVKXbSh2XTy58m03KM1RfKHwSpq/d4DnsQaSM7RFAdSKzHjIv0IkstdPIRZn jMvHnVyTKTltEr1QLrZIeWcaOC7BV70LUUAHdz1JZiCNBYWuYxZvdxLlhVU1fevDszVb HUwDDk7enAv7z8h8dboYuJmTuHptRj1ZOkg3rU/XwslRMiSo319crkv/MemEBngQf1aY deQb7TkFf6E+BJiueQdfSZ8+r3M6zNFGwmiCEqnItMbF64fw3p2dZvevFy2na8KXSoGf 7NyPUCEMLl01qUZkf9h4DUlUSBuL/HY5wyXoV8Kus1TCHPVaDAk0f6sJQKmtfImTi49T Qrmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=ihTGOmfh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si7848809eje.646.2020.11.01.05.19.37; Sun, 01 Nov 2020 05:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=ihTGOmfh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726814AbgKANR0 (ORCPT + 99 others); Sun, 1 Nov 2020 08:17:26 -0500 Received: from mail1.protonmail.ch ([185.70.40.18]:54264 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgKANRX (ORCPT ); Sun, 1 Nov 2020 08:17:23 -0500 Date: Sun, 01 Nov 2020 13:17:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1604236639; bh=PSBlUKp+w471ygVSGKtOZR8/NBsm90EQYMDdsaYJehU=; h=Date:To:From:Cc:Reply-To:Subject:From; b=ihTGOmfhDuJGrbKgQYXtnExCCrHyHea6aBpJvlELxbHejM4MoxqYcVd/bTS8++3zj SgT85hVBw872aLa0eJiIwh4BLP6nx7+qHNm+YcUwRqz+oA+6+T5vATxgOGPZ5N2xrl 5sWAvDPFXqzIoxttiP9ZY+6QRoPq2ykdsPzA3CcCgc5lJuT5yyBmx3Ehq+YIwTDb+r 7scphM2yqxqss4kXxB7CESQn5nMy7v821chvcLiVYOMZCU9DGV8mLXW8DXk2vHFfsH 8N+qKEMSwEEugss2IIOnUMlvWticrAUKvQcVsM6DMQsQZFeN+X30I2bcR0IAFy8Oge EdnE8jMdocsag== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , Jiri Pirko , Steffen Klassert , Willem de Bruijn , Alexander Lobakin , Miaohe Lin , Antoine Tenart , Mauro Carvalho Chehab , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH v2 net-next 2/2] net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Virtual netdevs should use NETIF_F_GSO_SOFTWARE to forward GSO skbs as-is and let the final drivers deal with them when supported. Also remove NETIF_F_GSO_UDP_L4 from bonding and team drivers as it's now included in the "software" list. Suggested-by: Willem de Bruijn Signed-off-by: Alexander Lobakin --- drivers/net/bonding/bond_main.c | 11 +++++------ drivers/net/dummy.c | 2 +- drivers/net/ifb.c | 3 +-- drivers/net/team/team.c | 9 ++++----- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_mai= n.c index 84ecbc6fa0ff..71c9677d135f 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1228,14 +1228,14 @@ static netdev_features_t bond_fix_features(struct n= et_device *dev, } =20 #define BOND_VLAN_FEATURES=09(NETIF_F_HW_CSUM | NETIF_F_SG | \ -=09=09=09=09 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ +=09=09=09=09 NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \ =09=09=09=09 NETIF_F_HIGHDMA | NETIF_F_LRO) =20 #define BOND_ENC_FEATURES=09(NETIF_F_HW_CSUM | NETIF_F_SG | \ -=09=09=09=09 NETIF_F_RXCSUM | NETIF_F_ALL_TSO) +=09=09=09=09 NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE) =20 #define BOND_MPLS_FEATURES=09(NETIF_F_HW_CSUM | NETIF_F_SG | \ -=09=09=09=09 NETIF_F_ALL_TSO) +=09=09=09=09 NETIF_F_GSO_SOFTWARE) =20 =20 static void bond_compute_features(struct bonding *bond) @@ -1291,8 +1291,7 @@ static void bond_compute_features(struct bonding *bon= d) =09bond_dev->vlan_features =3D vlan_features; =09bond_dev->hw_enc_features =3D enc_features | NETIF_F_GSO_ENCAP_ALL | =09=09=09=09 NETIF_F_HW_VLAN_CTAG_TX | -=09=09=09=09 NETIF_F_HW_VLAN_STAG_TX | -=09=09=09=09 NETIF_F_GSO_UDP_L4; +=09=09=09=09 NETIF_F_HW_VLAN_STAG_TX; #ifdef CONFIG_XFRM_OFFLOAD =09bond_dev->hw_enc_features |=3D xfrm_features; #endif /* CONFIG_XFRM_OFFLOAD */ @@ -4721,7 +4720,7 @@ void bond_setup(struct net_device *bond_dev) =09=09=09=09NETIF_F_HW_VLAN_CTAG_RX | =09=09=09=09NETIF_F_HW_VLAN_CTAG_FILTER; =20 -=09bond_dev->hw_features |=3D NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; +=09bond_dev->hw_features |=3D NETIF_F_GSO_ENCAP_ALL; #ifdef CONFIG_XFRM_OFFLOAD =09bond_dev->hw_features |=3D BOND_XFRM_FEATURES; #endif /* CONFIG_XFRM_OFFLOAD */ diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index bab3a9bb5e6f..f82ad7419508 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -124,7 +124,7 @@ static void dummy_setup(struct net_device *dev) =09dev->flags &=3D ~IFF_MULTICAST; =09dev->priv_flags |=3D IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE; =09dev->features=09|=3D NETIF_F_SG | NETIF_F_FRAGLIST; -=09dev->features=09|=3D NETIF_F_ALL_TSO; +=09dev->features=09|=3D NETIF_F_GSO_SOFTWARE; =09dev->features=09|=3D NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX; =09dev->features=09|=3D NETIF_F_GSO_ENCAP_ALL; =09dev->hw_features |=3D dev->features; diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 7fe306e76281..fa63d4dee0ba 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -187,8 +187,7 @@ static const struct net_device_ops ifb_netdev_ops =3D { }; =20 #define IFB_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_FRAGLIST=09|= \ -=09=09 NETIF_F_TSO_ECN | NETIF_F_TSO | NETIF_F_TSO6=09| \ -=09=09 NETIF_F_GSO_ENCAP_ALL =09=09=09=09| \ +=09=09 NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL=09| \ =09=09 NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_CTAG_TX=09=09| \ =09=09 NETIF_F_HW_VLAN_STAG_TX) =20 diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 07f1f3933927..b4092127a92c 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -975,11 +975,11 @@ static void team_port_disable(struct team *team, } =20 #define TEAM_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ -=09=09=09 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ +=09=09=09 NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \ =09=09=09 NETIF_F_HIGHDMA | NETIF_F_LRO) =20 #define TEAM_ENC_FEATURES=09(NETIF_F_HW_CSUM | NETIF_F_SG | \ -=09=09=09=09 NETIF_F_RXCSUM | NETIF_F_ALL_TSO) +=09=09=09=09 NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE) =20 static void __team_compute_features(struct team *team) { @@ -1009,8 +1009,7 @@ static void __team_compute_features(struct team *team= ) =09team->dev->vlan_features =3D vlan_features; =09team->dev->hw_enc_features =3D enc_features | NETIF_F_GSO_ENCAP_ALL | =09=09=09=09 NETIF_F_HW_VLAN_CTAG_TX | -=09=09=09=09 NETIF_F_HW_VLAN_STAG_TX | -=09=09=09=09 NETIF_F_GSO_UDP_L4; +=09=09=09=09 NETIF_F_HW_VLAN_STAG_TX; =09team->dev->hard_header_len =3D max_hard_header_len; =20 =09team->dev->priv_flags &=3D ~IFF_XMIT_DST_RELEASE; @@ -2175,7 +2174,7 @@ static void team_setup(struct net_device *dev) =09=09=09 NETIF_F_HW_VLAN_CTAG_RX | =09=09=09 NETIF_F_HW_VLAN_CTAG_FILTER; =20 -=09dev->hw_features |=3D NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; +=09dev->hw_features |=3D NETIF_F_GSO_ENCAP_ALL; =09dev->features |=3D dev->hw_features; =09dev->features |=3D NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX; } --=20 2.29.2