Patch "net/mlx5e: clear xdp features on non-uplink representors" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5e: clear xdp features on non-uplink representors

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5e-clear-xdp-features-on-non-uplink-represent.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8ee14b950591ff7d4e931637b9806296e4862ac5
Author: William Tu <witu@xxxxxxxxxx>
Date:   Thu Nov 7 20:35:25 2024 +0200

    net/mlx5e: clear xdp features on non-uplink representors
    
    [ Upstream commit c079389878debf767dc4e52fe877b9117258dfe2 ]
    
    Non-uplink representor port does not support XDP. The patch clears
    the xdp feature by checking the net_device_ops.ndo_bpf is set or not.
    
    Verify using the netlink tool:
    $ tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml --dump dev-get
    
    Representor netdev before the patch:
    {'ifindex': 8,
      'xdp-features': {'basic',
                       'ndo-xmit',
                       'ndo-xmit-sg',
                       'redirect',
                       'rx-sg',
                       'xsk-zerocopy'},
      'xdp-rx-metadata-features': set(),
      'xdp-zc-max-segs': 1,
      'xsk-features': set()},
    With the patch:
     {'ifindex': 8,
      'xdp-features': set(),
      'xdp-rx-metadata-features': set(),
      'xsk-features': set()},
    
    Fixes: 4d5ab0ad964d ("net/mlx5e: take into account device reconfiguration for xdp_features flag")
    Signed-off-by: William Tu <witu@xxxxxxxxxx>
    Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Link: https://patch.msgid.link/20241107183527.676877-6-tariqt@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index a65c407aa60bd..6e431f587c233 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4067,7 +4067,8 @@ void mlx5e_set_xdp_feature(struct net_device *netdev)
 	struct mlx5e_params *params = &priv->channels.params;
 	xdp_features_t val;
 
-	if (params->packet_merge.type != MLX5E_PACKET_MERGE_NONE) {
+	if (!netdev->netdev_ops->ndo_bpf ||
+	    params->packet_merge.type != MLX5E_PACKET_MERGE_NONE) {
 		xdp_clear_features_flag(netdev);
 		return;
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux