All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, mkubecek@suse.cz,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@idosch.org>, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net 3/5] bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
Date: Wed, 11 Dec 2024 09:18:57 +0000	[thread overview]
Message-ID: <Z1lZAT_lzl3G2v6V@fedora> (raw)
In-Reply-To: <20241210141245.327886-3-daniel@iogearbox.net>

On Tue, Dec 10, 2024 at 03:12:43PM +0100, Daniel Borkmann wrote:
> 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: a9b3ace44c7d ("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>
> ---
>  drivers/net/bonding/bond_main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 320dd71392ef..7b78c2bada81 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1534,6 +1534,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
>  
>  #define BOND_VLAN_FEATURES	(NETIF_F_HW_CSUM | NETIF_F_SG | \
>  				 NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \
> +				 NETIF_F_GSO_ENCAP_ALL | \
>  				 NETIF_F_HIGHDMA | NETIF_F_LRO)
>  
>  #define BOND_ENC_FEATURES	(NETIF_F_HW_CSUM | NETIF_F_SG | \
> -- 
> 2.43.0
> 
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>

  parent reply	other threads:[~2024-12-11  9:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 14:12 [PATCH net 1/5] net, team, bonding: Add netdev_base_features helper Daniel Borkmann
2024-12-10 14:12 ` [PATCH net 2/5] bonding: Fix initial {vlan,mpls}_feature set in bond_compute_features Daniel Borkmann
2024-12-11  7:44   ` Nikolay Aleksandrov
2024-12-11  9:09   ` Hangbin Liu
2024-12-10 14:12 ` [PATCH net 3/5] bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL Daniel Borkmann
2024-12-11  7:46   ` Nikolay Aleksandrov
2024-12-11  9:18   ` Hangbin Liu [this message]
2024-12-10 14:12 ` [PATCH net 4/5] team: Fix initial vlan_feature set in __team_compute_features Daniel Borkmann
2024-12-11  7:47   ` Nikolay Aleksandrov
2024-12-11  9:10   ` Hangbin Liu
2024-12-10 14:12 ` [PATCH net 5/5] team: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL Daniel Borkmann
2024-12-11  7:47   ` Nikolay Aleksandrov
2024-12-11  9:19   ` Hangbin Liu
2024-12-11  1:33 ` [PATCH net 1/5] net, team, bonding: Add netdev_base_features helper Hangbin Liu
2024-12-11  7:39 ` Nikolay Aleksandrov
2024-12-12 10:58 ` Paolo Abeni
2024-12-12 12:07   ` Daniel Borkmann
2024-12-12 11:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z1lZAT_lzl3G2v6V@fedora \
    --to=liuhangbin@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=idosch@idosch.org \
    --cc=jiri@nvidia.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=razor@blackwall.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.