diff --git a/patches.suse/net-Fix-features-skip-in-for_each_netdev_feature.patch b/patches.suse/net-Fix-features-skip-in-for_each_netdev_feature.patch new file mode 100644 index 0000000..d94a741 --- /dev/null +++ b/patches.suse/net-Fix-features-skip-in-for_each_netdev_feature.patch @@ -0,0 +1,42 @@ +From: Tariq Toukan +Date: Wed, 4 May 2022 11:09:14 +0300 +Subject: net: Fix features skip in for_each_netdev_feature() +Git-commit: 85db6352fc8a158a893151baa1716463d34a20d0 +Patch-mainline: 5.18-rc7 +References: git-fixes + +The find_next_netdev_feature() macro gets the "remaining length", +not bit index. +Passing "bit - 1" for the following iteration is wrong as it skips +the adjacent bit. Pass "bit" instead. + +Fixes: 3b89ea9c5902 ("net: Fix for_each_netdev_feature on Big endian") +Signed-off-by: Tariq Toukan +Reviewed-by: Gal Pressman +Link: https://lore.kernel.org/r/20220504080914.1918-1-tariqt@nvidia.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Jiri Slaby +--- + include/linux/netdev_features.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/include/linux/netdev_features.h ++++ b/include/linux/netdev_features.h +@@ -169,7 +169,7 @@ enum { + #define NETIF_F_HW_HSR_FWD __NETIF_F(HW_HSR_FWD) + #define NETIF_F_HW_HSR_DUP __NETIF_F(HW_HSR_DUP) + +-/* Finds the next feature with the highest number of the range of start till 0. ++/* Finds the next feature with the highest number of the range of start-1 till 0. + */ + static inline int find_next_netdev_feature(u64 feature, unsigned long start) + { +@@ -188,7 +188,7 @@ static inline int find_next_netdev_featu + for ((bit) = find_next_netdev_feature((mask_addr), \ + NETDEV_FEATURE_COUNT); \ + (bit) >= 0; \ +- (bit) = find_next_netdev_feature((mask_addr), (bit) - 1)) ++ (bit) = find_next_netdev_feature((mask_addr), (bit))) + + /* Features valid for ethtool to change */ + /* = all defined minus driver/device-class-related */ diff --git a/series.conf b/series.conf index 3e2adbc..989eb4c 100644 --- a/series.conf +++ b/series.conf @@ -24667,6 +24667,7 @@ patches.suse/net-phy-micrel-Do-not-use-kszphy_suspend-resume-for-.patch patches.suse/net-phy-micrel-Pass-.probe-for-KS8737.patch patches.suse/selftests-add-ping-test-with-ping_group_range-tuned.patch + patches.suse/net-Fix-features-skip-in-for_each_netdev_feature.patch patches.suse/net-mscc-ocelot-fix-last-VCAP-IS1-IS2-filter-persist.patch patches.suse/net-mscc-ocelot-fix-VCAP-IS2-filters-matching-on-bot.patch patches.suse/net-mscc-ocelot-restrict-tc-trap-actions-to-VCAP-IS2.patch