From 01f98df46216ae93961aedf9b1122b1d0bd51c6a Mon Sep 17 00:00:00 2001 From: Denis Kirjanov Date: Jul 23 2020 10:31:09 +0000 Subject: Merge remote-tracking branch 'origin/SLE15-SP1' into SLE12-SP5 Conflicts: blacklist.conf --- diff --git a/blacklist.conf b/blacklist.conf index 781fbe7..5665bca 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -1172,7 +1172,8 @@ e9d38b08d7a68ede91280036a6657693387e2bcd # bt: revert in the stable tree, but fi 09fe1f8d7e2f461275b1cdd832f2cfa5e9be346d # would break kABI c3acd59014148470dc58519870fbc779785b4bf7 # depends on 09fe1f8d7e2f461275b1cdd832f2cfa5e9be346d 7746a8dfb3f9c91b3a0b63a1d5c2664410e6498d # depends on 09fe1f8d7e2f461275b1cdd832f2cfa5e9be346d -d5443bbf5fc8f8389cce146b1fc2987cdd229d12 # infrastructure, no bug fix +064c5d6881e897077639e04973de26440ee205e6 # not needed +d3669ca9ff33e1dc6414d1e34891d342e4544e71 # not applicable, just changes in comments 24512228b7a3f412b5a51f189df302616b021c33 # DISCONTIGMEM unsupported 0c97bf863efce63d6ab7971dad811601e6171d2f # compiler warning, gcc-9 4a60aa05a0634241ce17f957bf9fb5ac1eed6576 # not needed. We don't build with -ffunction-sections -fdata-sections. diff --git a/patches.kabi/net-mlx5-Add-command-entry-handling-completion.patch b/patches.kabi/net-mlx5-Add-command-entry-handling-completion.patch new file mode 100644 index 0000000..ec2a705 --- /dev/null +++ b/patches.kabi/net-mlx5-Add-command-entry-handling-completion.patch @@ -0,0 +1,30 @@ +From: Jiri Slaby +Subject: kABI: protect struct mlx5_cmd_work_ent +Patch-mainline: never, kabi +References: kabi + +In networking-stable-20_05_27, upstream commit +17d00e839d3b592da9659c1977d45f85b77f986a (net/mlx5: Add command entry +handling completion) added handling to struct mlx5_cmd_work_ent. It +made the kABI checker to complain. + +Given the structure is private to mlx5, hide the change from the kABI +checker. + +Signed-off-by: Jiri Slaby +--- + include/linux/mlx5/driver.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/linux/mlx5/driver.h ++++ b/include/linux/mlx5/driver.h +@@ -907,7 +907,9 @@ struct mlx5_cmd_work_ent { + struct delayed_work cb_timeout_work; + void *context; + int idx; ++#ifndef __GENKSYMS__ + struct completion handling; ++#endif + struct completion done; + struct mlx5_cmd *cmd; + struct work_struct work; diff --git a/patches.kabi/padata-reorder-work-kABI-fixup.patch b/patches.kabi/padata-reorder-work-kABI-fixup.patch new file mode 100644 index 0000000..e4713cd --- /dev/null +++ b/patches.kabi/padata-reorder-work-kABI-fixup.patch @@ -0,0 +1,32 @@ +From 4a33db745a742b398ce889529f3bca738b630924 Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Tue, 21 Jul 2020 16:42:58 +0200 +Subject: [PATCH] padata: reorder work kABI fixup +Patch-mainline: Never, kABI fixup +References: git-fixes + +Signed-off-by: Oliver Neukum +--- + include/linux/padata.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/linux/padata.h b/include/linux/padata.h +index 50704b5..daaa8a8 100644 +--- a/include/linux/padata.h ++++ b/include/linux/padata.h +@@ -94,9 +94,11 @@ struct padata_parallel_queue { + struct padata_list reorder; + struct parallel_data *pd; + struct work_struct work; +- struct work_struct reorder_work; + atomic_t num_obj; + int cpu_index; ++#ifndef __GENKSYMS__ ++ struct work_struct reorder_work; ++#endif + }; + + /** +-- +2.16.4 + diff --git a/patches.suse/0001-PM-genpd-Stop-start-devices-without-pm_runtime_force.patch b/patches.suse/0001-PM-genpd-Stop-start-devices-without-pm_runtime_force.patch index 0888cab..f8f39f8 100644 --- a/patches.suse/0001-PM-genpd-Stop-start-devices-without-pm_runtime_force.patch +++ b/patches.suse/0001-PM-genpd-Stop-start-devices-without-pm_runtime_force.patch @@ -120,16 +120,16 @@ Signed-off-by: Oliver Neukum --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -925,7 +925,8 @@ static int genpd_finish_suspend(struct d - if (ret) - return ret; + if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd)) + return 0; - if (genpd->dev_ops.stop && genpd->dev_ops.start) { + if (genpd->dev_ops.stop && genpd->dev_ops.start && + !pm_runtime_status_suspended(dev)) { ret = pm_runtime_force_suspend(dev); - if (ret) - return ret; -@@ -1012,7 +1013,8 @@ static int pm_genpd_freeze_noirq(struct + if (ret) { + if (poweroff) +@@ -1016,7 +1017,8 @@ static int pm_genpd_freeze_noirq(struct if (ret) return ret; @@ -139,7 +139,7 @@ Signed-off-by: Oliver Neukum ret = pm_runtime_force_suspend(dev); return ret; -@@ -1036,7 +1038,8 @@ static int pm_genpd_thaw_noirq(struct de +@@ -1040,7 +1042,8 @@ static int pm_genpd_thaw_noirq(struct de if (IS_ERR(genpd)) return -EINVAL; @@ -149,7 +149,7 @@ Signed-off-by: Oliver Neukum ret = pm_runtime_force_resume(dev); if (ret) return ret; -@@ -1094,8 +1097,9 @@ static int pm_genpd_restore_noirq(struct +@@ -1098,8 +1101,9 @@ static int pm_genpd_restore_noirq(struct genpd_sync_power_on(genpd, true, 0); genpd_unlock(genpd); diff --git a/patches.suse/0001-nfp-bpf-fix-ALU32-high-bits-clearance-bug.patch b/patches.suse/0001-nfp-bpf-fix-ALU32-high-bits-clearance-bug.patch index 8ad737b..b2cec9d 100644 --- a/patches.suse/0001-nfp-bpf-fix-ALU32-high-bits-clearance-bug.patch +++ b/patches.suse/0001-nfp-bpf-fix-ALU32-high-bits-clearance-bug.patch @@ -26,7 +26,7 @@ Acked-by: Denis Kirjanov --- a/drivers/net/ethernet/netronome/nfp/bpf/jit.c +++ b/drivers/net/ethernet/netronome/nfp/bpf/jit.c -@@ -756,15 +756,10 @@ wrp_alu64_reg(struct nfp_prog *nfp_prog, +@@ -1291,15 +1291,10 @@ wrp_alu64_reg(struct nfp_prog *nfp_prog, static int wrp_alu32_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta, @@ -43,16 +43,16 @@ Acked-by: Denis Kirjanov wrp_alu_imm(nfp_prog, insn->dst_reg * 2, alu_op, insn->imm); wrp_immed(nfp_prog, reg_both(insn->dst_reg * 2 + 1), 0); -@@ -1017,7 +1012,7 @@ static int xor_reg(struct nfp_prog *nfp_ +@@ -2309,7 +2304,7 @@ static int xor_reg(struct nfp_prog *nfp_ static int xor_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) { -- return wrp_alu32_imm(nfp_prog, meta, ALU_OP_XOR, !~meta->insn.imm); +- return wrp_alu32_imm(nfp_prog, meta, ALU_OP_XOR, !meta->insn.imm); + return wrp_alu32_imm(nfp_prog, meta, ALU_OP_XOR); } static int and_reg(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) -@@ -1027,7 +1022,7 @@ static int and_reg(struct nfp_prog *nfp_ +@@ -2319,7 +2314,7 @@ static int and_reg(struct nfp_prog *nfp_ static int and_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) { @@ -61,7 +61,7 @@ Acked-by: Denis Kirjanov } static int or_reg(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) -@@ -1037,7 +1032,7 @@ static int or_reg(struct nfp_prog *nfp_p +@@ -2329,7 +2324,7 @@ static int or_reg(struct nfp_prog *nfp_p static int or_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) { @@ -70,7 +70,7 @@ Acked-by: Denis Kirjanov } static int add_reg(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) -@@ -1047,7 +1042,7 @@ static int add_reg(struct nfp_prog *nfp_ +@@ -2339,7 +2334,7 @@ static int add_reg(struct nfp_prog *nfp_ static int add_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) { @@ -79,7 +79,7 @@ Acked-by: Denis Kirjanov } static int sub_reg(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) -@@ -1057,7 +1052,7 @@ static int sub_reg(struct nfp_prog *nfp_ +@@ -2349,7 +2344,7 @@ static int sub_reg(struct nfp_prog *nfp_ static int sub_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) { diff --git a/patches.suse/PM-Domains-Allow-genpd-users-to-specify-default-acti.patch b/patches.suse/PM-Domains-Allow-genpd-users-to-specify-default-acti.patch new file mode 100644 index 0000000..b9d917b --- /dev/null +++ b/patches.suse/PM-Domains-Allow-genpd-users-to-specify-default-acti.patch @@ -0,0 +1,66 @@ +From 95a20ef6f7e54c6a982715a7d0da2fd81790db28 Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Tue, 7 Nov 2017 13:48:11 +0100 +Subject: [PATCH] PM / Domains: Allow genpd users to specify default active + wakeup behavior +Git-commit: 95a20ef6f7e54c6a982715a7d0da2fd81790db28 +References: git-fixes +Patch-mainline: v4.15-rc1 + +It is quite common for PM Domains to require slave devices to be kept +active during system suspend if they are to be used as wakeup sources. +To enable this, currently each PM Domain or driver has to provide its +own gpd_dev_ops.active_wakeup() callback. + +Introduce a new flag GENPD_FLAG_ACTIVE_WAKEUP to consolidate this. +If specified, all slave devices configured as wakeup sources will be +kept active during system suspend. + +PM Domains that need more fine-grained controls, based on the slave +device, can still provide their own callbacks, as before. + +Signed-off-by: Geert Uytterhoeven +Acked-by: Ulf Hansson +Reviewed-by: Kevin Hilman +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Oliver Neukum +--- + drivers/base/power/domain.c | 3 +++ + include/linux/pm_domain.h | 7 ++++--- + 2 files changed, 7 insertions(+), 3 deletions(-) + +--- a/drivers/base/power/domain.c ++++ b/drivers/base/power/domain.c +@@ -124,6 +124,7 @@ static const struct genpd_lock_ops genpd + #define genpd_status_on(genpd) (genpd->status == GPD_STATE_ACTIVE) + #define genpd_is_irq_safe(genpd) (genpd->flags & GENPD_FLAG_IRQ_SAFE) + #define genpd_is_always_on(genpd) (genpd->flags & GENPD_FLAG_ALWAYS_ON) ++#define genpd_is_active_wakeup(genpd) (genpd->flags & GENPD_FLAG_ACTIVE_WAKEUP) + + static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev, + struct generic_pm_domain *genpd) +@@ -741,6 +742,8 @@ static bool pm_genpd_present(const struc + static bool genpd_dev_active_wakeup(struct generic_pm_domain *genpd, + struct device *dev) + { ++ if (genpd_is_active_wakeup(genpd)) ++ return true; + return GENPD_DEV_CALLBACK(genpd, bool, active_wakeup, dev); + } + +--- a/include/linux/pm_domain.h ++++ b/include/linux/pm_domain.h +@@ -18,9 +18,10 @@ + #include + + /* Defines used for the flags field in the struct generic_pm_domain */ +-#define GENPD_FLAG_PM_CLK (1U << 0) /* PM domain uses PM clk */ +-#define GENPD_FLAG_IRQ_SAFE (1U << 1) /* PM domain operates in atomic */ +-#define GENPD_FLAG_ALWAYS_ON (1U << 2) /* PM domain is always powered on */ ++#define GENPD_FLAG_PM_CLK (1U << 0) /* PM domain uses PM clk */ ++#define GENPD_FLAG_IRQ_SAFE (1U << 1) /* PM domain operates in atomic */ ++#define GENPD_FLAG_ALWAYS_ON (1U << 2) /* PM domain is always powered on */ ++#define GENPD_FLAG_ACTIVE_WAKEUP (1U << 3) /* Keep devices active if wakeup */ + + enum gpd_status { + GPD_STATE_ACTIVE = 0, /* PM domain is active */ diff --git a/patches.suse/PM-domains-Don-t-skip-driver-s-suspend-resume_noirq-.patch b/patches.suse/PM-domains-Don-t-skip-driver-s-suspend-resume_noirq-.patch new file mode 100644 index 0000000..d2e707f --- /dev/null +++ b/patches.suse/PM-domains-Don-t-skip-driver-s-suspend-resume_noirq-.patch @@ -0,0 +1,106 @@ +From a935424bb658f9ca37eb5e94119b857998341356 Mon Sep 17 00:00:00 2001 +From: Ulf Hansson +Date: Wed, 10 Jan 2018 21:31:56 +0100 +Subject: [PATCH] PM / domains: Don't skip driver's ->suspend|resume_noirq() + callbacks +Git-commit: a935424bb658f9ca37eb5e94119b857998341356 +References: git-fixes +Patch-mainline: v4.16-rc1 + +Commit 10da65423fdb (PM / Domains: Call driver's noirq callbacks) +started to respect driver's noirq callbacks, but while doing that it +also introduced a few potential problems. + +More precisely, in genpd_finish_suspend() and genpd_resume_noirq() +the noirq callbacks at the driver level should be invoked, no matter +of whether dev->power.wakeup_path is set or not. + +Additionally, the commit in question also made genpd_resume_noirq() +to ignore the return value from pm_runtime_force_resume(). + +Let's fix both these issues! + +Fixes: 10da65423fdb (PM / Domains: Call driver's noirq callbacks) +Signed-off-by: Ulf Hansson +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Oliver Neukum +--- + drivers/base/power/domain.c | 30 +++++++++++++++++------------- + 1 file changed, 17 insertions(+), 13 deletions(-) + +--- a/drivers/base/power/domain.c ++++ b/drivers/base/power/domain.c +@@ -909,15 +909,12 @@ static int pm_genpd_prepare(struct devic + static int genpd_finish_suspend(struct device *dev, bool poweroff) + { + struct generic_pm_domain *genpd; +- int ret; ++ int ret = 0; + + genpd = dev_to_genpd(dev); + if (IS_ERR(genpd)) + return -EINVAL; + +- if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)) +- return 0; +- + if (poweroff) + ret = pm_generic_poweroff_noirq(dev); + else +@@ -925,10 +922,18 @@ static int genpd_finish_suspend(struct d + if (ret) + return ret; + ++ if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd)) ++ return 0; ++ + if (genpd->dev_ops.stop && genpd->dev_ops.start) { + ret = pm_runtime_force_suspend(dev); +- if (ret) ++ if (ret) { ++ if (poweroff) ++ pm_generic_restore_noirq(dev); ++ else ++ pm_generic_resume_noirq(dev); + return ret; ++ } + } + + genpd_lock(genpd); +@@ -962,7 +967,7 @@ static int pm_genpd_suspend_noirq(struct + static int pm_genpd_resume_noirq(struct device *dev) + { + struct generic_pm_domain *genpd; +- int ret = 0; ++ int ret; + + dev_dbg(dev, "%s()\n", __func__); + +@@ -971,21 +976,20 @@ static int pm_genpd_resume_noirq(struct + return -EINVAL; + + if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)) +- return 0; ++ return pm_generic_resume_noirq(dev); + + genpd_lock(genpd); + genpd_sync_power_on(genpd, true, 0); + genpd->suspended_count--; + genpd_unlock(genpd); + +- if (genpd->dev_ops.stop && genpd->dev_ops.start) ++ if (genpd->dev_ops.stop && genpd->dev_ops.start) { + ret = pm_runtime_force_resume(dev); ++ if (ret) ++ return ret; ++ } + +- ret = pm_generic_resume_noirq(dev); +- if (ret) +- return ret; +- +- return ret; ++ return pm_generic_resume_noirq(dev); + } + + /** diff --git a/patches.suse/Revert-ipv6-add-mtu-lock-check-in-__ip6_rt_update_pm.patch b/patches.suse/Revert-ipv6-add-mtu-lock-check-in-__ip6_rt_update_pm.patch new file mode 100644 index 0000000..7d599a8 --- /dev/null +++ b/patches.suse/Revert-ipv6-add-mtu-lock-check-in-__ip6_rt_update_pm.patch @@ -0,0 +1,64 @@ +From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= +Date: Tue, 5 May 2020 11:57:23 -0700 +Subject: Revert "ipv6: add mtu lock check in __ip6_rt_update_pmtu" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 09454fd0a4ce23cb3d8af65066c91a1bf27120dd +Patch-mainline: 5.7-rc6 +References: networking-stable-20_05_16 + +This reverts commit 19bda36c4299ce3d7e5bce10bebe01764a655a6d: + +| ipv6: add mtu lock check in __ip6_rt_update_pmtu +| +| Prior to this patch, ipv6 didn't do mtu lock check in ip6_update_pmtu. +| It leaded to that mtu lock doesn't really work when receiving the pkt +| of ICMPV6_PKT_TOOBIG. +| +| This patch is to add mtu lock check in __ip6_rt_update_pmtu just as ipv4 +| did in __ip_rt_update_pmtu. + +The above reasoning is incorrect. IPv6 *requires* icmp based pmtu to work. +There's already a comment to this effect elsewhere in the kernel: + + $ git grep -p -B1 -A3 'RTAX_MTU lock' + net/ipv6/route.c=4813= + + static int rt6_mtu_change_route(struct fib6_info *f6i, void *p_arg) + ... + /* In IPv6 pmtu discovery is not optional, + so that RTAX_MTU lock cannot disable it. + We still use this lock to block changes + caused by addrconf/ndisc. + */ + +This reverts to the pre-4.9 behaviour. + +Cc: Eric Dumazet +Cc: Willem de Bruijn +Cc: Xin Long +Cc: Hannes Frederic Sowa +Signed-off-by: Maciej Żenczykowski +Fixes: 19bda36c4299 ("ipv6: add mtu lock check in __ip6_rt_update_pmtu") +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/ipv6/route.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/net/ipv6/route.c ++++ b/net/ipv6/route.c +@@ -1392,8 +1392,10 @@ static void __ip6_rt_update_pmtu(struct + const struct in6_addr *daddr, *saddr; + struct rt6_info *rt6 = (struct rt6_info *)dst; + +- if (dst_metric_locked(dst, RTAX_MTU)) +- return; ++ /* Note: do *NOT* check dst_metric_locked(dst, RTAX_MTU) ++ * IPv6 pmtu discovery isn't optional, so 'mtu lock' cannot disable it. ++ * [see also comment in rt6_mtu_change_route()] ++ */ + + if (iph) { + daddr = &iph->daddr; diff --git a/patches.suse/ax25-fix-setsockopt-SO_BINDTODEVICE.patch b/patches.suse/ax25-fix-setsockopt-SO_BINDTODEVICE.patch new file mode 100644 index 0000000..ed263a1 --- /dev/null +++ b/patches.suse/ax25-fix-setsockopt-SO_BINDTODEVICE.patch @@ -0,0 +1,70 @@ +From: Eric Dumazet +Date: Tue, 19 May 2020 18:24:43 -0700 +Subject: ax25: fix setsockopt(SO_BINDTODEVICE) +Git-commit: 687775cec056b38a4c8f3291e0dd7a9145f7b667 +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +syzbot was able to trigger this trace [1], probably by using +a zero optlen. + +While we are at it, cap optlen to IFNAMSIZ - 1 instead of IFNAMSIZ. + +[1] +BUG: KMSAN: uninit-value in strnlen+0xf9/0x170 lib/string.c:569 +CPU: 0 PID: 8807 Comm: syz-executor483 Not tainted 5.7.0-rc4-syzkaller #0 +Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 +Call Trace: + __dump_stack lib/dump_stack.c:77 [inline] + dump_stack+0x1c9/0x220 lib/dump_stack.c:118 + kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121 + __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 + strnlen+0xf9/0x170 lib/string.c:569 + dev_name_hash net/core/dev.c:207 [inline] + netdev_name_node_lookup net/core/dev.c:277 [inline] + __dev_get_by_name+0x75/0x2b0 net/core/dev.c:778 + ax25_setsockopt+0xfa3/0x1170 net/ax25/af_ax25.c:654 + __compat_sys_setsockopt+0x4ed/0x910 net/compat.c:403 + __do_compat_sys_setsockopt net/compat.c:413 [inline] + __se_compat_sys_setsockopt+0xdd/0x100 net/compat.c:410 + __ia32_compat_sys_setsockopt+0x62/0x80 net/compat.c:410 + do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline] + do_fast_syscall_32+0x3bf/0x6d0 arch/x86/entry/common.c:398 + entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139 +RIP: 0023:0xf7f57dd9 +Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 +RSP: 002b:00000000ffae8c1c EFLAGS: 00000217 ORIG_RAX: 000000000000016e +RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000101 +RDX: 0000000000000019 RSI: 0000000020000000 RDI: 0000000000000004 +RBP: 0000000000000012 R08: 0000000000000000 R09: 0000000000000000 +R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 +R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 + +Local variable ----devname@ax25_setsockopt created at: + ax25_setsockopt+0xe6/0x1170 net/ax25/af_ax25.c:536 + ax25_setsockopt+0xe6/0x1170 net/ax25/af_ax25.c:536 + +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Signed-off-by: Eric Dumazet +Reported-by: syzbot +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/ax25/af_ax25.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/net/ax25/af_ax25.c ++++ b/net/ax25/af_ax25.c +@@ -639,8 +639,10 @@ static int ax25_setsockopt(struct socket + break; + + case SO_BINDTODEVICE: +- if (optlen > IFNAMSIZ) +- optlen = IFNAMSIZ; ++ if (optlen > IFNAMSIZ - 1) ++ optlen = IFNAMSIZ - 1; ++ ++ memset(devname, 0, sizeof(devname)); + + if (copy_from_user(devname, optval, optlen)) { + res = -EFAULT; diff --git a/patches.suse/be2net-fix-link-failure-after-ethtool-offline-test.patch b/patches.suse/be2net-fix-link-failure-after-ethtool-offline-test.patch new file mode 100644 index 0000000..ce5e6a7 --- /dev/null +++ b/patches.suse/be2net-fix-link-failure-after-ethtool-offline-test.patch @@ -0,0 +1,76 @@ +From: Petr Oros +Date: Wed, 19 Jun 2019 14:29:42 +0200 +Subject: be2net: fix link failure after ethtool offline test +Patch-mainline: v5.2-rc7 +Git-commit: 2e5db6eb3c23e5dc8171eb8f6af7a97ef9fcf3a9 +References: git-fixes + +Certain cards in conjunction with certain switches need a little more +time for link setup that results in ethtool link test failure after +offline test. Patch adds a loop that waits for a link setup finish. + +Changes in v2: +- added fixes header + +Fixes: 4276e47e2d1c ("be2net: Add link test to list of ethtool self tests.") +Signed-off-by: Petr Oros +Reviewed-by: Ivan Vecera +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/emulex/benet/be_ethtool.c | 28 +++++++++++++++++++------ + 1 file changed, 22 insertions(+), 6 deletions(-) + +--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c ++++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c +@@ -895,7 +895,7 @@ static void be_self_test(struct net_devi + u64 *data) + { + struct be_adapter *adapter = netdev_priv(netdev); +- int status; ++ int status, cnt; + u8 link_status = 0; + + if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC) { +@@ -906,6 +906,9 @@ static void be_self_test(struct net_devi + + memset(data, 0, sizeof(u64) * ETHTOOL_TESTS_NUM); + ++ /* check link status before offline tests */ ++ link_status = netif_carrier_ok(netdev); ++ + if (test->flags & ETH_TEST_FL_OFFLINE) { + if (be_loopback_test(adapter, BE_MAC_LOOPBACK, &data[0]) != 0) + test->flags |= ETH_TEST_FL_FAILED; +@@ -926,13 +929,26 @@ static void be_self_test(struct net_devi + test->flags |= ETH_TEST_FL_FAILED; + } + +- status = be_cmd_link_status_query(adapter, NULL, &link_status, 0); +- if (status) { +- test->flags |= ETH_TEST_FL_FAILED; +- data[4] = -1; +- } else if (!link_status) { ++ /* link status was down prior to test */ ++ if (!link_status) { + test->flags |= ETH_TEST_FL_FAILED; + data[4] = 1; ++ return; ++ } ++ ++ for (cnt = 10; cnt; cnt--) { ++ status = be_cmd_link_status_query(adapter, NULL, &link_status, ++ 0); ++ if (status) { ++ test->flags |= ETH_TEST_FL_FAILED; ++ data[4] = -1; ++ break; ++ } ++ ++ if (link_status) ++ break; ++ ++ msleep_interruptible(500); + } + } + diff --git a/patches.suse/bnxt_en-Fix-AER-reset-logic-on-57500-chips.patch b/patches.suse/bnxt_en-Fix-AER-reset-logic-on-57500-chips.patch new file mode 100644 index 0000000..4df09fb --- /dev/null +++ b/patches.suse/bnxt_en-Fix-AER-reset-logic-on-57500-chips.patch @@ -0,0 +1,46 @@ +From: Michael Chan +Date: Sun, 14 Jun 2020 19:57:09 -0400 +Subject: bnxt_en: Fix AER reset logic on 57500 chips. +Git-commit: 6e2f83884c099de0e87b15a820736e522755d074 +Patch-mainline: 5.8-rc2 +References: git-fixes + +AER reset should follow the same steps as suspend/resume. We need to +free context memory during AER reset and allocate new context memory +during recovery by calling bnxt_hwrm_func_qcaps(). We also need +to call bnxt_reenable_sriov() to restore the VFs. + +[js] the context is different in 4.12 esp. due to aa46dffff. + Also the firmware reset path (bnxt_reenable_sriov) does not exist + yet. + +Fixes: bae361c54fb6 ("bnxt_en: Improve AER slot reset.") +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c +@@ -10816,6 +10816,9 @@ static pci_ers_result_t bnxt_io_error_de + bnxt_close(netdev); + + pci_disable_device(pdev); ++ bnxt_free_ctx_mem(bp); ++ kfree(bp->ctx); ++ bp->ctx = NULL; + rtnl_unlock(); + + /* Request a slot slot reset. */ +@@ -10849,6 +10852,9 @@ static pci_ers_result_t bnxt_io_slot_res + pci_set_master(pdev); + + err = bnxt_hwrm_func_reset(bp); ++ if (!err) ++ err = bnxt_hwrm_func_qcaps(bp); ++ + if (!err && netif_running(netdev)) + err = bnxt_open(netdev); + diff --git a/patches.suse/bnxt_en-Fix-VF-anti-spoof-filter-setup.patch b/patches.suse/bnxt_en-Fix-VF-anti-spoof-filter-setup.patch new file mode 100644 index 0000000..132c273 --- /dev/null +++ b/patches.suse/bnxt_en-Fix-VF-anti-spoof-filter-setup.patch @@ -0,0 +1,86 @@ +From: Michael Chan +Date: Sun, 26 Apr 2020 16:24:38 -0400 +Subject: bnxt_en: Fix VF anti-spoof filter setup. +Git-commit: c71c4e49afe173823a2a85b0cabc9b3f1176ffa2 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +Fix the logic that sets the enable/disable flag for the source MAC +filter according to firmware spec 1.7.1. + +In the original firmware spec. before 1.7.1, the VF spoof check flags +were not latched after making the HWRM_FUNC_CFG call, so there was a +need to keep the func_flags so that subsequent calls would perserve +the VF spoof check setting. A change was made in the 1.7.1 spec +so that the flags became latched. So we now set or clear the anti- +spoof setting directly without retrieving the old settings in the +stored vf->func_flags which are no longer valid. We also remove the +unneeded vf->func_flags. + +Fixes: 8eb992e876a8 ("bnxt_en: Update firmware interface spec to 1.7.6.2.") +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 - + drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 9 ++------- + 2 files changed, 2 insertions(+), 8 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h +@@ -954,7 +954,6 @@ struct bnxt_vf_info { + #define BNXT_VF_LINK_FORCED 0x4 + #define BNXT_VF_LINK_UP 0x8 + #define BNXT_VF_TRUST 0x10 +- u32 func_flags; /* func cfg flags */ + u32 min_tx_rate; + u32 max_tx_rate; + void *hwrm_cmd_req_addr; +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +@@ -99,11 +99,10 @@ int bnxt_set_vf_spoofchk(struct net_devi + if (old_setting == setting) + return 0; + +- func_flags = vf->func_flags; + if (setting) +- func_flags |= FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE; ++ func_flags = FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE; + else +- func_flags |= FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE; ++ func_flags = FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE; + /*TODO: if the driver supports VLAN filter on guest VLAN, + * the spoof check should also include vlan anti-spoofing + */ +@@ -112,7 +111,6 @@ int bnxt_set_vf_spoofchk(struct net_devi + req.flags = cpu_to_le32(func_flags); + rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); + if (!rc) { +- vf->func_flags = func_flags; + if (setting) + vf->flags |= BNXT_VF_SPOOFCHK; + else +@@ -197,7 +195,6 @@ int bnxt_set_vf_mac(struct net_device *d + memcpy(vf->mac_addr, mac, ETH_ALEN); + bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); + req.fid = cpu_to_le16(vf->fw_fid); +- req.flags = cpu_to_le32(vf->func_flags); + req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR); + memcpy(req.dflt_mac_addr, mac, ETH_ALEN); + return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); +@@ -235,7 +232,6 @@ int bnxt_set_vf_vlan(struct net_device * + + bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); + req.fid = cpu_to_le16(vf->fw_fid); +- req.flags = cpu_to_le32(vf->func_flags); + req.dflt_vlan = cpu_to_le16(vlan_tag); + req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_VLAN); + rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); +@@ -274,7 +270,6 @@ int bnxt_set_vf_bw(struct net_device *de + return 0; + bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); + req.fid = cpu_to_le16(vf->fw_fid); +- req.flags = cpu_to_le32(vf->func_flags); + req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_MAX_BW); + req.max_bw = cpu_to_le32(max_tx_rate); + req.enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_MIN_BW); diff --git a/patches.suse/bnxt_en-Fix-VLAN-acceleration-handling-in-bnxt_fix_f.patch b/patches.suse/bnxt_en-Fix-VLAN-acceleration-handling-in-bnxt_fix_f.patch new file mode 100644 index 0000000..c37886f --- /dev/null +++ b/patches.suse/bnxt_en-Fix-VLAN-acceleration-handling-in-bnxt_fix_f.patch @@ -0,0 +1,49 @@ +From: Michael Chan +Date: Sun, 26 Apr 2020 16:24:42 -0400 +Subject: bnxt_en: Fix VLAN acceleration handling in bnxt_fix_features(). +Git-commit: c72cb303aa6c2ae7e4184f0081c6d11bf03fb96b +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +The current logic in bnxt_fix_features() will inadvertently turn on both +CTAG and STAG VLAN offload if the user tries to disable both. Fix it +by checking that the user is trying to enable CTAG or STAG before +enabling both. The logic is supposed to enable or disable both CTAG and +STAG together. + +Fixes: 5a9f6b238e59 ("bnxt_en: Enable and disable RX CTAG and RX STAG VLAN acceleration together.") +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c +@@ -9028,6 +9028,7 @@ static netdev_features_t bnxt_fix_featur + netdev_features_t features) + { + struct bnxt *bp = netdev_priv(dev); ++ netdev_features_t vlan_features; + + if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp)) + features &= ~NETIF_F_NTUPLE; +@@ -9044,12 +9045,14 @@ static netdev_features_t bnxt_fix_featur + /* Both CTAG and STAG VLAN accelaration on the RX side have to be + * turned on or off together. + */ +- if ((features & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX)) != +- (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX)) { ++ vlan_features = features & (NETIF_F_HW_VLAN_CTAG_RX | ++ NETIF_F_HW_VLAN_STAG_RX); ++ if (vlan_features != (NETIF_F_HW_VLAN_CTAG_RX | ++ NETIF_F_HW_VLAN_STAG_RX)) { + if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) + features &= ~(NETIF_F_HW_VLAN_CTAG_RX | + NETIF_F_HW_VLAN_STAG_RX); +- else ++ else if (vlan_features) + features |= NETIF_F_HW_VLAN_CTAG_RX | + NETIF_F_HW_VLAN_STAG_RX; + } diff --git a/patches.suse/bnxt_en-Fix-ethtool-selftest-crash-under-error-condi.patch b/patches.suse/bnxt_en-Fix-ethtool-selftest-crash-under-error-condi.patch new file mode 100644 index 0000000..8078023 --- /dev/null +++ b/patches.suse/bnxt_en-Fix-ethtool-selftest-crash-under-error-condi.patch @@ -0,0 +1,44 @@ +From: Michael Chan +Date: Sat, 29 Jun 2019 11:16:45 -0400 +Subject: bnxt_en: Fix ethtool selftest crash under error conditions. +Patch-mainline: v5.3-rc1 +Git-commit: d27e2ca1166aefd54d9c48fb6647dee8115a5dfc +References: git-fixes + +After ethtool loopback packet tests, we re-open the nic for the next +IRQ test. If the open fails, we must not proceed with the IRQ test +or we will crash with NULL pointer dereference. Fix it by checking +the bnxt_open_nic() return code before proceeding. + +Reported-by: Somasundaram Krishnasamy +Fixes: 67fea463fd87 ("bnxt_en: Add interrupt test to ethtool -t selftest.") +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +@@ -2803,7 +2803,7 @@ static void bnxt_self_test(struct net_de + bool offline = false; + u8 test_results = 0; + u8 test_mask = 0; +- int rc, i; ++ int rc = 0, i; + + if (!bp->num_tests || !BNXT_SINGLE_PF(bp)) + return; +@@ -2874,9 +2874,9 @@ static void bnxt_self_test(struct net_de + } + bnxt_hwrm_phy_loopback(bp, false, false); + bnxt_half_close_nic(bp); +- bnxt_open_nic(bp, false, true); ++ rc = bnxt_open_nic(bp, false, true); + } +- if (bnxt_test_irq(bp)) { ++ if (rc || bnxt_test_irq(bp)) { + buf[BNXT_IRQ_TEST_IDX] = 1; + etest->flags |= ETH_TEST_FL_FAILED; + } diff --git a/patches.suse/bnxt_en-Fix-handling-FRAG_ERR-when-NVM_INSTALL_UPDAT.patch b/patches.suse/bnxt_en-Fix-handling-FRAG_ERR-when-NVM_INSTALL_UPDAT.patch new file mode 100644 index 0000000..923d28d --- /dev/null +++ b/patches.suse/bnxt_en-Fix-handling-FRAG_ERR-when-NVM_INSTALL_UPDAT.patch @@ -0,0 +1,50 @@ +From: Vasundhara Volam +Date: Sat, 17 Aug 2019 17:04:49 -0400 +Subject: bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails +Patch-mainline: v5.3-rc6 +Git-commit: dd2ebf3404c7c295014bc025dea23960960ceb1a +References: git-fixes + +If FW returns FRAG_ERR in response error code, driver is resending the +command only when HWRM command returns success. Fix the code to resend +NVM_INSTALL_UPDATE command with DEFRAG install flags, if FW returns +FRAG_ERR in its response error code. + +Fixes: cb4d1d626145 ("bnxt_en: Retry failed NVM_INSTALL_UPDATE with defragmentation flag enabled.") +Signed-off-by: Vasundhara Volam +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +@@ -1977,21 +1977,19 @@ static int bnxt_flash_package_from_file( + mutex_lock(&bp->hwrm_cmd_lock); + hwrm_err = _hwrm_send_message(bp, &install, sizeof(install), + INSTALL_PACKAGE_TIMEOUT); +- if (hwrm_err) +- goto flash_pkg_exit; +- +- if (resp->error_code) { ++ if (hwrm_err) { + u8 error_code = ((struct hwrm_err_output *)resp)->cmd_err; + +- if (error_code == NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) { ++ if (resp->error_code && error_code == ++ NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) { + install.flags |= cpu_to_le16( + NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG); + hwrm_err = _hwrm_send_message(bp, &install, + sizeof(install), + INSTALL_PACKAGE_TIMEOUT); +- if (hwrm_err) +- goto flash_pkg_exit; + } ++ if (hwrm_err) ++ goto flash_pkg_exit; + } + + if (resp->result) { diff --git a/patches.suse/bnxt_en-Fix-ipv6-RFS-filter-matching-logic.patch b/patches.suse/bnxt_en-Fix-ipv6-RFS-filter-matching-logic.patch new file mode 100644 index 0000000..84f12a1 --- /dev/null +++ b/patches.suse/bnxt_en-Fix-ipv6-RFS-filter-matching-logic.patch @@ -0,0 +1,50 @@ +From: Michael Chan +Date: Fri, 17 Jan 2020 00:32:46 -0500 +Subject: bnxt_en: Fix ipv6 RFS filter matching logic. +Patch-mainline: v5.5-rc7 +Git-commit: 6fc7caa84e713f7627e171ab1e7c4b5be0dc9b3d +References: git-fixes + +Fix bnxt_fltr_match() to match ipv6 source and destination addresses. +The function currently only checks ipv4 addresses and will not work +corrently on ipv6 filters. + +Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c +@@ -9752,11 +9752,23 @@ static bool bnxt_fltr_match(struct bnxt_ + struct flow_keys *keys1 = &f1->fkeys; + struct flow_keys *keys2 = &f2->fkeys; + +- if (keys1->addrs.v4addrs.src == keys2->addrs.v4addrs.src && +- keys1->addrs.v4addrs.dst == keys2->addrs.v4addrs.dst && +- keys1->ports.ports == keys2->ports.ports && +- keys1->basic.ip_proto == keys2->basic.ip_proto && +- keys1->basic.n_proto == keys2->basic.n_proto && ++ if (keys1->basic.n_proto != keys2->basic.n_proto || ++ keys1->basic.ip_proto != keys2->basic.ip_proto) ++ return false; ++ ++ if (keys1->basic.n_proto == htons(ETH_P_IP)) { ++ if (keys1->addrs.v4addrs.src != keys2->addrs.v4addrs.src || ++ keys1->addrs.v4addrs.dst != keys2->addrs.v4addrs.dst) ++ return false; ++ } else { ++ if (memcmp(&keys1->addrs.v6addrs.src, &keys2->addrs.v6addrs.src, ++ sizeof(keys1->addrs.v6addrs.src)) || ++ memcmp(&keys1->addrs.v6addrs.dst, &keys2->addrs.v6addrs.dst, ++ sizeof(keys1->addrs.v6addrs.dst))) ++ return false; ++ } ++ ++ if (keys1->ports.ports == keys2->ports.ports && + keys1->control.flags == keys2->control.flags && + ether_addr_equal(f1->src_mac_addr, f2->src_mac_addr) && + ether_addr_equal(f1->dst_mac_addr, f2->dst_mac_addr)) diff --git a/patches.suse/bnxt_en-Improve-AER-slot-reset.patch b/patches.suse/bnxt_en-Improve-AER-slot-reset.patch new file mode 100644 index 0000000..028c157 --- /dev/null +++ b/patches.suse/bnxt_en-Improve-AER-slot-reset.patch @@ -0,0 +1,44 @@ +From: Michael Chan +Date: Sun, 26 Apr 2020 16:24:40 -0400 +Subject: bnxt_en: Improve AER slot reset. +Git-commit: bae361c54fb6ac6eba3b4762f49ce14beb73ef13 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +Improve the slot reset sequence by disabling the device to prevent bad +DMAs if slot reset fails. Return the proper result instead of always +PCI_ERS_RESULT_RECOVERED to the caller. + +Fixes: 6316ea6db93d ("bnxt_en: Enable AER support.") +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c +@@ -10855,8 +10855,11 @@ static pci_ers_result_t bnxt_io_slot_res + } + } + +- if (result != PCI_ERS_RESULT_RECOVERED && netif_running(netdev)) +- dev_close(netdev); ++ if (result != PCI_ERS_RESULT_RECOVERED) { ++ if (netif_running(netdev)) ++ dev_close(netdev); ++ pci_disable_device(pdev); ++ } + + rtnl_unlock(); + +@@ -10867,7 +10870,7 @@ static pci_ers_result_t bnxt_io_slot_res + err); /* non-fatal, continue */ + } + +- return PCI_ERS_RESULT_RECOVERED; ++ return result; + } + + /** diff --git a/patches.suse/bnxt_en-fix-NULL-dereference-in-case-SR-IOV-configur.patch b/patches.suse/bnxt_en-fix-NULL-dereference-in-case-SR-IOV-configur.patch new file mode 100644 index 0000000..b21b4bd --- /dev/null +++ b/patches.suse/bnxt_en-fix-NULL-dereference-in-case-SR-IOV-configur.patch @@ -0,0 +1,86 @@ +From: Davide Caratti +Date: Fri, 10 Jul 2020 12:55:08 +0200 +Subject: bnxt_en: fix NULL dereference in case SR-IOV configuration fails +Patch-mainline: v5.8-rc5 +Git-commit: c8b1d7436045d3599bae56aef1682813ecccaad7 +References: git-fixes + +we need to set 'active_vfs' back to 0, if something goes wrong during the +allocation of SR-IOV resources: otherwise, further VF configurations will +wrongly assume that bp->pf.vf[x] are valid memory locations, and commands +like the ones in the following sequence: + + # echo 2 >/sys/bus/pci/devices/${ADDR}/sriov_numvfs + # ip link set dev ens1f0np0 up + # ip link set dev ens1f0np0 vf 0 trust on + +will cause a kernel crash similar to this: + + bnxt_en 0000:3b:00.0: not enough MMIO resources for SR-IOV + BUG: kernel NULL pointer dereference, address: 0000000000000014 + #PF: supervisor read access in kernel mode + #PF: error_code(0x0000) - not-present page + PGD 0 P4D 0 + Oops: 0000 [#1] SMP PTI + CPU: 43 PID: 2059 Comm: ip Tainted: G I 5.8.0-rc2.upstream+ #871 + Hardware name: Dell Inc. PowerEdge R740/08D89F, BIOS 2.2.11 06/13/2019 + RIP: 0010:bnxt_set_vf_trust+0x5b/0x110 [bnxt_en] + Code: 44 24 58 31 c0 e8 f5 fb ff ff 85 c0 0f 85 b6 00 00 00 48 8d 1c 5b 41 89 c6 b9 0b 00 00 00 48 c1 e3 04 49 03 9c 24 f0 0e 00 00 <8b> 43 14 89 c2 83 c8 10 83 e2 ef 45 84 ed 49 89 e5 0f 44 c2 4c 89 + RSP: 0018:ffffac6246a1f570 EFLAGS: 00010246 + RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000000b + RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff98b28f538900 + RBP: ffff98b28f538900 R08: 0000000000000000 R09: 0000000000000008 + R10: ffffffffb9515be0 R11: ffffac6246a1f678 R12: ffff98b28f538000 + R13: 0000000000000001 R14: 0000000000000000 R15: ffffffffc05451e0 + FS: 00007fde0f688800(0000) GS:ffff98baffd40000(0000) knlGS:0000000000000000 + CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 + CR2: 0000000000000014 CR3: 000000104bb0a003 CR4: 00000000007606e0 + DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 + DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 + PKRU: 55555554 + Call Trace: + do_setlink+0x994/0xfe0 + __rtnl_newlink+0x544/0x8d0 + rtnl_newlink+0x47/0x70 + rtnetlink_rcv_msg+0x29f/0x350 + netlink_rcv_skb+0x4a/0x110 + netlink_unicast+0x21d/0x300 + netlink_sendmsg+0x329/0x450 + sock_sendmsg+0x5b/0x60 + ____sys_sendmsg+0x204/0x280 + ___sys_sendmsg+0x88/0xd0 + __sys_sendmsg+0x5e/0xa0 + do_syscall_64+0x47/0x80 + entry_SYSCALL_64_after_hwframe+0x44/0xa9 + +Fixes: c0c050c58d840 ("bnxt_en: New Broadcom ethernet driver.") +Reported-by: Fei Liu +CC: Jonathan Toppins +CC: Michael Chan +Signed-off-by: Davide Caratti +Reviewed-by: Michael Chan +Acked-by: Jonathan Toppins +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +@@ -365,6 +365,7 @@ static void bnxt_free_vf_resources(struc + } + } + ++ bp->pf.active_vfs = 0; + kfree(bp->pf.vf); + bp->pf.vf = NULL; + } +@@ -758,7 +759,6 @@ void bnxt_sriov_disable(struct bnxt *bp) + + bnxt_free_vf_resources(bp); + +- bp->pf.active_vfs = 0; + /* Reclaim all resources for the PF. */ + rtnl_lock(); + bnxt_restore_pf_fw_resources(bp); diff --git a/patches.suse/dpaa_eth-fix-usage-as-DSA-master-try-3.patch b/patches.suse/dpaa_eth-fix-usage-as-DSA-master-try-3.patch new file mode 100644 index 0000000..e2d5964 --- /dev/null +++ b/patches.suse/dpaa_eth-fix-usage-as-DSA-master-try-3.patch @@ -0,0 +1,71 @@ +From: Vladimir Oltean +Date: Mon, 25 May 2020 00:22:51 +0300 +Subject: dpaa_eth: fix usage as DSA master, try 3 +Git-commit: 5d14c304bfc14b4fd052dc83d5224376b48f52f0 +Patch-mainline: 5.7 +References: networking-stable-20_05_27 + +The dpaa-eth driver probes on compatible string for the MAC node, and +the fman/mac.c driver allocates a dpaa-ethernet platform device that +triggers the probing of the dpaa-eth net device driver. + +All of this is fine, but the problem is that the struct device of the +dpaa_eth net_device is 2 parents away from the MAC which can be +referenced via of_node. So of_find_net_device_by_node can't find it, and +DSA switches won't be able to probe on top of FMan ports. + +It would be a bit silly to modify a core function +(of_find_net_device_by_node) to look for dev->parent->parent->of_node +just for one driver. We're just 1 step away from implementing full +recursion. + +Actually there have already been at least 2 previous attempts to make +this work: +- Commit a1a50c8e4c24 ("fsl/man: Inherit parent device and of_node") +- One or more of the patches in "[v3,0/6] adapt DPAA drivers for DSA": + https://patchwork.ozlabs.org/project/netdev/cover/1508178970-28945-1-git-send-email-madalin.bucur@nxp.com/ + (I couldn't really figure out which one was supposed to solve the + problem and how). + +Point being, it looks like this is still pretty much a problem today. +On T1040, the /sys/class/net/eth0 symlink currently points to + +../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/dpaa-ethernet.0/net/eth0 + +which pretty much illustrates the problem. The closest of_node we've got +is the "fsl,fman-memac" at /soc@ffe000000/fman@400000/ethernet@e6000, +which is what we'd like to be able to reference from DSA as host port. + +For of_find_net_device_by_node to find the eth0 port, we would need the +parent of the eth0 net_device to not be the "dpaa-ethernet" platform +device, but to point 1 level higher, aka the "fsl,fman-memac" node +directly. The new sysfs path would look like this: + +../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/net/eth0 + +And this is exactly what SET_NETDEV_DEV does. It sets the parent of the +net_device. The new parent has an of_node associated with it, and +of_dev_node_match already checks for the of_node of the device or of its +parent. + +Fixes: a1a50c8e4c24 ("fsl/man: Inherit parent device and of_node") +Fixes: c6e26ea8c893 ("dpaa_eth: change device used") +Signed-off-by: Vladimir Oltean +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c ++++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +@@ -2783,7 +2783,7 @@ static int dpaa_eth_probe(struct platfor + } + + /* Do this here, so we can be verbose early */ +- SET_NETDEV_DEV(net_dev, dev); ++ SET_NETDEV_DEV(net_dev, dev->parent); + dev_set_drvdata(dev, net_dev); + + priv = netdev_priv(net_dev); diff --git a/patches.suse/fq_codel-fix-TCA_FQ_CODEL_DROP_BATCH_SIZE-sanity-che.patch b/patches.suse/fq_codel-fix-TCA_FQ_CODEL_DROP_BATCH_SIZE-sanity-che.patch new file mode 100644 index 0000000..937803c --- /dev/null +++ b/patches.suse/fq_codel-fix-TCA_FQ_CODEL_DROP_BATCH_SIZE-sanity-che.patch @@ -0,0 +1,33 @@ +From: Eric Dumazet +Date: Sat, 25 Apr 2020 12:40:25 -0700 +Subject: fq_codel: fix TCA_FQ_CODEL_DROP_BATCH_SIZE sanity checks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 14695212d4cd8b0c997f6121b6df8520038ce076 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +My intent was to not let users set a zero drop_batch_size, +it seems I once again messed with min()/max(). + +Fixes: 9d18562a2278 ("fq_codel: add batch ability to fq_codel_drop()") +Signed-off-by: Eric Dumazet +Acked-by: Toke Høiland-Jørgensen +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/sched/sch_fq_codel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/sched/sch_fq_codel.c ++++ b/net/sched/sch_fq_codel.c +@@ -429,7 +429,7 @@ static int fq_codel_change(struct Qdisc + q->quantum = max(256U, nla_get_u32(tb[TCA_FQ_CODEL_QUANTUM])); + + if (tb[TCA_FQ_CODEL_DROP_BATCH_SIZE]) +- q->drop_batch_size = min(1U, nla_get_u32(tb[TCA_FQ_CODEL_DROP_BATCH_SIZE])); ++ q->drop_batch_size = max(1U, nla_get_u32(tb[TCA_FQ_CODEL_DROP_BATCH_SIZE])); + + if (tb[TCA_FQ_CODEL_MEMORY_LIMIT]) + q->memory_limit = min(1U << 31, nla_get_u32(tb[TCA_FQ_CODEL_MEMORY_LIMIT])); diff --git a/patches.suse/i40e-reduce-stack-usage-in-i40e_set_fc.patch b/patches.suse/i40e-reduce-stack-usage-in-i40e_set_fc.patch new file mode 100644 index 0000000..6575a96 --- /dev/null +++ b/patches.suse/i40e-reduce-stack-usage-in-i40e_set_fc.patch @@ -0,0 +1,159 @@ +From: Arnd Bergmann +Date: Mon, 15 Jul 2019 14:35:07 +0200 +Subject: i40e: reduce stack usage in i40e_set_fc +Patch-mainline: v5.4-rc1 +Git-commit: 33b165684ab70867d4545643f550a5d48d3ddc57 +References: git-fixes + +The functions i40e_aq_get_phy_abilities_resp() and i40e_set_fc() both +have giant structure on the stack, which makes each one use stack frames +larger than 500 bytes. + +As clang decides one function into the other, we get a warning for +exceeding the frame size limit on 32-bit architectures: + +drivers/net/ethernet/intel/i40e/i40e_common.c:1654:23: error: stack frame size of 1116 bytes in function 'i40e_set_fc' [-Werror,-Wframe-larger-than=] + +When building with gcc, the inlining does not happen, but i40e_set_fc() +calls i40e_aq_get_phy_abilities_resp() anyway, so they add up on the +kernel stack just as much. + +The parts that actually use large stacks don't overlap, so make sure +each one is a separate function, and mark them as noinline_for_stack to +prevent the compilers from combining them again. + +Fixes: 0a862b43acc6 ("i40e/i40evf: Add module_types and update_link_info") +Signed-off-by: Arnd Bergmann +Tested-by: Andrew Bowers +Signed-off-by: Jeff Kirsher +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/intel/i40e/i40e_common.c | 91 ++++++++++++++------------ + 1 file changed, 51 insertions(+), 40 deletions(-) + +--- a/drivers/net/ethernet/intel/i40e/i40e_common.c ++++ b/drivers/net/ethernet/intel/i40e/i40e_common.c +@@ -1664,25 +1664,15 @@ enum i40e_status_code i40e_aq_set_phy_co + return status; + } + +-/** +- * i40e_set_fc +- * @hw: pointer to the hw struct +- * @aq_failures: buffer to return AdminQ failure information +- * @atomic_restart: whether to enable atomic link restart +- * +- * Set the requested flow control mode using set_phy_config. +- **/ +-enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures, +- bool atomic_restart) ++static noinline_for_stack enum i40e_status_code ++i40e_set_fc_status(struct i40e_hw *hw, ++ struct i40e_aq_get_phy_abilities_resp *abilities, ++ bool atomic_restart) + { +- enum i40e_fc_mode fc_mode = hw->fc.requested_mode; +- struct i40e_aq_get_phy_abilities_resp abilities; + struct i40e_aq_set_phy_config config; +- enum i40e_status_code status; ++ enum i40e_fc_mode fc_mode = hw->fc.requested_mode; + u8 pause_mask = 0x0; + +- *aq_failures = 0x0; +- + switch (fc_mode) { + case I40E_FC_FULL: + pause_mask |= I40E_AQ_PHY_FLAG_PAUSE_TX; +@@ -1698,6 +1688,48 @@ enum i40e_status_code i40e_set_fc(struct + break; + } + ++ memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); ++ /* clear the old pause settings */ ++ config.abilities = abilities->abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) & ++ ~(I40E_AQ_PHY_FLAG_PAUSE_RX); ++ /* set the new abilities */ ++ config.abilities |= pause_mask; ++ /* If the abilities have changed, then set the new config */ ++ if (config.abilities == abilities->abilities) ++ return 0; ++ ++ /* Auto restart link so settings take effect */ ++ if (atomic_restart) ++ config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK; ++ /* Copy over all the old settings */ ++ config.phy_type = abilities->phy_type; ++ config.phy_type_ext = abilities->phy_type_ext; ++ config.link_speed = abilities->link_speed; ++ config.eee_capability = abilities->eee_capability; ++ config.eeer = abilities->eeer_val; ++ config.low_power_ctrl = abilities->d3_lpan; ++ config.fec_config = abilities->fec_cfg_curr_mod_ext_info & ++ I40E_AQ_PHY_FEC_CONFIG_MASK; ++ ++ return i40e_aq_set_phy_config(hw, &config, NULL); ++} ++ ++/** ++ * i40e_set_fc ++ * @hw: pointer to the hw struct ++ * @aq_failures: buffer to return AdminQ failure information ++ * @atomic_restart: whether to enable atomic link restart ++ * ++ * Set the requested flow control mode using set_phy_config. ++ **/ ++enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures, ++ bool atomic_restart) ++{ ++ struct i40e_aq_get_phy_abilities_resp abilities; ++ enum i40e_status_code status; ++ ++ *aq_failures = 0x0; ++ + /* Get the current phy config */ + status = i40e_aq_get_phy_capabilities(hw, false, false, &abilities, + NULL); +@@ -1706,31 +1738,10 @@ enum i40e_status_code i40e_set_fc(struct + return status; + } + +- memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); +- /* clear the old pause settings */ +- config.abilities = abilities.abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) & +- ~(I40E_AQ_PHY_FLAG_PAUSE_RX); +- /* set the new abilities */ +- config.abilities |= pause_mask; +- /* If the abilities have changed, then set the new config */ +- if (config.abilities != abilities.abilities) { +- /* Auto restart link so settings take effect */ +- if (atomic_restart) +- config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK; +- /* Copy over all the old settings */ +- config.phy_type = abilities.phy_type; +- config.phy_type_ext = abilities.phy_type_ext; +- config.link_speed = abilities.link_speed; +- config.eee_capability = abilities.eee_capability; +- config.eeer = abilities.eeer_val; +- config.low_power_ctrl = abilities.d3_lpan; +- config.fec_config = abilities.fec_cfg_curr_mod_ext_info & +- I40E_AQ_PHY_FEC_CONFIG_MASK; +- status = i40e_aq_set_phy_config(hw, &config, NULL); ++ status = i40e_set_fc_status(hw, &abilities, atomic_restart); ++ if (status) ++ *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; + +- if (status) +- *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; +- } + /* Update the link info */ + status = i40e_update_link_info(hw); + if (status) { +@@ -2559,7 +2570,7 @@ i40e_status i40e_get_link_status(struct + * i40e_updatelink_status - update status of the HW network link + * @hw: pointer to the hw struct + **/ +-i40e_status i40e_update_link_info(struct i40e_hw *hw) ++noinline_for_stack i40e_status i40e_update_link_info(struct i40e_hw *hw) + { + struct i40e_aq_get_phy_abilities_resp abilities; + i40e_status status = 0; diff --git a/patches.suse/ipvlan-call-dev_change_flags-when-ipvlan-mode-is-res.patch b/patches.suse/ipvlan-call-dev_change_flags-when-ipvlan-mode-is-res.patch new file mode 100644 index 0000000..a368197 --- /dev/null +++ b/patches.suse/ipvlan-call-dev_change_flags-when-ipvlan-mode-is-res.patch @@ -0,0 +1,118 @@ +From: Hangbin Liu +Date: Sun, 1 Jul 2018 16:21:21 +0800 +Subject: ipvlan: call dev_change_flags when ipvlan mode is reset +Patch-mainline: v4.18-rc4 +Git-commit: 5dc2d3996a8b221c20dd0900bdad45031a572530 +References: git-fixes + +After we change the ipvlan mode from l3 to l2, or vice versa, we only +reset IFF_NOARP flag, but don't flush the ARP table cache, which will +cause eth->h_dest to be equal to eth->h_source in ipvlan_xmit_mode_l2(). +Then the message will not come out of host. + +Here is the reproducer on local host: + +ip link set eth1 up +ip addr add 192.168.1.1/24 dev eth1 +ip link add link eth1 ipvlan1 type ipvlan mode l3 + +ip netns add net1 +ip link set ipvlan1 netns net1 +ip netns exec net1 ip link set ipvlan1 up +ip netns exec net1 ip addr add 192.168.2.1/24 dev ipvlan1 + +ip route add 192.168.2.0/24 via 192.168.1.2 +ping 192.168.2.2 -c 2 + +ip netns exec net1 ip link set ipvlan1 type ipvlan mode l2 +ping 192.168.2.2 -c 2 + +Add the same configuration on remote host. After we set the mode to l2, +we could find that the src/dst MAC addresses are the same on eth1: + +21:26:06.648565 00:b7:13:ad:d3:05 > 00:b7:13:ad:d3:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 58356, offset 0, flags [DF], proto ICMP (1), length 84) + 192.168.2.1 > 192.168.2.2: ICMP echo request, id 22686, seq 1, length 64 + +Fix this by calling dev_change_flags(), which will call netdevice notifier +with flag change info. + +v2: +a) As pointed out by Wang Cong, check return value for dev_change_flags() when +change dev flags. +b) As suggested by Stefano and Sabrina, move flags setting before l3mdev_ops. +So we don't need to redo ipvlan_{, un}register_nf_hook() again in err path. + +Reported-by: Jianlin Shi +Reviewed-by: Stefano Brivio +Reviewed-by: Sabrina Dubroca +Fixes: 2ad7bf3638411 ("ipvlan: Initial check-in of the IPVLAN driver.") +Signed-off-by: Hangbin Liu +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ipvlan/ipvlan_main.c | 36 ++++++++++++++++++++++++++++-------- + 1 file changed, 28 insertions(+), 8 deletions(-) + +--- a/drivers/net/ipvlan/ipvlan_main.c ++++ b/drivers/net/ipvlan/ipvlan_main.c +@@ -73,10 +73,23 @@ static int ipvlan_set_port_mode(struct i + { + struct ipvl_dev *ipvlan; + struct net_device *mdev = port->dev; +- int err = 0; ++ unsigned int flags; ++ int err; + + ASSERT_RTNL(); + if (port->mode != nval) { ++ list_for_each_entry(ipvlan, &port->ipvlans, pnode) { ++ flags = ipvlan->dev->flags; ++ if (nval == IPVLAN_MODE_L3 || nval == IPVLAN_MODE_L3S) { ++ err = dev_change_flags(ipvlan->dev, ++ flags | IFF_NOARP); ++ } else { ++ err = dev_change_flags(ipvlan->dev, ++ flags & ~IFF_NOARP); ++ } ++ if (unlikely(err)) ++ goto fail; ++ } + if (nval == IPVLAN_MODE_L3S) { + /* New mode is L3S */ + err = ipvlan_register_nf_hook(read_pnet(&port->pnet)); +@@ -84,21 +97,28 @@ static int ipvlan_set_port_mode(struct i + mdev->l3mdev_ops = &ipvl_l3mdev_ops; + mdev->priv_flags |= IFF_L3MDEV_MASTER; + } else +- return err; ++ goto fail; + } else if (port->mode == IPVLAN_MODE_L3S) { + /* Old mode was L3S */ + mdev->priv_flags &= ~IFF_L3MDEV_MASTER; + ipvlan_unregister_nf_hook(read_pnet(&port->pnet)); + mdev->l3mdev_ops = NULL; + } +- list_for_each_entry(ipvlan, &port->ipvlans, pnode) { +- if (nval == IPVLAN_MODE_L3 || nval == IPVLAN_MODE_L3S) +- ipvlan->dev->flags |= IFF_NOARP; +- else +- ipvlan->dev->flags &= ~IFF_NOARP; +- } + port->mode = nval; + } ++ return 0; ++ ++fail: ++ /* Undo the flags changes that have been done so far. */ ++ list_for_each_entry_continue_reverse(ipvlan, &port->ipvlans, pnode) { ++ flags = ipvlan->dev->flags; ++ if (port->mode == IPVLAN_MODE_L3 || ++ port->mode == IPVLAN_MODE_L3S) ++ dev_change_flags(ipvlan->dev, flags | IFF_NOARP); ++ else ++ dev_change_flags(ipvlan->dev, flags & ~IFF_NOARP); ++ } ++ + return err; + } + diff --git a/patches.suse/ipvlan-l3mdev-fix-broken-l3s-mode-wrt-local-routes.patch b/patches.suse/ipvlan-l3mdev-fix-broken-l3s-mode-wrt-local-routes.patch index d498a28..f285af7 100644 --- a/patches.suse/ipvlan-l3mdev-fix-broken-l3s-mode-wrt-local-routes.patch +++ b/patches.suse/ipvlan-l3mdev-fix-broken-l3s-mode-wrt-local-routes.patch @@ -69,14 +69,14 @@ Signed-off-by: Jiri Slaby --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c -@@ -82,12 +82,12 @@ static int ipvlan_set_port_mode(struct i +@@ -95,12 +95,12 @@ static int ipvlan_set_port_mode(struct i err = ipvlan_register_nf_hook(read_pnet(&port->pnet)); if (!err) { mdev->l3mdev_ops = &ipvl_l3mdev_ops; - mdev->priv_flags |= IFF_L3MDEV_MASTER; + mdev->priv_flags |= IFF_L3MDEV_RX_HANDLER; } else - return err; + goto fail; } else if (port->mode == IPVLAN_MODE_L3S) { /* Old mode was L3S */ - mdev->priv_flags &= ~IFF_L3MDEV_MASTER; @@ -84,7 +84,7 @@ Signed-off-by: Jiri Slaby ipvlan_unregister_nf_hook(read_pnet(&port->pnet)); mdev->l3mdev_ops = NULL; } -@@ -140,7 +140,7 @@ static void ipvlan_port_destroy(struct n +@@ -160,7 +160,7 @@ static void ipvlan_port_destroy(struct n struct sk_buff *skb; if (port->mode == IPVLAN_MODE_L3S) { diff --git a/patches.suse/ixgbevf-Remove-limit-of-10-entries-for-unicast-filte.patch b/patches.suse/ixgbevf-Remove-limit-of-10-entries-for-unicast-filte.patch new file mode 100644 index 0000000..3428ad1 --- /dev/null +++ b/patches.suse/ixgbevf-Remove-limit-of-10-entries-for-unicast-filte.patch @@ -0,0 +1,35 @@ +From: Radoslaw Tyl +Date: Mon, 25 Nov 2019 15:24:52 +0100 +Subject: ixgbevf: Remove limit of 10 entries for unicast filter list +Patch-mainline: v5.5-rc7 +Git-commit: aa604651d523b1493988d0bf6710339f3ee60272 +References: git-fixes + +Currently, though the FDB entry is added to VF, it does not appear in +RAR filters. VF driver only allows to add 10 entries. Attempting to add +another causes an error. This patch removes limitation and allows use of +all free RAR entries for the FDB if needed. + +Fixes: 46ec20ff7d ("ixgbevf: Add macvlan support in the set rx mode op") +Signed-off-by: Radoslaw Tyl +Acked-by: Paul Menzel +Signed-off-by: Jeff Kirsher +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c ++++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +@@ -2100,11 +2100,6 @@ static int ixgbevf_write_uc_addr_list(st + struct ixgbe_hw *hw = &adapter->hw; + int count = 0; + +- if ((netdev_uc_count(netdev)) > 10) { +- pr_err("Too many unicast filters - No Space\n"); +- return -ENOSPC; +- } +- + if (!netdev_uc_empty(netdev)) { + struct netdev_hw_addr *ha; + diff --git a/patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-order.patch b/patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-order.patch new file mode 100644 index 0000000..e7de744 --- /dev/null +++ b/patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-order.patch @@ -0,0 +1,75 @@ +From: Ido Schimmel +Date: Wed, 10 Apr 2019 06:58:14 +0000 +Subject: mlxsw: core: Do not use WQ_MEM_RECLAIM for mlxsw ordered workqueue +Patch-mainline: v5.1-rc6 +Git-commit: 4af0699782e2cc7d0d89db9eb6f8844dd3df82dc +References: git-fixes + +The ordered workqueue is used to offload various objects such as routes +and neighbours in the order they are notified. + +It should not be called as part of memory reclaim path, so remove the +WQ_MEM_RECLAIM flag. This can also result in a warning [1], if a worker +tries to flush a non-WQ_MEM_RECLAIM workqueue. + +[1] +[97703.542861] workqueue: WQ_MEM_RECLAIM mlxsw_core_ordered:mlxsw_sp_router_fib6_event_work [mlxsw_spectrum] is flushing !WQ_MEM_RECLAIM events:rht_deferred_worker +[97703.542884] WARNING: CPU: 1 PID: 32492 at kernel/workqueue.c:2605 check_flush_dependency+0xb5/0x130 +... +[97703.542988] Hardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018 +[97703.543049] Workqueue: mlxsw_core_ordered mlxsw_sp_router_fib6_event_work [mlxsw_spectrum] +[97703.543061] RIP: 0010:check_flush_dependency+0xb5/0x130 +... +[97703.543071] RSP: 0018:ffffb3f08137bc00 EFLAGS: 00010086 +[97703.543076] RAX: 0000000000000000 RBX: ffff96e07740ae00 RCX: 0000000000000000 +[97703.543080] RDX: 0000000000000094 RSI: ffffffff82dc1934 RDI: 0000000000000046 +[97703.543084] RBP: ffffb3f08137bc20 R08: ffffffff82dc18a0 R09: 00000000000225c0 +[97703.543087] R10: 0000000000000000 R11: 0000000000007eec R12: ffffffff816e4ee0 +[97703.543091] R13: ffff96e06f6a5c00 R14: ffff96e077ba7700 R15: ffffffff812ab0c0 +[97703.543097] FS: 0000000000000000(0000) GS:ffff96e077a80000(0000) knlGS:0000000000000000 +[97703.543101] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +[97703.543104] CR2: 00007f8cd135b280 CR3: 00000001e860e003 CR4: 00000000003606e0 +[97703.543109] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +[97703.543112] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 +[97703.543115] Call Trace: +[97703.543129] __flush_work+0xbd/0x1e0 +[97703.543137] ? __cancel_work_timer+0x136/0x1b0 +[97703.543145] ? pwq_dec_nr_in_flight+0x49/0xa0 +[97703.543154] __cancel_work_timer+0x136/0x1b0 +[97703.543175] ? mlxsw_reg_trans_bulk_wait+0x145/0x400 [mlxsw_core] +[97703.543184] cancel_work_sync+0x10/0x20 +[97703.543191] rhashtable_free_and_destroy+0x23/0x140 +[97703.543198] rhashtable_destroy+0xd/0x10 +[97703.543254] mlxsw_sp_fib_destroy+0xb1/0xf0 [mlxsw_spectrum] +[97703.543310] mlxsw_sp_vr_put+0xa8/0xc0 [mlxsw_spectrum] +[97703.543364] mlxsw_sp_fib_node_put+0xbf/0x140 [mlxsw_spectrum] +[97703.543418] ? mlxsw_sp_fib6_entry_destroy+0xe8/0x110 [mlxsw_spectrum] +[97703.543475] mlxsw_sp_router_fib6_event_work+0x6cd/0x7f0 [mlxsw_spectrum] +[97703.543484] process_one_work+0x1fd/0x400 +[97703.543493] worker_thread+0x34/0x410 +[97703.543500] kthread+0x121/0x140 +[97703.543507] ? process_one_work+0x400/0x400 +[97703.543512] ? kthread_park+0x90/0x90 +[97703.543523] ret_from_fork+0x35/0x40 + +Fixes: a3832b31898f ("mlxsw: core: Create an ordered workqueue for FIB offload") +Signed-off-by: Ido Schimmel +Reported-by: Semion Lisyansky +Acked-by: Jiri Pirko +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/core.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/core.c +@@ -1878,7 +1878,7 @@ static int __init mlxsw_core_module_init + mlxsw_wq = alloc_workqueue(mlxsw_core_driver_name, WQ_MEM_RECLAIM, 0); + if (!mlxsw_wq) + return -ENOMEM; +- mlxsw_owq = alloc_ordered_workqueue("%s_ordered", WQ_MEM_RECLAIM, ++ mlxsw_owq = alloc_ordered_workqueue("%s_ordered", 0, + mlxsw_core_driver_name); + if (!mlxsw_owq) { + err = -ENOMEM; diff --git a/patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-workq.patch b/patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-workq.patch new file mode 100644 index 0000000..dcdee16 --- /dev/null +++ b/patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-workq.patch @@ -0,0 +1,34 @@ +From: Ido Schimmel +Date: Wed, 10 Apr 2019 06:58:15 +0000 +Subject: mlxsw: core: Do not use WQ_MEM_RECLAIM for mlxsw workqueue +Patch-mainline: v5.1-rc6 +Git-commit: b442fed1b724af0de087912a5718ddde1b87acbb +References: git-fixes + +The workqueue is used to periodically update the networking stack about +activity / statistics of various objects such as neighbours and TC +actions. + +It should not be called as part of memory reclaim path, so remove the +WQ_MEM_RECLAIM flag. + +Fixes: 3d5479e92087 ("mlxsw: core: Remove deprecated create_workqueue") +Signed-off-by: Ido Schimmel +Acked-by: Jiri Pirko +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/core.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/core.c +@@ -1875,7 +1875,7 @@ static int __init mlxsw_core_module_init + { + int err; + +- mlxsw_wq = alloc_workqueue(mlxsw_core_driver_name, WQ_MEM_RECLAIM, 0); ++ mlxsw_wq = alloc_workqueue(mlxsw_core_driver_name, 0, 0); + if (!mlxsw_wq) + return -ENOMEM; + mlxsw_owq = alloc_ordered_workqueue("%s_ordered", 0, diff --git a/patches.suse/mlxsw-pci-Return-error-on-PCI-reset-timeout.patch b/patches.suse/mlxsw-pci-Return-error-on-PCI-reset-timeout.patch new file mode 100644 index 0000000..dc6146e --- /dev/null +++ b/patches.suse/mlxsw-pci-Return-error-on-PCI-reset-timeout.patch @@ -0,0 +1,35 @@ +From: Nir Dotan +Date: Fri, 18 Jan 2019 15:57:57 +0000 +Subject: mlxsw: pci: Return error on PCI reset timeout +Patch-mainline: v5.0-rc3 +Git-commit: 67c14cc9b35055264fc0efed00159a7de1819f1b +References: git-fixes + +Return an appropriate error in the case when the driver timeouts on waiting +for firmware to go out of PCI reset. + +Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check") +Signed-off-by: Nir Dotan +Acked-by: Jiri Pirko +Signed-off-by: Ido Schimmel +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/pci.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c +@@ -1367,10 +1367,10 @@ static int mlxsw_pci_sw_reset(struct mlx + u32 val = mlxsw_pci_read32(mlxsw_pci, FW_READY); + + if ((val & MLXSW_PCI_FW_READY_MASK) == MLXSW_PCI_FW_READY_MAGIC) +- break; ++ return 0; + cond_resched(); + } while (time_before(jiffies, end)); +- return 0; ++ return -EBUSY; + } + + static int mlxsw_pci_alloc_irq_vectors(struct mlxsw_pci *mlxsw_pci) diff --git a/patches.suse/mlxsw-spectrum-Disallow-prio-tagged-packets-when-PVI.patch b/patches.suse/mlxsw-spectrum-Disallow-prio-tagged-packets-when-PVI.patch new file mode 100644 index 0000000..72af773 --- /dev/null +++ b/patches.suse/mlxsw-spectrum-Disallow-prio-tagged-packets-when-PVI.patch @@ -0,0 +1,30 @@ +From: Ido Schimmel +Date: Tue, 11 Jun 2019 10:19:46 +0300 +Subject: mlxsw: spectrum: Disallow prio-tagged packets when PVID is removed +Patch-mainline: v5.2-rc6 +Git-commit: 4b14cc313f076c37b646cee06a85f0db59cf216c +References: git-fixes + +When PVID is removed from a bridge port, the Linux bridge drops both +untagged and prio-tagged packets. Align mlxsw with this behavior. + +Fixes: 148f472da5db ("mlxsw: reg: Add the Switch Port Acceptable Frame Types register") +Acked-by: Jiri Pirko +Signed-off-by: Ido Schimmel +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h ++++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h +@@ -933,7 +933,7 @@ static inline void mlxsw_reg_spaft_pack( + MLXSW_REG_ZERO(spaft, payload); + mlxsw_reg_spaft_local_port_set(payload, local_port); + mlxsw_reg_spaft_allow_untagged_set(payload, allow_untagged); +- mlxsw_reg_spaft_allow_prio_tagged_set(payload, true); ++ mlxsw_reg_spaft_allow_prio_tagged_set(payload, allow_untagged); + mlxsw_reg_spaft_allow_tagged_set(payload, true); + } + diff --git a/patches.suse/mlxsw-spectrum-Prevent-force-of-56G.patch b/patches.suse/mlxsw-spectrum-Prevent-force-of-56G.patch new file mode 100644 index 0000000..41b11d6 --- /dev/null +++ b/patches.suse/mlxsw-spectrum-Prevent-force-of-56G.patch @@ -0,0 +1,36 @@ +From: Amit Cohen +Date: Wed, 29 May 2019 10:59:45 +0300 +Subject: mlxsw: spectrum: Prevent force of 56G +Patch-mainline: v5.2-rc3 +Git-commit: 275e928f19117d22f6d26dee94548baf4041b773 +References: git-fixes + +Force of 56G is not supported by hardware in Ethernet devices. This +configuration fails with a bad parameter error from firmware. + +Add check of this case. Instead of trying to set 56G with autoneg off, +return a meaningful error. + +Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") +Signed-off-by: Amit Cohen +Acked-by: Jiri Pirko +Signed-off-by: Ido Schimmel +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +@@ -2492,6 +2492,10 @@ mlxsw_sp_port_set_link_ksettings(struct + mlxsw_reg_ptys_eth_unpack(ptys_pl, ð_proto_cap, NULL, NULL); + + autoneg = cmd->base.autoneg == AUTONEG_ENABLE; ++ if (!autoneg && cmd->base.speed == SPEED_56000) { ++ netdev_err(dev, "56G not supported with autoneg off\n"); ++ return -EINVAL; ++ } + eth_proto_new = autoneg ? + mlxsw_sp_to_ptys_advert_link(cmd) : + mlxsw_sp_to_ptys_speed(cmd->base.speed); diff --git a/patches.suse/mlxsw-spectrum_acl_tcam-Position-vchunk-in-a-vregion.patch b/patches.suse/mlxsw-spectrum_acl_tcam-Position-vchunk-in-a-vregion.patch new file mode 100644 index 0000000..370a931 --- /dev/null +++ b/patches.suse/mlxsw-spectrum_acl_tcam-Position-vchunk-in-a-vregion.patch @@ -0,0 +1,52 @@ +From: Jiri Pirko +Date: Mon, 27 Apr 2020 18:05:47 +0300 +Subject: mlxsw: spectrum_acl_tcam: Position vchunk in a vregion list properly +Git-commit: 6ef4889fc0b3aa6ab928e7565935ac6f762cee6e +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +Vregion helpers to get min and max priority depend on the correct +ordering of vchunks in the vregion list. However, the current code +always adds new chunk to the end of the list, no matter what the +priority is. Fix this by finding the correct place in the list and put +vchunk there. + +[js] no virtual chunks and regions in 4.12, so adapt + +Fixes: 22a677661f56 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation") +Signed-off-by: Jiri Pirko +Signed-off-by: Ido Schimmel +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c +@@ -587,7 +587,9 @@ mlxsw_sp_acl_tcam_chunk_assoc(struct mlx + struct mlxsw_afk_element_usage *elusage, + struct mlxsw_sp_acl_tcam_chunk *chunk) + { ++ struct mlxsw_sp_acl_tcam_chunk *chunk2; + struct mlxsw_sp_acl_tcam_region *region; ++ struct list_head *pos; + bool region_created = false; + bool need_split; + int err; +@@ -616,7 +618,14 @@ mlxsw_sp_acl_tcam_chunk_assoc(struct mlx + } + + chunk->region = region; +- list_add_tail(&chunk->list, ®ion->chunk_list); ++ ++ /* Position the chunk inside the list according to priority */ ++ list_for_each(pos, ®ion->chunk_list) { ++ chunk2 = list_entry(pos, typeof(*chunk2), list); ++ if (chunk2->priority > priority) ++ break; ++ } ++ list_add_tail(&chunk->list, pos); + + if (!region_created) + return 0; diff --git a/patches.suse/mlxsw-spectrum_dpipe-Add-missing-error-path.patch b/patches.suse/mlxsw-spectrum_dpipe-Add-missing-error-path.patch new file mode 100644 index 0000000..ad3c852 --- /dev/null +++ b/patches.suse/mlxsw-spectrum_dpipe-Add-missing-error-path.patch @@ -0,0 +1,38 @@ +From: Ido Schimmel +Date: Fri, 7 Feb 2020 19:26:28 +0200 +Subject: mlxsw: spectrum_dpipe: Add missing error path +Patch-mainline: v5.6-rc1 +Git-commit: 3a99cbb6fa7bca1995586ec2dc21b0368aad4937 +References: git-fixes + +In case devlink_dpipe_entry_ctx_prepare() failed, release RTNL that was +previously taken and free the memory allocated by +mlxsw_sp_erif_entry_prepare(). + +Fixes: 2ba5999f009d ("mlxsw: spectrum: Add Support for erif table entries access") +Signed-off-by: Ido Schimmel +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c +@@ -215,7 +215,7 @@ mlxsw_sp_dpipe_table_erif_entries_dump(v + start_again: + err = devlink_dpipe_entry_ctx_prepare(dump_ctx); + if (err) +- return err; ++ goto err_ctx_prepare; + j = 0; + for (; i < rif_count; i++) { + struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); +@@ -247,6 +247,7 @@ start_again: + return 0; + err_entry_append: + err_entry_get: ++err_ctx_prepare: + rtnl_unlock(); + devlink_dpipe_entry_clear(&entry); + return err; diff --git a/patches.suse/mlxsw-spectrum_router-Refresh-nexthop-neighbour-when.patch b/patches.suse/mlxsw-spectrum_router-Refresh-nexthop-neighbour-when.patch new file mode 100644 index 0000000..932ef54 --- /dev/null +++ b/patches.suse/mlxsw-spectrum_router-Refresh-nexthop-neighbour-when.patch @@ -0,0 +1,135 @@ +From: Ido Schimmel +Date: Tue, 11 Jun 2019 10:19:41 +0300 +Subject: mlxsw: spectrum_router: Refresh nexthop neighbour when it becomes + dead +Patch-mainline: v5.2-rc6 +Git-commit: 83d5782681cc12b3d485a83cb34c46b2445f510c +References: git-fixes + +The driver tries to periodically refresh neighbours that are used to +reach nexthops. This is done by periodically calling neigh_event_send(). + +However, if the neighbour becomes dead, there is nothing we can do to +return it to a connected state and the above function call is basically +a NOP. + +This results in the nexthop never being written to the device's +adjacency table and therefore never used to forward packets. + +Fix this by dropping our reference from the dead neighbour and +associating the nexthop with a new neigbhour which we will try to +refresh. + +Fixes: a7ff87acd995 ("mlxsw: spectrum_router: Implement next-hop routing") +Signed-off-by: Ido Schimmel +Reported-by: Alex Veber +Tested-by: Alex Veber +Acked-by: Jiri Pirko +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 73 +++++++++++++++++- + 1 file changed, 70 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +@@ -2355,7 +2355,7 @@ static void mlxsw_sp_router_probe_unreso + static void + mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp *mlxsw_sp, + struct mlxsw_sp_neigh_entry *neigh_entry, +- bool removing); ++ bool removing, bool dead); + + static enum mlxsw_reg_rauht_op mlxsw_sp_rauht_op(bool adding) + { +@@ -2486,7 +2486,8 @@ static void mlxsw_sp_router_neigh_event_ + + memcpy(neigh_entry->ha, ha, ETH_ALEN); + mlxsw_sp_neigh_entry_update(mlxsw_sp, neigh_entry, entry_connected); +- mlxsw_sp_nexthop_neigh_update(mlxsw_sp, neigh_entry, !entry_connected); ++ mlxsw_sp_nexthop_neigh_update(mlxsw_sp, neigh_entry, !entry_connected, ++ dead); + + if (!neigh_entry->connected && list_empty(&neigh_entry->nexthop_list)) + mlxsw_sp_neigh_entry_destroy(mlxsw_sp, neigh_entry); +@@ -3431,13 +3432,79 @@ static void __mlxsw_sp_nexthop_neigh_upd + nh->update = 1; + } + ++static int ++mlxsw_sp_nexthop_dead_neigh_replace(struct mlxsw_sp *mlxsw_sp, ++ struct mlxsw_sp_neigh_entry *neigh_entry) ++{ ++ struct neighbour *n, *old_n = neigh_entry->key.n; ++ struct mlxsw_sp_nexthop *nh; ++ bool entry_connected; ++ u8 nud_state, dead; ++ int err; ++ ++ nh = list_first_entry(&neigh_entry->nexthop_list, ++ struct mlxsw_sp_nexthop, neigh_list_node); ++ ++ n = neigh_lookup(nh->nh_grp->neigh_tbl, &nh->gw_addr, nh->rif->dev); ++ if (!n) { ++ n = neigh_create(nh->nh_grp->neigh_tbl, &nh->gw_addr, ++ nh->rif->dev); ++ if (IS_ERR(n)) ++ return PTR_ERR(n); ++ neigh_event_send(n, NULL); ++ } ++ ++ mlxsw_sp_neigh_entry_remove(mlxsw_sp, neigh_entry); ++ neigh_entry->key.n = n; ++ err = mlxsw_sp_neigh_entry_insert(mlxsw_sp, neigh_entry); ++ if (err) ++ goto err_neigh_entry_insert; ++ ++ read_lock_bh(&n->lock); ++ nud_state = n->nud_state; ++ dead = n->dead; ++ read_unlock_bh(&n->lock); ++ entry_connected = nud_state & NUD_VALID && !dead; ++ ++ list_for_each_entry(nh, &neigh_entry->nexthop_list, ++ neigh_list_node) { ++ neigh_release(old_n); ++ neigh_clone(n); ++ __mlxsw_sp_nexthop_neigh_update(nh, !entry_connected); ++ mlxsw_sp_nexthop_group_refresh(mlxsw_sp, nh->nh_grp); ++ } ++ ++ neigh_release(n); ++ ++ return 0; ++ ++err_neigh_entry_insert: ++ neigh_entry->key.n = old_n; ++ mlxsw_sp_neigh_entry_insert(mlxsw_sp, neigh_entry); ++ neigh_release(n); ++ return err; ++} ++ + static void + mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp *mlxsw_sp, + struct mlxsw_sp_neigh_entry *neigh_entry, +- bool removing) ++ bool removing, bool dead) + { + struct mlxsw_sp_nexthop *nh; + ++ if (list_empty(&neigh_entry->nexthop_list)) ++ return; ++ ++ if (dead) { ++ int err; ++ ++ err = mlxsw_sp_nexthop_dead_neigh_replace(mlxsw_sp, ++ neigh_entry); ++ if (err) ++ dev_err(mlxsw_sp->bus_info->dev, "Failed to replace dead neigh\n"); ++ return; ++ } ++ + list_for_each_entry(nh, &neigh_entry->nexthop_list, + neigh_list_node) { + __mlxsw_sp_nexthop_neigh_update(nh, removing); diff --git a/patches.suse/mlxsw-spectrum_router-Remove-inappropriate-usage-of-.patch b/patches.suse/mlxsw-spectrum_router-Remove-inappropriate-usage-of-.patch new file mode 100644 index 0000000..76f2689 --- /dev/null +++ b/patches.suse/mlxsw-spectrum_router-Remove-inappropriate-usage-of-.patch @@ -0,0 +1,42 @@ +From: Ido Schimmel +Date: Fri, 10 Jul 2020 16:41:38 +0300 +Subject: mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON() +Patch-mainline: v5.8-rc5 +Git-commit: d9d5420273997664a1c09151ca86ac993f2f89c1 +References: git-fixes + +We should not trigger a warning when a memory allocation fails. Remove +the WARN_ON(). + +The warning is constantly triggered by syzkaller when it is injecting +faults: + +[ 2230.758664] FAULT_INJECTION: forcing a failure. +[ 2230.758664] name failslab, interval 1, probability 0, space 0, times 0 +[ 2230.762329] CPU: 3 PID: 1407 Comm: syz-executor.0 Not tainted 5.8.0-rc2+ #28 +... +[ 2230.898175] WARNING: CPU: 3 PID: 1407 at drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:6265 mlxsw_sp_router_fib_event+0xfad/0x13e0 +[ 2230.898179] Kernel panic - not syncing: panic_on_warn set ... +[ 2230.898183] CPU: 3 PID: 1407 Comm: syz-executor.0 Not tainted 5.8.0-rc2+ #28 +[ 2230.898190] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 + +Fixes: 3057224e014c ("mlxsw: spectrum_router: Implement FIB offload in deferred work") +Signed-off-by: Ido Schimmel +Reviewed-by: Jiri Pirko +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +@@ -6099,7 +6099,7 @@ static int mlxsw_sp_router_fib_event(str + } + + fib_work = kzalloc(sizeof(*fib_work), GFP_ATOMIC); +- if (WARN_ON(!fib_work)) ++ if (!fib_work) + return NOTIFY_BAD; + + fib_work->mlxsw_sp = router->mlxsw_sp; diff --git a/patches.suse/mlxsw-spectrum_switchdev-Add-MDB-entries-in-prepare-.patch b/patches.suse/mlxsw-spectrum_switchdev-Add-MDB-entries-in-prepare-.patch new file mode 100644 index 0000000..480cba0 --- /dev/null +++ b/patches.suse/mlxsw-spectrum_switchdev-Add-MDB-entries-in-prepare-.patch @@ -0,0 +1,64 @@ +From: Ido Schimmel +Date: Wed, 10 Apr 2019 06:58:12 +0000 +Subject: mlxsw: spectrum_switchdev: Add MDB entries in prepare phase +Patch-mainline: v5.1-rc6 +Git-commit: d4d0e40977ac450f32f2db5e4d8e23c9d2578899 +References: git-fixes + +The driver cannot guarantee in the prepare phase that it will be able to +write an MDB entry to the device. In case the driver returned success +during the prepare phase, but then failed to add the entry in the commit +phase, a WARNING [1] will be generated by the switchdev core. + +Fix this by doing the work in the prepare phase instead. + +[1] +[ 358.544486] swp12s0: Commit of object (id=2) failed. +[ 358.550061] WARNING: CPU: 0 PID: 30 at net/switchdev/switchdev.c:281 switchdev_port_obj_add_now+0x9b/0xe0 +[ 358.560754] CPU: 0 PID: 30 Comm: kworker/0:1 Not tainted 5.0.0-custom-13382-gf2449babf221 #1350 +[ 358.570472] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016 +[ 358.580582] Workqueue: events switchdev_deferred_process_work +[ 358.587001] RIP: 0010:switchdev_port_obj_add_now+0x9b/0xe0 +... +[ 358.614109] RSP: 0018:ffffa6b900d6fe18 EFLAGS: 00010286 +[ 358.619943] RAX: 0000000000000000 RBX: ffff8b00797ff000 RCX: 0000000000000000 +[ 358.627912] RDX: ffff8b00b7a1d4c0 RSI: ffff8b00b7a152e8 RDI: ffff8b00b7a152e8 +[ 358.635881] RBP: ffff8b005c3f5bc0 R08: 000000000000022b R09: 0000000000000000 +[ 358.643850] R10: 0000000000000000 R11: ffffa6b900d6fcc8 R12: 0000000000000000 +[ 358.651819] R13: dead000000000100 R14: ffff8b00b65a23c0 R15: 0ffff8b00b7a2200 +[ 358.659790] FS: 0000000000000000(0000) GS:ffff8b00b7a00000(0000) knlGS:0000000000000000 +[ 358.668820] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +[ 358.675228] CR2: 00007f00aad90de0 CR3: 00000001ca80d000 CR4: 00000000001006f0 +[ 358.683188] Call Trace: +[ 358.685918] switchdev_port_obj_add_deferred+0x13/0x60 +[ 358.691655] switchdev_deferred_process+0x6b/0xf0 +[ 358.696907] switchdev_deferred_process_work+0xa/0x10 +[ 358.702548] process_one_work+0x1f5/0x3f0 +[ 358.707022] worker_thread+0x28/0x3c0 +[ 358.711099] ? process_one_work+0x3f0/0x3f0 +[ 358.715768] kthread+0x10d/0x130 +[ 358.719369] ? __kthread_create_on_node+0x180/0x180 +[ 358.724815] ret_from_fork+0x35/0x40 + +Fixes: 3a49b4fde2a1 ("mlxsw: Adding layer 2 multicast support") +Signed-off-by: Ido Schimmel +Reported-by: Alex Kushnarov +Tested-by: Alex Kushnarov +Acked-by: Jiri Pirko +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +@@ -1665,7 +1665,7 @@ static int mlxsw_sp_port_mdb_add(struct + u16 fid_index; + int err = 0; + +- if (switchdev_trans_ph_prepare(trans)) ++ if (switchdev_trans_ph_commit(trans)) + return 0; + + bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev); diff --git a/patches.suse/mlxsw-spectrum_switchdev-Do-not-treat-static-FDB-ent.patch b/patches.suse/mlxsw-spectrum_switchdev-Do-not-treat-static-FDB-ent.patch new file mode 100644 index 0000000..22fbf34 --- /dev/null +++ b/patches.suse/mlxsw-spectrum_switchdev-Do-not-treat-static-FDB-ent.patch @@ -0,0 +1,76 @@ +From: Ido Schimmel +Date: Fri, 18 Jan 2019 15:58:01 +0000 +Subject: mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky +Patch-mainline: v5.0-rc3 +Git-commit: 64254a2054611205798e6bde634639bc704573ac +References: git-fixes + +The driver currently treats static FDB entries as both static and +sticky. This is incorrect and prevents such entries from being roamed to +a different port via learning. + +Fix this by configuring static entries with ageing disabled and roaming +enabled. + +In net-next we can add proper support for the newly introduced 'sticky' +flag. + +Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") +Signed-off-by: Ido Schimmel +Reported-by: Alexander Petrovskiy +Reviewed-by: Petr Machata +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +@@ -1244,7 +1244,7 @@ mlxsw_sp_bridge_port_fdb_flush(struct ml + static enum mlxsw_reg_sfd_rec_policy mlxsw_sp_sfd_rec_policy(bool dynamic) + { + return dynamic ? MLXSW_REG_SFD_REC_POLICY_DYNAMIC_ENTRY_INGRESS : +- MLXSW_REG_SFD_REC_POLICY_STATIC_ENTRY; ++ MLXSW_REG_SFD_REC_POLICY_DYNAMIC_ENTRY_MLAG; + } + + static enum mlxsw_reg_sfd_op mlxsw_sp_sfd_op(bool adding) +@@ -1301,7 +1301,7 @@ out: + static int __mlxsw_sp_port_fdb_uc_op(struct mlxsw_sp *mlxsw_sp, u8 local_port, + const char *mac, u16 fid, bool adding, + enum mlxsw_reg_sfd_rec_action action, +- bool dynamic) ++ enum mlxsw_reg_sfd_rec_policy policy) + { + char *sfd_pl; + u8 num_rec; +@@ -1312,8 +1312,7 @@ static int __mlxsw_sp_port_fdb_uc_op(str + return -ENOMEM; + + mlxsw_reg_sfd_pack(sfd_pl, mlxsw_sp_sfd_op(adding), 0); +- mlxsw_reg_sfd_uc_pack(sfd_pl, 0, mlxsw_sp_sfd_rec_policy(dynamic), +- mac, fid, action, local_port); ++ mlxsw_reg_sfd_uc_pack(sfd_pl, 0, policy, mac, fid, action, local_port); + num_rec = mlxsw_reg_sfd_num_rec_get(sfd_pl); + err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(sfd), sfd_pl); + if (err) +@@ -1332,7 +1331,8 @@ static int mlxsw_sp_port_fdb_uc_op(struc + bool dynamic) + { + return __mlxsw_sp_port_fdb_uc_op(mlxsw_sp, local_port, mac, fid, adding, +- MLXSW_REG_SFD_REC_ACTION_NOP, dynamic); ++ MLXSW_REG_SFD_REC_ACTION_NOP, ++ mlxsw_sp_sfd_rec_policy(dynamic)); + } + + int mlxsw_sp_rif_fdb_op(struct mlxsw_sp *mlxsw_sp, const char *mac, u16 fid, +@@ -1340,7 +1340,7 @@ int mlxsw_sp_rif_fdb_op(struct mlxsw_sp + { + return __mlxsw_sp_port_fdb_uc_op(mlxsw_sp, 0, mac, fid, adding, + MLXSW_REG_SFD_REC_ACTION_FORWARD_IP_ROUTER, +- false); ++ MLXSW_REG_SFD_REC_POLICY_STATIC_ENTRY); + } + + static int mlxsw_sp_port_fdb_uc_lag_op(struct mlxsw_sp *mlxsw_sp, u16 lag_id, diff --git a/patches.suse/mvpp2-remove-misleading-comment.patch b/patches.suse/mvpp2-remove-misleading-comment.patch new file mode 100644 index 0000000..46889ee --- /dev/null +++ b/patches.suse/mvpp2-remove-misleading-comment.patch @@ -0,0 +1,37 @@ +From: Matteo Croce +Date: Wed, 2 Oct 2019 23:49:04 +0200 +Subject: mvpp2: remove misleading comment +Patch-mainline: v5.5-rc1 +Git-commit: 80f60a911e5ea4de9e25b539bec4f597af7b2ff4 +References: git-fixes + +Recycling in mvpp2 has gone long time ago, but two comment still refers +to it. Remove those two misleading comments as they generate confusion. + +Fixes: 7ef7e1d949cd ("net: mvpp2: drop useless fields in mvpp2_bm_pool and related code") +Signed-off-by: Matteo Croce +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c ++++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +@@ -2619,7 +2619,7 @@ static void mvpp2_rx_csum(struct mvpp2_p + skb->ip_summed = CHECKSUM_NONE; + } + +-/* Reuse skb if possible, or allocate a new skb and add it to BM pool */ ++/* Allocate a new skb and add it to BM pool */ + static int mvpp2_rx_refill(struct mvpp2_port *port, + struct mvpp2_bm_pool *bm_pool, int pool) + { +@@ -2627,7 +2627,6 @@ static int mvpp2_rx_refill(struct mvpp2_ + phys_addr_t phys_addr; + void *buf; + +- /* No recycle or too many buffers are in use, so allocate a new skb */ + buf = mvpp2_buf_alloc(port, bm_pool, &dma_addr, &phys_addr, + GFP_ATOMIC); + if (!buf) diff --git a/patches.suse/net-cxgb4-Check-the-return-from-t4_query_params-prop.patch b/patches.suse/net-cxgb4-Check-the-return-from-t4_query_params-prop.patch new file mode 100644 index 0000000..0fc349c --- /dev/null +++ b/patches.suse/net-cxgb4-Check-the-return-from-t4_query_params-prop.patch @@ -0,0 +1,36 @@ +From: Jason Gunthorpe +Date: Tue, 14 Apr 2020 12:27:08 -0300 +Subject: net/cxgb4: Check the return from t4_query_params properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Patch-mainline: v5.7-rc2 +Git-commit: c799fca8baf18d1bbbbad6c3b736eefbde8bdb90 +References: git-fixes + +Positive return values are also failures that don't set val, +although this probably can't happen. Fixes gcc 10 warning: + +drivers/net/ethernet/chelsio/cxgb4/t4_hw.c: In function ‘t4_phy_fw_ver’: +drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:3747:14: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] + 3747 | *phy_fw_ver = val; + +Fixes: 01b6961410b7 ("cxgb4: Add PHY firmware support for T420-BT cards") +Signed-off-by: Jason Gunthorpe +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +@@ -3748,7 +3748,7 @@ int t4_phy_fw_ver(struct adapter *adap, + FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_VERSION)); + ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, + ¶m, &val); +- if (ret < 0) ++ if (ret) + return ret; + *phy_fw_ver = val; + return 0; diff --git a/patches.suse/net-dsa-loop-Add-module-soft-dependency.patch b/patches.suse/net-dsa-loop-Add-module-soft-dependency.patch new file mode 100644 index 0000000..5364430 --- /dev/null +++ b/patches.suse/net-dsa-loop-Add-module-soft-dependency.patch @@ -0,0 +1,30 @@ +From: Florian Fainelli +Date: Sat, 9 May 2020 16:45:44 -0700 +Subject: net: dsa: loop: Add module soft dependency +Git-commit: 3047211ca11bf77b3ecbce045c0aa544d934b945 +Patch-mainline: 5.7-rc6 +References: networking-stable-20_05_16 + +There is a soft dependency against dsa_loop_bdinfo.ko which sets up the +MDIO device registration, since there are no symbols referenced by +dsa_loop.ko, there is no automatic loading of dsa_loop_bdinfo.ko which +is needed. + +Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") +Signed-off-by: Florian Fainelli +Signed-off-by: Jakub Kicinski +Signed-off-by: Jiri Slaby +--- + drivers/net/dsa/dsa_loop.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/dsa/dsa_loop.c ++++ b/drivers/net/dsa/dsa_loop.c +@@ -326,6 +326,7 @@ static void __exit dsa_loop_exit(void) + } + module_exit(dsa_loop_exit); + ++MODULE_SOFTDEP("pre: dsa_loop_bdinfo"); + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("Florian Fainelli"); + MODULE_DESCRIPTION("DSA loopback driver"); diff --git a/patches.suse/net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch b/patches.suse/net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch new file mode 100644 index 0000000..69ee6b8 --- /dev/null +++ b/patches.suse/net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch @@ -0,0 +1,119 @@ +From: DENG Qingfang +Date: Wed, 13 May 2020 23:10:16 +0800 +Subject: net: dsa: mt7530: fix roaming from DSA user ports +Git-commit: 5e5502e012b8129e11be616acb0f9c34bc8f8adb +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +When a client moves from a DSA user port to a software port in a bridge, +it cannot reach any other clients that connected to the DSA user ports. +That is because SA learning on the CPU port is disabled, so the switch +ignores the client's frames from the CPU port and still thinks it is at +the user port. + +Fix it by enabling SA learning on the CPU port. + +To prevent the switch from learning from flooding frames from the CPU +port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames, +and let the switch flood them instead of trapping to the CPU port. +Multicast frames still need to be trapped to the CPU port for snooping, +so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames +to disable SA learning. + +Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") +Signed-off-by: DENG Qingfang +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/dsa/mt7530.c | 9 ++------- + drivers/net/dsa/mt7530.h | 1 + + net/dsa/tag_mtk.c | 16 ++++++++++++++++ + 3 files changed, 19 insertions(+), 7 deletions(-) + +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c +@@ -640,11 +640,8 @@ mt7530_cpu_port_enable(struct mt7530_pri + /* Setup the MAC by default for the cpu port */ + mt7530_write(priv, MT7530_PMCR_P(port), PMCR_CPUP_LINK); + +- /* Disable auto learning on the cpu port */ +- mt7530_set(priv, MT7530_PSC_P(port), SA_DIS); +- +- /* Unknown unicast frame fordwarding to the cpu port */ +- mt7530_set(priv, MT7530_MFC, UNU_FFP(BIT(port))); ++ /* Unknown multicast frame forwarding to the cpu port */ ++ mt7530_rmw(priv, MT7530_MFC, UNM_FFP_MASK, UNM_FFP(BIT(port))); + + /* CPU port gets connected to all user ports of + * the switch +@@ -981,8 +978,6 @@ mt7530_setup(struct dsa_switch *ds) + /* Enable and reset MIB counters */ + mt7530_mib_reset(ds); + +- mt7530_clear(priv, MT7530_MFC, UNU_FFP_MASK); +- + for (i = 0; i < MT7530_NUM_PORTS; i++) { + /* Disable forwarding by default on all ports */ + mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, +--- a/drivers/net/dsa/mt7530.h ++++ b/drivers/net/dsa/mt7530.h +@@ -33,6 +33,7 @@ + #define MT7530_MFC 0x10 + #define BC_FFP(x) (((x) & 0xff) << 24) + #define UNM_FFP(x) (((x) & 0xff) << 16) ++#define UNM_FFP_MASK UNM_FFP(~0) + #define UNU_FFP(x) (((x) & 0xff) << 8) + #define UNU_FFP_MASK UNU_FFP(~0) + +--- a/net/dsa/tag_mtk.c ++++ b/net/dsa/tag_mtk.c +@@ -19,12 +19,16 @@ + #define MTK_HDR_LEN 4 + #define MTK_HDR_RECV_SOURCE_PORT_MASK GENMASK(2, 0) + #define MTK_HDR_XMIT_DP_BIT_MASK GENMASK(5, 0) ++#define MTK_HDR_XMIT_SA_DIS BIT(6) + + static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb, + struct net_device *dev) + { + struct dsa_slave_priv *p = netdev_priv(dev); + u8 *mtk_tag; ++ unsigned char *dest = eth_hdr(skb)->h_dest; ++ bool is_multicast_skb = is_multicast_ether_addr(dest) && ++ !is_broadcast_ether_addr(dest); + + if (skb_cow_head(skb, MTK_HDR_LEN) < 0) + goto out_free; +@@ -37,6 +41,11 @@ static struct sk_buff *mtk_tag_xmit(stru + mtk_tag = skb->data + 2 * ETH_ALEN; + mtk_tag[0] = 0; + mtk_tag[1] = (1 << p->dp->index) & MTK_HDR_XMIT_DP_BIT_MASK; ++ ++ /* Disable SA learning for multicast frames */ ++ if (unlikely(is_multicast_skb)) ++ mtk_tag[1] |= MTK_HDR_XMIT_SA_DIS; ++ + mtk_tag[2] = 0; + mtk_tag[3] = 0; + +@@ -55,6 +64,9 @@ static struct sk_buff *mtk_tag_rcv(struc + struct dsa_switch *ds; + int port; + __be16 *phdr, hdr; ++ unsigned char *dest = eth_hdr(skb)->h_dest; ++ bool is_multicast_skb = is_multicast_ether_addr(dest) && ++ !is_broadcast_ether_addr(dest); + + if (unlikely(!pskb_may_pull(skb, MTK_HDR_LEN))) + goto out_drop; +@@ -88,6 +100,10 @@ static struct sk_buff *mtk_tag_rcv(struc + + skb->dev = ds->ports[port].netdev; + ++ /* Only unicast or broadcast frames are offloaded */ ++ if (likely(!is_multicast_skb)) ++ skb->offload_fwd_mark = 1; ++ + return skb; + + out_drop: diff --git a/patches.suse/net-ena-add-intr_moder_rx_interval-to-struct-ena_com.patch b/patches.suse/net-ena-add-intr_moder_rx_interval-to-struct-ena_com.patch new file mode 100644 index 0000000..5d59d19 --- /dev/null +++ b/patches.suse/net-ena-add-intr_moder_rx_interval-to-struct-ena_com.patch @@ -0,0 +1,113 @@ +From: Arthur Kiyanovski +Date: Mon, 16 Sep 2019 14:31:26 +0300 +Subject: net: ena: add intr_moder_rx_interval to struct ena_com_dev and use it +Patch-mainline: v5.4-rc1 +Git-commit: 15619e722b16aaa40f942b93631aa92581a7b393 +References: git-fixes + +Add intr_moder_rx_interval to struct ena_com_dev and use it as the +location where the interrupt moderation rx interval is saved, instead +of the interrupt moderation table. + +This is done as a first step before removing the old interrupt moderation +code. + +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 20 ++++---------------- + drivers/net/ethernet/amazon/ena/ena_com.h | 8 +++++++- + drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 ++- + 3 files changed, 13 insertions(+), 18 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -1297,9 +1297,6 @@ static int ena_com_init_interrupt_modera + static void ena_com_update_intr_delay_resolution(struct ena_com_dev *ena_dev, + u16 intr_delay_resolution) + { +- struct ena_intr_moder_entry *intr_moder_tbl = ena_dev->intr_moder_tbl; +- unsigned int i; +- + if (!intr_delay_resolution) { + pr_err("Illegal intr_delay_resolution provided. Going to use default 1 usec resolution\n"); + intr_delay_resolution = 1; +@@ -1307,8 +1304,7 @@ static void ena_com_update_intr_delay_re + ena_dev->intr_delay_resolution = intr_delay_resolution; + + /* update Rx */ +- for (i = 0; i < ENA_INTR_MAX_NUM_OF_LEVELS; i++) +- intr_moder_tbl[i].intr_moder_interval /= intr_delay_resolution; ++ ena_dev->intr_moder_rx_interval /= intr_delay_resolution; + + /* update Tx */ + ena_dev->intr_moder_tx_interval /= intr_delay_resolution; +@@ -2798,11 +2794,8 @@ int ena_com_update_nonadaptive_moderatio + return -EFAULT; + } + +- /* We use LOWEST entry of moderation table for storing +- * nonadaptive interrupt coalescing values +- */ +- ena_dev->intr_moder_tbl[ENA_INTR_MODER_LOWEST].intr_moder_interval = +- rx_coalesce_usecs / ena_dev->intr_delay_resolution; ++ ena_dev->intr_moder_rx_interval = rx_coalesce_usecs / ++ ena_dev->intr_delay_resolution; + + return 0; + } +@@ -2907,12 +2900,7 @@ unsigned int ena_com_get_nonadaptive_mod + + unsigned int ena_com_get_nonadaptive_moderation_interval_rx(struct ena_com_dev *ena_dev) + { +- struct ena_intr_moder_entry *intr_moder_tbl = ena_dev->intr_moder_tbl; +- +- if (intr_moder_tbl) +- return intr_moder_tbl[ENA_INTR_MODER_LOWEST].intr_moder_interval; +- +- return 0; ++ return ena_dev->intr_moder_rx_interval; + } + + void ena_com_init_intr_moderation_entry(struct ena_com_dev *ena_dev, +--- a/drivers/net/ethernet/amazon/ena/ena_com.h ++++ b/drivers/net/ethernet/amazon/ena/ena_com.h +@@ -93,7 +93,7 @@ + #define ENA_INTR_HIGHEST_BYTES (192 * 1024) + + #define ENA_INTR_INITIAL_TX_INTERVAL_USECS 196 +-#define ENA_INTR_INITIAL_RX_INTERVAL_USECS 4 ++#define ENA_INTR_INITIAL_RX_INTERVAL_USECS 0 + #define ENA_INTR_DELAY_OLD_VALUE_WEIGHT 6 + #define ENA_INTR_DELAY_NEW_VALUE_WEIGHT 4 + #define ENA_INTR_MODER_LEVEL_STRIDE 2 +@@ -376,7 +376,13 @@ struct ena_com_dev { + struct ena_host_attribute host_attr; + bool adaptive_coalescing; + u16 intr_delay_resolution; ++ ++ /* interrupt moderation intervals are in usec divided by ++ * intr_delay_resolution, which is supplied by the device. ++ */ + u32 intr_moder_tx_interval; ++ u32 intr_moder_rx_interval; ++ + struct ena_intr_moder_entry *intr_moder_tbl; + + struct ena_com_llq_info llq_info; +--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c ++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c +@@ -3487,10 +3487,11 @@ static int ena_probe(struct pci_dev *pde + calc_queue_ctx.get_feat_ctx = &get_feat_ctx; + calc_queue_ctx.pdev = pdev; + +- /* initial Tx interrupt delay, Assumes 1 usec granularity. ++ /* Initial Tx and RX interrupt delay. Assumes 1 usec granularity. + * Updated during device initialization with the real granularity + */ + ena_dev->intr_moder_tx_interval = ENA_INTR_INITIAL_TX_INTERVAL_USECS; ++ ena_dev->intr_moder_rx_interval = ENA_INTR_INITIAL_RX_INTERVAL_USECS; + io_queue_num = ena_calc_io_queue_num(pdev, ena_dev, &get_feat_ctx); + rc = ena_calc_queue_size(&calc_queue_ctx); + if (rc || io_queue_num <= 0) { diff --git a/patches.suse/net-ena-add-missing-ethtool-TX-timestamping-indicati.patch b/patches.suse/net-ena-add-missing-ethtool-TX-timestamping-indicati.patch new file mode 100644 index 0000000..950d96d --- /dev/null +++ b/patches.suse/net-ena-add-missing-ethtool-TX-timestamping-indicati.patch @@ -0,0 +1,38 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:42 +0000 +Subject: net: ena: add missing ethtool TX timestamping indication +Patch-mainline: v5.6-rc2 +Git-commit: cf6d17fde93bdda23c9b02dd5906a12bf8c55209 +References: git-fixes + +Current implementation of the driver calls skb_tx_timestamp()to add a +software tx timestamp to the skb, however the software-transmit capability +is not reported in ethtool -T. + +This commit updates the ethtool structure to report the software-transmit +capability in ethtool -T using the standard ethtool_op_get_ts_info(). +This function reports all software timestamping capabilities (tx and rx), +as well as setting phc_index = -1. phc_index is the index of the PTP +hardware clock device that will be used for hardware timestamps. Since we +don't have such a device in ENA, using the default -1 value is the correct +setting. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Ezequiel Lara Gomez +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -805,6 +805,7 @@ static const struct ethtool_ops ena_etht + .get_channels = ena_get_channels, + .get_tunable = ena_get_tunable, + .set_tunable = ena_set_tunable, ++ .get_ts_info = ethtool_op_get_ts_info, + }; + + void ena_set_ethtool_ops(struct net_device *netdev) diff --git a/patches.suse/net-ena-avoid-memory-access-violation-by-validating-.patch b/patches.suse/net-ena-avoid-memory-access-violation-by-validating-.patch new file mode 100644 index 0000000..08eec5d --- /dev/null +++ b/patches.suse/net-ena-avoid-memory-access-violation-by-validating-.patch @@ -0,0 +1,67 @@ +From: Arthur Kiyanovski +Date: Tue, 17 Mar 2020 09:06:41 +0200 +Subject: net: ena: avoid memory access violation by validating req_id properly +Patch-mainline: v5.6 +Git-commit: 30623e1ed116bcd1785217d0a98eec643687e091 +References: git-fixes + +Rx req_id is an index in struct ena_eth_io_rx_cdesc_base. +The driver should validate that the Rx req_id it received from +the device is in range [0, ring_size -1]. Failure to do so could +yield to potential memory access violoation. +The validation was mistakenly done when refilling +the Rx submission queue and not in Rx completion queue. + +Fixes: ad974baef2a1 ("net: ena: add support for out of order rx buffers refill") +Signed-off-by: Noam Dagan +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c ++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c +@@ -533,13 +533,9 @@ static int ena_refill_rx_bufs(struct ena + struct ena_rx_buffer *rx_info; + + req_id = rx_ring->free_ids[next_to_use]; +- rc = validate_rx_req_id(rx_ring, req_id); +- if (unlikely(rc < 0)) +- break; + + rx_info = &rx_ring->rx_buffer_info[req_id]; + +- + rc = ena_alloc_rx_page(rx_ring, rx_info, + GFP_ATOMIC | __GFP_COMP); + if (unlikely(rc < 0)) { +@@ -871,9 +867,15 @@ static struct sk_buff *ena_rx_skb(struct + struct ena_rx_buffer *rx_info; + u16 len, req_id, buf = 0; + void *va; ++ int rc; + + len = ena_bufs[buf].len; + req_id = ena_bufs[buf].req_id; ++ ++ rc = validate_rx_req_id(rx_ring, req_id); ++ if (unlikely(rc < 0)) ++ return NULL; ++ + rx_info = &rx_ring->rx_buffer_info[req_id]; + + if (unlikely(!rx_info->page)) { +@@ -946,6 +948,11 @@ static struct sk_buff *ena_rx_skb(struct + buf++; + len = ena_bufs[buf].len; + req_id = ena_bufs[buf].req_id; ++ ++ rc = validate_rx_req_id(rx_ring, req_id); ++ if (unlikely(rc < 0)) ++ return NULL; ++ + rx_info = &rx_ring->rx_buffer_info[req_id]; + } while (1); + diff --git a/patches.suse/net-ena-don-t-wake-up-tx-queue-when-down.patch b/patches.suse/net-ena-don-t-wake-up-tx-queue-when-down.patch new file mode 100644 index 0000000..b5108a6 --- /dev/null +++ b/patches.suse/net-ena-don-t-wake-up-tx-queue-when-down.patch @@ -0,0 +1,49 @@ +From: Sameeh Jubran +Date: Sun, 15 Sep 2019 17:29:44 +0300 +Subject: net: ena: don't wake up tx queue when down +Patch-mainline: v5.4-rc1 +Git-commit: a53651ec93a8d7ab5b26c5390e0c389048b4b4b6 +References: git-fixes + +There is a race condition that can occur when calling ena_down(). +The ena_clean_tx_irq() - which is a part of the napi handler - +function might wake up the tx queue when the queue is supposed +to be down (during recovery or changing the size of the queues +for example) This causes the ena_start_xmit() function to trigger +and possibly try to access the destroyed queues. + +The race is illustrated below: + +Flow A: Flow B(napi handler) +ena_down() + netif_carrier_off() + netif_tx_disable() + ena_clean_tx_irq() + netif_tx_wake_queue() + ena_napi_disable_all() + ena_destroy_all_io_queues() + +After these flows the tx queue is active and ena_start_xmit() accesses +the destroyed queue which leads to a kernel panic. + +fixes: 1738cd3ed342 (net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)) + +Signed-off-by: Sameeh Jubran +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c ++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c +@@ -824,7 +824,8 @@ static int ena_clean_tx_irq(struct ena_r + above_thresh = + ena_com_sq_have_enough_space(tx_ring->ena_com_io_sq, + ENA_TX_WAKEUP_THRESH); +- if (netif_tx_queue_stopped(txq) && above_thresh) { ++ if (netif_tx_queue_stopped(txq) && above_thresh && ++ test_bit(ENA_FLAG_DEV_UP, &tx_ring->adapter->flags)) { + netif_tx_wake_queue(txq); + u64_stats_update_begin(&tx_ring->syncp); + tx_ring->tx_stats.queue_wakeup++; diff --git a/patches.suse/net-ena-ena-com.c-prevent-NULL-pointer-dereference.patch b/patches.suse/net-ena-ena-com.c-prevent-NULL-pointer-dereference.patch new file mode 100644 index 0000000..21253d2 --- /dev/null +++ b/patches.suse/net-ena-ena-com.c-prevent-NULL-pointer-dereference.patch @@ -0,0 +1,45 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:51 +0000 +Subject: net: ena: ena-com.c: prevent NULL pointer dereference +Patch-mainline: v5.6-rc2 +Git-commit: c207979f5ae10ed70aff1bb13f39f0736973de99 +References: git-fixes + +comp_ctx can be NULL in a very rare case when an admin command is executed +during the execution of ena_remove(). + +The bug scenario is as follows: + +* ena_destroy_device() sets the comp_ctx to be NULL +* An admin command is executed before executing unregister_netdev(), + this can still happen because our device can still receive callbacks + from the netdev infrastructure such as ethtool commands. +* When attempting to access the comp_ctx, the bug occurs since it's set + to NULL + +Fix: +Added a check that comp_ctx is not NULL + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -200,6 +200,11 @@ static void comp_ctxt_release(struct ena + static struct ena_comp_ctx *get_comp_ctxt(struct ena_com_admin_queue *queue, + u16 command_id, bool capture) + { ++ if (unlikely(!queue->comp_ctx)) { ++ pr_err("Completion context is NULL\n"); ++ return NULL; ++ } ++ + if (unlikely(command_id >= queue->q_depth)) { + pr_err("command id is larger than the queue size. cmd_id: %u queue size %d\n", + command_id, queue->q_depth); diff --git a/patches.suse/net-ena-ethtool-use-correct-value-for-crc32-hash.patch b/patches.suse/net-ena-ethtool-use-correct-value-for-crc32-hash.patch new file mode 100644 index 0000000..efe07ef --- /dev/null +++ b/patches.suse/net-ena-ethtool-use-correct-value-for-crc32-hash.patch @@ -0,0 +1,38 @@ +From: Sameeh Jubran +Date: Tue, 11 Feb 2020 15:17:50 +0000 +Subject: net: ena: ethtool: use correct value for crc32 hash +Patch-mainline: v5.6-rc2 +Git-commit: 886d2089276e40d460731765083a741c5c762461 +References: git-fixes + +Up till kernel 4.11 there was no enum defined for crc32 hash in ethtool, +thus the xor enum was used for supporting crc32. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -693,7 +693,7 @@ static int ena_get_rxfh(struct net_devic + func = ETH_RSS_HASH_TOP; + break; + case ENA_ADMIN_CRC32: +- func = ETH_RSS_HASH_XOR; ++ func = ETH_RSS_HASH_CRC32; + break; + default: + netif_err(adapter, drv, netdev, +@@ -742,7 +742,7 @@ static int ena_set_rxfh(struct net_devic + case ETH_RSS_HASH_TOP: + func = ENA_ADMIN_TOEPLITZ; + break; +- case ETH_RSS_HASH_XOR: ++ case ETH_RSS_HASH_CRC32: + func = ENA_ADMIN_CRC32; + break; + default: diff --git a/patches.suse/net-ena-fix-continuous-keep-alive-resets.patch b/patches.suse/net-ena-fix-continuous-keep-alive-resets.patch new file mode 100644 index 0000000..f5a6dc1 --- /dev/null +++ b/patches.suse/net-ena-fix-continuous-keep-alive-resets.patch @@ -0,0 +1,39 @@ +From: Arthur Kiyanovski +Date: Tue, 17 Mar 2020 09:06:42 +0200 +Subject: net: ena: fix continuous keep-alive resets +Patch-mainline: v5.6 +Git-commit: dfdde1345bc124816f0fd42fa91b8748051e758e +References: git-fixes + +last_keep_alive_jiffies is updated in probe and when a keep-alive +event is received. In case the driver times-out on a keep-alive event, +it has high chances of continuously timing-out on keep-alive events. +This is because when the driver recovers from the keep-alive-timeout reset +the value of last_keep_alive_jiffies is very old, and if a keep-alive +event is not received before the next timer expires, the value of +last_keep_alive_jiffies will cause another keep-alive-timeout reset +and so forth in a loop. + +Solution: +Update last_keep_alive_jiffies whenever the device is restored after +reset. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Noam Dagan +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c ++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c +@@ -2807,6 +2807,7 @@ static int ena_restore_device(struct ena + netif_carrier_on(adapter->netdev); + + mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ)); ++ adapter->last_keep_alive_jiffies = jiffies; + dev_err(&pdev->dev, + "Device reset completed successfully, Driver info: %s\n", + version); diff --git a/patches.suse/net-ena-fix-corruption-of-dev_idx_to_host_tbl.patch b/patches.suse/net-ena-fix-corruption-of-dev_idx_to_host_tbl.patch new file mode 100644 index 0000000..4e26b4f --- /dev/null +++ b/patches.suse/net-ena-fix-corruption-of-dev_idx_to_host_tbl.patch @@ -0,0 +1,76 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:48 +0000 +Subject: net: ena: fix corruption of dev_idx_to_host_tbl +Patch-mainline: v5.6-rc2 +Git-commit: e3f89f91e98ce07dc0f121a3b70d21aca749ba39 +References: git-fixes + +The function ena_com_ind_tbl_convert_from_device() has an overflow +bug as explained below. Either way, this function is not needed at +all since we don't retrieve the indirection table from the device +at any point which means that this conversion is not needed. + +The bug: +The for loop iterates over all io_sq_queues, when passing the actual +number of used queues the io_sq_queues[i].idx equals 0 since they are +uninitialized which results in the following code to be executed till +the end of the loop: + +dev_idx_to_host_tbl[0] = i; + +This results dev_idx_to_host_tbl[0] in being equal to +ENA_TOTAL_NUM_QUEUES - 1. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 28 ---------------------------- + 1 file changed, 28 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -1281,30 +1281,6 @@ static int ena_com_ind_tbl_convert_to_de + return 0; + } + +-static int ena_com_ind_tbl_convert_from_device(struct ena_com_dev *ena_dev) +-{ +- u16 dev_idx_to_host_tbl[ENA_TOTAL_NUM_QUEUES] = { (u16)-1 }; +- struct ena_rss *rss = &ena_dev->rss; +- u8 idx; +- u16 i; +- +- for (i = 0; i < ENA_TOTAL_NUM_QUEUES; i++) +- dev_idx_to_host_tbl[ena_dev->io_sq_queues[i].idx] = i; +- +- for (i = 0; i < 1 << rss->tbl_log_size; i++) { +- if (rss->rss_ind_tbl[i].cq_idx > ENA_TOTAL_NUM_QUEUES) +- return -EINVAL; +- idx = (u8)rss->rss_ind_tbl[i].cq_idx; +- +- if (dev_idx_to_host_tbl[idx] > ENA_TOTAL_NUM_QUEUES) +- return -EINVAL; +- +- rss->host_rss_ind_tbl[i] = dev_idx_to_host_tbl[idx]; +- } +- +- return 0; +-} +- + static int ena_com_init_interrupt_moderation_table(struct ena_com_dev *ena_dev) + { + size_t size; +@@ -2642,10 +2618,6 @@ int ena_com_indirect_table_get(struct en + if (!ind_tbl) + return 0; + +- rc = ena_com_ind_tbl_convert_from_device(ena_dev); +- if (unlikely(rc)) +- return rc; +- + for (i = 0; i < (1 << rss->tbl_log_size); i++) + ind_tbl[i] = rss->host_rss_ind_tbl[i]; + diff --git a/patches.suse/net-ena-fix-default-tx-interrupt-moderation-interval.patch b/patches.suse/net-ena-fix-default-tx-interrupt-moderation-interval.patch new file mode 100644 index 0000000..854a3b5 --- /dev/null +++ b/patches.suse/net-ena-fix-default-tx-interrupt-moderation-interval.patch @@ -0,0 +1,38 @@ +From: Arthur Kiyanovski +Date: Thu, 19 Dec 2019 17:40:55 +0200 +Subject: net: ena: fix default tx interrupt moderation interval +Patch-mainline: v5.5-rc3 +Git-commit: 05785adf6e570a068adf0502b61fe2b521d7f0ca +References: git-fixes + +Current default non-adaptive tx interrupt moderation interval is 196 us. +This value is too high and might cause the tx queue to fill up. + +In this commit we set the default non-adaptive tx interrupt moderation +interval to 64 us in order to: +1. Reduce the probability of the queue filling-up (when compared to the + current default value of 196 us). +2. Reduce unnecessary tx interrupt overhead (which happens if we set the + default tx interval to 0). + We determined experimentally that 64 us is an optimal value that + reduces interrupt rate by more than 20% without affecting performance. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.h ++++ b/drivers/net/ethernet/amazon/ena/ena_com.h +@@ -92,7 +92,7 @@ + #define ENA_INTR_HIGHEST_PKTS (128) + #define ENA_INTR_HIGHEST_BYTES (192 * 1024) + +-#define ENA_INTR_INITIAL_TX_INTERVAL_USECS 196 ++#define ENA_INTR_INITIAL_TX_INTERVAL_USECS 64 + #define ENA_INTR_INITIAL_RX_INTERVAL_USECS 0 + #define ENA_INTR_DELAY_OLD_VALUE_WEIGHT 6 + #define ENA_INTR_DELAY_NEW_VALUE_WEIGHT 4 diff --git a/patches.suse/net-ena-fix-incorrect-default-RSS-key.patch b/patches.suse/net-ena-fix-incorrect-default-RSS-key.patch new file mode 100644 index 0000000..95bab6e --- /dev/null +++ b/patches.suse/net-ena-fix-incorrect-default-RSS-key.patch @@ -0,0 +1,74 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:43 +0000 +Subject: net: ena: fix incorrect default RSS key +Patch-mainline: v5.6-rc2 +Git-commit: 0d1c3de7b8c78a5e44b74b62ede4a63629f5d811 +References: git-fixes + +Bug description: +When running "ethtool -x " the key shows up as all zeros. + +When we use "ethtool -X hfunc toeplitz hkey " to +set the key and then try to retrieve it using "ethtool -x " then +we return the correct key because we return the one we saved. + +Bug cause: +We don't fetch the key from the device but instead return the key +that we have saved internally which is by default set to zero upon +allocation. + +Fix: +This commit fixes the issue by initializing the key to a random value +using netdev_rss_key_fill(). + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 15 +++++++++++++++ + drivers/net/ethernet/amazon/ena/ena_com.h | 1 + + 2 files changed, 16 insertions(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -1041,6 +1041,19 @@ static int ena_com_get_feature(struct en + feature_ver); + } + ++static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev) ++{ ++ struct ena_admin_feature_rss_flow_hash_control *hash_key = ++ (ena_dev->rss).hash_key; ++ ++ netdev_rss_key_fill(&hash_key->key, sizeof(hash_key->key)); ++ /* The key is stored in the device in u32 array ++ * as well as the API requires the key to be passed in this ++ * format. Thus the size of our array should be divided by 4 ++ */ ++ hash_key->keys_num = sizeof(hash_key->key) / sizeof(u32); ++} ++ + static int ena_com_hash_key_allocate(struct ena_com_dev *ena_dev) + { + struct ena_rss *rss = &ena_dev->rss; +@@ -2635,6 +2648,8 @@ int ena_com_rss_init(struct ena_com_dev + if (unlikely(rc)) + goto err_hash_key; + ++ ena_com_hash_key_fill_default_key(ena_dev); ++ + rc = ena_com_hash_ctrl_init(ena_dev); + if (unlikely(rc)) + goto err_hash_ctrl; +--- a/drivers/net/ethernet/amazon/ena/ena_com.h ++++ b/drivers/net/ethernet/amazon/ena/ena_com.h +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include "ena_common_defs.h" + #include "ena_admin_defs.h" diff --git a/patches.suse/net-ena-fix-incorrectly-saving-queue-numbers-when-se.patch b/patches.suse/net-ena-fix-incorrectly-saving-queue-numbers-when-se.patch new file mode 100644 index 0000000..74049a7 --- /dev/null +++ b/patches.suse/net-ena-fix-incorrectly-saving-queue-numbers-when-se.patch @@ -0,0 +1,88 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:47 +0000 +Subject: net: ena: fix incorrectly saving queue numbers when setting RSS + indirection table +Patch-mainline: v5.6-rc2 +Git-commit: 92569fd27f5cb0ccbdf7c7d70044b690e89a0277 +References: git-fixes + +The indirection table has the indices of the Rx queues. When we store it +during set indirection operation, we convert the indices to our internal +representation of the indices. + +Our internal representation of the indices is: even indices for Tx and +uneven indices for Rx, where every Tx/Rx pair are in a consecutive order +starting from 0. For example if the driver has 3 queues (3 for Tx and 3 +for Rx) then the indices are as follows: +0 1 2 3 4 5 +Tx Rx Tx Rx Tx Rx + +The BUG: +The issue is that when we satisfy a get request for the indirection +table, we don't convert the indices back to the original representation. + +The FIX: +Simply apply the inverse function for the indices of the indirection +table after we set it. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 24 +++++++++++++++++++++++- + drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 ++ + 2 files changed, 25 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -636,6 +636,28 @@ static u32 ena_get_rxfh_key_size(struct + return ENA_HASH_KEY_SIZE; + } + ++static int ena_indirection_table_get(struct ena_adapter *adapter, u32 *indir) ++{ ++ struct ena_com_dev *ena_dev = adapter->ena_dev; ++ int i, rc; ++ ++ if (!indir) ++ return 0; ++ ++ rc = ena_com_indirect_table_get(ena_dev, indir); ++ if (rc) ++ return rc; ++ ++ /* Our internal representation of the indices is: even indices ++ * for Tx and uneven indices for Rx. We need to convert the Rx ++ * indices to be consecutive ++ */ ++ for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) ++ indir[i] = ENA_IO_RXQ_IDX_TO_COMBINED_IDX(indir[i]); ++ ++ return rc; ++} ++ + static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, + u8 *hfunc) + { +@@ -644,7 +666,7 @@ static int ena_get_rxfh(struct net_devic + u8 func; + int rc; + +- rc = ena_com_indirect_table_get(adapter->ena_dev, indir); ++ rc = ena_indirection_table_get(adapter, indir); + if (rc) + return rc; + +--- a/drivers/net/ethernet/amazon/ena/ena_netdev.h ++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h +@@ -126,6 +126,8 @@ + + #define ENA_IO_TXQ_IDX(q) (2 * (q)) + #define ENA_IO_RXQ_IDX(q) (2 * (q) + 1) ++#define ENA_IO_TXQ_IDX_TO_COMBINED_IDX(q) ((q) / 2) ++#define ENA_IO_RXQ_IDX_TO_COMBINED_IDX(q) (((q) - 1) / 2) + + #define ENA_MGMNT_IRQ_IDX 0 + #define ENA_IO_IRQ_FIRST_IDX 1 diff --git a/patches.suse/net-ena-fix-issues-in-setting-interrupt-moderation-p.patch b/patches.suse/net-ena-fix-issues-in-setting-interrupt-moderation-p.patch new file mode 100644 index 0000000..16c4acc --- /dev/null +++ b/patches.suse/net-ena-fix-issues-in-setting-interrupt-moderation-p.patch @@ -0,0 +1,113 @@ +From: Arthur Kiyanovski +Date: Thu, 19 Dec 2019 17:40:56 +0200 +Subject: net: ena: fix issues in setting interrupt moderation params in + ethtool +Patch-mainline: v5.5-rc3 +Git-commit: 41c53caa5a61ebc9221b71cc37f4a90549f1121d +References: git-fixes + +Issue 1: +-------- +Reproduction steps: +1. sudo ethtool -C eth0 rx-usecs 128 +2. sudo ethtool -C eth0 adaptive-rx on +3. sudo ethtool -C eth0 adaptive-rx off +4. ethtool -c eth0 + +expected output: rx-usecs 128 +actual output: rx-usecs 0 + +Reason for issue: +In stage 3, ethtool userspace calls first the ena_get_coalesce() handler +to get the current value of all properties, and then the ena_set_coalesce() +handler. When ena_get_coalesce() is called the adaptive interrupt +moderation is still on. There is an if in the code that returns the +rx_coalesce_usecs only if the adaptive interrupt moderation is off. +And since it is still on, rx_coalesce_usecs is not set, meaning it +stays 0. + +Solution to issue: +Remove this if static interrupt moderation intervals have nothing to do +with dynamic ones. + +Issue 2: +-------- +Reproduction steps: +1. sudo ethtool -C eth0 adaptive-rx on +2. sudo ethtool -C eth0 rx-usecs 128 +3. ethtool -c eth0 + +expected output: rx-usecs 128 +actual output: rx-usecs 0 + +Reason for issue: +In stage 2, when ena_set_coalesce() is called, the handler tests if +rx adaptive interrupt moderation is on, and if it is, it returns before +getting to the part in the function that sets the rx non-adaptive +interrupt moderation interval. + +Solution to issue: +Remove the return from the function when rx adaptive interrupt moderation +is on. + +Also cleaned up the fixed code in ena_set_coalesce by grouping together +adaptive interrupt moderation toggling, and using && instead of nested +ifs. + +Fixes: b3db86dc4b82 ("net: ena: reimplement set/get_coalesce()") +Fixes: 0eda847953d8 ("net: ena: fix retrieval of nonadaptive interrupt moderation intervals") +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 24 ++++++++++-------------- + 1 file changed, 10 insertions(+), 14 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -315,10 +315,9 @@ static int ena_get_coalesce(struct net_d + ena_com_get_nonadaptive_moderation_interval_tx(ena_dev) * + ena_dev->intr_delay_resolution; + +- if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) +- coalesce->rx_coalesce_usecs = +- ena_com_get_nonadaptive_moderation_interval_rx(ena_dev) +- * ena_dev->intr_delay_resolution; ++ coalesce->rx_coalesce_usecs = ++ ena_com_get_nonadaptive_moderation_interval_rx(ena_dev) ++ * ena_dev->intr_delay_resolution; + + coalesce->use_adaptive_rx_coalesce = + ena_com_get_adaptive_moderation_enabled(ena_dev); +@@ -367,12 +366,6 @@ static int ena_set_coalesce(struct net_d + + ena_update_tx_rings_intr_moderation(adapter); + +- if (coalesce->use_adaptive_rx_coalesce) { +- if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) +- ena_com_enable_adaptive_moderation(ena_dev); +- return 0; +- } +- + rc = ena_com_update_nonadaptive_moderation_interval_rx(ena_dev, + coalesce->rx_coalesce_usecs); + if (rc) +@@ -380,10 +373,13 @@ static int ena_set_coalesce(struct net_d + + ena_update_rx_rings_intr_moderation(adapter); + +- if (!coalesce->use_adaptive_rx_coalesce) { +- if (ena_com_get_adaptive_moderation_enabled(ena_dev)) +- ena_com_disable_adaptive_moderation(ena_dev); +- } ++ if (coalesce->use_adaptive_rx_coalesce && ++ !ena_com_get_adaptive_moderation_enabled(ena_dev)) ++ ena_com_enable_adaptive_moderation(ena_dev); ++ ++ if (!coalesce->use_adaptive_rx_coalesce && ++ ena_com_get_adaptive_moderation_enabled(ena_dev)) ++ ena_com_disable_adaptive_moderation(ena_dev); + + return 0; + } diff --git a/patches.suse/net-ena-fix-potential-crash-when-rxfh-key-is-NULL.patch b/patches.suse/net-ena-fix-potential-crash-when-rxfh-key-is-NULL.patch new file mode 100644 index 0000000..b2e78ab --- /dev/null +++ b/patches.suse/net-ena-fix-potential-crash-when-rxfh-key-is-NULL.patch @@ -0,0 +1,48 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:40 +0000 +Subject: net: ena: fix potential crash when rxfh key is NULL +Patch-mainline: v5.6-rc2 +Git-commit: 91a65b7d3ed8450f31ab717a65dcb5f9ceb5ab02 +References: git-fixes + +When ethtool -X is called without an hkey, ena_com_fill_hash_function() +is called with key=NULL, which is passed to memcpy causing a crash. + +This commit fixes this issue by checking key is not NULL. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -2301,15 +2301,16 @@ int ena_com_fill_hash_function(struct en + + switch (func) { + case ENA_ADMIN_TOEPLITZ: +- if (key_len > sizeof(hash_key->key)) { +- pr_err("key len (%hu) is bigger than the max supported (%zu)\n", +- key_len, sizeof(hash_key->key)); +- return -EINVAL; ++ if (key) { ++ if (key_len != sizeof(hash_key->key)) { ++ pr_err("key len (%hu) doesn't equal the supported size (%zu)\n", ++ key_len, sizeof(hash_key->key)); ++ return -EINVAL; ++ } ++ memcpy(hash_key->key, key, key_len); ++ rss->hash_init_val = init_val; ++ hash_key->keys_num = key_len >> 2; + } +- +- memcpy(hash_key->key, key, key_len); +- rss->hash_init_val = init_val; +- hash_key->keys_num = key_len >> 2; + break; + case ENA_ADMIN_CRC32: + rss->hash_init_val = init_val; diff --git a/patches.suse/net-ena-fix-retrieval-of-nonadaptive-interrupt-moder.patch b/patches.suse/net-ena-fix-retrieval-of-nonadaptive-interrupt-moder.patch new file mode 100644 index 0000000..e248ae2 --- /dev/null +++ b/patches.suse/net-ena-fix-retrieval-of-nonadaptive-interrupt-moder.patch @@ -0,0 +1,44 @@ +From: Arthur Kiyanovski +Date: Mon, 16 Sep 2019 14:31:35 +0300 +Subject: net: ena: fix retrieval of nonadaptive interrupt moderation intervals +Patch-mainline: v5.4-rc1 +Git-commit: 0eda847953d8dfb4b713ea62420f66157e230e13 +References: git-fixes + +Nonadaptive interrupt moderation intervals are assigned the value set +by the user in ethtool -C divided by ena_dev->intr_delay_resolution. + +Therefore when the user tries to get the nonadaptive interrupt moderation +intervals with ethtool -c the code needs to multiply the saved value +by ena_dev->intr_delay_resolution. + +The current code erroneously divides instead of multiplying in ethtool -c. +This patch fixes this. + +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -310,14 +310,15 @@ static int ena_get_coalesce(struct net_d + /* the devie doesn't support interrupt moderation */ + return -EOPNOTSUPP; + } ++ + coalesce->tx_coalesce_usecs = +- ena_com_get_nonadaptive_moderation_interval_tx(ena_dev) / ++ ena_com_get_nonadaptive_moderation_interval_tx(ena_dev) * + ena_dev->intr_delay_resolution; + + if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) + coalesce->rx_coalesce_usecs = + ena_com_get_nonadaptive_moderation_interval_rx(ena_dev) +- / ena_dev->intr_delay_resolution; ++ * ena_dev->intr_delay_resolution; + + coalesce->use_adaptive_rx_coalesce = + ena_com_get_adaptive_moderation_enabled(ena_dev); diff --git a/patches.suse/net-ena-fix-uses-of-round_jiffies.patch b/patches.suse/net-ena-fix-uses-of-round_jiffies.patch new file mode 100644 index 0000000..d1d299b --- /dev/null +++ b/patches.suse/net-ena-fix-uses-of-round_jiffies.patch @@ -0,0 +1,68 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:41 +0000 +Subject: net: ena: fix uses of round_jiffies() +Patch-mainline: v5.6-rc2 +Git-commit: 2a6e5fa2f4c25b66c763428a3e65363214946931 +References: git-fixes + +>From the documentation of round_jiffies(): +"Rounds a time delta in the future (in jiffies) up or down to +(approximately) full seconds. This is useful for timers for which +the exact time they fire does not matter too much, as long as +they fire approximately every X seconds. +By rounding these timers to whole seconds, all such timers will fire +at the same time, rather than at various times spread out. The goal +of this is to have the CPU wake up less, which saves power." + +There are 2 parts to this patch: +================================ +Part 1: +------- +In our case we need timer_service to be called approximately every +X=1 seconds, and the exact time does not matter, so using round_jiffies() +is the right way to go. + +Therefore we add round_jiffies() to the mod_timer() in ena_timer_service(). + +Part 2: +------- +round_jiffies() is used in check_for_missing_keep_alive() when +getting the jiffies of the expiration of the keep_alive timeout. Here it +is actually a mistake to use round_jiffies() because we want the exact +time when keep_alive should expire and not an approximate rounded time, +which can cause early, false positive, timeouts. + +Therefore we remove round_jiffies() in the calculation of +keep_alive_expired() in check_for_missing_keep_alive(). + +Fixes: 82ef30f13be0 ("net: ena: add hardware hints capability to the driver") +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c ++++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c +@@ -3027,8 +3027,8 @@ static void check_for_missing_keep_alive + if (adapter->keep_alive_timeout == ENA_HW_HINTS_NO_TIMEOUT) + return; + +- keep_alive_expired = round_jiffies(adapter->last_keep_alive_jiffies + +- adapter->keep_alive_timeout); ++ keep_alive_expired = adapter->last_keep_alive_jiffies + ++ adapter->keep_alive_timeout; + if (unlikely(time_is_before_jiffies(keep_alive_expired))) { + netif_err(adapter, drv, adapter->netdev, + "Keep alive watchdog timeout.\n"); +@@ -3130,7 +3130,7 @@ static void ena_timer_service(unsigned l + } + + /* Reset the timer */ +- mod_timer(&adapter->timer_service, jiffies + HZ); ++ mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ)); + } + + static int ena_calc_io_queue_num(struct pci_dev *pdev, diff --git a/patches.suse/net-ena-make-ena-rxfh-support-ETH_RSS_HASH_NO_CHANGE.patch b/patches.suse/net-ena-make-ena-rxfh-support-ETH_RSS_HASH_NO_CHANGE.patch new file mode 100644 index 0000000..5648d35 --- /dev/null +++ b/patches.suse/net-ena-make-ena-rxfh-support-ETH_RSS_HASH_NO_CHANGE.patch @@ -0,0 +1,69 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:49 +0000 +Subject: net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE +Patch-mainline: v5.6-rc2 +Git-commit: 470793a78ce344bd53d31e0c2d537f71ba957547 +References: git-fixes + +As the name suggests ETH_RSS_HASH_NO_CHANGE is received upon changing +the key or indirection table using ethtool while keeping the same hash +function. + +Also add a function for retrieving the current hash function from +the ena-com layer. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Saeed Bshara +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++++ + drivers/net/ethernet/amazon/ena/ena_com.h | 8 ++++++++ + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 3 +++ + 3 files changed, 16 insertions(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -1041,6 +1041,11 @@ static int ena_com_get_feature(struct en + feature_ver); + } + ++int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev) ++{ ++ return ena_dev->rss.hash_func; ++} ++ + static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev) + { + struct ena_admin_feature_rss_flow_hash_control *hash_key = +--- a/drivers/net/ethernet/amazon/ena/ena_com.h ++++ b/drivers/net/ethernet/amazon/ena/ena_com.h +@@ -694,6 +694,14 @@ int ena_com_rss_init(struct ena_com_dev + */ + void ena_com_rss_destroy(struct ena_com_dev *ena_dev); + ++/* ena_com_get_current_hash_function - Get RSS hash function ++ * @ena_dev: ENA communication layer struct ++ * ++ * Return the current hash function. ++ * @return: 0 or one of the ena_admin_hash_functions values. ++ */ ++int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev); ++ + /* ena_com_fill_hash_function - Fill RSS hash function + * @ena_dev: ENA communication layer struct + * @func: The hash function (Toeplitz or crc) +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -736,6 +736,9 @@ static int ena_set_rxfh(struct net_devic + } + + switch (hfunc) { ++ case ETH_RSS_HASH_NO_CHANGE: ++ func = ena_com_get_current_hash_function(ena_dev); ++ break; + case ETH_RSS_HASH_TOP: + func = ENA_ADMIN_TOEPLITZ; + break; diff --git a/patches.suse/net-ena-reimplement-set-get_coalesce.patch b/patches.suse/net-ena-reimplement-set-get_coalesce.patch new file mode 100644 index 0000000..f99716d --- /dev/null +++ b/patches.suse/net-ena-reimplement-set-get_coalesce.patch @@ -0,0 +1,158 @@ +From: Arthur Kiyanovski +Date: Mon, 16 Sep 2019 14:31:28 +0300 +Subject: net: ena: reimplement set/get_coalesce() +Patch-mainline: v5.4-rc1 +Git-commit: b3db86dc4b82ffc63e33c78dafc09d5c78ac4fe4 +References: git-fixes + +1. Remove old adaptive interrupt moderation code from set/get_coalesce() +2. Add ena_update_rx_rings_intr_moderation() function for updating + nonadaptive interrupt moderation intervals similarly to + ena_update_tx_rings_intr_moderation(). +3. Remove checks of multiple unsupported received interrupt coalescing + parameters. This makes code cleaner and cancels the need to update + it every time a new coalescing parameter is invented. + +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 88 ++++++++------------------ + 1 file changed, 28 insertions(+), 60 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -305,7 +305,6 @@ static int ena_get_coalesce(struct net_d + { + struct ena_adapter *adapter = netdev_priv(net_dev); + struct ena_com_dev *ena_dev = adapter->ena_dev; +- struct ena_intr_moder_entry intr_moder_entry; + + if (!ena_com_interrupt_moderation_supported(ena_dev)) { + /* the devie doesn't support interrupt moderation */ +@@ -314,23 +313,12 @@ static int ena_get_coalesce(struct net_d + coalesce->tx_coalesce_usecs = + ena_com_get_nonadaptive_moderation_interval_tx(ena_dev) / + ena_dev->intr_delay_resolution; +- if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) { ++ ++ if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) + coalesce->rx_coalesce_usecs = + ena_com_get_nonadaptive_moderation_interval_rx(ena_dev) + / ena_dev->intr_delay_resolution; +- } else { +- ena_com_get_intr_moderation_entry(adapter->ena_dev, ENA_INTR_MODER_LOWEST, &intr_moder_entry); +- coalesce->rx_coalesce_usecs_low = intr_moder_entry.intr_moder_interval; +- coalesce->rx_max_coalesced_frames_low = intr_moder_entry.pkts_per_interval; +- +- ena_com_get_intr_moderation_entry(adapter->ena_dev, ENA_INTR_MODER_MID, &intr_moder_entry); +- coalesce->rx_coalesce_usecs = intr_moder_entry.intr_moder_interval; +- coalesce->rx_max_coalesced_frames = intr_moder_entry.pkts_per_interval; +- +- ena_com_get_intr_moderation_entry(adapter->ena_dev, ENA_INTR_MODER_HIGHEST, &intr_moder_entry); +- coalesce->rx_coalesce_usecs_high = intr_moder_entry.intr_moder_interval; +- coalesce->rx_max_coalesced_frames_high = intr_moder_entry.pkts_per_interval; +- } ++ + coalesce->use_adaptive_rx_coalesce = + ena_com_get_adaptive_moderation_enabled(ena_dev); + +@@ -348,12 +336,22 @@ static void ena_update_tx_rings_intr_mod + adapter->tx_ring[i].smoothed_interval = val; + } + ++static void ena_update_rx_rings_intr_moderation(struct ena_adapter *adapter) ++{ ++ unsigned int val; ++ int i; ++ ++ val = ena_com_get_nonadaptive_moderation_interval_rx(adapter->ena_dev); ++ ++ for (i = 0; i < adapter->num_queues; i++) ++ adapter->rx_ring[i].smoothed_interval = val; ++} ++ + static int ena_set_coalesce(struct net_device *net_dev, + struct ethtool_coalesce *coalesce) + { + struct ena_adapter *adapter = netdev_priv(net_dev); + struct ena_com_dev *ena_dev = adapter->ena_dev; +- struct ena_intr_moder_entry intr_moder_entry; + int rc; + + if (!ena_com_interrupt_moderation_supported(ena_dev)) { +@@ -361,22 +359,6 @@ static int ena_set_coalesce(struct net_d + return -EOPNOTSUPP; + } + +- if (coalesce->rx_coalesce_usecs_irq || +- coalesce->rx_max_coalesced_frames_irq || +- coalesce->tx_coalesce_usecs_irq || +- coalesce->tx_max_coalesced_frames || +- coalesce->tx_max_coalesced_frames_irq || +- coalesce->stats_block_coalesce_usecs || +- coalesce->use_adaptive_tx_coalesce || +- coalesce->pkt_rate_low || +- coalesce->tx_coalesce_usecs_low || +- coalesce->tx_max_coalesced_frames_low || +- coalesce->pkt_rate_high || +- coalesce->tx_coalesce_usecs_high || +- coalesce->tx_max_coalesced_frames_high || +- coalesce->rate_sample_interval) +- return -EINVAL; +- + rc = ena_com_update_nonadaptive_moderation_interval_tx(ena_dev, + coalesce->tx_coalesce_usecs); + if (rc) +@@ -384,37 +366,23 @@ static int ena_set_coalesce(struct net_d + + ena_update_tx_rings_intr_moderation(adapter); + +- if (ena_com_get_adaptive_moderation_enabled(ena_dev)) { +- if (!coalesce->use_adaptive_rx_coalesce) { +- ena_com_disable_adaptive_moderation(ena_dev); +- rc = ena_com_update_nonadaptive_moderation_interval_rx(ena_dev, +- coalesce->rx_coalesce_usecs); +- return rc; +- } +- } else { /* was in non-adaptive mode */ +- if (coalesce->use_adaptive_rx_coalesce) { ++ if (coalesce->use_adaptive_rx_coalesce) { ++ if (!ena_com_get_adaptive_moderation_enabled(ena_dev)) + ena_com_enable_adaptive_moderation(ena_dev); +- } else { +- rc = ena_com_update_nonadaptive_moderation_interval_rx(ena_dev, +- coalesce->rx_coalesce_usecs); +- return rc; +- } ++ return 0; + } + +- intr_moder_entry.intr_moder_interval = coalesce->rx_coalesce_usecs_low; +- intr_moder_entry.pkts_per_interval = coalesce->rx_max_coalesced_frames_low; +- intr_moder_entry.bytes_per_interval = ENA_INTR_BYTE_COUNT_NOT_SUPPORTED; +- ena_com_init_intr_moderation_entry(adapter->ena_dev, ENA_INTR_MODER_LOWEST, &intr_moder_entry); +- +- intr_moder_entry.intr_moder_interval = coalesce->rx_coalesce_usecs; +- intr_moder_entry.pkts_per_interval = coalesce->rx_max_coalesced_frames; +- intr_moder_entry.bytes_per_interval = ENA_INTR_BYTE_COUNT_NOT_SUPPORTED; +- ena_com_init_intr_moderation_entry(adapter->ena_dev, ENA_INTR_MODER_MID, &intr_moder_entry); +- +- intr_moder_entry.intr_moder_interval = coalesce->rx_coalesce_usecs_high; +- intr_moder_entry.pkts_per_interval = coalesce->rx_max_coalesced_frames_high; +- intr_moder_entry.bytes_per_interval = ENA_INTR_BYTE_COUNT_NOT_SUPPORTED; +- ena_com_init_intr_moderation_entry(adapter->ena_dev, ENA_INTR_MODER_HIGHEST, &intr_moder_entry); ++ rc = ena_com_update_nonadaptive_moderation_interval_rx(ena_dev, ++ coalesce->rx_coalesce_usecs); ++ if (rc) ++ return rc; ++ ++ ena_update_rx_rings_intr_moderation(adapter); ++ ++ if (!coalesce->use_adaptive_rx_coalesce) { ++ if (ena_com_get_adaptive_moderation_enabled(ena_dev)) ++ ena_com_disable_adaptive_moderation(ena_dev); ++ } + + return 0; + } diff --git a/patches.suse/net-ena-rss-do-not-allocate-key-when-not-supported.patch b/patches.suse/net-ena-rss-do-not-allocate-key-when-not-supported.patch new file mode 100644 index 0000000..e788ffd --- /dev/null +++ b/patches.suse/net-ena-rss-do-not-allocate-key-when-not-supported.patch @@ -0,0 +1,61 @@ +From: Sameeh Jubran +Date: Tue, 11 Feb 2020 15:17:44 +0000 +Subject: net: ena: rss: do not allocate key when not supported +Patch-mainline: v5.6-rc2 +Git-commit: 6a4f7dc82d1e3abd3feb0c60b5041056fcd9880c +References: git-fixes + +Currently we allocate the key whether the device supports setting the +key or not. This commit adds a check to the allocation function and +handles the error accordingly. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -1057,6 +1057,20 @@ static void ena_com_hash_key_fill_defaul + static int ena_com_hash_key_allocate(struct ena_com_dev *ena_dev) + { + struct ena_rss *rss = &ena_dev->rss; ++ struct ena_admin_feature_rss_flow_hash_control *hash_key; ++ struct ena_admin_get_feat_resp get_resp; ++ int rc; ++ ++ hash_key = (ena_dev->rss).hash_key; ++ ++ rc = ena_com_get_feature_ex(ena_dev, &get_resp, ++ ENA_ADMIN_RSS_HASH_FUNCTION, ++ ena_dev->rss.hash_key_dma_addr, ++ sizeof(ena_dev->rss.hash_key), 0); ++ if (unlikely(rc)) { ++ hash_key = NULL; ++ return -EOPNOTSUPP; ++ } + + rss->hash_key = + dma_zalloc_coherent(ena_dev->dmadev, sizeof(*rss->hash_key), +@@ -2644,11 +2658,15 @@ int ena_com_rss_init(struct ena_com_dev + if (unlikely(rc)) + goto err_indr_tbl; + ++ /* The following function might return unsupported in case the ++ * device doesn't support setting the key / hash function. We can safely ++ * ignore this error and have indirection table support only. ++ */ + rc = ena_com_hash_key_allocate(ena_dev); +- if (unlikely(rc)) ++ if (unlikely(rc) && rc != -EOPNOTSUPP) + goto err_hash_key; +- +- ena_com_hash_key_fill_default_key(ena_dev); ++ else if (rc != -EOPNOTSUPP) ++ ena_com_hash_key_fill_default_key(ena_dev); + + rc = ena_com_hash_ctrl_init(ena_dev); + if (unlikely(rc)) diff --git a/patches.suse/net-ena-rss-fix-failure-to-get-indirection-table.patch b/patches.suse/net-ena-rss-fix-failure-to-get-indirection-table.patch new file mode 100644 index 0000000..e9a3fba --- /dev/null +++ b/patches.suse/net-ena-rss-fix-failure-to-get-indirection-table.patch @@ -0,0 +1,45 @@ +From: Sameeh Jubran +Date: Tue, 11 Feb 2020 15:17:45 +0000 +Subject: net: ena: rss: fix failure to get indirection table +Patch-mainline: v5.6-rc2 +Git-commit: 0c8923c0a64fb5d14bebb9a9065d2dc25ac5e600 +References: git-fixes + +On old hardware, getting / setting the hash function is not supported while +gettting / setting the indirection table is. + +This commit enables us to still show the indirection table on older +hardwares by setting the hash function and key to NULL. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -648,7 +648,21 @@ static int ena_get_rxfh(struct net_devic + if (rc) + return rc; + ++ /* We call this function in order to check if the device ++ * supports getting/setting the hash function. ++ */ + rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func, key); ++ ++ if (rc) { ++ if (rc == -EOPNOTSUPP) { ++ key = NULL; ++ hfunc = NULL; ++ rc = 0; ++ } ++ ++ return rc; ++ } ++ + if (rc) + return rc; + diff --git a/patches.suse/net-ena-rss-store-hash-function-as-values-and-not-bi.patch b/patches.suse/net-ena-rss-store-hash-function-as-values-and-not-bi.patch new file mode 100644 index 0000000..d9a2ad5 --- /dev/null +++ b/patches.suse/net-ena-rss-store-hash-function-as-values-and-not-bi.patch @@ -0,0 +1,49 @@ +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:46 +0000 +Subject: net: ena: rss: store hash function as values and not bits +Patch-mainline: v5.6-rc2 +Git-commit: 4844470d472d660c26149ad764da2406adb13423 +References: git-fixes + +The device receives, stores and retrieves the hash function value as bits +and not as their enum value. + +The bug: +* In ena_com_set_hash_function() we set + cmd.u.flow_hash_func.selected_func to the bit value of rss->hash_func. + (1 << rss->hash_func) +* In ena_com_get_hash_function() we retrieve the hash function and store + it's bit value in rss->hash_func. (Now the bit value of rss->hash_func + is stored in rss->hash_func instead of it's enum value) + +The fix: +This commit fixes the issue by converting the retrieved hash function +values from the device to the matching enum value of the set bit using +ffs(). ffs() finds the first set bit's index in a word. Since the function +returns 1 for the LSB's index, we need to subtract 1 from the returned +value (note that BIT(0) is 1). + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -2374,7 +2374,11 @@ int ena_com_get_hash_function(struct ena + if (unlikely(rc)) + return rc; + +- rss->hash_func = get_resp.u.flow_hash_func.selected_func; ++ /* ffs() returns 1 in case the lsb is set */ ++ rss->hash_func = ffs(get_resp.u.flow_hash_func.selected_func); ++ if (rss->hash_func) ++ rss->hash_func--; ++ + if (func) + *func = rss->hash_func; + diff --git a/patches.suse/net-fix-a-potential-recursive-NETDEV_FEAT_CHANGE.patch b/patches.suse/net-fix-a-potential-recursive-NETDEV_FEAT_CHANGE.patch new file mode 100644 index 0000000..e390e0b --- /dev/null +++ b/patches.suse/net-fix-a-potential-recursive-NETDEV_FEAT_CHANGE.patch @@ -0,0 +1,64 @@ +From: Cong Wang +Date: Thu, 7 May 2020 12:19:03 -0700 +Subject: net: fix a potential recursive NETDEV_FEAT_CHANGE +Git-commit: dd912306ff008891c82cd9f63e8181e47a9cb2fb +Patch-mainline: 5.7-rc6 +References: networking-stable-20_05_16 + +syzbot managed to trigger a recursive NETDEV_FEAT_CHANGE event +between bonding master and slave. I managed to find a reproducer +for this: + + ip li set bond0 up + ifenslave bond0 eth0 + brctl addbr br0 + ethtool -K eth0 lro off + brctl addif br0 bond0 + ip li set br0 up + +When a NETDEV_FEAT_CHANGE event is triggered on a bonding slave, +it captures this and calls bond_compute_features() to fixup its +master's and other slaves' features. However, when syncing with +its lower devices by netdev_sync_lower_features() this event is +triggered again on slaves when the LRO feature fails to change, +so it goes back and forth recursively until the kernel stack is +exhausted. + +Commit 17b85d29e82c intentionally lets __netdev_update_features() +return -1 for such a failure case, so we have to just rely on +the existing check inside netdev_sync_lower_features() and skip +NETDEV_FEAT_CHANGE event only for this specific failure case. + +Fixes: fd867d51f889 ("net/core: generic support for disabling netdev features down stack") +Reported-by: syzbot+e73ceacfd8560cc8a3ca@syzkaller.appspotmail.com +Reported-by: syzbot+c2fb6f9ddcea95ba49b5@syzkaller.appspotmail.com +Cc: Jarod Wilson +Cc: Nikolay Aleksandrov +Cc: Josh Poimboeuf +Cc: Jann Horn +Reviewed-by: Jay Vosburgh +Signed-off-by: Cong Wang +Acked-by: Nikolay Aleksandrov +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/core/dev.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -8017,11 +8017,13 @@ static void netdev_sync_lower_features(s + netdev_dbg(upper, "Disabling feature %pNF on lower dev %s.\n", + &feature, lower->name); + lower->wanted_features &= ~feature; +- netdev_update_features(lower); ++ __netdev_update_features(lower); + + if (unlikely(lower->features & feature)) + netdev_WARN(upper, "failed to disable %pNF on %s!\n", + &feature, lower->name); ++ else ++ netdev_features_change(lower); + } + } + } diff --git a/patches.suse/net-inet_csk-Fix-so_reuseport-bind-address-cache-in-.patch b/patches.suse/net-inet_csk-Fix-so_reuseport-bind-address-cache-in-.patch new file mode 100644 index 0000000..8e84d35 --- /dev/null +++ b/patches.suse/net-inet_csk-Fix-so_reuseport-bind-address-cache-in-.patch @@ -0,0 +1,161 @@ +From: Martin KaFai Lau +Date: Mon, 18 May 2020 17:13:34 -0700 +Subject: net: inet_csk: Fix so_reuseport bind-address cache in tb->fast* +Git-commit: 88d7fcfa3b1fe670f0412b95be785aafca63352b +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +The commit 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") +added a bind-address cache in tb->fast*. The tb->fast* caches the address +of a sk which has successfully been binded with SO_REUSEPORT ON. The idea +is to avoid the expensive conflict search in inet_csk_bind_conflict(). + +There is an issue with wildcard matching where sk_reuseport_match() should +have returned false but it is currently returning true. It ends up +hiding bind conflict. For example, + +bind("[::1]:443"); /* without SO_REUSEPORT. Succeed. */ +bind("[::2]:443"); /* with SO_REUSEPORT. Succeed. */ +bind("[::]:443"); /* with SO_REUSEPORT. Still Succeed where it shouldn't */ + +The last bind("[::]:443") with SO_REUSEPORT on should have failed because +it should have a conflict with the very first bind("[::1]:443") which +has SO_REUSEPORT off. However, the address "[::2]" is cached in +tb->fast* in the second bind. In the last bind, the sk_reuseport_match() +returns true because the binding sk's wildcard addr "[::]" matches with +the "[::2]" cached in tb->fast*. + +The correct bind conflict is reported by removing the second +bind such that tb->fast* cache is not involved and forces the +bind("[::]:443") to go through the inet_csk_bind_conflict(): + +bind("[::1]:443"); /* without SO_REUSEPORT. Succeed. */ +bind("[::]:443"); /* with SO_REUSEPORT. -EADDRINUSE */ + +The expected behavior for sk_reuseport_match() is, it should only allow +the "cached" tb->fast* address to be used as a wildcard match but not +the address of the binding sk. To do that, the current +"bool match_wildcard" arg is split into +"bool match_sk1_wildcard" and "bool match_sk2_wildcard". + +This change only affects the sk_reuseport_match() which is only +used by inet_csk (e.g. TCP). +The other use cases are calling inet_rcv_saddr_equal() and +this patch makes it pass the same "match_wildcard" arg twice to +the "ipv[46]_rcv_saddr_equal(..., match_wildcard, match_wildcard)". + +Cc: Josef Bacik +Fixes: 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") +Signed-off-by: Martin KaFai Lau +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/ipv4/inet_connection_sock.c | 43 ++++++++++++++++++++++------------------ + 1 file changed, 24 insertions(+), 19 deletions(-) + +--- a/net/ipv4/inet_connection_sock.c ++++ b/net/ipv4/inet_connection_sock.c +@@ -32,17 +32,19 @@ EXPORT_SYMBOL(inet_csk_timer_bug_msg); + #endif + + #if IS_ENABLED(CONFIG_IPV6) +-/* match_wildcard == true: IPV6_ADDR_ANY equals to any IPv6 addresses if IPv6 +- * only, and any IPv4 addresses if not IPv6 only +- * match_wildcard == false: addresses must be exactly the same, i.e. +- * IPV6_ADDR_ANY only equals to IPV6_ADDR_ANY, +- * and 0.0.0.0 equals to 0.0.0.0 only ++/* match_sk*_wildcard == true: IPV6_ADDR_ANY equals to any IPv6 addresses ++ * if IPv6 only, and any IPv4 addresses ++ * if not IPv6 only ++ * match_sk*_wildcard == false: addresses must be exactly the same, i.e. ++ * IPV6_ADDR_ANY only equals to IPV6_ADDR_ANY, ++ * and 0.0.0.0 equals to 0.0.0.0 only + */ + static int ipv6_rcv_saddr_equal(const struct in6_addr *sk1_rcv_saddr6, + const struct in6_addr *sk2_rcv_saddr6, + __be32 sk1_rcv_saddr, __be32 sk2_rcv_saddr, + bool sk1_ipv6only, bool sk2_ipv6only, +- bool match_wildcard) ++ bool match_sk1_wildcard, ++ bool match_sk2_wildcard) + { + int addr_type = ipv6_addr_type(sk1_rcv_saddr6); + int addr_type2 = sk2_rcv_saddr6 ? ipv6_addr_type(sk2_rcv_saddr6) : IPV6_ADDR_MAPPED; +@@ -52,8 +54,8 @@ static int ipv6_rcv_saddr_equal(const st + if (!sk2_ipv6only) { + if (sk1_rcv_saddr == sk2_rcv_saddr) + return 1; +- if (!sk1_rcv_saddr || !sk2_rcv_saddr) +- return match_wildcard; ++ return (match_sk1_wildcard && !sk1_rcv_saddr) || ++ (match_sk2_wildcard && !sk2_rcv_saddr); + } + return 0; + } +@@ -61,11 +63,11 @@ static int ipv6_rcv_saddr_equal(const st + if (addr_type == IPV6_ADDR_ANY && addr_type2 == IPV6_ADDR_ANY) + return 1; + +- if (addr_type2 == IPV6_ADDR_ANY && match_wildcard && ++ if (addr_type2 == IPV6_ADDR_ANY && match_sk2_wildcard && + !(sk2_ipv6only && addr_type == IPV6_ADDR_MAPPED)) + return 1; + +- if (addr_type == IPV6_ADDR_ANY && match_wildcard && ++ if (addr_type == IPV6_ADDR_ANY && match_sk1_wildcard && + !(sk1_ipv6only && addr_type2 == IPV6_ADDR_MAPPED)) + return 1; + +@@ -77,18 +79,19 @@ static int ipv6_rcv_saddr_equal(const st + } + #endif + +-/* match_wildcard == true: 0.0.0.0 equals to any IPv4 addresses +- * match_wildcard == false: addresses must be exactly the same, i.e. +- * 0.0.0.0 only equals to 0.0.0.0 ++/* match_sk*_wildcard == true: 0.0.0.0 equals to any IPv4 addresses ++ * match_sk*_wildcard == false: addresses must be exactly the same, i.e. ++ * 0.0.0.0 only equals to 0.0.0.0 + */ + static int ipv4_rcv_saddr_equal(__be32 sk1_rcv_saddr, __be32 sk2_rcv_saddr, +- bool sk2_ipv6only, bool match_wildcard) ++ bool sk2_ipv6only, bool match_sk1_wildcard, ++ bool match_sk2_wildcard) + { + if (!sk2_ipv6only) { + if (sk1_rcv_saddr == sk2_rcv_saddr) + return 1; +- if (!sk1_rcv_saddr || !sk2_rcv_saddr) +- return match_wildcard; ++ return (match_sk1_wildcard && !sk1_rcv_saddr) || ++ (match_sk2_wildcard && !sk2_rcv_saddr); + } + return 0; + } +@@ -104,10 +107,12 @@ int inet_rcv_saddr_equal(const struct so + sk2->sk_rcv_saddr, + ipv6_only_sock(sk), + ipv6_only_sock(sk2), ++ match_wildcard, + match_wildcard); + #endif + return ipv4_rcv_saddr_equal(sk->sk_rcv_saddr, sk2->sk_rcv_saddr, +- ipv6_only_sock(sk2), match_wildcard); ++ ipv6_only_sock(sk2), match_wildcard, ++ match_wildcard); + } + EXPORT_SYMBOL(inet_rcv_saddr_equal); + +@@ -269,10 +274,10 @@ static inline int sk_reuseport_match(str + tb->fast_rcv_saddr, + sk->sk_rcv_saddr, + tb->fast_ipv6_only, +- ipv6_only_sock(sk), true); ++ ipv6_only_sock(sk), true, false); + #endif + return ipv4_rcv_saddr_equal(tb->fast_rcv_saddr, sk->sk_rcv_saddr, +- ipv6_only_sock(sk), true); ++ ipv6_only_sock(sk), true, false); + } + + /* Obtain a reference to a local port for the given sock, diff --git a/patches.suse/net-ipip-fix-wrong-address-family-in-init-error-path.patch b/patches.suse/net-ipip-fix-wrong-address-family-in-init-error-path.patch new file mode 100644 index 0000000..5f12dab --- /dev/null +++ b/patches.suse/net-ipip-fix-wrong-address-family-in-init-error-path.patch @@ -0,0 +1,29 @@ +From: Vadim Fedorenko +Date: Wed, 20 May 2020 11:50:48 +0300 +Subject: net: ipip: fix wrong address family in init error path +Git-commit: 57ebc8f08504f176eb0f25b3e0fde517dec61a4f +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +In case of error with MPLS support the code is misusing AF_INET +instead of AF_MPLS. + +Fixes: 1b69e7e6c4da ("ipip: support MPLS over IPv4") +Signed-off-by: Vadim Fedorenko +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/ipv4/ipip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/ipv4/ipip.c ++++ b/net/ipv4/ipip.c +@@ -704,7 +704,7 @@ out: + + rtnl_link_failed: + #if IS_ENABLED(CONFIG_MPLS) +- xfrm4_tunnel_deregister(&mplsip_handler, AF_INET); ++ xfrm4_tunnel_deregister(&mplsip_handler, AF_MPLS); + xfrm_tunnel_mplsip_failed: + + #endif diff --git a/patches.suse/net-ipvlan-Fix-ipvlan-device-tso-disabled-while-NETI.patch b/patches.suse/net-ipvlan-Fix-ipvlan-device-tso-disabled-while-NETI.patch new file mode 100644 index 0000000..018cf86 --- /dev/null +++ b/patches.suse/net-ipvlan-Fix-ipvlan-device-tso-disabled-while-NETI.patch @@ -0,0 +1,40 @@ +From: Miaohe Lin +Date: Tue, 4 Jun 2019 06:07:34 +0000 +Subject: net: ipvlan: Fix ipvlan device tso disabled while NETIF_F_IP_CSUM is + set +Patch-mainline: v5.2-rc4 +Git-commit: ceae266bf0ae6564ac16d086bf749a096fa90ded +References: git-fixes + +There's some NICs, such as hinic, with NETIF_F_IP_CSUM and NETIF_F_TSO +on but NETIF_F_HW_CSUM off. And ipvlan device features will be +NETIF_F_TSO on with NETIF_F_IP_CSUM and NETIF_F_IP_CSUM both off as +IPVLAN_FEATURES only care about NETIF_F_HW_CSUM. So TSO will be +disabled in netdev_fix_features. +For example: +Features for enp129s0f0: +rx-checksumming: on +tx-checksumming: on + tx-checksum-ipv4: on + tx-checksum-ip-generic: off [fixed] + tx-checksum-ipv6: on + +Fixes: a188222b6ed2 ("net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK") +Signed-off-by: Miaohe Lin +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ipvlan/ipvlan_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ipvlan/ipvlan_main.c ++++ b/drivers/net/ipvlan/ipvlan_main.c +@@ -176,7 +176,7 @@ static void ipvlan_port_destroy(struct n + } + + #define IPVLAN_FEATURES \ +- (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ ++ (NETIF_F_SG | NETIF_F_CSUM_MASK | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ + NETIF_F_GSO | NETIF_F_TSO | NETIF_F_GSO_ROBUST | \ + NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_GRO | NETIF_F_RXCSUM | \ + NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_VLAN_STAG_FILTER) diff --git a/patches.suse/net-macsec-preserve-ingress-frame-ordering.patch b/patches.suse/net-macsec-preserve-ingress-frame-ordering.patch new file mode 100644 index 0000000..e51be94 --- /dev/null +++ b/patches.suse/net-macsec-preserve-ingress-frame-ordering.patch @@ -0,0 +1,73 @@ +From: Scott Dial +Date: Fri, 24 Apr 2020 18:51:08 -0400 +Subject: net: macsec: preserve ingress frame ordering +Git-commit: ab046a5d4be4c90a3952a0eae75617b49c0cb01b +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +MACsec decryption always occurs in a softirq context. Since +the FPU may not be usable in the softirq context, the call to +decrypt may be scheduled on the cryptd work queue. The cryptd +work queue does not provide ordering guarantees. Therefore, +preserving order requires masking out ASYNC implementations +of gcm(aes). + +For instance, an Intel CPU with AES-NI makes available the +generic-gcm-aesni driver from the aesni_intel module to +implement gcm(aes). However, this implementation requires +the FPU, so it is not always available to use from a softirq +context, and will fallback to the cryptd work queue, which +does not preserve frame ordering. With this change, such a +system would select gcm_base(ctr(aes-aesni),ghash-generic). +While the aes-aesni implementation prefers to use the FPU, it +will fallback to the aes-asm implementation if unavailable. + +By using a synchronous version of gcm(aes), the decryption +will complete before returning from crypto_aead_decrypt(). +Therefore, the macsec_decrypt_done() callback will be called +before returning from macsec_decrypt(). Thus, the order of +calls to macsec_post_decrypt() for the frames is preserved. + +While it's presumable that the pure AES-NI version of gcm(aes) +is more performant, the hybrid solution is capable of gigabit +speeds on modest hardware. Regardless, preserving the order +of frames is paramount for many network protocols (e.g., +triggering TCP retries). Within the MACsec driver itself, the +replay protection is tripped by the out-of-order frames, and +can cause frames to be dropped. + +This bug has been present in this code since it was added in +v4.6, however it may not have been noticed since not all CPUs +have FPU offload available. Additionally, the bug manifests +as occasional out-of-order packets that are easily +misattributed to other network phenomena. + +When this code was added in v4.6, the crypto/gcm.c code did +not restrict selection of the ghash function based on the +ASYNC flag. For instance, x86 CPUs with PCLMULQDQ would +select the ghash-clmulni driver instead of ghash-generic, +which submits to the cryptd work queue if the FPU is busy. +However, this bug was was corrected in v4.8 by commit +b30bdfa86431afbafe15284a3ad5ac19b49b88e3, and was backported +all the way back to the v3.14 stable branch, so this patch +should be applicable back to the v4.6 stable branch. + +Signed-off-by: Scott Dial +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/macsec.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/macsec.c ++++ b/drivers/net/macsec.c +@@ -1312,7 +1312,8 @@ static struct crypto_aead *macsec_alloc_ + struct crypto_aead *tfm; + int ret; + +- tfm = crypto_alloc_aead("gcm(aes)", 0, 0); ++ /* Pick a sync gcm(aes) cipher to ensure order is preserved. */ ++ tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); + + if (IS_ERR(tfm)) + return tfm; diff --git a/patches.suse/net-mlx4_core-Fix-use-of-ENOSPC-around-mlx4_counter_.patch b/patches.suse/net-mlx4_core-Fix-use-of-ENOSPC-around-mlx4_counter_.patch new file mode 100644 index 0000000..f8ccb88 --- /dev/null +++ b/patches.suse/net-mlx4_core-Fix-use-of-ENOSPC-around-mlx4_counter_.patch @@ -0,0 +1,47 @@ +From: Tariq Toukan +Date: Mon, 4 May 2020 11:36:02 +0300 +Subject: net/mlx4_core: Fix use of ENOSPC around mlx4_counter_alloc() +Git-commit: 40e473071dbad04316ddc3613c3a3d1c75458299 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +When ENOSPC is set the idx is still valid and gets set to the global +MLX4_SINK_COUNTER_INDEX. However gcc's static analysis cannot tell that +ENOSPC is impossible from mlx4_cmd_imm() and gives this warning: + +drivers/net/ethernet/mellanox/mlx4/main.c:2552:28: warning: 'idx' may be +used uninitialized in this function [-Wmaybe-uninitialized] + 2552 | priv->def_counter[port] = idx; + +Also, when ENOSPC is returned mlx4_allocate_default_counters should not +fail. + +Fixes: 6de5f7f6a1fa ("net/mlx4_core: Allocate default counter per port") +Signed-off-by: Jason Gunthorpe +Signed-off-by: Tariq Toukan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/mellanox/mlx4/main.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlx4/main.c ++++ b/drivers/net/ethernet/mellanox/mlx4/main.c +@@ -2540,6 +2540,7 @@ static int mlx4_allocate_default_counter + + if (!err || err == -ENOSPC) { + priv->def_counter[port] = idx; ++ err = 0; + } else if (err == -ENOENT) { + err = 0; + continue; +@@ -2590,7 +2591,8 @@ int mlx4_counter_alloc(struct mlx4_dev * + MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); + if (!err) + *idx = get_param_l(&out_param); +- ++ if (WARN_ON(err == -ENOSPC)) ++ err = -EINVAL; + return err; + } + return __mlx4_counter_alloc(dev, idx); diff --git a/patches.suse/net-mlx4_core-drop-useless-LIST_HEAD.patch b/patches.suse/net-mlx4_core-drop-useless-LIST_HEAD.patch new file mode 100644 index 0000000..5b2e30b --- /dev/null +++ b/patches.suse/net-mlx4_core-drop-useless-LIST_HEAD.patch @@ -0,0 +1,71 @@ +From: Julia Lawall +Date: Sun, 23 Dec 2018 09:57:14 +0100 +Subject: net/mlx4_core: drop useless LIST_HEAD +Patch-mainline: v5.0-rc1 +Git-commit: 61988bd281c9b08e0cc084f0b2da3b109c4c39c8 +References: git-fixes + +Drop LIST_HEAD where the variable it declares has never +been used. + +The semantic patch that fixes this problem is as follows: +(http://coccinelle.lip6.fr/) + +// +@@ +identifier x; +@@ +- LIST_HEAD(x); + ... when != x +// + +Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests") +Signed-off-by: Julia Lawall +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c ++++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +@@ -4727,7 +4727,6 @@ static void rem_slave_srqs(struct mlx4_d + struct res_srq *tmp; + int state; + u64 in_param; +- LIST_HEAD(tlist); + int srqn; + int err; + +@@ -4793,7 +4792,6 @@ static void rem_slave_cqs(struct mlx4_de + struct res_cq *tmp; + int state; + u64 in_param; +- LIST_HEAD(tlist); + int cqn; + int err; + +@@ -4856,7 +4854,6 @@ static void rem_slave_mrs(struct mlx4_de + struct res_mpt *tmp; + int state; + u64 in_param; +- LIST_HEAD(tlist); + int mptn; + int err; + +@@ -4924,7 +4921,6 @@ static void rem_slave_mtts(struct mlx4_d + struct res_mtt *mtt; + struct res_mtt *tmp; + int state; +- LIST_HEAD(tlist); + int base; + int err; + +@@ -5113,7 +5109,6 @@ static void rem_slave_eqs(struct mlx4_de + struct res_eq *tmp; + int err; + int state; +- LIST_HEAD(tlist); + int eqn; + + err = move_all_busy(dev, slave, RES_EQ); diff --git a/patches.suse/net-mlx4_core-fix-a-memory-leak-bug.patch b/patches.suse/net-mlx4_core-fix-a-memory-leak-bug.patch new file mode 100644 index 0000000..516c28a --- /dev/null +++ b/patches.suse/net-mlx4_core-fix-a-memory-leak-bug.patch @@ -0,0 +1,31 @@ +From: Qiushi Wu +Date: Fri, 22 May 2020 14:07:15 -0500 +Subject: net/mlx4_core: fix a memory leak bug. +Patch-mainline: v5.7-rc7 +Git-commit: febfd9d3c7f74063e8e630b15413ca91b567f963 +References: git-fixes + +In function mlx4_opreq_action(), pointer "mailbox" is not released, +when mlx4_cmd_box() return and error, causing a memory leak bug. +Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can +free this pointer. + +Fixes: fe6f700d6cbb ("net/mlx4_core: Respond to operation request by firmware") +Signed-off-by: Qiushi Wu +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlx4/fw.c ++++ b/drivers/net/ethernet/mellanox/mlx4/fw.c +@@ -2731,7 +2731,7 @@ void mlx4_opreq_action(struct work_struc + if (err) { + mlx4_err(dev, "Failed to retrieve required operation: %d\n", + err); +- return; ++ goto out; + } + MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET); + MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET); diff --git a/patches.suse/net-mlx5-Add-command-entry-handling-completion.patch b/patches.suse/net-mlx5-Add-command-entry-handling-completion.patch new file mode 100644 index 0000000..3cbc6ff --- /dev/null +++ b/patches.suse/net-mlx5-Add-command-entry-handling-completion.patch @@ -0,0 +1,94 @@ +From: Moshe Shemesh +Date: Fri, 27 Dec 2019 07:01:53 +0200 +Subject: net/mlx5: Add command entry handling completion +Git-commit: 17d00e839d3b592da9659c1977d45f85b77f986a +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +When FW response to commands is very slow and all command entries in +use are waiting for completion we can have a race where commands can get +timeout before they get out of the queue and handled. Timeout +completion on uninitialized command will cause releasing command's +buffers before accessing it for initialization and then we will get NULL +pointer exception while trying access it. It may also cause releasing +buffers of another command since we may have timeout completion before +even allocating entry index for this command. +Add entry handling completion to avoid this race. + +Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") +Signed-off-by: Moshe Shemesh +Signed-off-by: Eran Ben Elisha +Signed-off-by: Saeed Mahameed +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 14 ++++++++++++++ + include/linux/mlx5/driver.h | 1 + + 2 files changed, 15 insertions(+) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +@@ -847,6 +847,7 @@ static void cmd_work_handler(struct work + int alloc_ret; + int cmd_mode; + ++ complete(&ent->handling); + sem = ent->page_queue ? &cmd->pages_sem : &cmd->sem; + down(sem); + if (!ent->page_queue) { +@@ -965,6 +966,11 @@ static int wait_func(struct mlx5_core_de + struct mlx5_cmd *cmd = &dev->cmd; + int err; + ++ if (!wait_for_completion_timeout(&ent->handling, timeout) && ++ cancel_work_sync(&ent->work)) { ++ ent->ret = -ECANCELED; ++ goto out_err; ++ } + if (cmd->mode == CMD_MODE_POLLING || ent->polling) { + wait_for_completion(&ent->done); + } else if (!wait_for_completion_timeout(&ent->done, timeout)) { +@@ -972,12 +978,17 @@ static int wait_func(struct mlx5_core_de + mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true); + } + ++out_err: + err = ent->ret; + + if (err == -ETIMEDOUT) { + mlx5_core_warn(dev, "%s(0x%x) timeout. Will cause a leak of a command resource\n", + mlx5_command_str(msg_to_opcode(ent->in)), + msg_to_opcode(ent->in)); ++ } else if (err == -ECANCELED) { ++ mlx5_core_warn(dev, "%s(0x%x) canceled on out of queue timeout.\n", ++ mlx5_command_str(msg_to_opcode(ent->in)), ++ msg_to_opcode(ent->in)); + } + mlx5_core_dbg(dev, "err %d, delivery status %s(%d)\n", + err, deliv_status_to_str(ent->status), ent->status); +@@ -1013,6 +1024,7 @@ static int mlx5_cmd_invoke(struct mlx5_c + ent->token = token; + ent->polling = force_polling; + ++ init_completion(&ent->handling); + if (!callback) + init_completion(&ent->done); + +@@ -1032,6 +1044,8 @@ static int mlx5_cmd_invoke(struct mlx5_c + err = wait_func(dev, ent); + if (err == -ETIMEDOUT) + goto out; ++ if (err == -ECANCELED) ++ goto out_free; + + ds = ent->ts2 - ent->ts1; + op = MLX5_GET(mbox_in, in->first.data, opcode); +--- a/include/linux/mlx5/driver.h ++++ b/include/linux/mlx5/driver.h +@@ -905,6 +905,7 @@ struct mlx5_cmd_work_ent { + struct delayed_work cb_timeout_work; + void *context; + int idx; ++ struct completion handling; + struct completion done; + struct mlx5_cmd *cmd; + struct work_struct work; diff --git a/patches.suse/net-mlx5-Avoid-panic-when-setting-vport-rate.patch b/patches.suse/net-mlx5-Avoid-panic-when-setting-vport-rate.patch new file mode 100644 index 0000000..c588d06 --- /dev/null +++ b/patches.suse/net-mlx5-Avoid-panic-when-setting-vport-rate.patch @@ -0,0 +1,76 @@ +From: Tonghao Zhang +Date: Mon, 4 Mar 2019 00:27:16 -0800 +Subject: net/mlx5: Avoid panic when setting vport rate +Patch-mainline: v5.1-rc1 +Git-commit: 24319258660a84dd77f4be026a55b10a12524919 +References: git-fixes + +If we try to set VFs rate on a VF (not PF) net device, the kernel +will be crash. The commands are show as below: + +$ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs +$ ip link set $MLX_VF0 vf 0 max_tx_rate 2 min_tx_rate 1 + +If not applied the first patch ("net/mlx5: Avoid panic when setting +vport mac, getting vport config"), the command: + +$ ip link set $MLX_VF0 vf 0 rate 100 + +can also crash the kernel. + +[ 1650.006388] RIP: 0010:mlx5_eswitch_set_vport_rate+0x1f/0x260 [mlx5_core] +[ 1650.007092] do_setlink+0x982/0xd20 +[ 1650.007129] __rtnl_newlink+0x528/0x7d0 +[ 1650.007374] rtnl_newlink+0x43/0x60 +[ 1650.007407] rtnetlink_rcv_msg+0x2a2/0x320 +[ 1650.007484] netlink_rcv_skb+0xcb/0x100 +[ 1650.007519] netlink_unicast+0x17f/0x230 +[ 1650.007554] netlink_sendmsg+0x2d2/0x3d0 +[ 1650.007592] sock_sendmsg+0x36/0x50 +[ 1650.007625] ___sys_sendmsg+0x280/0x2a0 +[ 1650.007963] __sys_sendmsg+0x58/0xa0 +[ 1650.007998] do_syscall_64+0x5b/0x180 +[ 1650.009438] entry_SYSCALL_64_after_hwframe+0x44/0xa9 + +Fixes: c9497c98901c ("net/mlx5: Add support for setting VF min rate") +Cc: Mohamad Haj Yahia +Signed-off-by: Tonghao Zhang +Reviewed-by: Roi Dayan +Acked-by: Saeed Mahameed +Signed-off-by: Saeed Mahameed +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +@@ -2044,19 +2044,24 @@ static int normalize_vports_min_rate(str + int mlx5_eswitch_set_vport_rate(struct mlx5_eswitch *esw, int vport, + u32 max_rate, u32 min_rate) + { +- u32 fw_max_bw_share = MLX5_CAP_QOS(esw->dev, max_tsar_bw_share); +- bool min_rate_supported = MLX5_CAP_QOS(esw->dev, esw_bw_share) && +- fw_max_bw_share >= MLX5_MIN_BW_SHARE; +- bool max_rate_supported = MLX5_CAP_QOS(esw->dev, esw_rate_limit); + struct mlx5_vport *evport; ++ u32 fw_max_bw_share; + u32 previous_min_rate; + u32 divider; ++ bool min_rate_supported; ++ bool max_rate_supported; + int err = 0; + + if (!ESW_ALLOWED(esw)) + return -EPERM; + if (!LEGAL_VPORT(esw, vport)) + return -EINVAL; ++ ++ fw_max_bw_share = MLX5_CAP_QOS(esw->dev, max_tsar_bw_share); ++ min_rate_supported = MLX5_CAP_QOS(esw->dev, esw_bw_share) && ++ fw_max_bw_share >= MLX5_MIN_BW_SHARE; ++ max_rate_supported = MLX5_CAP_QOS(esw->dev, esw_rate_limit); ++ + if ((min_rate && !min_rate_supported) || (max_rate && !max_rate_supported)) + return -EOPNOTSUPP; + diff --git a/patches.suse/net-mlx5-Continue-driver-initialization-despite-debu.patch b/patches.suse/net-mlx5-Continue-driver-initialization-despite-debu.patch new file mode 100644 index 0000000..11ba4d4 --- /dev/null +++ b/patches.suse/net-mlx5-Continue-driver-initialization-despite-debu.patch @@ -0,0 +1,37 @@ +From: Leon Romanovsky +Date: Thu, 13 Dec 2018 13:15:11 +0200 +Subject: net/mlx5: Continue driver initialization despite debugfs failure +Patch-mainline: v5.0-rc1 +Git-commit: 199fa087dc6b503baad06712716fac645a983e8a +References: git-fixes + +The failure to create debugfs entry is unpleasant event, but not enough +to abort drier initialization. Align the mlx5_core code to debugfs design +and continue execution whenever debugfs_create_dir() successes or not. + +Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") +Reviewed-by: Saeed Mahameed +Signed-off-by: Leon Romanovsky +Signed-off-by: Saeed Mahameed +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c +@@ -877,11 +877,9 @@ static int mlx5_pci_init(struct mlx5_cor + + priv->numa_node = dev_to_node(&dev->pdev->dev); + +- priv->dbg_root = debugfs_create_dir(dev_name(&pdev->dev), mlx5_debugfs_root); +- if (!priv->dbg_root) { +- dev_err(&pdev->dev, "Cannot create debugfs dir, aborting\n"); +- return -ENOMEM; +- } ++ if (mlx5_debugfs_root) ++ priv->dbg_root = ++ debugfs_create_dir(pci_name(pdev), mlx5_debugfs_root); + + err = mlx5_pci_enable_device(dev); + if (err) { diff --git a/patches.suse/net-mlx5-Fix-command-entry-leak-in-Internal-Error-St.patch b/patches.suse/net-mlx5-Fix-command-entry-leak-in-Internal-Error-St.patch new file mode 100644 index 0000000..3211be3 --- /dev/null +++ b/patches.suse/net-mlx5-Fix-command-entry-leak-in-Internal-Error-St.patch @@ -0,0 +1,34 @@ +From: Moshe Shemesh +Date: Sun, 23 Feb 2020 03:27:41 +0200 +Subject: net/mlx5: Fix command entry leak in Internal Error State +Git-commit: cece6f432cca9f18900463ed01b97a152a03600a +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +Processing commands by cmd_work_handler() while already in Internal +Error State will result in entry leak, since the handler process force +completion without doorbell. Forced completion doesn't release the entry +and event completion will never arrive, so entry should be released. + +Fixes: 73dd3a4839c1 ("net/mlx5: Avoid using pending command interface slots") +Signed-off-by: Moshe Shemesh +Signed-off-by: Eran Ben Elisha +Signed-off-by: Saeed Mahameed +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +@@ -908,6 +908,10 @@ static void cmd_work_handler(struct work + MLX5_SET(mbox_out, ent->out, syndrome, drv_synd); + + mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true); ++ /* no doorbell, no need to keep the entry */ ++ free_ent(cmd, ent->idx); ++ if (ent->callback) ++ free_cmd(ent); + return; + } + diff --git a/patches.suse/net-mlx5-Fix-forced-completion-access-non-initialize.patch b/patches.suse/net-mlx5-Fix-forced-completion-access-non-initialize.patch new file mode 100644 index 0000000..fa79ed8 --- /dev/null +++ b/patches.suse/net-mlx5-Fix-forced-completion-access-non-initialize.patch @@ -0,0 +1,44 @@ +From: Moshe Shemesh +Date: Sun, 21 Jul 2019 08:40:13 +0300 +Subject: net/mlx5: Fix forced completion access non initialized command entry +Git-commit: f3cb3cebe26ed4c8036adbd9448b372129d3c371 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +mlx5_cmd_flush() will trigger forced completions to all valid command +entries. Triggered by an asynch event such as fast teardown it can +happen at any stage of the command, including command initialization. +It will trigger forced completion and that can lead to completion on an +uninitialized command entry. + +Setting MLX5_CMD_ENT_STATE_PENDING_COMP only after command entry is +initialized will ensure force completion is treated only if command +entry is initialized. + +Fixes: 73dd3a4839c1 ("net/mlx5: Avoid using pending command interface slots") +Signed-off-by: Moshe Shemesh +Signed-off-by: Eran Ben Elisha +Signed-off-by: Saeed Mahameed +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +@@ -874,7 +874,6 @@ static void cmd_work_handler(struct work + } + + cmd->ent_arr[ent->idx] = ent; +- set_bit(MLX5_CMD_ENT_STATE_PENDING_COMP, &ent->state); + lay = get_inst(cmd, ent->idx); + ent->lay = lay; + memset(lay, 0, sizeof(*lay)); +@@ -896,6 +895,7 @@ static void cmd_work_handler(struct work + + if (ent->callback) + schedule_delayed_work(&ent->cb_timeout_work, cb_timeout); ++ set_bit(MLX5_CMD_ENT_STATE_PENDING_COMP, &ent->state); + + /* Skip sending command to fw if internal error */ + if (pci_channel_offline(dev->pdev) || diff --git a/patches.suse/net-mlx5e-Fix-traffic-duplication-in-ethtool-steerin.patch b/patches.suse/net-mlx5e-Fix-traffic-duplication-in-ethtool-steerin.patch new file mode 100644 index 0000000..b571c81 --- /dev/null +++ b/patches.suse/net-mlx5e-Fix-traffic-duplication-in-ethtool-steerin.patch @@ -0,0 +1,39 @@ +From: Saeed Mahameed +Date: Wed, 11 Sep 2019 07:50:13 -0700 +Subject: net/mlx5e: Fix traffic duplication in ethtool steering +Patch-mainline: v5.4-rc1 +Git-commit: d22fcc806b84b9818de08b32e494f3c05dd236c7 +References: git-fixes + +Before this patch, when adding multiple ethtool steering rules with +identical classification, the driver used to append the new destination +to the already existing hw rule, which caused the hw to forward the +traffic to all destinations (rx queues). + +Here we avoid this by setting the "no append" mlx5 fs core flag when +adding a new ethtool rule. + +Fixes: 6dc6071cfcde ("net/mlx5e: Add ethtool flow steering support") +Signed-off-by: Saeed Mahameed +Reviewed-by: Maor Gottlieb +Signed-off-by: Saeed Mahameed +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c +@@ -397,10 +397,10 @@ add_ethtool_flow_rule(struct mlx5e_priv + struct mlx5_flow_table *ft, + struct ethtool_rx_flow_spec *fs) + { ++ struct mlx5_flow_act flow_act = { .flags = FLOW_ACT_NO_APPEND }; + struct mlx5_flow_destination *dst = NULL; +- struct mlx5_flow_act flow_act = {0}; +- struct mlx5_flow_spec *spec; + struct mlx5_flow_handle *rule; ++ struct mlx5_flow_spec *spec; + int err = 0; + + spec = kvzalloc(sizeof(*spec), GFP_KERNEL); diff --git a/patches.suse/net-mlx5e-Remove-unnecessary-clear_bit-s.patch b/patches.suse/net-mlx5e-Remove-unnecessary-clear_bit-s.patch new file mode 100644 index 0000000..054c979 --- /dev/null +++ b/patches.suse/net-mlx5e-Remove-unnecessary-clear_bit-s.patch @@ -0,0 +1,37 @@ +From: Maxim Mikityanskiy +Date: Mon, 12 Aug 2019 14:32:37 +0300 +Subject: net/mlx5e: Remove unnecessary clear_bit()s +Patch-mainline: v5.4-rc1 +Git-commit: 7f7edefda122b43ab2cd40b5efe43a10fd4a5894 +References: git-fixes + +Don't clear MLX5E_SQ_STATE_ENABLED on error in mlx5e_open_txqsq and +mlx5e_open_icosq, because it's not set there, and is 0 by default. + +Fixes: acc6c5953af1 ("net/mlx5e: Split open/close channels to stages") +Fixes: 9d18b5144a0a ("net/mlx5e: Split open/close ICOSQ into stages") +Signed-off-by: Maxim Mikityanskiy +Signed-off-by: Saeed Mahameed +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +@@ -1343,7 +1343,6 @@ static int mlx5e_open_txqsq(struct mlx5e + return 0; + + err_free_txqsq: +- clear_bit(MLX5E_SQ_STATE_ENABLED, &sq->state); + mlx5e_free_txqsq(sq); + + return err; +@@ -1537,7 +1536,6 @@ static int mlx5e_open_icosq(struct mlx5e + return 0; + + err_free_icosq: +- clear_bit(MLX5E_SQ_STATE_ENABLED, &sq->state); + mlx5e_free_icosq(sq); + + return err; diff --git a/patches.suse/net-mlx5e-Update-netdev-txq-on-completions-during-cl.patch b/patches.suse/net-mlx5e-Update-netdev-txq-on-completions-during-cl.patch new file mode 100644 index 0000000..c09d9ff --- /dev/null +++ b/patches.suse/net-mlx5e-Update-netdev-txq-on-completions-during-cl.patch @@ -0,0 +1,46 @@ +From: Moshe Shemesh +Date: Tue, 7 Apr 2020 17:38:28 +0300 +Subject: net/mlx5e: Update netdev txq on completions during closure +Git-commit: 5e911e2c06bd8c17df29147a5e2d4b17fafda024 +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +On sq closure when we free its descriptors, we should also update netdev +txq on completions which would not arrive. Otherwise if we reopen sqs +and attach them back, for example on fw fatal recovery flow, we may get +tx timeout. + +Fixes: 29429f3300a3 ("net/mlx5e: Timeout if SQ doesn't flush during close") +Signed-off-by: Moshe Shemesh +Reviewed-by: Tariq Toukan +Signed-off-by: Saeed Mahameed +Signed-off-by: Jiri Slaby +--- + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +@@ -593,7 +593,8 @@ void mlx5e_free_txqsq_descs(struct mlx5e + { + struct mlx5e_tx_wqe_info *wi; + struct sk_buff *skb; +- u16 ci; ++ u32 nbytes = 0; ++ u16 ci, npkts = 0; + int i; + + while (sq->cc != sq->pc) { +@@ -614,8 +615,12 @@ void mlx5e_free_txqsq_descs(struct mlx5e + } + + dev_kfree_skb_any(skb); ++ npkts++; ++ nbytes += wi->num_bytes; + sq->cc += wi->num_wqebbs; + } ++ ++ netdev_tx_completed_queue(sq->txq, npkts, nbytes); + } + + #ifdef CONFIG_MLX5_CORE_IPOIB diff --git a/patches.suse/net-mlx5e-ethtool-Fix-a-typo-in-WOL-function-names.patch b/patches.suse/net-mlx5e-ethtool-Fix-a-typo-in-WOL-function-names.patch new file mode 100644 index 0000000..ad274b2 --- /dev/null +++ b/patches.suse/net-mlx5e-ethtool-Fix-a-typo-in-WOL-function-names.patch @@ -0,0 +1,57 @@ +From: Erez Alfasi +Date: Wed, 7 Aug 2019 17:56:02 +0300 +Subject: net/mlx5e: ethtool, Fix a typo in WOL function names +Patch-mainline: v5.4-rc1 +Git-commit: d5e1c0ef550e4fa4577e6567f829a460a7f4ab6e +References: git-fixes + +Fix a typo in 'mlx5e_refomrat_wol_mode_mlx5_to_linux' and +'mlx5e_refomrat_wol_mode_linux_to_mlx5' function names: +"refomrat" -> "reformat". + +Fixes: 928cfe8745a6 ("net/mlx5e: Wake On LAN support") +Signed-off-by: Erez Alfasi +Signed-off-by: Saeed Mahameed +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +@@ -1252,7 +1252,7 @@ static __u32 mlx5e_get_wol_supported(str + return ret; + } + +-static __u32 mlx5e_refomrat_wol_mode_mlx5_to_linux(u8 mode) ++static __u32 mlx5e_reformat_wol_mode_mlx5_to_linux(u8 mode) + { + __u32 ret = 0; + +@@ -1280,7 +1280,7 @@ static __u32 mlx5e_refomrat_wol_mode_mlx + return ret; + } + +-static u8 mlx5e_refomrat_wol_mode_linux_to_mlx5(__u32 mode) ++static u8 mlx5e_reformat_wol_mode_linux_to_mlx5(__u32 mode) + { + u8 ret = 0; + +@@ -1326,7 +1326,7 @@ static void mlx5e_get_wol(struct net_dev + if (err) + return; + +- wol->wolopts = mlx5e_refomrat_wol_mode_mlx5_to_linux(mlx5_wol_mode); ++ wol->wolopts = mlx5e_reformat_wol_mode_mlx5_to_linux(mlx5_wol_mode); + } + + static int mlx5e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) +@@ -1342,7 +1342,7 @@ static int mlx5e_set_wol(struct net_devi + if (wol->wolopts & ~wol_supported) + return -EINVAL; + +- mlx5_wol_mode = mlx5e_refomrat_wol_mode_linux_to_mlx5(wol->wolopts); ++ mlx5_wol_mode = mlx5e_reformat_wol_mode_linux_to_mlx5(wol->wolopts); + + return mlx5_set_port_wol(mdev, mlx5_wol_mode); + } diff --git a/patches.suse/net-mvmdio-allow-up-to-four-clocks-to-be-specified-f.patch b/patches.suse/net-mvmdio-allow-up-to-four-clocks-to-be-specified-f.patch new file mode 100644 index 0000000..fa6896e --- /dev/null +++ b/patches.suse/net-mvmdio-allow-up-to-four-clocks-to-be-specified-f.patch @@ -0,0 +1,36 @@ +From: Josua Mayer +Date: Tue, 9 Jul 2019 15:00:59 +0200 +Subject: net: mvmdio: allow up to four clocks to be specified for orion-mdio +Patch-mainline: v5.3-rc1 +Git-commit: 4aabed699c400810981d3dda170f05fa4d782905 +References: git-fixes + +Allow up to four clocks to be specified and enabled for the orion-mdio +interface, which are required by the Armada 8k and defined in +armada-cp110.dtsi. + +Fixes a hang in probing the mvmdio driver that was encountered on the +Clearfog GT 8K with all drivers built as modules, but also affects other +boards such as the MacchiatoBIN. + +Cc: stable@vger.kernel.org +Fixes: 96cb43423822 ("net: mvmdio: allow up to three clocks to be specified for orion-mdio") +Reviewed-by: Andrew Lunn +Signed-off-by: Josua Mayer +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/marvell/mvmdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/marvell/mvmdio.c ++++ b/drivers/net/ethernet/marvell/mvmdio.c +@@ -64,7 +64,7 @@ + + struct orion_mdio_dev { + void __iomem *regs; +- struct clk *clk[3]; ++ struct clk *clk[4]; + /* + * If we have access to the error interrupt pin (which is + * somewhat misnamed as it not only reflects internal errors diff --git a/patches.suse/net-mvpp2-prs-Don-t-override-the-sign-bit-in-SRAM-pa.patch b/patches.suse/net-mvpp2-prs-Don-t-override-the-sign-bit-in-SRAM-pa.patch new file mode 100644 index 0000000..166b906 --- /dev/null +++ b/patches.suse/net-mvpp2-prs-Don-t-override-the-sign-bit-in-SRAM-pa.patch @@ -0,0 +1,41 @@ +From: Maxime Chevallier +Date: Thu, 20 Jun 2019 11:42:45 +0200 +Subject: net: mvpp2: prs: Don't override the sign bit in SRAM parser shift +Patch-mainline: v5.3-rc1 +Git-commit: 8ec3ede559956f8ad58db7b57d25ac724bab69e9 +References: git-fixes + +The Header Parser allows identifying various fields in the packet +headers, used for various kind of filtering and classification +steps. + +This is a re-entrant process, where the offset in the packet header +depends on the previous lookup results. This offset is represented in +the SRAM results of the TCAM, as a shift to be operated. + +This shift can be negative in some cases, such as in IPv6 parsing. + +This commit prevents overriding the sign bit when setting the shift +value, which could cause instabilities when parsing IPv6 flows. + +Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") +Suggested-by: Alan Winkowski +Signed-off-by: Maxime Chevallier +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c ++++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +@@ -312,7 +312,8 @@ static void mvpp2_prs_sram_shift_set(str + } + + /* Set value */ +- pe->sram[MVPP2_BIT_TO_WORD(MVPP2_PRS_SRAM_SHIFT_OFFS)] = shift & MVPP2_PRS_SRAM_SHIFT_MASK; ++ pe->sram[MVPP2_BIT_TO_WORD(MVPP2_PRS_SRAM_SHIFT_OFFS)] |= ++ shift & MVPP2_PRS_SRAM_SHIFT_MASK; + + /* Reset and set operation */ + mvpp2_prs_sram_bits_clear(pe, MVPP2_PRS_SRAM_OP_SEL_SHIFT_OFFS, diff --git a/patches.suse/net-phy-fix-aneg-restart-in-phy_ethtool_set_eee.patch b/patches.suse/net-phy-fix-aneg-restart-in-phy_ethtool_set_eee.patch new file mode 100644 index 0000000..1f48300 --- /dev/null +++ b/patches.suse/net-phy-fix-aneg-restart-in-phy_ethtool_set_eee.patch @@ -0,0 +1,37 @@ +From: Heiner Kallweit +Date: Tue, 12 May 2020 21:45:53 +0200 +Subject: net: phy: fix aneg restart in phy_ethtool_set_eee +Git-commit: 9de5d235b60a7cdfcdd5461e70c5663e713fde87 +Patch-mainline: 5.7-rc6 +References: networking-stable-20_05_16 + +phy_restart_aneg() enables aneg in the PHY. That's not what we want +if phydev->autoneg is disabled. In this case still update EEE +advertisement register, but don't enable aneg and don't trigger an +aneg restart. + +Fixes: f75abeb8338e ("net: phy: restart phy autonegotiation after EEE advertisment change") +Signed-off-by: Heiner Kallweit +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/phy/phy.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/net/phy/phy.c ++++ b/drivers/net/phy/phy.c +@@ -1267,9 +1267,11 @@ int phy_ethtool_set_eee(struct phy_devic + /* Restart autonegotiation so the new modes get sent to the + * link partner. + */ +- ret = phy_restart_aneg(phydev); +- if (ret < 0) +- return ret; ++ if (phydev->autoneg == AUTONEG_ENABLE) { ++ ret = phy_restart_aneg(phydev); ++ if (ret < 0) ++ return ret; ++ } + } + + return 0; diff --git a/patches.suse/net-qed-fix-NVMe-login-fails-over-VFs.patch b/patches.suse/net-qed-fix-NVMe-login-fails-over-VFs.patch new file mode 100644 index 0000000..c0ffcb2 --- /dev/null +++ b/patches.suse/net-qed-fix-NVMe-login-fails-over-VFs.patch @@ -0,0 +1,73 @@ +From: Alexander Lobakin +Date: Tue, 23 Jun 2020 16:51:32 +0300 +Subject: net: qed: fix NVMe login fails over VFs +Patch-mainline: v5.8-rc3 +Git-commit: ccd7c7ce167a21dbf2b698ffcf00f11d96d44f9b +References: git-fixes + +25ms sleep cycles in waiting for PF response are excessive and may lead +to different timeout failures. + +Start to wait with short udelays, and in most cases polling will end +here. If the time was not sufficient, switch to msleeps. +usleep_range() may go far beyond 100us depending on platform and tick +configuration, hence atomic udelays for consistency. + +Also add explicit DMA barriers since 'done' always comes from a shared +request-response DMA pool, and note that in the comment nearby. + +Fixes: 1408cc1fa48c ("qed: Introduce VFs") +Signed-off-by: Alexander Lobakin +Signed-off-by: Igor Russkikh +Signed-off-by: Michal Kalderon +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/qlogic/qed/qed_vf.c | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/qlogic/qed/qed_vf.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_vf.c +@@ -81,12 +81,17 @@ static void qed_vf_pf_req_end(struct qed + mutex_unlock(&(p_hwfn->vf_iov_info->mutex)); + } + ++#define QED_VF_CHANNEL_USLEEP_ITERATIONS 90 ++#define QED_VF_CHANNEL_USLEEP_DELAY 100 ++#define QED_VF_CHANNEL_MSLEEP_ITERATIONS 10 ++#define QED_VF_CHANNEL_MSLEEP_DELAY 25 ++ + static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done, u32 resp_size) + { + union vfpf_tlvs *p_req = p_hwfn->vf_iov_info->vf2pf_request; + struct ustorm_trigger_vf_zone trigger; + struct ustorm_vf_zone *zone_data; +- int rc = 0, time = 100; ++ int iter, rc = 0; + + zone_data = (struct ustorm_vf_zone *)PXP_VF_BAR0_START_USDM_ZONE_B; + +@@ -126,11 +131,19 @@ static int qed_send_msg2pf(struct qed_hw + REG_WR(p_hwfn, (uintptr_t)&zone_data->trigger, *((u32 *)&trigger)); + + /* When PF would be done with the response, it would write back to the +- * `done' address. Poll until then. ++ * `done' address from a coherent DMA zone. Poll until then. + */ +- while ((!*done) && time) { +- msleep(25); +- time--; ++ ++ iter = QED_VF_CHANNEL_USLEEP_ITERATIONS; ++ while (!*done && iter--) { ++ udelay(QED_VF_CHANNEL_USLEEP_DELAY); ++ dma_rmb(); ++ } ++ ++ iter = QED_VF_CHANNEL_MSLEEP_ITERATIONS; ++ while (!*done && iter--) { ++ msleep(QED_VF_CHANNEL_MSLEEP_DELAY); ++ dma_rmb(); + } + + if (!*done) { diff --git a/patches.suse/net-qed-fix-excessive-QM-ILT-lines-consumption.patch b/patches.suse/net-qed-fix-excessive-QM-ILT-lines-consumption.patch new file mode 100644 index 0000000..2e839e5 --- /dev/null +++ b/patches.suse/net-qed-fix-excessive-QM-ILT-lines-consumption.patch @@ -0,0 +1,33 @@ +From: Alexander Lobakin +Date: Tue, 23 Jun 2020 16:51:33 +0300 +Subject: net: qed: fix excessive QM ILT lines consumption +Patch-mainline: v5.8-rc3 +Git-commit: d434d02f7e7c24c721365fd594ed781acb18e0da +References: git-fixes + +This is likely a copy'n'paste mistake. The amount of ILT lines to +reserve for a single VF was being multiplied by the total VFs count. +This led to a huge redundancy in reservation and potential lines +drainouts. + +Fixes: 1408cc1fa48c ("qed: Introduce VFs") +Signed-off-by: Alexander Lobakin +Signed-off-by: Igor Russkikh +Signed-off-by: Michal Kalderon +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/qlogic/qed/qed_cxt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c +@@ -396,7 +396,7 @@ static void qed_cxt_qm_iids(struct qed_h + vf_tids += segs[NUM_TASK_PF_SEGMENTS].count; + } + +- iids->vf_cids += vf_cids * p_mngr->vf_count; ++ iids->vf_cids = vf_cids; + iids->tids += vf_tids * p_mngr->vf_count; + + DP_VERBOSE(p_hwfn, QED_MSG_ILT, diff --git a/patches.suse/net-qede-stop-adding-events-on-an-already-destroyed-.patch b/patches.suse/net-qede-stop-adding-events-on-an-already-destroyed-.patch new file mode 100644 index 0000000..0f5ce58 --- /dev/null +++ b/patches.suse/net-qede-stop-adding-events-on-an-already-destroyed-.patch @@ -0,0 +1,39 @@ +From: Alexander Lobakin +Date: Tue, 23 Jun 2020 16:51:31 +0300 +Subject: net: qede: stop adding events on an already destroyed workqueue +Patch-mainline: v5.8-rc3 +Git-commit: 4079c7f7a2a00ab403c177ce723b560de59139c3 +References: git-fixes + +Set rdma_wq pointer to NULL after destroying the workqueue and check +for it when adding new events to fix crashes on driver unload. + +Fixes: cee9fbd8e2e9 ("qede: Add qedr framework") +Signed-off-by: Alexander Lobakin +Signed-off-by: Igor Russkikh +Signed-off-by: Michal Kalderon +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/qlogic/qede/qede_rdma.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/qlogic/qede/qede_rdma.c ++++ b/drivers/net/ethernet/qlogic/qede/qede_rdma.c +@@ -105,6 +105,7 @@ static void qede_rdma_destroy_wq(struct + + qede_rdma_cleanup_event(edev); + destroy_workqueue(edev->rdma_info.rdma_wq); ++ edev->rdma_info.rdma_wq = NULL; + } + + int qede_rdma_dev_add(struct qede_dev *edev, bool recovery) +@@ -325,7 +326,7 @@ static void qede_rdma_add_event(struct q + if (edev->rdma_info.exp_recovery) + return; + +- if (!edev->rdma_info.qedr_dev) ++ if (!edev->rdma_info.qedr_dev || !edev->rdma_info.rdma_wq) + return; + + /* We don't want the cleanup flow to start while we're allocating and diff --git a/patches.suse/net-qrtr-Fix-passing-invalid-reference-to-qrtr_local.patch b/patches.suse/net-qrtr-Fix-passing-invalid-reference-to-qrtr_local.patch new file mode 100644 index 0000000..667aa8e --- /dev/null +++ b/patches.suse/net-qrtr-Fix-passing-invalid-reference-to-qrtr_local.patch @@ -0,0 +1,36 @@ +From: Manivannan Sadhasivam +Date: Tue, 19 May 2020 23:44:16 +0530 +Subject: net: qrtr: Fix passing invalid reference to qrtr_local_enqueue() +Git-commit: d28ea1fbbf437054ef339afec241019f2c4e2bb6 +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +Once the traversal of the list is completed with list_for_each_entry(), +the iterator (node) will point to an invalid object. So passing this to +qrtr_local_enqueue() which is outside of the iterator block is erroneous +eventhough the object is not used. + +So fix this by passing NULL to qrtr_local_enqueue(). + +Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") +Reported-by: kbuild test robot +Reported-by: Julia Lawall +Signed-off-by: Manivannan Sadhasivam +Reviewed-by: Bjorn Andersson +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/qrtr/qrtr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/qrtr/qrtr.c ++++ b/net/qrtr/qrtr.c +@@ -661,7 +661,7 @@ static int qrtr_bcast_enqueue(struct qrt + } + mutex_unlock(&qrtr_node_lock); + +- qrtr_local_enqueue(node, skb); ++ qrtr_local_enqueue(NULL, skb); + + return 0; + } diff --git a/patches.suse/net-revert-net-get-rid-of-an-signed-integer-overflow.patch b/patches.suse/net-revert-net-get-rid-of-an-signed-integer-overflow.patch new file mode 100644 index 0000000..6a3b0d1 --- /dev/null +++ b/patches.suse/net-revert-net-get-rid-of-an-signed-integer-overflow.patch @@ -0,0 +1,65 @@ +From: Yuqi Jin +Date: Sat, 16 May 2020 11:46:49 +0800 +Subject: net: revert "net: get rid of an signed integer overflow in + ip_idents_reserve()" +Git-commit: a6211caa634da39d861a47437ffcda8b38ef421b +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +Commit adb03115f459 ("net: get rid of an signed integer overflow in ip_idents_reserve()") +used atomic_cmpxchg to replace "atomic_add_return" inside the function +"ip_idents_reserve". The reason was to avoid UBSAN warning. +However, this change has caused performance degrade and in GCC-8, +fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer +and signed integer overflow is now undefined by default at all +optimization levels[1]. Moreover, it was a bug in UBSAN vs -fwrapv +/-fno-strict-overflow, so Let's revert it safely. + +[1] https://gcc.gnu.org/gcc-8/changes.html + +Suggested-by: Peter Zijlstra +Suggested-by: Eric Dumazet +Cc: "David S. Miller" +Cc: Alexey Kuznetsov +Cc: Hideaki YOSHIFUJI +Cc: Jakub Kicinski +Cc: Jiri Pirko +Cc: Arvind Sankar +Cc: Peter Zijlstra +Cc: Eric Dumazet +Cc: Jiong Wang +Signed-off-by: Yuqi Jin +Signed-off-by: Shaokun Zhang +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/ipv4/route.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +--- a/net/ipv4/route.c ++++ b/net/ipv4/route.c +@@ -496,18 +496,16 @@ u32 ip_idents_reserve(u32 hash, int segs + atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ; + u32 old = READ_ONCE(*p_tstamp); + u32 now = (u32)jiffies; +- u32 new, delta = 0; ++ u32 delta = 0; + + if (old != now && cmpxchg(p_tstamp, old, now) == old) + delta = prandom_u32_max(now - old); + +- /* Do not use atomic_add_return() as it makes UBSAN unhappy */ +- do { +- old = (u32)atomic_read(p_id); +- new = old + delta + segs; +- } while (atomic_cmpxchg(p_id, old, new) != old); +- +- return new - segs; ++ /* If UBSAN reports an error there, please make sure your compiler ++ * supports -fno-strict-overflow before reporting it that was a bug ++ * in UBSAN, and it has been fixed in GCC-8. ++ */ ++ return atomic_add_return(segs + delta, p_id) - segs; + } + EXPORT_SYMBOL(ip_idents_reserve); + diff --git a/patches.suse/net-sched-fix-reporting-the-first-time-use-timestamp.patch b/patches.suse/net-sched-fix-reporting-the-first-time-use-timestamp.patch new file mode 100644 index 0000000..d9dc3b2 --- /dev/null +++ b/patches.suse/net-sched-fix-reporting-the-first-time-use-timestamp.patch @@ -0,0 +1,35 @@ +From: Roman Mashak +Date: Sun, 17 May 2020 08:46:31 -0400 +Subject: net sched: fix reporting the first-time use timestamp +Git-commit: b15e62631c5f19fea9895f7632dae9c1b27fe0cd +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +When a new action is installed, firstuse field of 'tcf_t' is explicitly set +to 0. Value of zero means "new action, not yet used"; as a packet hits the +action, 'firstuse' is stamped with the current jiffies value. + +tcf_tm_dump() should return 0 for firstuse if action has not yet been hit. + +Fixes: 48d8ee1694dd ("net sched actions: aggregate dumping of actions timeinfo") +Cc: Jamal Hadi Salim +Signed-off-by: Roman Mashak +Acked-by: Jamal Hadi Salim +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + include/net/act_api.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/include/net/act_api.h ++++ b/include/net/act_api.h +@@ -69,7 +69,8 @@ static inline void tcf_tm_dump(struct tc + { + dtm->install = jiffies_to_clock_t(jiffies - stm->install); + dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse); +- dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse); ++ dtm->firstuse = stm->firstuse ? ++ jiffies_to_clock_t(jiffies - stm->firstuse) : 0; + dtm->expires = jiffies_to_clock_t(stm->expires); + } + diff --git a/patches.suse/net-stricter-validation-of-untrusted-gso-packets.patch b/patches.suse/net-stricter-validation-of-untrusted-gso-packets.patch new file mode 100644 index 0000000..89de785 --- /dev/null +++ b/patches.suse/net-stricter-validation-of-untrusted-gso-packets.patch @@ -0,0 +1,105 @@ +From: Willem de Bruijn +Date: Mon, 4 May 2020 12:48:54 -0400 +Subject: net: stricter validation of untrusted gso packets +Git-commit: 9274124f023b5c56dc4326637d4f787968b03607 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +Syzkaller again found a path to a kernel crash through bad gso input: +a packet with transport header extending beyond skb_headlen(skb). + +Tighten validation at kernel entry: + +- Verify that the transport header lies within the linear section. + + To avoid pulling linux/tcp.h, verify just sizeof tcphdr. + tcp_gso_segment will call pskb_may_pull (th->doff * 4) before use. + +- Match the gso_type against the ip_proto found by the flow dissector. + +[js] no namespaces for skb_flow_dissect_flow_keys_basic in 4.12 yet + +Fixes: bfd5f4a3d605 ("packet: Add GSO/csum offload support.") +Reported-by: syzbot +Signed-off-by: Willem de Bruijn +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + include/linux/virtio_net.h | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +--- a/include/linux/virtio_net.h ++++ b/include/linux/virtio_net.h +@@ -2,6 +2,8 @@ + #define _LINUX_VIRTIO_NET_H + + #include ++#include ++#include + #include + + static inline int virtio_net_hdr_set_proto(struct sk_buff *skb, +@@ -27,17 +29,25 @@ static inline int virtio_net_hdr_to_skb( + bool little_endian) + { + unsigned int gso_type = 0; ++ unsigned int thlen = 0; ++ unsigned int ip_proto; + + if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { + switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { + case VIRTIO_NET_HDR_GSO_TCPV4: + gso_type = SKB_GSO_TCPV4; ++ ip_proto = IPPROTO_TCP; ++ thlen = sizeof(struct tcphdr); + break; + case VIRTIO_NET_HDR_GSO_TCPV6: + gso_type = SKB_GSO_TCPV6; ++ ip_proto = IPPROTO_TCP; ++ thlen = sizeof(struct tcphdr); + break; + case VIRTIO_NET_HDR_GSO_UDP: + gso_type = SKB_GSO_UDP; ++ ip_proto = IPPROTO_UDP; ++ thlen = sizeof(struct udphdr); + break; + default: + return -EINVAL; +@@ -56,16 +66,22 @@ static inline int virtio_net_hdr_to_skb( + + if (!skb_partial_csum_set(skb, start, off)) + return -EINVAL; ++ ++ if (skb_transport_offset(skb) + thlen > skb_headlen(skb)) ++ return -EINVAL; + } else { + /* gso packets without NEEDS_CSUM do not set transport_offset. + * probe and drop if does not match one of the above types. + */ + if (gso_type && skb->network_header) { ++ struct flow_keys_basic keys; ++ + if (!skb->protocol) + virtio_net_hdr_set_proto(skb, hdr); + retry: +- skb_probe_transport_header(skb, -1); +- if (!skb_transport_header_was_set(skb)) { ++ if (!skb_flow_dissect_flow_keys_basic(skb, &keys, ++ NULL, 0, 0, 0, ++ 0)) { + /* UFO does not specify ipv4 or 6: try both */ + if (gso_type & SKB_GSO_UDP && + skb->protocol == htons(ETH_P_IP)) { +@@ -74,6 +90,12 @@ retry: + } + return -EINVAL; + } ++ ++ if (keys.control.thoff + thlen > skb_headlen(skb) || ++ keys.basic.ip_proto != ip_proto) ++ return -EINVAL; ++ ++ skb_set_transport_header(skb, keys.control.thoff); + } + } + diff --git a/patches.suse/net-tls-Fix-sk_psock-refcnt-leak-in-bpf_exec_tx_verd.patch b/patches.suse/net-tls-Fix-sk_psock-refcnt-leak-in-bpf_exec_tx_verd.patch new file mode 100644 index 0000000..1d03717 --- /dev/null +++ b/patches.suse/net-tls-Fix-sk_psock-refcnt-leak-in-bpf_exec_tx_verd.patch @@ -0,0 +1,40 @@ +From: Xiyu Yang +Date: Sat, 25 Apr 2020 20:54:37 +0800 +Subject: net/tls: Fix sk_psock refcnt leak in bpf_exec_tx_verdict() +Git-commit: 095f5614bfe16e5b3e191b34ea41b10d6fdd4ced +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +bpf_exec_tx_verdict() invokes sk_psock_get(), which returns a reference +of the specified sk_psock object to "psock" with increased refcnt. + +When bpf_exec_tx_verdict() returns, local variable "psock" becomes +invalid, so the refcount should be decreased to keep refcount balanced. + +The reference counting issue happens in one exception handling path of +bpf_exec_tx_verdict(). When "policy" equals to NULL but "psock" is not +NULL, the function forgets to decrease the refcnt increased by +sk_psock_get(), causing a refcnt leak. + +Fix this issue by calling sk_psock_put() on this error path before +bpf_exec_tx_verdict() returns. + +Signed-off-by: Xiyu Yang +Signed-off-by: Xin Tan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/tls/tls_sw.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/net/tls/tls_sw.c ++++ b/net/tls/tls_sw.c +@@ -699,6 +699,8 @@ static int bpf_exec_tx_verdict(struct sk + *copied -= sk_msg_free(sk, msg); + tls_free_open_rec(sk); + } ++ if (psock) ++ sk_psock_put(sk, psock); + return err; + } + more_data: diff --git a/patches.suse/net-tls-Fix-sk_psock-refcnt-leak-when-in-tls_data_re.patch b/patches.suse/net-tls-Fix-sk_psock-refcnt-leak-when-in-tls_data_re.patch new file mode 100644 index 0000000..ffd04ff --- /dev/null +++ b/patches.suse/net-tls-Fix-sk_psock-refcnt-leak-when-in-tls_data_re.patch @@ -0,0 +1,43 @@ +From: Xiyu Yang +Date: Sat, 25 Apr 2020 21:10:23 +0800 +Subject: net/tls: Fix sk_psock refcnt leak when in tls_data_ready() +Git-commit: 62b4011fa7bef9fa00a6aeec26e69685dc1cc21e +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +tls_data_ready() invokes sk_psock_get(), which returns a reference of +the specified sk_psock object to "psock" with increased refcnt. + +When tls_data_ready() returns, local variable "psock" becomes invalid, +so the refcount should be decreased to keep refcount balanced. + +The reference counting issue happens in one exception handling path of +tls_data_ready(). When "psock->ingress_msg" is empty but "psock" is not +NULL, the function forgets to decrease the refcnt increased by +sk_psock_get(), causing a refcnt leak. + +Fix this issue by calling sk_psock_put() on all paths when "psock" is +not NULL. + +Signed-off-by: Xiyu Yang +Signed-off-by: Xin Tan +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/tls/tls_sw.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/net/tls/tls_sw.c ++++ b/net/tls/tls_sw.c +@@ -1780,8 +1780,9 @@ static void tls_data_ready(struct sock * + strp_data_ready(&ctx->strp); + + psock = sk_psock_get(sk); +- if (psock && !list_empty(&psock->ingress_msg)) { +- ctx->saved_data_ready(sk); ++ if (psock) { ++ if (!list_empty(&psock->ingress_msg)) ++ ctx->saved_data_ready(sk); + sk_psock_put(sk, psock); + } + } diff --git a/patches.suse/net-usb-qmi_wwan-add-support-for-DW5816e.patch b/patches.suse/net-usb-qmi_wwan-add-support-for-DW5816e.patch new file mode 100644 index 0000000..213e3a9 --- /dev/null +++ b/patches.suse/net-usb-qmi_wwan-add-support-for-DW5816e.patch @@ -0,0 +1,30 @@ +From: Matt Jolly +Date: Sun, 3 May 2020 01:52:28 +1000 +Subject: net: usb: qmi_wwan: add support for DW5816e +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 57c7f2bd758eed867295c81d3527fff4fab1ed74 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +Add support for Dell Wireless 5816e to drivers/net/usb/qmi_wwan.c + +Signed-off-by: Matt Jolly +Acked-by: Bjørn Mork +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/usb/qmi_wwan.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1346,6 +1346,7 @@ static const struct usb_device_id produc + {QMI_FIXED_INTF(0x413c, 0x81b3, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ + {QMI_FIXED_INTF(0x413c, 0x81b6, 8)}, /* Dell Wireless 5811e */ + {QMI_FIXED_INTF(0x413c, 0x81b6, 10)}, /* Dell Wireless 5811e */ ++ {QMI_FIXED_INTF(0x413c, 0x81cc, 8)}, /* Dell Wireless 5816e */ + {QMI_FIXED_INTF(0x413c, 0x81d7, 0)}, /* Dell Wireless 5821e */ + {QMI_FIXED_INTF(0x413c, 0x81d7, 1)}, /* Dell Wireless 5821e preproduction config */ + {QMI_FIXED_INTF(0x413c, 0x81e0, 0)}, /* Dell Wireless 5821e with eSIM support*/ diff --git a/patches.suse/netprio_cgroup-Fix-unlimited-memory-leak-of-v2-cgrou.patch b/patches.suse/netprio_cgroup-Fix-unlimited-memory-leak-of-v2-cgrou.patch new file mode 100644 index 0000000..ceaba4f --- /dev/null +++ b/patches.suse/netprio_cgroup-Fix-unlimited-memory-leak-of-v2-cgrou.patch @@ -0,0 +1,48 @@ +From: Zefan Li +Date: Sat, 9 May 2020 11:32:10 +0800 +Subject: netprio_cgroup: Fix unlimited memory leak of v2 cgroups +Git-commit: 090e28b229af92dc5b40786ca673999d59e73056 +Patch-mainline: 5.7-rc6 +References: networking-stable-20_05_16 + +If systemd is configured to use hybrid mode which enables the use of +both cgroup v1 and v2, systemd will create new cgroup on both the default +root (v2) and netprio_cgroup hierarchy (v1) for a new session and attach +task to the two cgroups. If the task does some network thing then the v2 +cgroup can never be freed after the session exited. + +One of our machines ran into OOM due to this memory leak. + +In the scenario described above when sk_alloc() is called +cgroup_sk_alloc() thought it's in v2 mode, so it stores +the cgroup pointer in sk->sk_cgrp_data and increments +the cgroup refcnt, but then sock_update_netprioidx() +thought it's in v1 mode, so it stores netprioidx value +in sk->sk_cgrp_data, so the cgroup refcnt will never be freed. + +Currently we do the mode switch when someone writes to the ifpriomap +cgroup control file. The easiest fix is to also do the switch when +a task is attached to a new cgroup. + +Fixes: bd1060a1d671 ("sock, cgroup: add sock->sk_cgroup") +Reported-by: Yang Yingliang +Tested-by: Yang Yingliang +Signed-off-by: Zefan Li +Acked-by: Tejun Heo +Signed-off-by: Jakub Kicinski +Signed-off-by: Jiri Slaby +--- + net/core/netprio_cgroup.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/net/core/netprio_cgroup.c ++++ b/net/core/netprio_cgroup.c +@@ -241,6 +241,8 @@ static void net_prio_attach(struct cgrou + struct task_struct *p; + struct cgroup_subsys_state *css; + ++ cgroup_sk_alloc_disable(); ++ + cgroup_taskset_for_each(p, css, tset) { + void *v = (void *)(unsigned long)css->cgroup->id; + diff --git a/patches.suse/nfp-bpf-fix-code-gen-bug-on-BPF_ALU-BPF_XOR-BPF_K.patch b/patches.suse/nfp-bpf-fix-code-gen-bug-on-BPF_ALU-BPF_XOR-BPF_K.patch new file mode 100644 index 0000000..4957359 --- /dev/null +++ b/patches.suse/nfp-bpf-fix-code-gen-bug-on-BPF_ALU-BPF_XOR-BPF_K.patch @@ -0,0 +1,29 @@ +From: Jiong Wang +Date: Fri, 22 Feb 2019 22:36:03 +0000 +Subject: nfp: bpf: fix code-gen bug on BPF_ALU | BPF_XOR | BPF_K +Patch-mainline: v5.0-rc8 +Git-commit: 71c190249f0ced5b26377ea6bf829ab3af77a40c +References: git-fixes + +The intended optimization should be A ^ 0 = A, not A ^ -1 = A. + +Fixes: cd7df56ed3e6 ("nfp: add BPF to NFP code translator") +Reviewed-by: Jakub Kicinski +Signed-off-by: Jiong Wang +Signed-off-by: Daniel Borkmann +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/netronome/nfp/bpf/jit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/netronome/nfp/bpf/jit.c ++++ b/drivers/net/ethernet/netronome/nfp/bpf/jit.c +@@ -2309,7 +2309,7 @@ static int xor_reg(struct nfp_prog *nfp_ + + static int xor_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) + { +- return wrp_alu32_imm(nfp_prog, meta, ALU_OP_XOR, !~meta->insn.imm); ++ return wrp_alu32_imm(nfp_prog, meta, ALU_OP_XOR, !meta->insn.imm); + } + + static int and_reg(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta) diff --git a/patches.suse/padata-ensure-the-reorder-timer-callback-runs-on-the.patch b/patches.suse/padata-ensure-the-reorder-timer-callback-runs-on-the.patch new file mode 100644 index 0000000..d5197ab --- /dev/null +++ b/patches.suse/padata-ensure-the-reorder-timer-callback-runs-on-the.patch @@ -0,0 +1,115 @@ +From cf5868c8a22dc2854b96e9569064bb92365549ca Mon Sep 17 00:00:00 2001 +From: Mathias Krause +Date: Fri, 8 Sep 2017 20:57:10 +0200 +Subject: [PATCH] padata: ensure the reorder timer callback runs on the correct + CPU +Git-commit: cf5868c8a22dc2854b96e9569064bb92365549ca +References: git-fixes +Patch-mainline: v4.15-rc1 + +The reorder timer function runs on the CPU where the timer interrupt was +handled which is not necessarily one of the CPUs of the 'pcpu' CPU mask +set. + +Ensure the padata_reorder() callback runs on the correct CPU, which is +one in the 'pcpu' CPU mask set and, preferrably, the next expected one. +Do so by comparing the current CPU with the expected target CPU. If they +match, call padata_reorder() right away. If they differ, schedule a work +item on the target CPU that does the padata_reorder() call for us. + +Signed-off-by: Mathias Krause +Signed-off-by: Herbert Xu +Signed-off-by: Oliver Neukum +--- + include/linux/padata.h | 2 ++ + kernel/padata.c | 43 ++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 44 insertions(+), 1 deletion(-) + +diff --git a/include/linux/padata.h b/include/linux/padata.h +index 2f9c1f93b1ce..5c0175bbc179 100644 +--- a/include/linux/padata.h ++++ b/include/linux/padata.h +@@ -85,6 +85,7 @@ struct padata_serial_queue { + * @swork: work struct for serialization. + * @pd: Backpointer to the internal control structure. + * @work: work struct for parallelization. ++ * @reorder_work: work struct for reordering. + * @num_obj: Number of objects that are processed by this cpu. + * @cpu_index: Index of the cpu. + */ +@@ -93,6 +94,7 @@ struct padata_parallel_queue { + struct padata_list reorder; + struct parallel_data *pd; + struct work_struct work; ++ struct work_struct reorder_work; + atomic_t num_obj; + int cpu_index; + }; +diff --git a/kernel/padata.c b/kernel/padata.c +index 1b9b4bac4a9b..b4066147bce4 100644 +--- a/kernel/padata.c ++++ b/kernel/padata.c +@@ -275,11 +275,51 @@ static void padata_reorder(struct parallel_data *pd) + return; + } + ++static void invoke_padata_reorder(struct work_struct *work) ++{ ++ struct padata_parallel_queue *pqueue; ++ struct parallel_data *pd; ++ ++ local_bh_disable(); ++ pqueue = container_of(work, struct padata_parallel_queue, reorder_work); ++ pd = pqueue->pd; ++ padata_reorder(pd); ++ local_bh_enable(); ++} ++ + static void padata_reorder_timer(unsigned long arg) + { + struct parallel_data *pd = (struct parallel_data *)arg; ++ unsigned int weight; ++ int target_cpu, cpu; + +- padata_reorder(pd); ++ cpu = get_cpu(); ++ ++ /* We don't lock pd here to not interfere with parallel processing ++ * padata_reorder() calls on other CPUs. We just need any CPU out of ++ * the cpumask.pcpu set. It would be nice if it's the right one but ++ * it doesn't matter if we're off to the next one by using an outdated ++ * pd->processed value. ++ */ ++ weight = cpumask_weight(pd->cpumask.pcpu); ++ target_cpu = padata_index_to_cpu(pd, pd->processed % weight); ++ ++ /* ensure to call the reorder callback on the correct CPU */ ++ if (cpu != target_cpu) { ++ struct padata_parallel_queue *pqueue; ++ struct padata_instance *pinst; ++ ++ /* The timer function is serialized wrt itself -- no locking ++ * needed. ++ */ ++ pinst = pd->pinst; ++ pqueue = per_cpu_ptr(pd->pqueue, target_cpu); ++ queue_work_on(target_cpu, pinst->wq, &pqueue->reorder_work); ++ } else { ++ padata_reorder(pd); ++ } ++ ++ put_cpu(); + } + + static void padata_serial_worker(struct work_struct *serial_work) +@@ -399,6 +439,7 @@ static void padata_init_pqueues(struct parallel_data *pd) + __padata_list_init(&pqueue->reorder); + __padata_list_init(&pqueue->parallel); + INIT_WORK(&pqueue->work, padata_parallel_worker); ++ INIT_WORK(&pqueue->reorder_work, invoke_padata_reorder); + atomic_set(&pqueue->num_obj, 0); + } + } +-- +2.16.4 + diff --git a/patches.suse/pppoe-only-process-PADT-targeted-at-local-interfaces.patch b/patches.suse/pppoe-only-process-PADT-targeted-at-local-interfaces.patch new file mode 100644 index 0000000..11ccea7 --- /dev/null +++ b/patches.suse/pppoe-only-process-PADT-targeted-at-local-interfaces.patch @@ -0,0 +1,36 @@ +From: Guillaume Nault +Date: Thu, 14 May 2020 12:15:39 +0200 +Subject: pppoe: only process PADT targeted at local interfaces +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: b8c158395119be62294da73646a3953c29ac974b +Patch-mainline: 5.7-rc6 +References: networking-stable-20_05_16 + +We don't want to disconnect a session because of a stray PADT arriving +while the interface is in promiscuous mode. +Furthermore, multicast and broadcast packets make no sense here, so +only PACKET_HOST is accepted. + +Reported-by: David Balažic +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Signed-off-by: Guillaume Nault +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/ppp/pppoe.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/ppp/pppoe.c ++++ b/drivers/net/ppp/pppoe.c +@@ -497,6 +497,9 @@ static int pppoe_disc_rcv(struct sk_buff + if (!skb) + goto out; + ++ if (skb->pkt_type != PACKET_HOST) ++ goto abort; ++ + if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) + goto abort; + diff --git a/patches.suse/qed-reduce-maximum-stack-frame-size.patch b/patches.suse/qed-reduce-maximum-stack-frame-size.patch new file mode 100644 index 0000000..393caaa --- /dev/null +++ b/patches.suse/qed-reduce-maximum-stack-frame-size.patch @@ -0,0 +1,96 @@ +From: Arnd Bergmann +Date: Mon, 22 Jul 2019 17:01:23 +0200 +Subject: qed: reduce maximum stack frame size +Patch-mainline: v5.4-rc1 +Git-commit: 7c116e02a4a7575c8c62bfd2106e3e3ec8fb99dc +References: git-fixes + +clang warns about an overly large stack frame in one function +when it decides to inline all __qed_get_vport_*() functions into +__qed_get_vport_stats(): + +drivers/net/ethernet/qlogic/qed/qed_l2.c:1889:13: error: stack frame size of 1128 bytes in function '_qed_get_vport_stats' [-Werror,-Wframe-larger-than=] + +Use a noinline_for_stack annotation to prevent clang from inlining +these, which keeps the maximum stack usage at around half of that +in the worst case, similar to what we get with gcc. + +Fixes: 86622ee75312 ("qed: Move statistics to L2 code") +Signed-off-by: Arnd Bergmann +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/qlogic/qed/qed_l2.c | 34 +++++++++++++------------------ + 1 file changed, 15 insertions(+), 19 deletions(-) + +--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c +@@ -1631,10 +1631,9 @@ static void __qed_get_vport_pstats_addrl + } + } + +-static void __qed_get_vport_pstats(struct qed_hwfn *p_hwfn, +- struct qed_ptt *p_ptt, +- struct qed_eth_stats *p_stats, +- u16 statistics_bin) ++static noinline_for_stack void ++__qed_get_vport_pstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, ++ struct qed_eth_stats *p_stats, u16 statistics_bin) + { + struct eth_pstorm_per_queue_stat pstats; + u32 pstats_addr = 0, pstats_len = 0; +@@ -1661,10 +1660,9 @@ static void __qed_get_vport_pstats(struc + HILO_64_REGPAIR(pstats.error_drop_pkts); + } + +-static void __qed_get_vport_tstats(struct qed_hwfn *p_hwfn, +- struct qed_ptt *p_ptt, +- struct qed_eth_stats *p_stats, +- u16 statistics_bin) ++static noinline_for_stack void ++__qed_get_vport_tstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, ++ struct qed_eth_stats *p_stats, u16 statistics_bin) + { + struct tstorm_per_port_stat tstats; + u32 tstats_addr, tstats_len; +@@ -1709,10 +1707,9 @@ static void __qed_get_vport_ustats_addrl + } + } + +-static void __qed_get_vport_ustats(struct qed_hwfn *p_hwfn, +- struct qed_ptt *p_ptt, +- struct qed_eth_stats *p_stats, +- u16 statistics_bin) ++static noinline_for_stack ++void __qed_get_vport_ustats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, ++ struct qed_eth_stats *p_stats, u16 statistics_bin) + { + struct eth_ustorm_per_queue_stat ustats; + u32 ustats_addr = 0, ustats_len = 0; +@@ -1751,10 +1748,9 @@ static void __qed_get_vport_mstats_addrl + } + } + +-static void __qed_get_vport_mstats(struct qed_hwfn *p_hwfn, +- struct qed_ptt *p_ptt, +- struct qed_eth_stats *p_stats, +- u16 statistics_bin) ++static noinline_for_stack void ++__qed_get_vport_mstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, ++ struct qed_eth_stats *p_stats, u16 statistics_bin) + { + struct eth_mstorm_per_queue_stat mstats; + u32 mstats_addr = 0, mstats_len = 0; +@@ -1780,9 +1776,9 @@ static void __qed_get_vport_mstats(struc + HILO_64_REGPAIR(mstats.tpa_coalesced_bytes); + } + +-static void __qed_get_vport_port_stats(struct qed_hwfn *p_hwfn, +- struct qed_ptt *p_ptt, +- struct qed_eth_stats *p_stats) ++static noinline_for_stack void ++__qed_get_vport_port_stats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, ++ struct qed_eth_stats *p_stats) + { + struct qed_eth_stats_common *p_common = &p_stats->common; + struct port_stats port_stats; diff --git a/patches.suse/qlcnic-fix-missing-release-in-qlcnic_83xx_interrupt_.patch b/patches.suse/qlcnic-fix-missing-release-in-qlcnic_83xx_interrupt_.patch new file mode 100644 index 0000000..46647fd --- /dev/null +++ b/patches.suse/qlcnic-fix-missing-release-in-qlcnic_83xx_interrupt_.patch @@ -0,0 +1,42 @@ +From: Qiushi Wu +Date: Mon, 25 May 2020 03:24:39 -0500 +Subject: qlcnic: fix missing release in qlcnic_83xx_interrupt_test. +Patch-mainline: v5.7 +Git-commit: 15c973858903009e995b2037683de29dfe968621 +References: git-fixes + +In function qlcnic_83xx_interrupt_test(), function +qlcnic_83xx_diag_alloc_res() is not handled by function +qlcnic_83xx_diag_free_res() after a call of the function +qlcnic_alloc_mbx_args() failed. Fix this issue by adding +a jump target "fail_mbx_args", and jump to this new target +when qlcnic_alloc_mbx_args() failed. + +Fixes: b6b4316c8b2f ("qlcnic: Handle qlcnic_alloc_mbx_args() failure") +Signed-off-by: Qiushi Wu +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c ++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +@@ -3650,7 +3650,7 @@ int qlcnic_83xx_interrupt_test(struct ne + ahw->diag_cnt = 0; + ret = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_INTRPT_TEST); + if (ret) +- goto fail_diag_irq; ++ goto fail_mbx_args; + + if (adapter->flags & QLCNIC_MSIX_ENABLED) + intrpt_id = ahw->intr_tbl[0].id; +@@ -3680,6 +3680,8 @@ int qlcnic_83xx_interrupt_test(struct ne + + done: + qlcnic_free_mbx_args(&cmd); ++ ++fail_mbx_args: + qlcnic_83xx_diag_free_res(netdev, drv_sds_rings); + + fail_diag_irq: diff --git a/patches.suse/r8152-support-additional-Microsoft-Surface-Ethernet-.patch b/patches.suse/r8152-support-additional-Microsoft-Surface-Ethernet-.patch new file mode 100644 index 0000000..cd62446 --- /dev/null +++ b/patches.suse/r8152-support-additional-Microsoft-Surface-Ethernet-.patch @@ -0,0 +1,58 @@ +From: Marc Payne +Date: Tue, 19 May 2020 19:01:46 +0100 +Subject: r8152: support additional Microsoft Surface Ethernet Adapter variant +Git-commit: c27a204383616efba5a4194075e90819961ff66a +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +Device id 0927 is the RTL8153B-based component of the 'Surface USB-C to +Ethernet and USB Adapter' and may be used as a component of other devices +in future. Tested and working with the r8152 driver. + +Update the cdc_ether blacklist due to the RTL8153 'network jam on suspend' +issue which this device will cause (personally confirmed). + +Signed-off-by: Marc Payne +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + drivers/net/usb/cdc_ether.c | 11 +++++++++-- + drivers/net/usb/r8152.c | 1 + + 2 files changed, 10 insertions(+), 2 deletions(-) + +--- a/drivers/net/usb/cdc_ether.c ++++ b/drivers/net/usb/cdc_ether.c +@@ -811,14 +811,21 @@ static const struct usb_device_id produc + .driver_info = 0, + }, + +-/* Microsoft Surface 3 dock (based on Realtek RTL8153) */ ++/* Microsoft Surface Ethernet Adapter (based on Realtek RTL8153) */ + { + USB_DEVICE_AND_INTERFACE_INFO(MICROSOFT_VENDOR_ID, 0x07c6, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info = 0, + }, + +- /* TP-LINK UE300 USB 3.0 Ethernet Adapters (based on Realtek RTL8153) */ ++/* Microsoft Surface Ethernet Adapter (based on Realtek RTL8153B) */ ++{ ++ USB_DEVICE_AND_INTERFACE_INFO(MICROSOFT_VENDOR_ID, 0x0927, USB_CLASS_COMM, ++ USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), ++ .driver_info = 0, ++}, ++ ++/* TP-LINK UE300 USB 3.0 Ethernet Adapters (based on Realtek RTL8153) */ + { + USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, 0x0601, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), +--- a/drivers/net/usb/r8152.c ++++ b/drivers/net/usb/r8152.c +@@ -5348,6 +5348,7 @@ static const struct usb_device_id rtl815 + {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, + {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, ++ {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927)}, + {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, + {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, + {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, diff --git a/patches.suse/sch_choke-avoid-potential-panic-in-choke_reset.patch b/patches.suse/sch_choke-avoid-potential-panic-in-choke_reset.patch new file mode 100644 index 0000000..0dfba66 --- /dev/null +++ b/patches.suse/sch_choke-avoid-potential-panic-in-choke_reset.patch @@ -0,0 +1,67 @@ +From: Eric Dumazet +Date: Sat, 25 Apr 2020 15:19:51 -0700 +Subject: sch_choke: avoid potential panic in choke_reset() +Git-commit: 8738c85c72b3108c9b9a369a39868ba5f8e10ae0 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +If choke_init() could not allocate q->tab, we would crash later +in choke_reset(). + +BUG: KASAN: null-ptr-deref in memset include/linux/string.h:366 [inline] +BUG: KASAN: null-ptr-deref in choke_reset+0x208/0x340 net/sched/sch_choke.c:326 +Write of size 8 at addr 0000000000000000 by task syz-executor822/7022 + +CPU: 1 PID: 7022 Comm: syz-executor822 Not tainted 5.7.0-rc1-syzkaller #0 +Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 +Call Trace: + __dump_stack lib/dump_stack.c:77 [inline] + dump_stack+0x188/0x20d lib/dump_stack.c:118 + __kasan_report.cold+0x5/0x4d mm/kasan/report.c:515 + kasan_report+0x33/0x50 mm/kasan/common.c:625 + check_memory_region_inline mm/kasan/generic.c:187 [inline] + check_memory_region+0x141/0x190 mm/kasan/generic.c:193 + memset+0x20/0x40 mm/kasan/common.c:85 + memset include/linux/string.h:366 [inline] + choke_reset+0x208/0x340 net/sched/sch_choke.c:326 + qdisc_reset+0x6b/0x520 net/sched/sch_generic.c:910 + dev_deactivate_queue.constprop.0+0x13c/0x240 net/sched/sch_generic.c:1138 + netdev_for_each_tx_queue include/linux/netdevice.h:2197 [inline] + dev_deactivate_many+0xe2/0xba0 net/sched/sch_generic.c:1195 + dev_deactivate+0xf8/0x1c0 net/sched/sch_generic.c:1233 + qdisc_graft+0xd25/0x1120 net/sched/sch_api.c:1051 + tc_modify_qdisc+0xbab/0x1a00 net/sched/sch_api.c:1670 + rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5454 + netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469 + netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] + netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 + netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 + sock_sendmsg_nosec net/socket.c:652 [inline] + sock_sendmsg+0xcf/0x120 net/socket.c:672 + ____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362 + ___sys_sendmsg+0x100/0x170 net/socket.c:2416 + __sys_sendmsg+0xec/0x1b0 net/socket.c:2449 + do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 + +Fixes: 77e62da6e60c ("sch_choke: drop all packets in queue during reset") +Signed-off-by: Eric Dumazet +Reported-by: syzbot +Cc: Cong Wang +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/sched/sch_choke.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/sched/sch_choke.c ++++ b/net/sched/sch_choke.c +@@ -327,7 +327,8 @@ static void choke_reset(struct Qdisc *sc + + sch->q.qlen = 0; + sch->qstats.backlog = 0; +- memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *)); ++ if (q->tab) ++ memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *)); + q->head = q->tail = 0; + red_restart(&q->vars); + } diff --git a/patches.suse/sch_sfq-validate-silly-quantum-values.patch b/patches.suse/sch_sfq-validate-silly-quantum-values.patch new file mode 100644 index 0000000..53c1fb0 --- /dev/null +++ b/patches.suse/sch_sfq-validate-silly-quantum-values.patch @@ -0,0 +1,45 @@ +From: Eric Dumazet +Date: Sun, 26 Apr 2020 18:19:07 -0700 +Subject: sch_sfq: validate silly quantum values +Git-commit: df4953e4e997e273501339f607b77953772e3559 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +syzbot managed to set up sfq so that q->scaled_quantum was zero, +triggering an infinite loop in sfq_dequeue() + +More generally, we must only accept quantum between 1 and 2^18 - 7, +meaning scaled_quantum must be in [1, 0x7FFF] range. + +Otherwise, we also could have a loop in sfq_dequeue() +if scaled_quantum happens to be 0x8000, since slot->allot +could indefinitely switch between 0 and 0x8000. + +Fixes: eeaeb068f139 ("sch_sfq: allow big packets and be fair") +Signed-off-by: Eric Dumazet +Reported-by: syzbot+0251e883fe39e7a0cb0a@syzkaller.appspotmail.com +Cc: Jason A. Donenfeld +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/sched/sch_sfq.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/net/sched/sch_sfq.c ++++ b/net/sched/sch_sfq.c +@@ -638,6 +638,15 @@ static int sfq_change(struct Qdisc *sch, + if (ctl->divisor && + (!is_power_of_2(ctl->divisor) || ctl->divisor > 65536)) + return -EINVAL; ++ ++ /* slot->allot is a short, make sure quantum is not too big. */ ++ if (ctl->quantum) { ++ unsigned int scaled = SFQ_ALLOT_SIZE(ctl->quantum); ++ ++ if (scaled <= 0 || scaled > SHRT_MAX) ++ return -EINVAL; ++ } ++ + if (ctl_v1 && !red_check_params(ctl_v1->qth_min, ctl_v1->qth_max, + ctl_v1->Wlog)) + return -EINVAL; diff --git a/patches.suse/sctp-Don-t-add-the-shutdown-timer-if-its-already-bee.patch b/patches.suse/sctp-Don-t-add-the-shutdown-timer-if-its-already-bee.patch new file mode 100644 index 0000000..8f9a05d --- /dev/null +++ b/patches.suse/sctp-Don-t-add-the-shutdown-timer-if-its-already-bee.patch @@ -0,0 +1,79 @@ +From: Neil Horman +Date: Tue, 19 May 2020 16:04:05 -0400 +Subject: sctp: Don't add the shutdown timer if its already been added +Git-commit: 20a785aa52c82246055a089e55df9dac47d67da1 +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +This BUG halt was reported a while back, but the patch somehow got +missed: + +PID: 2879 TASK: c16adaa0 CPU: 1 COMMAND: "sctpn" + #0 [f418dd28] crash_kexec at c04a7d8c + #1 [f418dd7c] oops_end at c0863e02 + #2 [f418dd90] do_invalid_op at c040aaca + #3 [f418de28] error_code (via invalid_op) at c08631a5 + EAX: f34baac0 EBX: 00000090 ECX: f418deb0 EDX: f5542950 EBP: 00000000 + DS: 007b ESI: f34ba800 ES: 007b EDI: f418dea0 GS: 00e0 + CS: 0060 EIP: c046fa5e ERR: ffffffff EFLAGS: 00010286 + #4 [f418de5c] add_timer at c046fa5e + #5 [f418de68] sctp_do_sm at f8db8c77 [sctp] + #6 [f418df30] sctp_primitive_SHUTDOWN at f8dcc1b5 [sctp] + #7 [f418df48] inet_shutdown at c080baf9 + #8 [f418df5c] sys_shutdown at c079eedf + #9 [f418df70] sys_socketcall at c079fe88 + EAX: ffffffda EBX: 0000000d ECX: bfceea90 EDX: 0937af98 + DS: 007b ESI: 0000000c ES: 007b EDI: b7150ae4 + SS: 007b ESP: bfceea7c EBP: bfceeaa8 GS: 0033 + CS: 0073 EIP: b775c424 ERR: 00000066 EFLAGS: 00000282 + +It appears that the side effect that starts the shutdown timer was processed +multiple times, which can happen as multiple paths can trigger it. This of +course leads to the BUG halt in add_timer getting called. + +Fix seems pretty straightforward, just check before the timer is added if its +already been started. If it has mod the timer instead to min(current +expiration, new expiration) + +Its been tested but not confirmed to fix the problem, as the issue has only +occured in production environments where test kernels are enjoined from being +installed. It appears to be a sane fix to me though. Also, recentely, +Jere found a reproducer posted on list to confirm that this resolves the +issues + +Signed-off-by: Neil Horman +CC: Vlad Yasevich +CC: "David S. Miller" +CC: jere.leppanen@nokia.com +CC: marcelo.leitner@gmail.com +CC: netdev@vger.kernel.org +Acked-by: Marcelo Ricardo Leitner +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/sctp/sm_sideeffect.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +--- a/net/sctp/sm_sideeffect.c ++++ b/net/sctp/sm_sideeffect.c +@@ -1498,9 +1498,17 @@ static int sctp_cmd_interpreter(sctp_eve + timeout = asoc->timeouts[cmd->obj.to]; + BUG_ON(!timeout); + +- timer->expires = jiffies + timeout; +- sctp_association_hold(asoc); +- add_timer(timer); ++ /* ++ * SCTP has a hard time with timer starts. Because we process ++ * timer starts as side effects, it can be hard to tell if we ++ * have already started a timer or not, which leads to BUG ++ * halts when we call add_timer. So here, instead of just starting ++ * a timer, if the timer is already started, and just mod ++ * the timer with the shorter of the two expiration times ++ */ ++ if (!timer_pending(timer)) ++ sctp_association_hold(asoc); ++ timer_reduce(timer, jiffies + timeout); + break; + + case SCTP_CMD_TIMER_RESTART: diff --git a/patches.suse/sctp-Start-shutdown-on-association-restart-if-in-SHU.patch b/patches.suse/sctp-Start-shutdown-on-association-restart-if-in-SHU.patch new file mode 100644 index 0000000..c1df4e5 --- /dev/null +++ b/patches.suse/sctp-Start-shutdown-on-association-restart-if-in-SHU.patch @@ -0,0 +1,71 @@ +From: =?UTF-8?q?Jere=20Lepp=C3=A4nen?= +Date: Wed, 20 May 2020 18:15:31 +0300 +Subject: sctp: Start shutdown on association restart if in SHUTDOWN-SENT state + and socket is closed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: d3e8e4c11870413789f029a71e72ae6e971fe678 +Patch-mainline: 5.7-rc7 +References: networking-stable-20_05_27 + +Commit bdf6fa52f01b ("sctp: handle association restarts when the +socket is closed.") starts shutdown when an association is restarted, +if in SHUTDOWN-PENDING state and the socket is closed. However, the +rationale stated in that commit applies also when in SHUTDOWN-SENT +state - we don't want to move an association to ESTABLISHED state when +the socket has been closed, because that results in an association +that is unreachable from user space. + +The problem scenario: + +1. Client crashes and/or restarts. + +2. Server (using one-to-one socket) calls close(). SHUTDOWN is lost. + +3. Client reconnects using the same addresses and ports. + +4. Server's association is restarted. The association and the socket + move to ESTABLISHED state, even though the server process has + closed its descriptor. + +Also, after step 4 when the server process exits, some resources are +leaked in an attempt to release the underlying inet sock structure in +ESTABLISHED state: + + IPv4: Attempt to release TCP socket in state 1 00000000377288c7 + +Fix by acting the same way as in SHUTDOWN-PENDING state. That is, if +an association is restarted in SHUTDOWN-SENT state and the socket is +closed, then start shutdown and don't move the association or the +socket to ESTABLISHED state. + +Fixes: bdf6fa52f01b ("sctp: handle association restarts when the socket is closed.") +Signed-off-by: Jere Leppänen +Acked-by: Marcelo Ricardo Leitner +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + net/sctp/sm_statefuns.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/net/sctp/sm_statefuns.c ++++ b/net/sctp/sm_statefuns.c +@@ -1819,12 +1819,13 @@ static sctp_disposition_t sctp_sf_do_dup + /* Update the content of current association. */ + sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_ASSOC, SCTP_ASOC(new_asoc)); + sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); +- if (sctp_state(asoc, SHUTDOWN_PENDING) && ++ if ((sctp_state(asoc, SHUTDOWN_PENDING) || ++ sctp_state(asoc, SHUTDOWN_SENT)) && + (sctp_sstate(asoc->base.sk, CLOSING) || + sock_flag(asoc->base.sk, SOCK_DEAD))) { +- /* if were currently in SHUTDOWN_PENDING, but the socket +- * has been closed by user, don't transition to ESTABLISHED. +- * Instead trigger SHUTDOWN bundled with COOKIE_ACK. ++ /* If the socket has been closed by user, don't ++ * transition to ESTABLISHED. Instead trigger SHUTDOWN ++ * bundled with COOKIE_ACK. + */ + sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl)); + return sctp_sf_do_9_2_start_shutdown(net, ep, asoc, diff --git a/patches.suse/timers-Add-a-function-to-start-reduce-a-timer.patch b/patches.suse/timers-Add-a-function-to-start-reduce-a-timer.patch new file mode 100644 index 0000000..2b26220 --- /dev/null +++ b/patches.suse/timers-Add-a-function-to-start-reduce-a-timer.patch @@ -0,0 +1,199 @@ +From: David Howells +Date: Thu, 9 Nov 2017 12:35:07 +0000 +Subject: timers: Add a function to start/reduce a timer +Git-commit: b24591e2fcf852ad7ad2ccf745c8220bf378d312 +Patch-mainline: 4.15-rc1 +References: networking-stable-20_05_27 + +Add a function, similar to mod_timer(), that will start a timer if it isn't +running and will modify it if it is running and has an expiry time longer +than the new time. If the timer is running with an expiry time that's the +same or sooner, no change is made. + +The function looks like: + + int timer_reduce(struct timer_list *timer, unsigned long expires); + +This can be used by code such as networking code to make it easier to share +a timer for multiple timeouts. For instance, in upcoming AF_RXRPC code, +the rxrpc_call struct will maintain a number of timeouts: + + unsigned long ack_at; + unsigned long resend_at; + unsigned long ping_at; + unsigned long expect_rx_by; + unsigned long expect_req_by; + unsigned long expect_term_by; + +each of which is set independently of the others. With timer reduction +available, when the code needs to set one of the timeouts, it only needs to +look at that timeout and then call timer_reduce() to modify the timer, +starting it or bringing it forward if necessary. There is no need to refer +to the other timeouts to see which is earliest and no need to take any lock +other than, potentially, the timer lock inside timer_reduce(). + +Note, that this does not protect against concurrent invocations of any of +the timer functions. + +As an example, the expect_rx_by timeout above, which terminates a call if +we don't get a packet from the server within a certain time window, would +be set something like this: + + unsigned long now = jiffies; + unsigned long expect_rx_by = now + packet_receive_timeout; + WRITE_ONCE(call->expect_rx_by, expect_rx_by); + timer_reduce(&call->timer, expect_rx_by); + +The timer service code (which might, say, be in a work function) would then +check all the timeouts to see which, if any, had triggered, deal with +those: + + t = READ_ONCE(call->ack_at); + if (time_after_eq(now, t)) { + cmpxchg(&call->ack_at, t, now + MAX_JIFFY_OFFSET); + set_bit(RXRPC_CALL_EV_ACK, &call->events); + } + +and then restart the timer if necessary by finding the soonest timeout that +hasn't yet passed and then calling timer_reduce(). + +The disadvantage of doing things this way rather than comparing the timers +each time and calling mod_timer() is that you *will* take timer events +unless you can finish what you're doing and delete the timer in time. + +The advantage of doing things this way is that you don't need to use a lock +to work out when the next timer should be set, other than the timer's own +lock - which you might not have to take. + +[ tglx: Fixed weird formatting and adopted it to pending changes ] +[js] schedule_timeout was not converted to from_timer in 4.12 yet + +Signed-off-by: David Howells +Signed-off-by: Thomas Gleixner +Cc: keyrings@vger.kernel.org +Cc: linux-afs@lists.infradead.org +Link: https://lkml.kernel.org/r/151023090769.23050.1801643667223880753.stgit@warthog.procyon.org.uk +Signed-off-by: Jiri Slaby +--- + include/linux/timer.h | 1 + + kernel/time/timer.c | 45 ++++++++++++++++++++++++++++++++++++++------- + 2 files changed, 39 insertions(+), 7 deletions(-) + +--- a/include/linux/timer.h ++++ b/include/linux/timer.h +@@ -215,6 +215,7 @@ extern void add_timer_on(struct timer_li + extern int del_timer(struct timer_list * timer); + extern int mod_timer(struct timer_list *timer, unsigned long expires); + extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); ++extern int timer_reduce(struct timer_list *timer, unsigned long expires); + + /* + * The jiffies value which is added to now, when there is no timer +--- a/kernel/time/timer.c ++++ b/kernel/time/timer.c +@@ -929,8 +929,11 @@ static struct timer_base *lock_timer_bas + } + } + ++#define MOD_TIMER_PENDING_ONLY 0x01 ++#define MOD_TIMER_REDUCE 0x02 ++ + static inline int +-__mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only) ++__mod_timer(struct timer_list *timer, unsigned long expires, unsigned int options) + { + struct timer_base *base, *new_base; + unsigned int idx = UINT_MAX; +@@ -950,7 +953,11 @@ __mod_timer(struct timer_list *timer, un + * larger granularity than you would get from adding a new + * timer with this expiry. + */ +- if (timer->expires == expires) ++ long diff = timer->expires - expires; ++ ++ if (!diff) ++ return 1; ++ if (options & MOD_TIMER_REDUCE && diff <= 0) + return 1; + + /* +@@ -962,6 +969,12 @@ __mod_timer(struct timer_list *timer, un + base = lock_timer_base(timer, &flags); + forward_timer_base(base); + ++ if (timer_pending(timer) && (options & MOD_TIMER_REDUCE) && ++ time_before_eq(timer->expires, expires)) { ++ ret = 1; ++ goto out_unlock; ++ } ++ + clk = base->clk; + idx = calc_wheel_index(expires, clk); + +@@ -971,7 +984,10 @@ __mod_timer(struct timer_list *timer, un + * subsequent call will exit in the expires check above. + */ + if (idx == timer_get_idx(timer)) { +- timer->expires = expires; ++ if (!(options & MOD_TIMER_REDUCE)) ++ timer->expires = expires; ++ else if (time_after(timer->expires, expires)) ++ timer->expires = expires; + ret = 1; + goto out_unlock; + } +@@ -981,7 +997,7 @@ __mod_timer(struct timer_list *timer, un + } + + ret = detach_if_pending(timer, base, false); +- if (!ret && pending_only) ++ if (!ret && (options & MOD_TIMER_PENDING_ONLY)) + goto out_unlock; + + debug_activate(timer, expires); +@@ -1042,7 +1058,7 @@ out_unlock: + */ + int mod_timer_pending(struct timer_list *timer, unsigned long expires) + { +- return __mod_timer(timer, expires, true); ++ return __mod_timer(timer, expires, MOD_TIMER_PENDING_ONLY); + } + EXPORT_SYMBOL(mod_timer_pending); + +@@ -1068,11 +1084,26 @@ EXPORT_SYMBOL(mod_timer_pending); + */ + int mod_timer(struct timer_list *timer, unsigned long expires) + { +- return __mod_timer(timer, expires, false); ++ return __mod_timer(timer, expires, 0); + } + EXPORT_SYMBOL(mod_timer); + + /** ++ * timer_reduce - Modify a timer's timeout if it would reduce the timeout ++ * @timer: The timer to be modified ++ * @expires: New timeout in jiffies ++ * ++ * timer_reduce() is very similar to mod_timer(), except that it will only ++ * modify a running timer if that would reduce the expiration time (it will ++ * start a timer that isn't running). ++ */ ++int timer_reduce(struct timer_list *timer, unsigned long expires) ++{ ++ return __mod_timer(timer, expires, MOD_TIMER_REDUCE); ++} ++EXPORT_SYMBOL(timer_reduce); ++ ++/** + * add_timer - start a timer + * @timer: the timer to be added + * +@@ -1739,7 +1770,7 @@ signed long __sched schedule_timeout(sig + expire = timeout + jiffies; + + setup_timer_on_stack(&timer, process_timeout, (unsigned long)current); +- __mod_timer(&timer, expire, false); ++ __mod_timer(&timer, expire, 0); + schedule(); + del_singleshot_timer_sync(&timer); + diff --git a/patches.suse/timers-Invoke-timer_start_debug-where-it-makes-sense.patch b/patches.suse/timers-Invoke-timer_start_debug-where-it-makes-sense.patch index f1af576..6cc7882 100644 --- a/patches.suse/timers-Invoke-timer_start_debug-where-it-makes-sense.patch +++ b/patches.suse/timers-Invoke-timer_start_debug-where-it-makes-sense.patch @@ -28,8 +28,8 @@ Signed-off-by: Mike Galbraith --- a/kernel/time/timer.c +++ b/kernel/time/timer.c -@@ -982,8 +982,6 @@ __mod_timer(struct timer_list *timer, un - if (!ret && pending_only) +@@ -998,8 +998,6 @@ __mod_timer(struct timer_list *timer, un + if (!ret && (options & MOD_TIMER_PENDING_ONLY)) goto out_unlock; - debug_activate(timer, expires); @@ -37,7 +37,7 @@ Signed-off-by: Mike Galbraith new_base = get_target_base(base, timer->flags); if (base != new_base) { -@@ -1007,6 +1005,8 @@ __mod_timer(struct timer_list *timer, un +@@ -1023,6 +1021,8 @@ __mod_timer(struct timer_list *timer, un } } diff --git a/patches.suse/tunnel-Propagate-ECT-1-when-decapsulating-as-recomme.patch b/patches.suse/tunnel-Propagate-ECT-1-when-decapsulating-as-recomme.patch new file mode 100644 index 0000000..4870ce7 --- /dev/null +++ b/patches.suse/tunnel-Propagate-ECT-1-when-decapsulating-as-recomme.patch @@ -0,0 +1,114 @@ +From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= +Date: Mon, 27 Apr 2020 16:11:05 +0200 +Subject: tunnel: Propagate ECT(1) when decapsulating as recommended by RFC6040 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: b723748750ece7d844cdf2f52c01d37f83387208 +Patch-mainline: 5.7-rc5 +References: networking-stable-20_05_12 + +RFC 6040 recommends propagating an ECT(1) mark from an outer tunnel header +to the inner header if that inner header is already marked as ECT(0). When +RFC 6040 decapsulation was implemented, this case of propagation was not +added. This simply appears to be an oversight, so let's fix that. + +Fixes: eccc1bb8d4b4 ("tunnel: drop packet if ECN present with not-ECT") +Reported-by: Bob Briscoe +Reported-by: Olivier Tilmans +Cc: Dave Taht +Cc: Stephen Hemminger +Signed-off-by: Toke Høiland-Jørgensen +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +--- + include/net/inet_ecn.h | 57 +++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 55 insertions(+), 2 deletions(-) + +--- a/include/net/inet_ecn.h ++++ b/include/net/inet_ecn.h +@@ -98,6 +98,20 @@ static inline int IP_ECN_set_ce(struct i + return 1; + } + ++static inline int IP_ECN_set_ect1(struct iphdr *iph) ++{ ++ u32 check = (__force u32)iph->check; ++ ++ if ((iph->tos & INET_ECN_MASK) != INET_ECN_ECT_0) ++ return 0; ++ ++ check += (__force u16)htons(0x100); ++ ++ iph->check = (__force __sum16)(check + (check>=0xFFFF)); ++ iph->tos ^= INET_ECN_MASK; ++ return 1; ++} ++ + static inline void IP_ECN_clear(struct iphdr *iph) + { + iph->tos &= ~INET_ECN_MASK; +@@ -138,6 +152,22 @@ static inline void IP6_ECN_clear(struct + *(__be32*)iph &= ~htonl(INET_ECN_MASK << 20); + } + ++static inline int IP6_ECN_set_ect1(struct sk_buff *skb, struct ipv6hdr *iph) ++{ ++ __be32 from, to; ++ ++ if ((ipv6_get_dsfield(iph) & INET_ECN_MASK) != INET_ECN_ECT_0) ++ return 0; ++ ++ from = *(__be32 *)iph; ++ to = from ^ htonl(INET_ECN_MASK << 20); ++ *(__be32 *)iph = to; ++ if (skb->ip_summed == CHECKSUM_COMPLETE) ++ skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), ++ (__force __wsum)to); ++ return 1; ++} ++ + static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner) + { + dscp &= ~INET_ECN_MASK; +@@ -163,6 +193,25 @@ static inline int INET_ECN_set_ce(struct + return 0; + } + ++static inline int INET_ECN_set_ect1(struct sk_buff *skb) ++{ ++ switch (skb->protocol) { ++ case cpu_to_be16(ETH_P_IP): ++ if (skb_network_header(skb) + sizeof(struct iphdr) <= ++ skb_tail_pointer(skb)) ++ return IP_ECN_set_ect1(ip_hdr(skb)); ++ break; ++ ++ case cpu_to_be16(ETH_P_IPV6): ++ if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= ++ skb_tail_pointer(skb)) ++ return IP6_ECN_set_ect1(skb, ipv6_hdr(skb)); ++ break; ++ } ++ ++ return 0; ++} ++ + /* + * RFC 6040 4.2 + * To decapsulate the inner header at the tunnel egress, a compliant +@@ -212,8 +261,12 @@ static inline int INET_ECN_decapsulate(s + int rc; + + rc = __INET_ECN_decapsulate(outer, inner, &set_ce); +- if (!rc && set_ce) +- INET_ECN_set_ce(skb); ++ if (!rc) { ++ if (set_ce) ++ INET_ECN_set_ce(skb); ++ else if ((outer & INET_ECN_MASK) == INET_ECN_ECT_1) ++ INET_ECN_set_ect1(skb); ++ } + + return rc; + } diff --git a/patches.suse/usb-dwc3-gadget-Properly-handle-failed-kick_transfer.patch b/patches.suse/usb-dwc3-gadget-Properly-handle-failed-kick_transfer.patch deleted file mode 100644 index d93eb78..0000000 --- a/patches.suse/usb-dwc3-gadget-Properly-handle-failed-kick_transfer.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 8d99087c2db863c5fa3a4a1f3cb82b3a493705ca Mon Sep 17 00:00:00 2001 -From: Thinh Nguyen -Date: Sun, 29 Mar 2020 16:12:57 -0700 -Subject: [PATCH] usb: dwc3: gadget: Properly handle failed kick_transfer -Git-commit: 8d99087c2db863c5fa3a4a1f3cb82b3a493705ca -References: git-fixes -Patch-mainline: v5.8-rc1 - -If dwc3 fails to issue START_TRANSFER/UPDATE_TRANSFER command, then we -should properly end an active transfer and give back all the started -requests. However if it's for an isoc endpoint, the failure maybe due to -bus-expiry status. In this case, don't give back the requests and wait -for the next retry. - -Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver") -Signed-off-by: Thinh Nguyen -Signed-off-by: Felipe Balbi -Signed-off-by: Oliver Neukum ---- - drivers/usb/dwc3/gadget.c | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -1143,6 +1143,8 @@ static void dwc3_prepare_trbs(struct dwc - } - } - -+static void dwc3_gadget_ep_cleanup_cancelled_requests(struct dwc3_ep *dep); -+ - static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) - { - struct dwc3_gadget_ep_cmd_params params; -@@ -1174,15 +1176,20 @@ static int __dwc3_gadget_kick_transfer(s - - ret = dwc3_send_gadget_ep_cmd(dep, cmd, ¶ms); - if (ret < 0) { -- /* -- * FIXME we need to iterate over the list of requests -- * here and stop, unmap, free and del each of the linked -- * requests instead of what we do now. -- */ -- if (req->trb) -- memset(req->trb, 0, sizeof(struct dwc3_trb)); -- dep->queued_requests--; -- dwc3_gadget_del_and_unmap_request(dep, req, ret); -+ struct dwc3_request *tmp; -+ -+ if (ret == -EAGAIN) -+ return ret; -+ -+ dwc3_stop_active_transfer(dep, true, true); -+ -+ list_for_each_entry_safe(req, tmp, &dep->started_list, list) -+ dwc3_gadget_move_cancelled_request(req); -+ -+ /* If ep isn't started, then there's no end transfer pending */ -+ if (!(dep->flags & DWC3_EP_END_TRANSFER_PENDING)) -+ dwc3_gadget_ep_cleanup_cancelled_requests(dep); -+ - return ret; - } - diff --git a/patches.suse/usb-dwc3-gadget-introduce-cancelled_list.patch b/patches.suse/usb-dwc3-gadget-introduce-cancelled_list.patch new file mode 100644 index 0000000..5ac4847 --- /dev/null +++ b/patches.suse/usb-dwc3-gadget-introduce-cancelled_list.patch @@ -0,0 +1,71 @@ +From d5443bbf5fc8f8389cce146b1fc2987cdd229d12 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Wed, 1 Aug 2018 13:53:29 +0300 +Subject: [PATCH] usb: dwc3: gadget: introduce cancelled_list +Git-commit: d5443bbf5fc8f8389cce146b1fc2987cdd229d12 +References: git-fixes +Patch-mainline: v5.0-rc1 + +This list will host cancelled requests who still have TRBs being +processed. + +Signed-off-by: Felipe Balbi +Signed-off-by: Oliver Neukum +--- + drivers/usb/dwc3/core.h | 2 ++ + drivers/usb/dwc3/gadget.c | 1 + + drivers/usb/dwc3/gadget.h | 15 +++++++++++++++ + 3 files changed, 18 insertions(+) + +--- a/drivers/usb/dwc3/core.h ++++ b/drivers/usb/dwc3/core.h +@@ -517,6 +517,7 @@ struct dwc3_event_buffer { + /** + * struct dwc3_ep - device side endpoint representation + * @endpoint: usb endpoint ++ * @cancelled_list: list of cancelled requests for this endpoint + * @pending_list: list of pending requests for this endpoint + * @started_list: list of started requests on this endpoint + * @wait_end_transfer: wait_queue_head_t for waiting on End Transfer complete +@@ -542,6 +543,7 @@ struct dwc3_event_buffer { + */ + struct dwc3_ep { + struct usb_ep endpoint; ++ struct list_head cancelled_list; + struct list_head pending_list; + struct list_head started_list; + +--- a/drivers/usb/dwc3/gadget.c ++++ b/drivers/usb/dwc3/gadget.c +@@ -2104,6 +2104,7 @@ static int dwc3_gadget_init_endpoints(st + + INIT_LIST_HEAD(&dep->pending_list); + INIT_LIST_HEAD(&dep->started_list); ++ INIT_LIST_HEAD(&dep->cancelled_list); + } + + return 0; +--- a/drivers/usb/dwc3/gadget.h ++++ b/drivers/usb/dwc3/gadget.h +@@ -73,6 +73,21 @@ static inline void dwc3_gadget_move_star + list_move_tail(&req->list, &dep->started_list); + } + ++/** ++ * dwc3_gadget_move_cancelled_request - move @req to the cancelled_list ++ * @req: the request to be moved ++ * ++ * Caller should take care of locking. This function will move @req from its ++ * current list to the endpoint's cancelled_list. ++ */ ++static inline void dwc3_gadget_move_cancelled_request(struct dwc3_request *req) ++{ ++ struct dwc3_ep *dep = req->dep; ++ ++ req->started = false; ++ list_move_tail(&req->list, &dep->cancelled_list); ++} ++ + void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, + int status); + diff --git a/patches.suse/vxlan-Avoid-infinite-loop-when-suppressing-NS-messag.patch b/patches.suse/vxlan-Avoid-infinite-loop-when-suppressing-NS-messag.patch new file mode 100644 index 0000000..8593a08 --- /dev/null +++ b/patches.suse/vxlan-Avoid-infinite-loop-when-suppressing-NS-messag.patch @@ -0,0 +1,47 @@ +From: Ido Schimmel +Date: Mon, 1 Jun 2020 15:58:55 +0300 +Subject: vxlan: Avoid infinite loop when suppressing NS messages with invalid + options +Patch-mainline: v5.8-rc1 +Git-commit: 8066e6b449e050675df48e7c4b16c29f00507ff0 +References: git-fixes + +When proxy mode is enabled the vxlan device might reply to Neighbor +Solicitation (NS) messages on behalf of remote hosts. + +In case the NS message includes the "Source link-layer address" option +[1], the vxlan device will use the specified address as the link-layer +destination address in its reply. + +To avoid an infinite loop, break out of the options parsing loop when +encountering an option with length zero and disregard the NS message. + +This is consistent with the IPv6 ndisc code and RFC 4886 which states +that "Nodes MUST silently discard an ND packet that contains an option +with length zero" [2]. + +[1] https://tools.ietf.org/html/rfc4861#section-4.3 +[2] https://tools.ietf.org/html/rfc4861#section-4.6 + +Fixes: 4b29dba9c085 ("vxlan: fix nonfunctional neigh_reduce()") +Signed-off-by: Ido Schimmel +Acked-by: Nikolay Aleksandrov +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/vxlan.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/vxlan.c ++++ b/drivers/net/vxlan.c +@@ -1662,6 +1662,10 @@ static struct sk_buff *vxlan_na_create(s + ns_olen = request->len - skb_network_offset(request) - + sizeof(struct ipv6hdr) - sizeof(*ns); + for (i = 0; i < ns_olen-1; i += (ns->opt[i+1]<<3)) { ++ if (!ns->opt[i + 1]) { ++ kfree_skb(reply); ++ return NULL; ++ } + if (ns->opt[i] == ND_OPT_SOURCE_LL_ADDR) { + daddr = ns->opt + i + sizeof(struct nd_opt_hdr); + break; diff --git a/series.conf b/series.conf index a1bbece..e49705a 100644 --- a/series.conf +++ b/series.conf @@ -12019,6 +12019,7 @@ patches.suse/scsi-sas-Convert-timers-to-use-timer_setup.patch patches.suse/1400-drm-gma500-convert-timers-to-use-timer_setup patches.suse/1401-drm-etnaviv-convert-timers-to-use-timer_setup + patches.suse/timers-Add-a-function-to-start-reduce-a-timer.patch patches.suse/x86-intel_rdt-add-framework-for-better-rdt-ui-diagnostics patches.suse/x86-intel_rdt-add-diagnostics-when-writing-the-schemata-file patches.suse/x86-intel_rdt-add-diagnostics-when-writing-the-tasks-file @@ -12035,6 +12036,7 @@ patches.suse/x86-platform-uv-add-check-of-tsc-state-set-by-uv-bio.patch patches.suse/x86-tsc-make-config_x86_tsc-n-build-work-again.patch patches.suse/x86-CPU-Avoid-unnecessary-IPIs-in-arch_freq_get_on_cpu.patch + patches.suse/PM-Domains-Allow-genpd-users-to-specify-default-acti.patch patches.suse/PM-Domains-Fix-genpd-to-deal-with-drivers-returning-.patch patches.suse/PM-QoS-Drop-PM_QOS_FLAG_REMOTE_WAKEUP.patch patches.suse/cpuidle-fix-broadcast-control-when-broadcast-can-not-be-entered.patch @@ -12230,6 +12232,7 @@ patches.suse/crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b patches.suse/0021-crypto-inside-secure-remove-null-check-before-kfree.patch patches.suse/crypto-brcm-Explicity-ACK-mailbox-message + patches.suse/padata-ensure-the-reorder-timer-callback-runs-on-the.patch patches.suse/crypto-lrw-Fix-an-error-handling-path-in-create patches.suse/crypto-lrw-Check-for-incorrect-cipher-name patches.suse/crypto-chelsio-pr_err-strings-should-end-with-newlin.patch @@ -19405,6 +19408,7 @@ patches.suse/cpufreq-intel_pstate-Replace-bxt_funcs-with-core_funcs.patch patches.suse/cpufreq-intel_pstate-Add-Skylake-servers-support.patch patches.suse/cpufreq-powernv-Dont-assume-distinct-pstate-values-f.patch + patches.suse/PM-domains-Don-t-skip-driver-s-suspend-resume_noirq-.patch patches.suse/0001-PM-genpd-Stop-start-devices-without-pm_runtime_force.patch patches.suse/0001-PM-core-Add-LEAVE_SUSPENDED-driver-flag.patch patches.suse/0002-PCI-PM-Support-for-LEAVE_SUSPENDED-driver-flag.patch @@ -35099,6 +35103,7 @@ patches.suse/tcp-prevent-bogus-FRTO-undos-with-non-SACK-flows.patch patches.suse/net-fix-use-after-free-in-GRO-with-ESP.patch patches.suse/ipv6-sr-fix-passing-wrong-flags-to-crypto_alloc_shas.patch + patches.suse/ipvlan-call-dev_change_flags-when-ipvlan-mode-is-res.patch patches.suse/qed-Limit-msix-vectors-in-kdump-kernel-to-the-minimu.patch patches.suse/qed-Fix-setting-of-incorrect-eswitch-mode.patch patches.suse/qed-Fix-use-of-incorrect-size-in-memcpy-call.patch @@ -45118,6 +45123,7 @@ patches.suse/bpf-tls_sw-init-TLS-ULP-removes-BPF-proto-hooks.patch patches.suse/net-mlx5e-drop-useless-LIST_HEAD.patch patches.suse/mlxsw-spectrum-drop-useless-LIST_HEAD.patch + patches.suse/net-mlx4_core-drop-useless-LIST_HEAD.patch patches.suse/net-core-Fix-Spectre-v1-vulnerability.patch patches.suse/phonet-af_phonet-Fix-Spectre-v1-vulnerability.patch patches.suse/packet-validate-address-length-if-non-zero.patch @@ -45431,6 +45437,7 @@ patches.suse/RDMA-srp-Document-srp_parse_in-arguments.patch patches.suse/RDMA-bnxt_re-Query-HWRM-Interface-version-from-FW.patch patches.suse/RDMA-bnxt_re-Increase-depth-of-control-path-command-.patch + patches.suse/net-mlx5-Continue-driver-initialization-despite-debu.patch patches.suse/net-mlx5-Add-shared-Q-counter-bits.patch patches.suse/IB-mlx5-Introduce-uid-as-part-of-alloc-dealloc-trans.patch patches.suse/IB-mlx5-Use-uid-as-part-of-alloc-dealloc-transport-d.patch @@ -45508,6 +45515,7 @@ patches.suse/phy-sun4i-usb-add-support-for-missing-USB-PHY-index.patch patches.suse/usb-dwc3-debugfs-Properly-print-set-link-state-for-H.patch patches.suse/usb-dwc3-don-t-log-probe-deferrals-but-do-log-other-.patch + patches.suse/usb-dwc3-gadget-introduce-cancelled_list.patch patches.suse/usb-dwc3-Correct-the-logic-for-checking-TRB-full-in-.patch patches.suse/usb-mtu3-fix-the-issue-about-SetFeature-U1-U2_Enable.patch patches.suse/usb-dwc2-host-use-hrtimer-for-nak-retries.patch @@ -45957,7 +45965,9 @@ patches.suse/net-Fix-typo-in-NET_FAILOVER-help-text.patch patches.suse/mlxsw-pci-Ring-CQ-s-doorbell-before-RDQ-s.patch patches.suse/mlxsw-pci-Increase-PCI-SW-reset-timeout.patch + patches.suse/mlxsw-pci-Return-error-on-PCI-reset-timeout.patch patches.suse/mlxsw-spectrum_fid-Update-dummy-FID-index.patch + patches.suse/mlxsw-spectrum_switchdev-Do-not-treat-static-FDB-ent.patch patches.suse/net-mlx5e-Force-CHECKSUM_UNNECESSARY-for-short-ether.patch patches.suse/net-mlx5e-Fix-wrong-error-code-return-on-FEC-query-f.patch patches.suse/isdn-avm-Fix-string-plus-integer-warning-from-Clang.patch @@ -46411,6 +46421,7 @@ patches.suse/net-Set-rtm_table-to-RT_TABLE_COMPAT-for-ipv6-for-ta.patch patches.suse/mdio_bus-Fix-use-after-free-on-device_register-fails.patch patches.suse/bpf-lpm-fix-lookup-bug-in-map_delete_elem.patch + patches.suse/nfp-bpf-fix-code-gen-bug-on-BPF_ALU-BPF_XOR-BPF_K.patch patches.suse/0001-nfp-bpf-fix-ALU32-high-bits-clearance-bug.patch patches.suse/net-phy-marvell10g-Fix-Multi-G-advertisement-to-only.patch patches.suse/net-x25-fix-a-race-in-x25_bind.patch @@ -47528,6 +47539,7 @@ patches.suse/net-mlx5-Fix-multiple-updates-of-steering-rules-in-p.patch patches.suse/0001-net-mlx5e-IPoIB-Fix-RX-checksum-statistics-update.patch patches.suse/net-mlx5-Avoid-panic-when-setting-vport-mac-getting-.patch + patches.suse/net-mlx5-Avoid-panic-when-setting-vport-rate.patch patches.suse/0001-net-mlx4_core-Fix-reset-flow-when-in-command-polling.patch patches.suse/0001-net-mlx4_core-Fix-locking-in-SRIOV-mode-when-switchi.patch patches.suse/0001-net-mlx4_core-Fix-qp-mtt-size-calculation.patch @@ -48008,7 +48020,10 @@ patches.suse/mac80211-do-not-call-driver-wake_tx_queue-op-during-.patch patches.suse/nl80211-Add-NL80211_FLAG_CLEAR_SKB-flag-for-other-NL.patch patches.suse/mac80211-Honor-SW_CRYPTO_CONTROL-for-unicast-keys-in.patch + patches.suse/mlxsw-spectrum_switchdev-Add-MDB-entries-in-prepare-.patch patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-EMAD-workqu.patch + patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-order.patch + patches.suse/mlxsw-core-Do-not-use-WQ_MEM_RECLAIM-for-mlxsw-workq.patch patches.suse/ibmvnic-Enable-GRO.patch patches.suse/ibmvnic-Fix-netdev-feature-clobbering-during-a-reset.patch patches.suse/net-tls-fix-the-IV-leaks.patch @@ -49523,6 +49538,7 @@ patches.suse/net-mlx5-Avoid-double-free-in-fs-init-error-unwindin.patch patches.suse/net-mlx5-Allocate-root-ns-memory-using-kzalloc-to-ma.patch patches.suse/net-dsa-mv88e6xxx-fix-handling-of-upper-half-of-STAT.patch + patches.suse/mlxsw-spectrum-Prevent-force-of-56G.patch patches.suse/net-mvpp2-fix-bad-MVPP2_TXQ_SCHED_TOKEN_CNTR_REG-que.patch patches.suse/net-gro-fix-use-after-free-read-in-napi_gro_frags.patch patches.suse/net-don-t-clear-sock-sk-early-to-avoid-trouble-in-st.patch @@ -49582,6 +49598,7 @@ patches.suse/net-hns-Fix-loopback-test-failed-at-copper-ports.patch patches.suse/net-ethernet-ti-cpsw_ethtool-fix-ethtool-ring-param-.patch patches.suse/net-tls-replace-the-sleeping-lock-around-RX-resync-w.patch + patches.suse/net-ipvlan-Fix-ipvlan-device-tso-disabled-while-NETI.patch patches.suse/s390-qeth-fix-vlan-attribute-in-bridge_hostnotify-udev-event patches.suse/Fix-memory-leak-in-sctp_process_init.patch patches.suse/ethtool-fix-potential-userspace-buffer-overflow.patch @@ -49702,7 +49719,9 @@ patches.suse/ibmvnic-Fix-unchecked-return-codes-of-memory-allocat.patch patches.suse/net-openvswitch-do-not-free-vport-if-register_netdev.patch patches.suse/net-tls-correctly-account-for-copied-bytes-with-mult.patch + patches.suse/mlxsw-spectrum_router-Refresh-nexthop-neighbour-when.patch patches.suse/mlxsw-spectrum_flower-Fix-TOS-matching.patch + patches.suse/mlxsw-spectrum-Disallow-prio-tagged-packets-when-PVI.patch patches.suse/net-mvpp2-prs-Fix-parser-range-for-VID-filtering.patch patches.suse/net-mvpp2-prs-Use-the-correct-helpers-when-removing-.patch patches.suse/mac80211-handle-deauthentication-disassociation-from.patch @@ -49781,6 +49800,7 @@ patches.suse/scsi-ufs-avoid-runtime-suspend-possibly-being-blocked-forever patches.suse/scsi-qla2xxx-Fix-hardlockup-in-abort-command-during-.patch patches.suse/powerpc-mm-64s-hash-Reallocate-context-ids-on-fork.patch + patches.suse/be2net-fix-link-failure-after-ethtool-offline-test.patch patches.suse/ppp-mppe-Add-softdep-to-arc4.patch patches.suse/net-stmmac-fixed-new-system-time-seconds-value-calcu.patch patches.suse/net-stmmac-set-IC-bit-when-transmitting-frames-with-.patch @@ -50218,11 +50238,13 @@ patches.suse/xdp-fix-race-on-generic-receive-path.patch patches.suse/mwifiex-Don-t-abort-on-small-spec-compliant-vendor-I.patch patches.suse/batman-adv-fix-for-leaked-TVLV-handler.patch + patches.suse/net-mvpp2-prs-Don-t-override-the-sign-bit-in-SRAM-pa.patch patches.suse/net-make-skb_dst_force-return-true-when-dst-is-refco.patch patches.suse/igmp-fix-memory-leak-in-igmpv3_del_delrec.patch patches.suse/bnx2x-Prevent-ptp_task-to-be-rescheduled-indefinitel.patch patches.suse/net-dsa-mv88e6xxx-wait-after-reset-deactivation.patch patches.suse/bnxt_en-Disable-bus-master-during-PCI-shutdown-and-d.patch + patches.suse/bnxt_en-Fix-ethtool-selftest-crash-under-error-condi.patch patches.suse/bnxt_en-Fix-statistics-context-reservation-logic-for.patch patches.suse/bnxt_en-Cap-the-returned-MSIX-vectors-to-the-RDMA-dr.patch patches.suse/bnxt_en-Suppress-error-messages-when-querying-DSCP-D.patch @@ -50250,6 +50272,7 @@ patches.suse/tcp-Reset-bytes_acked-and-bytes_received-when-discon.patch patches.suse/net-tls-fix-socket-wmem-accounting-on-fallback-with-.patch patches.suse/dt-bindings-allow-up-to-four-clocks-for-orion-mdio.patch + patches.suse/net-mvmdio-allow-up-to-four-clocks-to-be-specified-f.patch patches.suse/irqchip-gic-v3-its-Fix-misuse-of-GENMASK-macro.patch patches.suse/stacktrace-use-pf_kthread-to-check-for-kernel-threads.patch patches.suse/x86-alternatives-fix-int3_emulate_call-selftest-stack-corruption.patch @@ -50962,6 +50985,7 @@ patches.suse/cx82310_eth-fix-a-memory-leak-bug.patch patches.suse/bnxt_en-Fix-VNIC-clearing-logic-for-57500-chips.patch patches.suse/bnxt_en-Improve-RX-doorbell-sequence.patch + patches.suse/bnxt_en-Fix-handling-FRAG_ERR-when-NVM_INSTALL_UPDAT.patch patches.suse/bnxt_en-Use-correct-src_fid-to-determine-direction-o.patch patches.suse/bnxt_en-Fix-to-include-flow-direction-in-L2-key.patch patches.suse/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch @@ -51327,6 +51351,7 @@ patches.suse/crypto-cavium-zip-Add-missing-single_release.patch patches.suse/e1000e-Use-dev_get_drvdata-where-possible.patch patches.suse/e1000e-add-workaround-for-possible-stalled-packet.patch + patches.suse/qed-reduce-maximum-stack-frame-size.patch patches.suse/net-hns3-change-GFP-flag-during-lock-period.patch patches.suse/NFC-fix-attrs-checks-in-netlink-interface.patch patches.suse/bnxt_en-Update-firmware-interface-spec.-to-1.10.0.89.patch @@ -51345,7 +51370,9 @@ patches.suse/Revert-mwifiex-fix-system-hang-problem-after-resume.patch patches.suse/can-mcp251x-mcp251x_hw_reset-allow-more-time-after-a.patch patches.suse/mac80211-minstrel_ht-fix-per-group-max-throughput-ra.patch + patches.suse/i40e-reduce-stack-usage-in-i40e_set_fc.patch patches.suse/IB-mlx5-Support-MLX5_CMD_OP_QUERY_LAG-as-a-DEVX-gene.patch + patches.suse/net-mlx5e-ethtool-Fix-a-typo-in-WOL-function-names.patch patches.suse/tools-bpftool-fix-arguments-for-p_err-in-do_event_pi.patch patches.suse/xsk-avoid-store-tearing-when-assigning-queues.patch patches.suse/xsk-avoid-store-tearing-when-assigning-umem.patch @@ -51353,6 +51380,7 @@ patches.suse/bcma-fix-incorrect-update-of-BCMA_CORE_PCI_MDIO_DATA.patch patches.suse/rtlwifi-Fix-file-release-memory-leak.patch patches.suse/netfilter-not-mark-a-spinlock-as-__read_mostly.patch + patches.suse/net-mlx5e-Remove-unnecessary-clear_bit-s.patch patches.suse/ixgbe-sync-the-first-fragment-unconditionally.patch patches.suse/i40e-Add-support-for-X710-device.patch patches.suse/net-mlx5-FWTrace-Reduce-stack-usage.patch @@ -51365,6 +51393,10 @@ patches.suse/ath9k-release-allocated-buffer-if-timed-out.patch patches.suse/ath10k-adjust-skb-length-in-ath10k_sdio_mbox_rx_pack.patch patches.suse/bnxt_en-Increase-timeout-for-HWRM_DBG_COREDUMP_XX-co.patch + patches.suse/net-ena-add-intr_moder_rx_interval-to-struct-ena_com.patch + patches.suse/net-ena-reimplement-set-get_coalesce.patch + patches.suse/net-ena-fix-retrieval-of-nonadaptive-interrupt-moder.patch + patches.suse/net-ena-don-t-wake-up-tx-queue-when-down.patch patches.suse/0001-xen-netfront-do-not-assume-sk_buff_head-list-is-empt.patch patches.suse/btrfs-volumes-Remove-ENOSPC-prone-btrfs_can_relocate.patch patches.suse/0001-btrfs-tree-checker-Add-ROOT_ITEM-check.patch @@ -51773,6 +51805,7 @@ patches.suse/ppp-Fix-memory-leak-in-ppp_write.patch patches.suse/net-sched-cbs-Fix-not-adding-cbs-instance-to-list.patch patches.suse/net-mlx5-Add-device-ID-of-upcoming-BlueField-2.patch + patches.suse/net-mlx5e-Fix-traffic-duplication-in-ethtool-steerin.patch patches.suse/macsec-drop-skb-sk-before-calling-gro_cells_receive.patch patches.suse/openvswitch-change-type-of-UPCALL_PID-attribute-to-N.patch patches.suse/iwlwifi-fw-don-t-send-GEO_TX_POWER_LIMIT-command-to-.patch @@ -52303,6 +52336,7 @@ patches.suse/crypto-ecdh-fix-big-endian-bug-in-ECC-library.patch patches.suse/crypto-crypto4xx-fix-double-free-in-crypto4xx_destro.patch patches.suse/crypto-tgr192-remove-unneeded-semicolon.patch + patches.suse/mvpp2-remove-misleading-comment.patch patches.suse/Bluetooth-hci_core-fix-init-for-HCI_USER_CHANNEL.patch patches.suse/bpf-stackmap-Fix-deadlock-with-rq_lock-in-bpf_get_st.patch patches.suse/e1000e-Add-support-for-Comet-Lake.patch @@ -52903,6 +52937,8 @@ patches.suse/s390-qeth-fix-promiscuous-mode-after-reset patches.suse/s390-qeth-don-t-return-enotsupp-to-userspace patches.suse/net-hisilicon-Fix-a-BUG-trigered-by-wrong-bytes_comp.patch + patches.suse/net-ena-fix-default-tx-interrupt-moderation-interval.patch + patches.suse/net-ena-fix-issues-in-setting-interrupt-moderation-p.patch patches.suse/qede-Disable-hardware-gro-when-xdp-prog-is-installed.patch patches.suse/mod_devicetable-fix-PHY-module-format.patch patches.suse/msft-hv-1998-hv_netvsc-Fix-unwanted-rx_table-reset.patch @@ -53019,6 +53055,7 @@ patches.suse/x86-resctrl-fix-potential-memory-leak.patch patches.suse/drm-i915-Add-missing-include-file-linux-math64.h.patch patches.suse/sh_eth-check-sh_eth_cpu_data-dual_port-when-dumping-.patch + patches.suse/ixgbevf-Remove-limit-of-10-entries-for-unicast-filte.patch patches.suse/net-tls-fix-async-operation.patch patches.suse/qmi_wwan-Add-support-for-Quectel-RM500Q.patch patches.suse/NFC-pn533-fix-bulk-message-timeout.patch @@ -53045,6 +53082,7 @@ patches.suse/net-dsa-tag_qca-fix-doubled-Tx-statistics.patch patches.suse/net-hns-fix-soft-lockup-when-there-is-not-enough-mem.patch patches.suse/bnxt_en-Fix-NTUPLE-firmware-command-failures.patch + patches.suse/bnxt_en-Fix-ipv6-RFS-filter-matching-logic.patch patches.suse/hwmon-nct7802-Fix-voltage-limits-to-wrong-registers.patch patches.suse/hwmon-adt7475-Make-volt2reg-return-same-reg-as-reg2v.patch patches.suse/hwmon-core-Do-not-use-device-managed-functions-for-m.patch @@ -53446,6 +53484,7 @@ patches.suse/net-systemport-Avoid-RBUF-stuck-in-Wake-on-LAN-mode.patch patches.suse/net-mlx5-IPsec-Fix-esp-modify-function-attribute.patch patches.suse/net-mlx5-IPsec-fix-memory-leak-at-mlx5_fpga_ipsec_de.patch + patches.suse/mlxsw-spectrum_dpipe-Add-missing-error-path.patch patches.suse/mwifiex-fix-unbalanced-locking-in-mwifiex_process_co.patch patches.suse/mwifiex-Fix-possible-buffer-overflows-in-mwifiex_ret.patch patches.suse/mwifiex-Fix-possible-buffer-overflows-in-mwifiex_cmd.patch @@ -53478,6 +53517,18 @@ patches.suse/qmi_wwan-unconditionally-reject-2-ep-interfaces.patch patches.suse/core-Don-t-skip-generic-XDP-program-execution-for-cl.patch patches.suse/net-smc-fix-leak-of-kernel-memory-to-user-space.patch + patches.suse/net-ena-fix-potential-crash-when-rxfh-key-is-NULL.patch + patches.suse/net-ena-fix-uses-of-round_jiffies.patch + patches.suse/net-ena-add-missing-ethtool-TX-timestamping-indicati.patch + patches.suse/net-ena-fix-incorrect-default-RSS-key.patch + patches.suse/net-ena-rss-do-not-allocate-key-when-not-supported.patch + patches.suse/net-ena-rss-fix-failure-to-get-indirection-table.patch + patches.suse/net-ena-rss-store-hash-function-as-values-and-not-bi.patch + patches.suse/net-ena-fix-incorrectly-saving-queue-numbers-when-se.patch + patches.suse/net-ena-fix-corruption-of-dev_idx_to_host_tbl.patch + patches.suse/net-ena-make-ena-rxfh-support-ETH_RSS_HASH_NO_CHANGE.patch + patches.suse/net-ena-ethtool-use-correct-value-for-crc32-hash.patch + patches.suse/net-ena-ena-com.c-prevent-NULL-pointer-dereference.patch patches.suse/0001-enic-prevent-waking-up-stopped-tx-queues-over-watchd.patch patches.suse/net-sched-matchall-add-missing-validation-of-TCA_MAT.patch patches.suse/net-sched-flower-add-missing-validation-of-TCA_FLOWE.patch @@ -53745,6 +53796,8 @@ patches.suse/hsr-set-.netnsok-flag.patch patches.suse/net_sched-cls_route-remove-the-right-filter-from-has.patch patches.suse/net-mvneta-Fix-the-case-where-the-last-poll-did-not-.patch + patches.suse/net-ena-avoid-memory-access-violation-by-validating-.patch + patches.suse/net-ena-fix-continuous-keep-alive-resets.patch patches.suse/vxlan-check-return-value-of-gro_cells_init.patch patches.suse/cxgb4-fix-Txq-restart-check-during-backpressure.patch patches.suse/hsr-fix-general-protection-fault-in-hsr_addr_is_self.patch @@ -54159,6 +54212,7 @@ patches.suse/hsr-check-protocol-version-in-hsr_newlink.patch patches.suse/l2tp-Allow-management-of-tunnels-and-session-in-user.patch patches.suse/net-ipv4-devinet-Fix-crash-when-add-del-multicast-IP.patch + patches.suse/net-cxgb4-Check-the-return-from-t4_query_params-prop.patch patches.suse/mac80211_hwsim-Use-kstrndup-in-place-of-kasprintf.patch patches.suse/xsk-Add-missing-check-on-user-supplied-headroom-size.patch patches.suse/ALSA-ctxfi-Remove-unnecessary-cast-in-kfree.patch @@ -54289,17 +54343,33 @@ patches.suse/HID-wacom-Read-HID_DG_CONTACTMAX-directly-for-non-ge.patch patches.suse/HID-multitouch-add-eGalaxTouch-P80H84-support.patch patches.suse/platform-x86-asus-nb-wmi-Do-not-load-on-Asus-T100TA-.patch + patches.suse/net-tls-Fix-sk_psock-refcnt-leak-in-bpf_exec_tx_verd.patch + patches.suse/net-tls-Fix-sk_psock-refcnt-leak-when-in-tls_data_re.patch + patches.suse/fq_codel-fix-TCA_FQ_CODEL_DROP_BATCH_SIZE-sanity-che.patch + patches.suse/sch_choke-avoid-potential-panic-in-choke_reset.patch + patches.suse/bnxt_en-Fix-VF-anti-spoof-filter-setup.patch patches.suse/bnxt_en-Reduce-BNXT_MSIX_VEC_MAX-value-to-supported-.patch + patches.suse/bnxt_en-Improve-AER-slot-reset.patch patches.suse/bnxt_en-Return-error-when-allocating-zero-size-conte.patch + patches.suse/bnxt_en-Fix-VLAN-acceleration-handling-in-bnxt_fix_f.patch + patches.suse/sch_sfq-validate-silly-quantum-values.patch patches.suse/batman-adv-fix-batadv_nc_random_weight_tq.patch patches.suse/batman-adv-Fix-refcnt-leak-in-batadv_show_throughput.patch patches.suse/batman-adv-Fix-refcnt-leak-in-batadv_store_throughpu.patch patches.suse/batman-adv-Fix-refcnt-leak-in-batadv_v_ogm_process.patch + patches.suse/net-mlx5-Fix-forced-completion-access-non-initialize.patch + patches.suse/net-mlx5-Fix-command-entry-leak-in-Internal-Error-St.patch patches.suse/ibmvnic-Skip-fatal-error-reset-after-passive-init.patch patches.suse/dp83640-reverse-arguments-to-list_add_tail.patch + patches.suse/net-macsec-preserve-ingress-frame-ordering.patch + patches.suse/tunnel-Propagate-ECT-1-when-decapsulating-as-recomme.patch + patches.suse/mlxsw-spectrum_acl_tcam-Position-vchunk-in-a-vregion.patch patches.suse/devlink-fix-return-value-after-hitting-end-in-region.patch patches.suse/net_sched-sch_skbprio-add-message-validation-to-skbp.patch + patches.suse/net-usb-qmi_wwan-add-support-for-DW5816e.patch + patches.suse/net-mlx4_core-Fix-use-of-ENOSPC-around-mlx4_counter_.patch patches.suse/nfp-abm-fix-a-memory-leak-bug.patch + patches.suse/net-stricter-validation-of-untrusted-gso-packets.patch patches.suse/tracing-add-a-vmalloc_sync_mappings-for-safe-measure.patch patches.suse/scripts-decodecode-fix-trapping-instruction-formatti.patch patches.suse/mm-limit-boost_watermark-on-small-zones.patch @@ -54345,9 +54415,15 @@ patches.suse/ALSA-hda-realtek-Enable-headset-mic-of-ASUS-UX581LV-.patch patches.suse/ALSA-hda-realtek-Add-COEF-workaround-for-ASUS-ZenBoo.patch patches.suse/ALSA-hda-realtek-Limit-int-mic-boost-for-Thinkpad-T5.patch + patches.suse/Revert-ipv6-add-mtu-lock-check-in-__ip6_rt_update_pm.patch + patches.suse/net-fix-a-potential-recursive-NETDEV_FEAT_CHANGE.patch patches.suse/bpf-Fix-sk_psock-refcnt-leak-when-receiving-message.patch + patches.suse/netprio_cgroup-Fix-unlimited-memory-leak-of-v2-cgrou.patch + patches.suse/net-dsa-loop-Add-module-soft-dependency.patch patches.suse/netlabel-cope-with-NULL-catmap.patch patches.suse/s390-ism-fix-error-return-code-in-ism_probe + patches.suse/net-phy-fix-aneg-restart-in-phy_ethtool_set_eee.patch + patches.suse/pppoe-only-process-PADT-targeted-at-local-interfaces.patch patches.suse/pinctrl-sunrisepoint-Fix-PAD-lock-register-offset-fo.patch patches.suse/pinctrl-baytrail-Enable-pin-configuration-setting-fo.patch patches.suse/pinctrl-cherryview-Add-missing-spinlock-usage-in-chv.patch @@ -54382,6 +54458,19 @@ patches.suse/iio-adc-stm32-adc-fix-device-used-to-request-dma.patch patches.suse/iio-sca3000-Remove-an-erroneous-get_device.patch patches.suse/mei-release-me_cl-object-reference.patch + patches.suse/net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch + patches.suse/net-revert-net-get-rid-of-an-signed-integer-overflow.patch + patches.suse/net-sched-fix-reporting-the-first-time-use-timestamp.patch + patches.suse/r8152-support-additional-Microsoft-Surface-Ethernet-.patch + patches.suse/net-inet_csk-Fix-so_reuseport-bind-address-cache-in-.patch + patches.suse/sctp-Don-t-add-the-shutdown-timer-if-its-already-bee.patch + patches.suse/ax25-fix-setsockopt-SO_BINDTODEVICE.patch + patches.suse/net-qrtr-Fix-passing-invalid-reference-to-qrtr_local.patch + patches.suse/net-ipip-fix-wrong-address-family-in-init-error-path.patch + patches.suse/sctp-Start-shutdown-on-association-restart-if-in-SHU.patch + patches.suse/net-mlx4_core-fix-a-memory-leak-bug.patch + patches.suse/net-mlx5-Add-command-entry-handling-completion.patch + patches.suse/net-mlx5e-Update-netdev-txq-on-completions-during-cl.patch patches.suse/x86-unwind-orc-fix-unwind_get_return_address_ptr-for-inactive-tasks.patch patches.suse/Input-usbtouchscreen-add-support-for-BonXeon-TP.patch patches.suse/Input-evdev-call-input_flush_device-on-release-not-f.patch @@ -54400,6 +54489,8 @@ patches.suse/mmc-block-Fix-use-after-free-issue-for-rpmb.patch patches.suse/iommu-fix-reference-count-leak-in-iommu_group_alloc patches.suse/libceph-ignore-pool-overlay-and-cache-logic-on-redirects.patch + patches.suse/dpaa_eth-fix-usage-as-DSA-master-try-3.patch + patches.suse/qlcnic-fix-missing-release-in-qlcnic_83xx_interrupt_.patch patches.suse/mac80211-mesh-fix-discovery-timer-re-arming-issue-cr.patch patches.suse/crypto-chelsio-chtls-properly-set-tp-lsndtime.patch patches.suse/0022-xfrm-fix-error-in-comment.patch @@ -54468,6 +54559,7 @@ patches.suse/b43-Fix-connection-problem-with-WPA3.patch patches.suse/b43_legacy-Fix-connection-problem-with-WPA3.patch patches.suse/Bluetooth-Add-SCO-fallback-for-invalid-LMP-parameter.patch + patches.suse/vxlan-Avoid-infinite-loop-when-suppressing-NS-messag.patch patches.suse/net-vmxnet3-fix-possible-buffer-overflow-caused-by-b.patch patches.suse/ipv6-fix-IPV6_ADDRFORM-operation-logic.patch patches.suse/s390-bpf-maintain-8-byte-stack-alignment @@ -54531,7 +54623,6 @@ patches.suse/PCI-PM-Call-.bridge_d3-hook-only-if-non-NULL.patch patches.suse/PCI-Allow-pci_resize_resource-for-devices-on-root-bu.patch patches.suse/USB-host-ehci-mxc-Add-error-handling-in-ehci_mxc_drv.patch - patches.suse/usb-dwc3-gadget-Properly-handle-failed-kick_transfer.patch patches.suse/usb-dwc2-gadget-move-gadget-resume-after-the-core-is.patch patches.suse/USB-gadget-udc-s3c2410_udc-Remove-pointless-NULL-che.patch patches.suse/usb-gadget-lpc32xx_udc-don-t-dereference-ep-pointer-.patch @@ -54592,6 +54683,7 @@ patches.suse/ext4-fix-partial-cluster-initialization-when-splitti.patch patches.suse/ext4-jbd2-ensure-panic-by-fix-a-race-between-jbd2-ab.patch patches.suse/ibmvnic-Harden-device-login-requests.patch + patches.suse/bnxt_en-Fix-AER-reset-logic-on-57500-chips.patch patches.suse/e1000e-Do-not-wake-up-the-system-via-WOL-if-device-w.patch patches.suse/libceph-don-t-omit-recovery_deletes-in-target_copy.patch patches.suse/0001-drm-i915-icl-Fix-hotplug-interrupt-disabling-after-s.patch @@ -54608,6 +54700,9 @@ patches.suse/ibmveth-Fix-max-MTU-limit.patch patches.suse/ibmvnic-continue-to-init-in-CRQ-reset-returns-H_CLOS.patch patches.suse/usbnet-smsc95xx-Fix-use-after-free-after-removal.patch + patches.suse/net-qede-stop-adding-events-on-an-already-destroyed-.patch + patches.suse/net-qed-fix-NVMe-login-fails-over-VFs.patch + patches.suse/net-qed-fix-excessive-QM-ILT-lines-consumption.patch patches.suse/drm-tegra-hub-Do-not-enable-orphaned-window-group.patch patches.suse/gpu-host1x-Detach-driver-on-unregister.patch patches.suse/0001-drm-radeon-fix-fb_div-check-in-ni_init_smc_spll_tabl.patch @@ -54639,6 +54734,8 @@ patches.suse/ALSA-usb-audio-Fix-packet-size-calculation.patch patches.suse/0001-drm-mediatek-Check-plane-visibility-in-atomic_update.patch patches.suse/0001-drm-radeon-fix-double-free.patch + patches.suse/bnxt_en-fix-NULL-dereference-in-case-SR-IOV-configur.patch + patches.suse/mlxsw-spectrum_router-Remove-inappropriate-usage-of-.patch patches.suse/Revert-thermal-mediatek-fix-register-index-error.patch patches.suse/iio-health-afe4404-Fix-timestamp-alignment-and-preve.patch patches.suse/iio-mma8452-Add-missed-iio_device_unregister-call-in.patch @@ -55504,6 +55601,9 @@ patches.kabi/libnvdimm-cover-up-changes-in-struct-nvdimm_bus.patch patches.kabi/libnvdimm-cover-up-nd_pfn_sb-change.patch patches.kabi/jbd2-abort-mutex-kabi.patch + patches.kabi/net-mlx5-Add-command-entry-handling-completion.patch + + patches.kabi/padata-reorder-work-kABI-fixup.patch ######################################################## # You'd better have a good reason for adding a patch