Message ID | 20180514230747.118875-3-willemdebruijn.kernel@gmail.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | udp gso fixes | expand |
On Mon, May 14, 2018 at 7:07 PM, Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote: > From: Willem de Bruijn <willemb@google.com> > > Until the udp receive stack supports large packets (UDP GRO), GSO > packets must not loop from the egress to the ingress path. > > Revert the change that added NETIF_F_GSO_UDP_L4 to various virtual > devices through NETIF_F_GSO_ENCAP_ALL as this included devices that > may loop packets, such as veth and macvlan. > > Instead add it to specific devices that forward to another device's > egress path: bonding and team. > > Fixes: 83aa025f535f ("udp: add gso support to virtual devices") > CC: Alexander Duyck <alexander.duyck@gmail.com> > Signed-off-by: Willem de Bruijn <willemb@google.com> > --- > diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c > index 9dbd390ace34..c6a9f0cafea2 100644 > --- a/drivers/net/team/team.c > +++ b/drivers/net/team/team.c > @@ -1026,7 +1026,8 @@ static void __team_compute_features(struct team *team) > } > > team->dev->vlan_features = vlan_features; > - team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL; > + team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL | > + NETIF_GSO_UDP_L4; This has a typo. team.ko did not build automatically for me and caught it with a full compile just too late. Need to send a v2, sorry.
Hi Willem, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Willem-de-Bruijn/udp-gso-fixes/20180515-120246 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): drivers/net//team/team.c: In function '__team_compute_features': >> drivers/net//team/team.c:1030:10: error: 'NETIF_GSO_UDP_L4' undeclared (first use in this function); did you mean 'NETIF_F_GSO_UDP_L4'? NETIF_GSO_UDP_L4; ^~~~~~~~~~~~~~~~ NETIF_F_GSO_UDP_L4 drivers/net//team/team.c:1030:10: note: each undeclared identifier is reported only once for each function it appears in vim +1030 drivers/net//team/team.c 996 997 #define TEAM_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ 998 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ 999 NETIF_F_HIGHDMA | NETIF_F_LRO) 1000 1001 #define TEAM_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ 1002 NETIF_F_RXCSUM | NETIF_F_ALL_TSO) 1003 1004 static void __team_compute_features(struct team *team) 1005 { 1006 struct team_port *port; 1007 u32 vlan_features = TEAM_VLAN_FEATURES & NETIF_F_ALL_FOR_ALL; 1008 netdev_features_t enc_features = TEAM_ENC_FEATURES; 1009 unsigned short max_hard_header_len = ETH_HLEN; 1010 unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE | 1011 IFF_XMIT_DST_RELEASE_PERM; 1012 1013 list_for_each_entry(port, &team->port_list, list) { 1014 vlan_features = netdev_increment_features(vlan_features, 1015 port->dev->vlan_features, 1016 TEAM_VLAN_FEATURES); 1017 enc_features = 1018 netdev_increment_features(enc_features, 1019 port->dev->hw_enc_features, 1020 TEAM_ENC_FEATURES); 1021 1022 1023 dst_release_flag &= port->dev->priv_flags; 1024 if (port->dev->hard_header_len > max_hard_header_len) 1025 max_hard_header_len = port->dev->hard_header_len; 1026 } 1027 1028 team->dev->vlan_features = vlan_features; 1029 team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL | > 1030 NETIF_GSO_UDP_L4; 1031 team->dev->hard_header_len = max_hard_header_len; 1032 1033 team->dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 1034 if (dst_release_flag == (IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM)) 1035 team->dev->priv_flags |= IFF_XMIT_DST_RELEASE; 1036 } 1037 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4176e1d95f47..d7b58370ae77 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1107,7 +1107,8 @@ static void bond_compute_features(struct bonding *bond) done: bond_dev->vlan_features = vlan_features; - bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL; + bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL | + NETIF_F_GSO_UDP_L4; bond_dev->gso_max_segs = gso_max_segs; netif_set_gso_max_size(bond_dev, gso_max_size); @@ -4263,7 +4264,7 @@ void bond_setup(struct net_device *bond_dev) NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER; - bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL; + bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; bond_dev->features |= bond_dev->hw_features; } diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 9dbd390ace34..c6a9f0cafea2 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1026,7 +1026,8 @@ static void __team_compute_features(struct team *team) } team->dev->vlan_features = vlan_features; - team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL; + team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL | + NETIF_GSO_UDP_L4; team->dev->hard_header_len = max_hard_header_len; team->dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; @@ -2117,7 +2118,7 @@ static void team_setup(struct net_device *dev) NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER; - dev->hw_features |= NETIF_F_GSO_ENCAP_ALL; + dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; dev->features |= dev->hw_features; } diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index c87c3a3453c1..623bb8ced060 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -220,7 +220,6 @@ enum { NETIF_F_GSO_GRE_CSUM | \ NETIF_F_GSO_IPXIP4 | \ NETIF_F_GSO_IPXIP6 | \ - NETIF_F_GSO_UDP_L4 | \ NETIF_F_GSO_UDP_TUNNEL | \ NETIF_F_GSO_UDP_TUNNEL_CSUM)