Patch "net: ethtool: Fix RSS setting" has been added to the 6.9-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: ethtool: Fix RSS setting

to the 6.9-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-ethtool-fix-rss-setting.patch
and it can be found in the queue-6.9 subdirectory.

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



commit e3d57eb0862cf6ff18dd67bab11a41e01ab74a4c
Author: Saeed Mahameed <saeedm@xxxxxxxxxx>
Date:   Wed Jul 10 15:55:38 2024 -0700

    net: ethtool: Fix RSS setting
    
    [ Upstream commit 503757c809281a24d50ac2538401d3b1302b301c ]
    
    When user submits a rxfh set command without touching XFRM_SYM_XOR,
    rxfh.input_xfrm is set to RXH_XFRM_NO_CHANGE, which is equal to 0xff.
    
    Testing if (rxfh.input_xfrm & RXH_XFRM_SYM_XOR &&
                !ops->cap_rss_sym_xor_supported)
                    return -EOPNOTSUPP;
    
    Will always be true on devices that don't set cap_rss_sym_xor_supported,
    since rxfh.input_xfrm & RXH_XFRM_SYM_XOR is always true, if input_xfrm
    was not set, i.e RXH_XFRM_NO_CHANGE=0xff, which will result in failure
    of any command that doesn't require any change of XFRM, e.g RSS context
    or hash function changes.
    
    To avoid this breakage, test if rxfh.input_xfrm != RXH_XFRM_NO_CHANGE
    before testing other conditions. Note that the problem will only trigger
    with XFRM-aware userspace, old ethtool CLI would continue to work.
    
    Fixes: 0dd415d15505 ("net: ethtool: add a NO_CHANGE uAPI for new RXFH's input_xfrm")
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Reviewed-by: Ahmed Zaki <ahmed.zaki@xxxxxxxxx>
    Link: https://patch.msgid.link/20240710225538.43368-1-saeed@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index e645d751a5e89..223dcd25d88a2 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1306,7 +1306,8 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
 	if (rxfh.input_xfrm && rxfh.input_xfrm != RXH_XFRM_SYM_XOR &&
 	    rxfh.input_xfrm != RXH_XFRM_NO_CHANGE)
 		return -EINVAL;
-	if ((rxfh.input_xfrm & RXH_XFRM_SYM_XOR) &&
+	if (rxfh.input_xfrm != RXH_XFRM_NO_CHANGE &&
+	    (rxfh.input_xfrm & RXH_XFRM_SYM_XOR) &&
 	    !ops->cap_rss_sym_xor_supported)
 		return -EOPNOTSUPP;
 




[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