Patch "bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY" has been added to the 6.7-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

    bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY

to the 6.7-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:
     bonding-do-not-report-netdev_xdp_act_xsk_zerocopy.patch
and it can be found in the queue-6.7 subdirectory.

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



commit 4623e7948e1d88b126c46a57695cbb0b069016f3
Author: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>
Date:   Wed Feb 7 09:47:36 2024 +0100

    bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY
    
    [ Upstream commit 9b0ed890ac2ae233efd8b27d11aee28a19437bb8 ]
    
    Do not report the XDP capability NETDEV_XDP_ACT_XSK_ZEROCOPY as the
    bonding driver does not support XDP and AF_XDP in zero-copy mode even
    if the real NIC drivers do.
    
    Note that the driver used to report everything as supported before a
    device was bonded. Instead of just masking out the zero-copy support
    from this, have the driver report that no XDP feature is supported
    until a real device is bonded. This seems to be more truthful as it is
    the real drivers that decide what XDP features are supported.
    
    Fixes: cb9e6e584d58 ("bonding: add xdp_features support")
    Reported-by: Prashant Batra <prbatra.mail@xxxxxxxxx>
    Link: https://lore.kernel.org/all/CAJ8uoz2ieZCopgqTvQ9ZY6xQgTbujmC6XkMTamhp68O-h_-rLg@xxxxxxxxxxxxxx/T/
    Signed-off-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>
    Reviewed-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240207084737.20890-1-magnus.karlsson@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 8e6cc0e133b7..6cf7f364704e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1819,6 +1819,8 @@ void bond_xdp_set_features(struct net_device *bond_dev)
 	bond_for_each_slave(bond, slave, iter)
 		val &= slave->dev->xdp_features;
 
+	val &= ~NETDEV_XDP_ACT_XSK_ZEROCOPY;
+
 	xdp_set_features_flag(bond_dev, val);
 }
 
@@ -5934,9 +5936,6 @@ void bond_setup(struct net_device *bond_dev)
 	if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP)
 		bond_dev->features |= BOND_XFRM_FEATURES;
 #endif /* CONFIG_XFRM_OFFLOAD */
-
-	if (bond_xdp_check(bond))
-		bond_dev->xdp_features = NETDEV_XDP_ACT_MASK;
 }
 
 /* Destroy a bonding device.




[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