linux/drivers/net/bonding
Daniel Borkmann 77b11c8bf3 bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
Drivers like mlx5 expose NIC's vlan_features such as
NETIF_F_GSO_UDP_TUNNEL & NETIF_F_GSO_UDP_TUNNEL_CSUM which are
later not propagated when the underlying devices are bonded and
a vlan device created on top of the bond.

Right now, the more cumbersome workaround for this is to create
the vlan on top of the mlx5 and then enslave the vlan devices
to a bond.

To fix this, add NETIF_F_GSO_ENCAP_ALL to BOND_VLAN_FEATURES
such that bond_compute_features() can probe and propagate the
vlan_features from the slave devices up to the vlan device.

Given the following bond:

  # ethtool -i enp2s0f{0,1}np{0,1}
  driver: mlx5_core
  [...]

  # ethtool -k enp2s0f0np0 | grep udp
  tx-udp_tnl-segmentation: on
  tx-udp_tnl-csum-segmentation: on
  tx-udp-segmentation: on
  rx-udp_tunnel-port-offload: on
  rx-udp-gro-forwarding: off

  # ethtool -k enp2s0f1np1 | grep udp
  tx-udp_tnl-segmentation: on
  tx-udp_tnl-csum-segmentation: on
  tx-udp-segmentation: on
  rx-udp_tunnel-port-offload: on
  rx-udp-gro-forwarding: off

  # ethtool -k bond0 | grep udp
  tx-udp_tnl-segmentation: on
  tx-udp_tnl-csum-segmentation: on
  tx-udp-segmentation: on
  rx-udp_tunnel-port-offload: off [fixed]
  rx-udp-gro-forwarding: off

Before:

  # ethtool -k bond0.100 | grep udp
  tx-udp_tnl-segmentation: off [requested on]
  tx-udp_tnl-csum-segmentation: off [requested on]
  tx-udp-segmentation: on
  rx-udp_tunnel-port-offload: off [fixed]
  rx-udp-gro-forwarding: off

After:

  # ethtool -k bond0.100 | grep udp
  tx-udp_tnl-segmentation: on
  tx-udp_tnl-csum-segmentation: on
  tx-udp-segmentation: on
  rx-udp_tunnel-port-offload: off [fixed]
  rx-udp-gro-forwarding: off

Various users have run into this reporting performance issues when
configuring Cilium in vxlan tunneling mode and having the combination
of bond & vlan for the core devices connecting the Kubernetes cluster
to the outside world.

Fixes: a9b3ace44c ("bonding: fix vlan_features computing")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Nikolay Aleksandrov <razor@blackwall.org>
Cc: Ido Schimmel <idosch@idosch.org>
Cc: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20241210141245.327886-3-daniel@iogearbox.net
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-12-12 11:59:18 +01:00
..
bond_3ad.c bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner 2024-02-27 18:18:31 -08:00
bond_alb.c bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk 2023-11-21 12:06:50 +01:00
bond_debugfs.c bonding: remove redundant NULL check in debugfs function 2023-08-11 11:10:55 +01:00
bond_main.c bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL 2024-12-12 11:59:18 +01:00
bond_netlink.c bonding: no longer use RTNL in bonding_show_queue_id() 2024-04-09 17:31:45 -07:00
bond_options.c bonding: add ns target multicast address to slave device 2024-11-14 11:16:28 +01:00
bond_procfs.c bonding: no longer use RTNL in bonding_show_queue_id() 2024-04-09 17:31:45 -07:00
bond_sysfs_slave.c bonding: no longer use RTNL in bonding_show_queue_id() 2024-04-09 17:31:45 -07:00
bond_sysfs.c bonding: no longer use RTNL in bonding_show_queue_id() 2024-04-09 17:31:45 -07:00
bonding_priv.h net: bonding: Add SPDX identifier to remaining files 2023-05-16 15:38:06 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00