Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8eea1ca8 authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller
Browse files

gso: limit udp gso to egress-only virtual devices



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: 83aa025f ("udp: add gso support to virtual devices")
CC: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ff06342c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);

@@ -4268,7 +4269,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;
}

+3 −2
Original line number Diff line number Diff line
@@ -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_F_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;
}

+0 −1
Original line number Diff line number Diff line
@@ -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)