From 8a9086cf0a99d89480ba28168ccdcd756b298e49 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Mon, 11 Jul 2022 01:36:10 -0400 Subject: [PATCH] Fixes for 5.4 Signed-off-by: Sasha Levin --- ...-proper-compatible-for-sama5d2-s-rtc.patch | 36 +++++++++++ ...proper-compatibles-for-sam9x60-s-rtc.patch | 42 +++++++++++++ ...fcount-leak-in-meson_smp_prepare_cpu.patch | 46 ++++++++++++++ ...gister-the-clk-notifier-in-error-pat.patch | 37 +++++++++++ ...-dispose-of-all-skbs-during-a-failov.patch | 50 +++++++++++++++ ...3t-fix-nand-function-name-for-some-p.patch | 61 +++++++++++++++++++ ...i-sunxi_pconf_set-use-correct-offset.patch | 40 ++++++++++++ ...ding-fix-error-message-in-learning_t.patch | 38 ++++++++++++ ...ding-fix-flood_unicast_test-when-h2-.patch | 61 +++++++++++++++++++ ...ding-fix-learning_test-when-h1-suppo.patch | 50 +++++++++++++++ queue-5.4/series | 10 +++ 11 files changed, 471 insertions(+) create mode 100644 queue-5.4/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch create mode 100644 queue-5.4/arm-at91-pm-use-proper-compatibles-for-sam9x60-s-rtc.patch create mode 100644 queue-5.4/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch create mode 100644 queue-5.4/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch create mode 100644 queue-5.4/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch create mode 100644 queue-5.4/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch create mode 100644 queue-5.4/pinctrl-sunxi-sunxi_pconf_set-use-correct-offset.patch create mode 100644 queue-5.4/selftests-forwarding-fix-error-message-in-learning_t.patch create mode 100644 queue-5.4/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch create mode 100644 queue-5.4/selftests-forwarding-fix-learning_test-when-h1-suppo.patch diff --git a/queue-5.4/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch b/queue-5.4/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch new file mode 100644 index 00000000000..bf2a6d174a2 --- /dev/null +++ b/queue-5.4/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch @@ -0,0 +1,36 @@ +From fc94b24b2a222e5bbfd6f5deed5a9c7e5e4339d3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 23 May 2022 12:24:19 +0300 +Subject: ARM: at91: pm: use proper compatible for sama5d2's rtc + +From: Claudiu Beznea + +[ Upstream commit ddc980da8043779119acaca106c6d9b445c9b65b ] + +Use proper compatible strings for SAMA5D2's RTC IPs. This is necessary +for configuring wakeup sources for ULP1 PM mode. + +Fixes: d7484f5c6b3b ("ARM: at91: pm: configure wakeup sources for ULP1 mode") +Signed-off-by: Claudiu Beznea +Link: https://lore.kernel.org/r/20220523092421.317345-2-claudiu.beznea@microchip.com +Signed-off-by: Sasha Levin +--- + arch/arm/mach-at91/pm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c +index 676cc2a318f4..3e24e104e687 100644 +--- a/arch/arm/mach-at91/pm.c ++++ b/arch/arm/mach-at91/pm.c +@@ -103,7 +103,7 @@ static const struct wakeup_source_info ws_info[] = { + + static const struct of_device_id sama5d2_ws_ids[] = { + { .compatible = "atmel,sama5d2-gem", .data = &ws_info[0] }, +- { .compatible = "atmel,at91rm9200-rtc", .data = &ws_info[1] }, ++ { .compatible = "atmel,sama5d2-rtc", .data = &ws_info[1] }, + { .compatible = "atmel,sama5d3-udc", .data = &ws_info[2] }, + { .compatible = "atmel,at91rm9200-ohci", .data = &ws_info[2] }, + { .compatible = "usb-ohci", .data = &ws_info[2] }, +-- +2.35.1 + diff --git a/queue-5.4/arm-at91-pm-use-proper-compatibles-for-sam9x60-s-rtc.patch b/queue-5.4/arm-at91-pm-use-proper-compatibles-for-sam9x60-s-rtc.patch new file mode 100644 index 00000000000..dc8a9261297 --- /dev/null +++ b/queue-5.4/arm-at91-pm-use-proper-compatibles-for-sam9x60-s-rtc.patch @@ -0,0 +1,42 @@ +From 0f5dd0d1bf395b106d070537a1b553e169580e48 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 23 May 2022 12:24:20 +0300 +Subject: ARM: at91: pm: use proper compatibles for sam9x60's rtc and rtt + +From: Claudiu Beznea + +[ Upstream commit 641522665dbb25ce117c78746df1aad8b58c80e5 ] + +Use proper compatible strings for SAM9X60's RTC and RTT IPs. These are +necessary for configuring wakeup sources for ULP1 PM mode. + +Fixes: eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60") +Signed-off-by: Claudiu Beznea +Link: https://lore.kernel.org/r/20220523092421.317345-3-claudiu.beznea@microchip.com +Signed-off-by: Sasha Levin +--- + arch/arm/mach-at91/pm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c +index 3e24e104e687..5d75ab82d5a6 100644 +--- a/arch/arm/mach-at91/pm.c ++++ b/arch/arm/mach-at91/pm.c +@@ -114,12 +114,12 @@ static const struct of_device_id sama5d2_ws_ids[] = { + }; + + static const struct of_device_id sam9x60_ws_ids[] = { +- { .compatible = "atmel,at91sam9x5-rtc", .data = &ws_info[1] }, ++ { .compatible = "microchip,sam9x60-rtc", .data = &ws_info[1] }, + { .compatible = "atmel,at91rm9200-ohci", .data = &ws_info[2] }, + { .compatible = "usb-ohci", .data = &ws_info[2] }, + { .compatible = "atmel,at91sam9g45-ehci", .data = &ws_info[2] }, + { .compatible = "usb-ehci", .data = &ws_info[2] }, +- { .compatible = "atmel,at91sam9260-rtt", .data = &ws_info[4] }, ++ { .compatible = "microchip,sam9x60-rtt", .data = &ws_info[4] }, + { .compatible = "cdns,sam9x60-macb", .data = &ws_info[5] }, + { /* sentinel */ } + }; +-- +2.35.1 + diff --git a/queue-5.4/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch b/queue-5.4/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch new file mode 100644 index 00000000000..00becb9bcf7 --- /dev/null +++ b/queue-5.4/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch @@ -0,0 +1,46 @@ +From 89d89192695ada5e75a81fa22b362b4912692ed2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 12 May 2022 06:16:10 +0400 +Subject: ARM: meson: Fix refcount leak in meson_smp_prepare_cpus + +From: Miaoqian Lin + +[ Upstream commit 34d2cd3fccced12b958b8848e3eff0ee4296764c ] + +of_find_compatible_node() returns a node pointer with refcount +incremented, we should use of_node_put() on it when done. +Add missing of_node_put() to avoid refcount leak. + +Fixes: d850f3e5d296 ("ARM: meson: Add SMP bringup code for Meson8 and Meson8b") +Signed-off-by: Miaoqian Lin +Reviewed-by: Martin Blumenstingl +Signed-off-by: Neil Armstrong +Link: https://lore.kernel.org/r/20220512021611.47921-1-linmq006@gmail.com +Signed-off-by: Sasha Levin +--- + arch/arm/mach-meson/platsmp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/mach-meson/platsmp.c b/arch/arm/mach-meson/platsmp.c +index 4b8ad728bb42..32ac60b89fdc 100644 +--- a/arch/arm/mach-meson/platsmp.c ++++ b/arch/arm/mach-meson/platsmp.c +@@ -71,6 +71,7 @@ static void __init meson_smp_prepare_cpus(const char *scu_compatible, + } + + sram_base = of_iomap(node, 0); ++ of_node_put(node); + if (!sram_base) { + pr_err("Couldn't map SRAM registers\n"); + return; +@@ -91,6 +92,7 @@ static void __init meson_smp_prepare_cpus(const char *scu_compatible, + } + + scu_base = of_iomap(node, 0); ++ of_node_put(node); + if (!scu_base) { + pr_err("Couldn't map SCU registers\n"); + return; +-- +2.35.1 + diff --git a/queue-5.4/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch b/queue-5.4/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch new file mode 100644 index 00000000000..5f8443770c8 --- /dev/null +++ b/queue-5.4/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch @@ -0,0 +1,37 @@ +From 23c439162eff4ca8e158356c44b7f67ccd526f68 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 28 Jun 2022 12:12:16 -0700 +Subject: i2c: cadence: Unregister the clk notifier in error path + +From: Satish Nagireddy + +[ Upstream commit 3501f0c663063513ad604fb1b3f06af637d3396d ] + +This patch ensures that the clock notifier is unregistered +when driver probe is returning error. + +Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller") +Signed-off-by: Satish Nagireddy +Tested-by: Lars-Peter Clausen +Reviewed-by: Michal Simek +Signed-off-by: Wolfram Sang +Signed-off-by: Sasha Levin +--- + drivers/i2c/busses/i2c-cadence.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c +index 8a3a0991bc1c..3a1bdc75275f 100644 +--- a/drivers/i2c/busses/i2c-cadence.c ++++ b/drivers/i2c/busses/i2c-cadence.c +@@ -985,6 +985,7 @@ static int cdns_i2c_probe(struct platform_device *pdev) + return 0; + + err_clk_dis: ++ clk_notifier_unregister(id->clk, &id->clk_rate_change_nb); + clk_disable_unprepare(id->clk); + pm_runtime_set_suspended(&pdev->dev); + pm_runtime_disable(&pdev->dev); +-- +2.35.1 + diff --git a/queue-5.4/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch b/queue-5.4/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch new file mode 100644 index 00000000000..6928ed54934 --- /dev/null +++ b/queue-5.4/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch @@ -0,0 +1,50 @@ +From 5d7320b91cf4c7fa0a7238dfad109fd3c76cd8db Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 2 Jul 2022 03:37:12 -0700 +Subject: ibmvnic: Properly dispose of all skbs during a failover. + +From: Rick Lindsley + +[ Upstream commit 1b18f09d31cfa7148df15a7d5c5e0e86f105f7d1 ] + +During a reset, there may have been transmits in flight that are no +longer valid and cannot be fulfilled. Resetting and clearing the +queues is insufficient; each skb also needs to be explicitly freed +so that upper levels are not left waiting for confirmation of a +transmit that will never happen. If this happens frequently enough, +the apparent backlog will cause TCP to begin "congestion control" +unnecessarily, culminating in permanently decreased throughput. + +Fixes: d7c0ef36bde03 ("ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change") +Tested-by: Nick Child +Reviewed-by: Brian King +Signed-off-by: Rick Lindsley +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/ibm/ibmvnic.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c +index 34bf6f4eef4a..bc313d85fe13 100644 +--- a/drivers/net/ethernet/ibm/ibmvnic.c ++++ b/drivers/net/ethernet/ibm/ibmvnic.c +@@ -5022,6 +5022,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter) + release_sub_crqs(adapter, 0); + rc = init_sub_crqs(adapter); + } else { ++ /* no need to reinitialize completely, but we do ++ * need to clean up transmits that were in flight ++ * when we processed the reset. Failure to do so ++ * will confound the upper layer, usually TCP, by ++ * creating the illusion of transmits that are ++ * awaiting completion. ++ */ ++ clean_tx_pools(adapter); ++ + rc = reset_sub_crq_queues(adapter); + } + } else { +-- +2.35.1 + diff --git a/queue-5.4/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch b/queue-5.4/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch new file mode 100644 index 00000000000..b48053c6503 --- /dev/null +++ b/queue-5.4/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch @@ -0,0 +1,61 @@ +From 40f9f90e67bde65d5ffadc2540c3218d41c63984 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 25 May 2022 21:49:56 -0500 +Subject: pinctrl: sunxi: a83t: Fix NAND function name for some pins + +From: Samuel Holland + +[ Upstream commit aaefa29270d9551b604165a08406543efa9d16f5 ] + +The other NAND pins on Port C use the "nand0" function name. +"nand0" also matches all of the other Allwinner SoCs. + +Fixes: 4730f33f0d82 ("pinctrl: sunxi: add allwinner A83T PIO controller support") +Signed-off-by: Samuel Holland +Acked-by: Jernej Skrabec +Link: https://lore.kernel.org/r/20220526024956.49500-1-samuel@sholland.org +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c +index 4ada80317a3b..b5c1a8f363f3 100644 +--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c ++++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c +@@ -158,26 +158,26 @@ static const struct sunxi_desc_pin sun8i_a83t_pins[] = { + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand"), /* DQ6 */ ++ SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */ + SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand"), /* DQ7 */ ++ SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */ + SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand"), /* DQS */ ++ SUNXI_FUNCTION(0x2, "nand0"), /* DQS */ + SUNXI_FUNCTION(0x3, "mmc2")), /* RST */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand")), /* CE2 */ ++ SUNXI_FUNCTION(0x2, "nand0")), /* CE2 */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand")), /* CE3 */ ++ SUNXI_FUNCTION(0x2, "nand0")), /* CE3 */ + /* Hole */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2), + SUNXI_FUNCTION(0x0, "gpio_in"), +-- +2.35.1 + diff --git a/queue-5.4/pinctrl-sunxi-sunxi_pconf_set-use-correct-offset.patch b/queue-5.4/pinctrl-sunxi-sunxi_pconf_set-use-correct-offset.patch new file mode 100644 index 00000000000..a62ae3d01b5 --- /dev/null +++ b/queue-5.4/pinctrl-sunxi-sunxi_pconf_set-use-correct-offset.patch @@ -0,0 +1,40 @@ +From 685b021bc433fef4db1a242839e86625363d9b46 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 25 May 2022 22:04:25 +0300 +Subject: pinctrl: sunxi: sunxi_pconf_set: use correct offset + +From: Andrei Lalaev + +[ Upstream commit cd4c1e65a32afd003b08ad4aafe1e4d3e4e8e61b ] + +Some Allwinner SoCs have 2 pinctrls (PIO and R_PIO). +Previous implementation used absolute pin numbering and it was incorrect +for R_PIO pinctrl. +It's necessary to take into account the base pin number. + +Fixes: 90be64e27621 ("pinctrl: sunxi: implement pin_config_set") +Signed-off-by: Andrei Lalaev +Reviewed-by: Samuel Holland +Link: https://lore.kernel.org/r/20220525190423.410609-1-andrey.lalaev@gmail.com +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c +index 77783582080c..c4052eab6bfc 100644 +--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c ++++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c +@@ -536,6 +536,8 @@ static int sunxi_pconf_set(struct pinctrl_dev *pctldev, unsigned pin, + struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); + int i; + ++ pin -= pctl->desc->pin_base; ++ + for (i = 0; i < num_configs; i++) { + enum pin_config_param param; + unsigned long flags; +-- +2.35.1 + diff --git a/queue-5.4/selftests-forwarding-fix-error-message-in-learning_t.patch b/queue-5.4/selftests-forwarding-fix-error-message-in-learning_t.patch new file mode 100644 index 00000000000..304a5ebd9da --- /dev/null +++ b/queue-5.4/selftests-forwarding-fix-error-message-in-learning_t.patch @@ -0,0 +1,38 @@ +From 594a0e0802de004dea0a87950f0ac5a7ff334130 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jul 2022 10:36:26 +0300 +Subject: selftests: forwarding: fix error message in learning_test + +From: Vladimir Oltean + +[ Upstream commit 83844aacab2015da1dba1df0cc61fc4b4c4e8076 ] + +When packets are not received, they aren't received on $host1_if, so the +message talking about the second host not receiving them is incorrect. +Fix it. + +Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning") +Signed-off-by: Vladimir Oltean +Reviewed-by: Ido Schimmel +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/forwarding/lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh +index b759f7903c06..f190ad58e00d 100644 +--- a/tools/testing/selftests/net/forwarding/lib.sh ++++ b/tools/testing/selftests/net/forwarding/lib.sh +@@ -905,7 +905,7 @@ learning_test() + tc -j -s filter show dev $host1_if ingress \ + | jq -e ".[] | select(.options.handle == 101) \ + | select(.options.actions[0].stats.packets == 1)" &> /dev/null +- check_fail $? "Packet reached second host when should not" ++ check_fail $? "Packet reached first host when should not" + + $MZ $host1_if -c 1 -p 64 -a $mac -t ip -q + sleep 1 +-- +2.35.1 + diff --git a/queue-5.4/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch b/queue-5.4/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch new file mode 100644 index 00000000000..e61f96432fb --- /dev/null +++ b/queue-5.4/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch @@ -0,0 +1,61 @@ +From b1a61c3083aae2bab26ff5032c0206d231f9add4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jul 2022 10:36:24 +0300 +Subject: selftests: forwarding: fix flood_unicast_test when h2 supports + IFF_UNICAST_FLT + +From: Vladimir Oltean + +[ Upstream commit b8e629b05f5d23f9649c901bef09fab8b0c2e4b9 ] + +As mentioned in the blamed commit, flood_unicast_test() works by +checking the match count on a tc filter placed on the receiving +interface. + +But the second host interface (host2_if) has no interest in receiving a +packet with MAC DA de:ad:be:ef:13:37, so its RX filter drops it even +before the ingress tc filter gets to be executed. So we will incorrectly +get the message "Packet was not flooded when should", when in fact, the +packet was flooded as expected but dropped due to an unrelated reason, +at some other layer on the receiving side. + +Force h2 to accept this packet by temporarily placing it in promiscuous +mode. Alternatively we could either deliver to its MAC address or use +tcpdump_start, but this has the fewest complications. + +This fixes the "flooding" test from bridge_vlan_aware.sh and +bridge_vlan_unaware.sh, which calls flood_test from the lib. + +Fixes: 236dd50bf67a ("selftests: forwarding: Add a test for flooded traffic") +Signed-off-by: Vladimir Oltean +Reviewed-by: Ido Schimmel +Tested-by: Ido Schimmel +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/forwarding/lib.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh +index 85c587a03c8a..be977cd4bfe3 100644 +--- a/tools/testing/selftests/net/forwarding/lib.sh ++++ b/tools/testing/selftests/net/forwarding/lib.sh +@@ -960,6 +960,7 @@ flood_test_do() + + # Add an ACL on `host2_if` which will tell us whether the packet + # was flooded to it or not. ++ ip link set $host2_if promisc on + tc qdisc add dev $host2_if ingress + tc filter add dev $host2_if ingress protocol ip pref 1 handle 101 \ + flower dst_mac $mac action drop +@@ -977,6 +978,7 @@ flood_test_do() + + tc filter del dev $host2_if ingress protocol ip pref 1 handle 101 flower + tc qdisc del dev $host2_if ingress ++ ip link set $host2_if promisc off + + return $err + } +-- +2.35.1 + diff --git a/queue-5.4/selftests-forwarding-fix-learning_test-when-h1-suppo.patch b/queue-5.4/selftests-forwarding-fix-learning_test-when-h1-suppo.patch new file mode 100644 index 00000000000..3e5d598a714 --- /dev/null +++ b/queue-5.4/selftests-forwarding-fix-learning_test-when-h1-suppo.patch @@ -0,0 +1,50 @@ +From d668a6fb7018e2cea4f3cd886113341578f97e95 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jul 2022 10:36:25 +0300 +Subject: selftests: forwarding: fix learning_test when h1 supports + IFF_UNICAST_FLT + +From: Vladimir Oltean + +[ Upstream commit 1a635d3e1c80626237fdae47a5545b6655d8d81c ] + +The first host interface has by default no interest in receiving packets +MAC DA de:ad:be:ef:13:37, so it might drop them before they hit the tc +filter and this might confuse the selftest. + +Enable promiscuous mode such that the filter properly counts received +packets. + +Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning") +Signed-off-by: Vladimir Oltean +Reviewed-by: Ido Schimmel +Tested-by: Ido Schimmel +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/forwarding/lib.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh +index be977cd4bfe3..b759f7903c06 100644 +--- a/tools/testing/selftests/net/forwarding/lib.sh ++++ b/tools/testing/selftests/net/forwarding/lib.sh +@@ -894,6 +894,7 @@ learning_test() + # FDB entry was installed. + bridge link set dev $br_port1 flood off + ++ ip link set $host1_if promisc on + tc qdisc add dev $host1_if ingress + tc filter add dev $host1_if ingress protocol ip pref 1 handle 101 \ + flower dst_mac $mac action drop +@@ -943,6 +944,7 @@ learning_test() + + tc filter del dev $host1_if ingress protocol ip pref 1 handle 101 flower + tc qdisc del dev $host1_if ingress ++ ip link set $host1_if promisc off + + bridge link set dev $br_port1 flood on + +-- +2.35.1 + diff --git a/queue-5.4/series b/queue-5.4/series index cc0fac6d806..9fce16c5bb3 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -16,3 +16,13 @@ can-kvaser_usb-replace-run-time-checks-with-struct-kvaser_usb_driver_info.patch can-kvaser_usb-kvaser_usb_leaf-fix-can-clock-frequency-regression.patch can-kvaser_usb-kvaser_usb_leaf-fix-bittiming-limits.patch xfs-remove-incorrect-assert-in-xfs_rename.patch +arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch +pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch +pinctrl-sunxi-sunxi_pconf_set-use-correct-offset.patch +arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch +arm-at91-pm-use-proper-compatibles-for-sam9x60-s-rtc.patch +ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch +selftests-forwarding-fix-flood_unicast_test-when-h2-.patch +selftests-forwarding-fix-learning_test-when-h1-suppo.patch +selftests-forwarding-fix-error-message-in-learning_t.patch +i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch -- 2.47.3