patch 'net/ngbe: fix MAC control frame forwarding' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 14 17:11:03 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/16/25. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/926ab7c88e824e2356f4f7c5dab6408ac3c90a22
Thanks.
Luca Boccassi
---
>From 926ab7c88e824e2356f4f7c5dab6408ac3c90a22 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu at trustnetic.com>
Date: Fri, 13 Jun 2025 16:41:54 +0800
Subject: [PATCH] net/ngbe: fix MAC control frame forwarding
[ upstream commit 31ae872822cdc89cd00926c3e162781ef927ca24 ]
Test failure on the case "test_pause_fwd_port_stop_start", which expect
MAC control frame forwarding setting still working after port stop/start.
Fix the bug to pass the test case.
Fixes: f40e9f0e2278 ("net/ngbe: support flow control")
Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
drivers/net/ngbe/base/ngbe_hw.c | 9 +++++++++
drivers/net/ngbe/base/ngbe_type.h | 1 +
drivers/net/ngbe/ngbe_ethdev.c | 1 +
3 files changed, 11 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index b9bb861adc..fa6445b12b 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -812,6 +812,15 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw)
goto out;
}
+ /*
+ * Reconfig mac ctrl frame fwd rule to make sure it still
+ * working after port stop/start.
+ */
+ wr32m(hw, NGBE_MACRXFLT, NGBE_MACRXFLT_CTL_MASK,
+ (hw->fc.mac_ctrl_frame_fwd ?
+ NGBE_MACRXFLT_CTL_NOPS : NGBE_MACRXFLT_CTL_DROP));
+ ngbe_flush(hw);
+
err = hw->phy.set_pause_adv(hw, reg_cu);
out:
diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h
index 8a7d2cd331..82ce3f5440 100644
--- a/drivers/net/ngbe/base/ngbe_type.h
+++ b/drivers/net/ngbe/base/ngbe_type.h
@@ -108,6 +108,7 @@ struct ngbe_fc_info {
u32 high_water; /* Flow Ctrl High-water */
u32 low_water; /* Flow Ctrl Low-water */
u16 pause_time; /* Flow Control Pause timer */
+ u8 mac_ctrl_frame_fwd; /* Forward MAC control frames */
bool send_xon; /* Flow control send XON */
bool strict_ieee; /* Strict IEEE mode */
bool disable_fc_autoneg; /* Do not autonegotiate FC */
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 9d6ae6f2ef..deaf415623 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -2365,6 +2365,7 @@ ngbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
hw->fc.low_water = fc_conf->low_water;
hw->fc.send_xon = fc_conf->send_xon;
hw->fc.disable_fc_autoneg = !fc_conf->autoneg;
+ hw->fc.mac_ctrl_frame_fwd = fc_conf->mac_ctrl_frame_fwd;
err = hw->mac.fc_enable(hw);
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-14 16:09:41.018754922 +0100
+++ 0008-net-ngbe-fix-MAC-control-frame-forwarding.patch 2025-07-14 16:09:40.700448723 +0100
@@ -1 +1 @@
-From 31ae872822cdc89cd00926c3e162781ef927ca24 Mon Sep 17 00:00:00 2001
+From 926ab7c88e824e2356f4f7c5dab6408ac3c90a22 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31ae872822cdc89cd00926c3e162781ef927ca24 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 6688ae6a31..bf09f8a817 100644
+index b9bb861adc..fa6445b12b 100644
@@ -24 +25 @@
-@@ -865,6 +865,15 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw)
+@@ -812,6 +812,15 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw)
@@ -41 +42 @@
-index 7a3b52ffd4..fc571c7457 100644
+index 8a7d2cd331..82ce3f5440 100644
@@ -44 +45 @@
-@@ -112,6 +112,7 @@ struct ngbe_fc_info {
+@@ -108,6 +108,7 @@ struct ngbe_fc_info {
@@ -53 +54 @@
-index 08e87471f6..a8f847de8d 100644
+index 9d6ae6f2ef..deaf415623 100644
@@ -56 +57 @@
-@@ -2420,6 +2420,7 @@ ngbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -2365,6 +2365,7 @@ ngbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
More information about the stable
mailing list