* [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' " Xueming Li
` (251 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Yury Kylulin
Cc: Luca Boccassi, Ashish Paul, Christian Ehrhardt, Luca Boccassi,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cd9f079d8799f40cf1739045bc7ff5429981cc09
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From cd9f079d8799f40cf1739045bc7ff5429981cc09 Mon Sep 17 00:00:00 2001
From: Yury Kylulin <yury.kylulin@intel.com>
Date: Mon, 6 Sep 2021 10:17:44 +0200
Subject: [PATCH] net/i40e: support 25G AOC/ACC cables
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit b1daa3461429e7674206a714c17adca65e9b44b4 ]
Enable additional PHY types (25G-AOC and 25G-ACC) for set PHY config
command.
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1940957
Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Tested-by: Ashish Paul <apaul@juniper.net>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
drivers/net/i40e/i40e_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0dc20de9a0..5e3b80a6b8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2372,7 +2372,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
phy_conf.phy_type = is_up ? cpu_to_le32(phy_type_mask) : 0;
phy_conf.phy_type_ext = is_up ? (I40E_AQ_PHY_TYPE_EXT_25G_KR |
I40E_AQ_PHY_TYPE_EXT_25G_CR | I40E_AQ_PHY_TYPE_EXT_25G_SR |
- I40E_AQ_PHY_TYPE_EXT_25G_LR) : 0;
+ I40E_AQ_PHY_TYPE_EXT_25G_LR | I40E_AQ_PHY_TYPE_EXT_25G_AOC |
+ I40E_AQ_PHY_TYPE_EXT_25G_ACC) : 0;
phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
phy_conf.eee_capability = phy_ab.eee_capability;
phy_conf.eeer = phy_ab.eeer_val;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.172063822 +0800
+++ 0001-net-i40e-support-25G-AOC-ACC-cables.patch 2021-11-10 14:17:01.730747236 +0800
@@ -1 +1 @@
-From b1daa3461429e7674206a714c17adca65e9b44b4 Mon Sep 17 00:00:00 2001
+From cd9f079d8799f40cf1739045bc7ff5429981cc09 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Tue, 13 Apr 2021 18:29:50 +0300
+Date: Mon, 6 Sep 2021 10:17:44 +0200
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b1daa3461429e7674206a714c17adca65e9b44b4 ]
@@ -8,0 +12,2 @@
+Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1940957
+
@@ -10,0 +16,2 @@
+Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Acked-by: Luca Boccassi <luca.boccassi@microsoft.com>
@@ -16 +23 @@
-index ea5d384283..e6206a7e51 100644
+index 0dc20de9a0..5e3b80a6b8 100644
@@ -19 +26 @@
-@@ -2307,7 +2307,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
+@@ -2372,7 +2372,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' " Xueming Li
` (250 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Jerin Jacob; +Cc: Luca Boccassi, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d65672bac2ec7927684e16a8677983f1c4e9ac01
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d65672bac2ec7927684e16a8677983f1c4e9ac01 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Mon, 16 Aug 2021 18:49:14 +0530
Subject: [PATCH] examples/performance-thread: fix build with clang 12.0.1
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 ]
In clang 12.0.1 version, the use of pthread_yield() is deprecated,
use sched_yield() instead.
log:
examples/performance-thread/pthread_shim/main.c:75:9: warning:
'pthread_yield' is deprecated: pthread_yield is deprecated,
use sched_yield instead [-Wdeprecated-declarations]
Bugzilla ID: 745
Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
examples/performance-thread/pthread_shim/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c
index 241267fd9e..288c70c6cd 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -71,7 +71,7 @@ void *helloworld_pthread(void *arg)
print_count++;
/* yield thread to give opportunity for lock contention */
- pthread_yield();
+ sched_yield();
/* retrieve arg from TLS */
uint64_t thread_no = (uint64_t) pthread_getspecific(key);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.222062262 +0800
+++ 0002-examples-performance-thread-fix-build-with-clang-12..patch 2021-11-10 14:17:01.730747236 +0800
@@ -1 +1 @@
-From 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 Mon Sep 17 00:00:00 2001
+From d65672bac2ec7927684e16a8677983f1c4e9ac01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 257de50692..7ce6cfb0c8 100644
+index 241267fd9e..288c70c6cd 100644
@@ -28 +30 @@
-@@ -72,7 +72,7 @@ void *helloworld_pthread(void *arg)
+@@ -71,7 +71,7 @@ void *helloworld_pthread(void *arg)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been " Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'drivers/net: fix vector Rx comments' " Xueming Li
` (249 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Feifei Wang; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/99e95a04c40e72d58fb62e1f82a2b7a0eaf4ba50
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 99e95a04c40e72d58fb62e1f82a2b7a0eaf4ba50 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 23 Jul 2021 11:10:46 +0800
Subject: [PATCH] drivers/net: fix typo in vector Rx comment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 635a9373fa99158c69b3fb5b19315f7b9d4cdecd ]
In Rx vec path, for extracting and recording EOP bit, comment has
redundant "count" word, removing it.
Fixes: 7092be8437bd ("fm10k: add vector Rx")
Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec")
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +-
drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +-
drivers/net/i40e/i40e_rxtx_vec_neon.c | 2 +-
drivers/net/i40e/i40e_rxtx_vec_sse.c | 2 +-
drivers/net/iavf/iavf_rxtx_vec_sse.c | 4 ++--
drivers/net/ice/ice_rxtx_vec_sse.c | 2 +-
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 6fcc939ad9..b3c31ff198 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -544,7 +544,7 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
/* and with mask to extract bits, flipping 1-0 */
__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index d3238bfb6a..0f03d5e0fa 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -398,7 +398,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
(vector unsigned char)vec_nor(staterr, staterr),
(vector unsigned char)eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index edb202a51a..278c523a8f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -387,7 +387,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
eop_bits = vmvnq_u8(vreinterpretq_u8_u16(staterr));
eop_bits = vandq_u8(eop_bits, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 0bcb48e24e..e9b4258bbc 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -557,7 +557,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* and with mask to extract bits, flipping 1-0 */
__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 75c77f9d32..52919182b6 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -590,7 +590,7 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* and with mask to extract bits, flipping 1-0 */
__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
@@ -884,7 +884,7 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
/* and with mask to extract bits, flipping 1-0 */
__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index eef21fa70c..fb0d1621a5 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -545,7 +545,7 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* and with mask to extract bits, flipping 1-0 */
__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index 52add17b5d..cbd907f2b9 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -540,7 +540,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* and with mask to extract bits, flipping 1-0 */
__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
/* the staterr values are not in order, as the count
- * count of dd bits doesn't care. However, for end of
+ * of dd bits doesn't care. However, for end of
* packet tracking, we do care, so shuffle. This also
* compresses the 32-bit values to 8-bit
*/
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.264447334 +0800
+++ 0003-drivers-net-fix-typo-in-vector-Rx-comment.patch 2021-11-10 14:17:01.734080543 +0800
@@ -1 +1 @@
-From 635a9373fa99158c69b3fb5b19315f7b9d4cdecd Mon Sep 17 00:00:00 2001
+From 99e95a04c40e72d58fb62e1f82a2b7a0eaf4ba50 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 635a9373fa99158c69b3fb5b19315f7b9d4cdecd ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 39e3cdac1f..cae5322d48 100644
+index 6fcc939ad9..b3c31ff198 100644
@@ -45 +47 @@
-index 1ad74646d6..edaa462ac8 100644
+index d3238bfb6a..0f03d5e0fa 100644
@@ -58 +60 @@
-index 1f5539bda8..32336fdb80 100644
+index edb202a51a..278c523a8f 100644
@@ -71 +73 @@
-index bfa5aff48d..03a0320353 100644
+index 0bcb48e24e..e9b4258bbc 100644
@@ -84 +86 @@
-index bf87696fa4..b813d96ef4 100644
+index 75c77f9d32..52919182b6 100644
@@ -106 +108 @@
-index 673e44a243..5f7e13ee39 100644
+index eef21fa70c..fb0d1621a5 100644
@@ -119 +121 @@
-index 7610fd93db..3a3ef51172 100644
+index 52add17b5d..cbd907f2b9 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'drivers/net: fix vector Rx comments' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (2 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice/base: fix typo in comment' " Xueming Li
` (248 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Feifei Wang; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/39a30eb8841d7177a1a61bc4a432a79c9e5e86e6
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 39a30eb8841d7177a1a61bc4a432a79c9e5e86e6 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 23 Jul 2021 11:10:47 +0800
Subject: [PATCH] drivers/net: fix vector Rx comments
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4f76ac98b787dbc893d9aaae487f79e69cb962c4 ]
For the loop to process packets in Rx vector path, some notes for the
code are wrong, fix these errors.
Fixes: 7092be8437bd ("fm10k: add vector Rx")
Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec")
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")
Suggested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
drivers/net/fm10k/fm10k_rxtx_vec.c | 4 ++--
drivers/net/i40e/i40e_rxtx_vec_altivec.c | 8 ++++----
drivers/net/i40e/i40e_rxtx_vec_neon.c | 8 ++++----
drivers/net/i40e/i40e_rxtx_vec_sse.c | 4 ++--
drivers/net/iavf/iavf_rxtx_vec_sse.c | 8 ++++----
drivers/net/ice/ice_rxtx_vec_sse.c | 4 ++--
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 ++--
7 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index b3c31ff198..50e76b1083 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -472,7 +472,7 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
mbp1 = _mm_loadu_si128((__m128i *)&mbufp[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs0[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
@@ -484,9 +484,9 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
mbp2 = _mm_loadu_si128((__m128i *)&mbufp[pos+2]);
#endif
+ /* A.1 load desc[2-0] */
descs0[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs0[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
rte_compiler_barrier();
descs0[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index 0f03d5e0fa..161870f505 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -281,22 +281,22 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
* in one XMM reg.
*/
- /* B.1 load 1 mbuf point */
+ /* B.1 load 2 mbuf point */
mbp1 = *(vector unsigned long *)&sw_ring[pos];
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = *(vector unsigned long *)(rxdp + 3);
rte_compiler_barrier();
/* B.2 copy 2 mbuf point into rx_pkts */
*(vector unsigned long *)&rx_pkts[pos] = mbp1;
- /* B.1 load 1 mbuf point */
+ /* B.1 load 2 mbuf point */
mbp2 = *(vector unsigned long *)&sw_ring[pos + 2];
+ /* A.1 load desc[2-0] */
descs[2] = *(vector unsigned long *)(rxdp + 2);
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs[1] = *(vector unsigned long *)(rxdp + 1);
rte_compiler_barrier();
descs[0] = *(vector unsigned long *)(rxdp);
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 278c523a8f..0df315b162 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -280,20 +280,20 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
int32x4_t len_shl = {0, 0, 0, PKTLEN_SHIFT};
- /* B.1 load 1 mbuf point */
+ /* B.1 load 2 mbuf point */
mbp1 = vld1q_u64((uint64_t *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = vld1q_u64((uint64_t *)(rxdp + 3));
/* B.2 copy 2 mbuf point into rx_pkts */
vst1q_u64((uint64_t *)&rx_pkts[pos], mbp1);
- /* B.1 load 1 mbuf point */
+ /* B.1 load 2 mbuf point */
mbp2 = vld1q_u64((uint64_t *)&sw_ring[pos + 2]);
+ /* A.1 load desc[2-0] */
descs[2] = vld1q_u64((uint64_t *)(rxdp + 2));
- /* B.1 load 2 mbuf point */
descs[1] = vld1q_u64((uint64_t *)(rxdp + 1));
descs[0] = vld1q_u64((uint64_t *)(rxdp));
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index e9b4258bbc..8090a3a370 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -462,7 +462,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
@@ -474,9 +474,9 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos+2]);
#endif
+ /* A.1 load desc[2-0] */
descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
rte_compiler_barrier();
descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 52919182b6..5d9a1bb809 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -494,7 +494,7 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
@@ -506,9 +506,9 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]);
#endif
+ /* A.1 load desc[2-0] */
descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
rte_compiler_barrier();
descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
@@ -755,7 +755,7 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
@@ -767,9 +767,9 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]);
#endif
+ /* A.1 load desc[2-0] */
descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
rte_compiler_barrier();
descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index fb0d1621a5..e624fd54b8 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -416,7 +416,7 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
@@ -428,9 +428,9 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]);
#endif
+ /* A.1 load desc[2-0] */
descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
rte_compiler_barrier();
descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index cbd907f2b9..d0377410d6 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -454,7 +454,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
- /* A.1 load 4 pkts desc */
+ /* A.1 load desc[3] */
descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
@@ -466,9 +466,9 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos+2]);
#endif
+ /* A.1 load desc[2-0] */
descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
- /* B.1 load 2 mbuf point */
descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
rte_compiler_barrier();
descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.311513117 +0800
+++ 0004-drivers-net-fix-vector-Rx-comments.patch 2021-11-10 14:17:01.737413849 +0800
@@ -1 +1 @@
-From 4f76ac98b787dbc893d9aaae487f79e69cb962c4 Mon Sep 17 00:00:00 2001
+From 39a30eb8841d7177a1a61bc4a432a79c9e5e86e6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4f76ac98b787dbc893d9aaae487f79e69cb962c4 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index cae5322d48..83af01dc2d 100644
+index b3c31ff198..50e76b1083 100644
@@ -57 +59 @@
-index edaa462ac8..b99323992f 100644
+index 0f03d5e0fa..161870f505 100644
@@ -88 +90 @@
-index 32336fdb80..fb624a4882 100644
+index 278c523a8f..0df315b162 100644
@@ -117 +119 @@
-index 03a0320353..b235502db5 100644
+index e9b4258bbc..8090a3a370 100644
@@ -141 +143 @@
-index b813d96ef4..ee1e905525 100644
+index 52919182b6..5d9a1bb809 100644
@@ -185 +187 @@
-index 5f7e13ee39..653bd28b41 100644
+index fb0d1621a5..e624fd54b8 100644
@@ -209 +211 @@
-index 3a3ef51172..1dea95e73b 100644
+index cbd907f2b9..d0377410d6 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice/base: fix typo in comment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (3 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'drivers/net: fix vector Rx comments' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' " Xueming Li
` (247 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qi Zhang; +Cc: Luca Boccassi, Kevin Scott, Junfeng Guo, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2cbc3c42d22b4db7b53859058f6db3298fd30886
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2cbc3c42d22b4db7b53859058f6db3298fd30886 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 10 Aug 2021 10:51:39 +0800
Subject: [PATCH] net/ice/base: fix typo in comment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 34be38f024ee650be2ae445c18985641b63d138f ]
Correct spelling of word data instead of date.
Fixes: 453d087ccaff ("net/ice/base: add common functions")
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
---
drivers/net/ice/base/ice_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 304e55e210..be33ee252d 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -2913,7 +2913,7 @@ ice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *phy_caps,
/**
* ice_copy_phy_caps_to_cfg - Copy PHY ability data to configuration data
* @pi: port information structure
- * @caps: PHY ability structure to copy date from
+ * @caps: PHY ability structure to copy data from
* @cfg: PHY configuration structure to copy data to
*
* Helper function to copy AQC PHY get ability data to PHY set configuration
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.357055892 +0800
+++ 0005-net-ice-base-fix-typo-in-comment.patch 2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 34be38f024ee650be2ae445c18985641b63d138f Mon Sep 17 00:00:00 2001
+From 2cbc3c42d22b4db7b53859058f6db3298fd30886 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 34be38f024ee650be2ae445c18985641b63d138f ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9c6649b6c5..641859f752 100644
+index 304e55e210..be33ee252d 100644
@@ -22 +24 @@
-@@ -3528,7 +3528,7 @@ ice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *phy_caps,
+@@ -2913,7 +2913,7 @@ ice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *phy_caps,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (4 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice/base: fix typo in comment' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' " Xueming Li
` (246 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Simei Su; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e2eae48793251ed86eda5176e7b4c9d3c4ad2b5b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e2eae48793251ed86eda5176e7b4c9d3c4ad2b5b Mon Sep 17 00:00:00 2001
From: Simei Su <simei.su@intel.com>
Date: Wed, 28 Jul 2021 10:24:29 +0800
Subject: [PATCH] net/ice: fix max entry number for ACL normal priority
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4f72c21fdffa9074f0df9d5855522735ec61f4d7 ]
For ACL, there are three entry priorities: LOW, NORMAL, HIGH.
Low priority starts from the highest index, 25% of total entries;
Normal priority starts from the highest index, 50% of total entries;
High priority starts from the lowest index, 25% of total entries.
Each TCAM block has 512 entries of 40 bits. Currently, there is a
scenario in which multiple TCAM blocks are cascaded. It means the
total entries are 512. The default priority is NORMAL, so the max
entry is 256, not 512. This patch changes the max entry number for
NORMAL priority.
Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_acl_filter.c | 4 ++--
drivers/net/ice/ice_ethdev.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index f7dbe53574..95b235e470 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -430,7 +430,7 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
/* For IPV4_OTHER type, should add entry for all types.
* For IPV4_UDP/TCP/SCTP type, only add entry for each.
*/
- if (slot_id < MAX_ACL_ENTRIES) {
+ if (slot_id < MAX_ACL_NORMAL_ENTRIES) {
entry_id = ((uint64_t)flow_type << 32) | slot_id;
ret = ice_flow_add_entry(hw, blk, flow_type,
entry_id, pf->main_vsi->idx,
@@ -444,7 +444,7 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
pf->acl.hw_entry_id[slot_id] = hw_entry;
} else {
PMD_DRV_LOG(ERR, "Exceed the maximum entry number(%d)"
- " HW supported!", MAX_ACL_ENTRIES);
+ " HW supported!", MAX_ACL_NORMAL_ENTRIES);
return -1;
}
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index c1b432c1ef..cba2e46eff 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -50,7 +50,7 @@
#define ICE_PKG_FILE_SEARCH_PATH_UPDATES "/lib/firmware/updates/intel/ice/ddp/"
#define ICE_MAX_PKG_FILENAME_SIZE 256
-#define MAX_ACL_ENTRIES 512
+#define MAX_ACL_NORMAL_ENTRIES 256
/**
* vlan_id is a 12 bit number.
@@ -400,7 +400,7 @@ struct ice_acl_conf {
struct ice_acl_info {
struct ice_acl_conf conf;
struct rte_bitmap *slots;
- uint64_t hw_entry_id[MAX_ACL_ENTRIES];
+ uint64_t hw_entry_id[MAX_ACL_NORMAL_ENTRIES];
};
struct ice_pf {
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.402145540 +0800
+++ 0006-net-ice-fix-max-entry-number-for-ACL-normal-priority.patch 2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 4f72c21fdffa9074f0df9d5855522735ec61f4d7 Mon Sep 17 00:00:00 2001
+From e2eae48793251ed86eda5176e7b4c9d3c4ad2b5b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4f72c21fdffa9074f0df9d5855522735ec61f4d7 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 33756099c6..0c15a7036c 100644
+index f7dbe53574..95b235e470 100644
@@ -50 +52 @@
-index edafdf168b..b4bf651c1c 100644
+index c1b432c1ef..cba2e46eff 100644
@@ -62 +64 @@
-@@ -408,7 +408,7 @@ struct ice_acl_conf {
+@@ -400,7 +400,7 @@ struct ice_acl_conf {
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (5 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' " Xueming Li
` (245 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/05af857e4305c4d5533c44c458b92f15e9af4281
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 05af857e4305c4d5533c44c458b92f15e9af4281 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 12 Aug 2021 10:00:19 +0800
Subject: [PATCH] net/txgbe: fix reading SFP module SFF-8472 data
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 00970f6398c871df52cfe3b87ebbe418616c9117 ]
Fix the I2C target address selection to read SFP module's SFF-8472 data.
Fixes: 8f09fb4642fa ("net/txgbe: add module identify")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_phy.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index bdd6bf780e..aa8037a36e 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -7,7 +7,7 @@
#include "txgbe_mng.h"
#include "txgbe_phy.h"
-static void txgbe_i2c_start(struct txgbe_hw *hw);
+static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr);
static void txgbe_i2c_stop(struct txgbe_hw *hw);
/**
@@ -1223,11 +1223,9 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
s32 txgbe_read_i2c_byte_unlocked(struct txgbe_hw *hw, u8 byte_offset,
u8 dev_addr, u8 *data)
{
- UNREFERENCED_PARAMETER(dev_addr);
-
DEBUGFUNC("txgbe_read_i2c_byte");
- txgbe_i2c_start(hw);
+ txgbe_i2c_start(hw, dev_addr);
/* wait tx empty */
if (!po32m(hw, TXGBE_I2CICR, TXGBE_I2CICR_TXEMPTY,
@@ -1289,11 +1287,9 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
s32 txgbe_write_i2c_byte_unlocked(struct txgbe_hw *hw, u8 byte_offset,
u8 dev_addr, u8 data)
{
- UNREFERENCED_PARAMETER(dev_addr);
-
DEBUGFUNC("txgbe_write_i2c_byte");
- txgbe_i2c_start(hw);
+ txgbe_i2c_start(hw, dev_addr);
/* wait tx empty */
if (!po32m(hw, TXGBE_I2CICR, TXGBE_I2CICR_TXEMPTY,
@@ -1344,7 +1340,7 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
*
* Sets I2C start condition (High -> Low on SDA while SCL is High)
**/
-static void txgbe_i2c_start(struct txgbe_hw *hw)
+static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr)
{
DEBUGFUNC("txgbe_i2c_start");
@@ -1355,9 +1351,9 @@ static void txgbe_i2c_start(struct txgbe_hw *hw)
TXGBE_I2CCON_SPEED(1) |
TXGBE_I2CCON_RESTART |
TXGBE_I2CCON_SDIA));
- wr32(hw, TXGBE_I2CTAR, TXGBE_I2C_SLAVEADDR);
- wr32(hw, TXGBE_I2CSSSCLHCNT, 600);
- wr32(hw, TXGBE_I2CSSSCLLCNT, 600);
+ wr32(hw, TXGBE_I2CTAR, dev_addr >> 1);
+ wr32(hw, TXGBE_I2CSSSCLHCNT, 200);
+ wr32(hw, TXGBE_I2CSSSCLLCNT, 200);
wr32(hw, TXGBE_I2CRXTL, 0); /* 1byte for rx full signal */
wr32(hw, TXGBE_I2CTXTL, 4);
wr32(hw, TXGBE_I2CSCLTMOUT, 0xFFFFFF);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.444702146 +0800
+++ 0007-net-txgbe-fix-reading-SFP-module-SFF-8472-data.patch 2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 00970f6398c871df52cfe3b87ebbe418616c9117 Mon Sep 17 00:00:00 2001
+From 05af857e4305c4d5533c44c458b92f15e9af4281 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 00970f6398c871df52cfe3b87ebbe418616c9117 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 3e9f507212..2db87ae0c5 100644
+index bdd6bf780e..aa8037a36e 100644
@@ -20 +22 @@
-@@ -8,7 +8,7 @@
+@@ -7,7 +7,7 @@
@@ -27,3 +29,3 @@
- static s32 txgbe_handle_bp_flow(u32 link_mode, struct txgbe_hw *hw);
- static void txgbe_get_bp_ability(struct txgbe_backplane_ability *ability,
-@@ -1248,11 +1248,9 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
+
+ /**
+@@ -1223,11 +1223,9 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
@@ -42 +44 @@
-@@ -1314,11 +1312,9 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1289,11 +1287,9 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
@@ -55 +57 @@
-@@ -1369,7 +1365,7 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1344,7 +1340,7 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
@@ -64 +66 @@
-@@ -1380,9 +1376,9 @@ static void txgbe_i2c_start(struct txgbe_hw *hw)
+@@ -1355,9 +1351,9 @@ static void txgbe_i2c_start(struct txgbe_hw *hw)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (6 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' " Xueming Li
` (244 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f50cec54fd7ac0ba16ac15580c1e60b501aeb53b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f50cec54fd7ac0ba16ac15580c1e60b501aeb53b Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 4 Aug 2021 09:23:16 +0300
Subject: [PATCH] net/mlx5: fix mbuf replenishment check for zipped CQE
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 828274b70ad10bc1ae54c4b4b446e7f42f181521 ]
A core dump is being generated with the following call stack:
0 _mm256_storeu_si256 (__A=..., __P=0x80)
1 rte_mov32 (src=0x2299c9140 "", dst=0x80)
2 rte_memcpy_aligned (n=60, src=0x2299c9140, dst=0x80)
3 rte_memcpy (n=60, src=0x2299c9140, dst=0x80)
4 mprq_buf_to_pkt (strd_cnt=1, strd_idx=0, buf=0x2299c8a00, len=60,
pkt=0x18345f0c0, rxq=0x18345ef40)
5 rxq_copy_mprq_mbuf_v (rxq=0x18345ef40, pkts=0x7f76e0ff6d18, pkts_n=5)
6 rxq_burst_mprq_v (rxq=0x18345ef40, pkts=0x7f76e0ff6d18, pkts_n=46,
err=0x7f76e0ff6a28, no_cq=0x7f76e0ff6a27)
7 mlx5_rx_burst_mprq_vec (dpdk_rxq=0x18345ef40, pkts=0x7f76e0ff6a88,
pkts_n=128)
8 rte_eth_rx_burst (nb_pkts=128, rx_pkts=0x7f76e0ff6a88,
queue_id=<optimized out>, port_id=<optimized out>)
This crash is caused by an attempt to copy previously uncompressed CQEs
into non-allocated mbufs. There is a check to make sure we only use
allocated mbufs in the rxq_burst_mprq_v() function, but it is done only
before the main processing loop. Leftovers of compressed CQEs session are
handled before that loop and may lead to the mbufs overflow as seen.
Move the check for replenished mbufs up to protect uncompressed CQEs
session leftovers from accessing non-allocated mbufs after the
mlx5_rx_mprq_replenish_bulk_mbuf() function is invoked.
Bugzilla ID: 746
Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx_vec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index b8b555690e..1536a462dc 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -442,6 +442,8 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
rte_prefetch0(cq + 3);
pkts_n = RTE_MIN(pkts_n, MLX5_VPMD_RX_MAX_BURST);
mlx5_rx_mprq_replenish_bulk_mbuf(rxq);
+ /* Not to move past the allocated mbufs. */
+ pkts_n = RTE_MIN(pkts_n, rxq->elts_ci - rxq->rq_pi);
/* See if there're unreturned mbufs from compressed CQE. */
rcvd_pkt = rxq->decompressed;
if (rcvd_pkt > 0) {
@@ -457,8 +459,6 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
/* Not to cross queue end. */
pkts_n = RTE_MIN(pkts_n, elts_n - elts_idx);
pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
- /* Not to move past the allocated mbufs. */
- pkts_n = RTE_MIN(pkts_n, rxq->elts_ci - rxq->rq_pi);
if (!pkts_n) {
*no_cq = !cp_pkt;
return cp_pkt;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.487895876 +0800
+++ 0008-net-mlx5-fix-mbuf-replenishment-check-for-zipped-CQE.patch 2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 828274b70ad10bc1ae54c4b4b446e7f42f181521 Mon Sep 17 00:00:00 2001
+From f50cec54fd7ac0ba16ac15580c1e60b501aeb53b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 828274b70ad10bc1ae54c4b4b446e7f42f181521 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
-index e1b6d5422a..ecd273e00a 100644
+index b8b555690e..1536a462dc 100644
@@ -45 +47 @@
-@@ -448,6 +448,8 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
+@@ -442,6 +442,8 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
@@ -54 +56 @@
-@@ -463,8 +465,6 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
+@@ -457,8 +459,6 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (7 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' " Xueming Li
` (243 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4ba7ab1ebd55722715dbd8aca29ec0c60a098b98
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 9 Aug 2021 17:26:46 +0300
Subject: [PATCH] net/mlx5: fix eCPRI matching
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 ]
When an ETH or VLAN flow item directly preceding ECPRI (i. e. a pattern
for eCPRI over Ethernet) did not specify the eCPRI protocol, matches
were not restricted to eCPRI traffic. For example, "eth / ecpri / end"
pattern behaved as "eth / end". Implicitly add Ethernet type condition,
so that "eth / ecpri / end" behaves as "eth type is 0xAEFE / end".
Fixes: daa38a8924a0 ("net/mlx5: add flow translation of eCPRI header")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1793683421..0b1a488edb 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7927,12 +7927,13 @@ flow_dv_translate_item_gtp(void *matcher, void *key,
* Flow matcher value.
* @param[in] item
* Flow pattern to translate.
- * @param[in] samples
- * Sample IDs to be used in the matching.
+ * @param[in] last_item
+ * Last item flags.
*/
static void
flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
- void *key, const struct rte_flow_item *item)
+ void *key, const struct rte_flow_item *item,
+ uint64_t last_item)
{
struct mlx5_priv *priv = dev->data->dev_private;
const struct rte_flow_item_ecpri *ecpri_m = item->mask;
@@ -7945,6 +7946,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
void *dw_m;
void *dw_v;
+ /*
+ * In case of eCPRI over Ethernet, if EtherType is not specified,
+ * match on eCPRI EtherType implicitly.
+ */
+ if (last_item & MLX5_FLOW_LAYER_OUTER_L2) {
+ void *hdrs_m, *hdrs_v, *l2m, *l2v;
+
+ hdrs_m = MLX5_ADDR_OF(fte_match_param, matcher, outer_headers);
+ hdrs_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
+ l2m = MLX5_ADDR_OF(fte_match_set_lyr_2_4, hdrs_m, ethertype);
+ l2v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, hdrs_v, ethertype);
+ if (*(uint16_t *)l2m == 0 && *(uint16_t *)l2v == 0) {
+ *(uint16_t *)l2m = UINT16_MAX;
+ *(uint16_t *)l2v = RTE_BE16(RTE_ETHER_TYPE_ECPRI);
+ }
+ }
if (!ecpri_v)
return;
if (!ecpri_m)
@@ -10603,7 +10620,8 @@ flow_dv_translate(struct rte_eth_dev *dev,
dev_flow->dv.value.size =
MLX5_ST_SZ_BYTES(fte_match_param);
flow_dv_translate_item_ecpri(dev, match_mask,
- match_value, items);
+ match_value, items,
+ last_item);
/* No other protocol should follow eCPRI layer. */
last_item = MLX5_FLOW_LAYER_ECPRI;
break;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.529371657 +0800
+++ 0009-net-mlx5-fix-eCPRI-matching.patch 2021-11-10 14:17:01.747413767 +0800
@@ -1 +1 @@
-From 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 Mon Sep 17 00:00:00 2001
+From 4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 31d857030f..5bb6d89a3f 100644
+index 1793683421..0b1a488edb 100644
@@ -25 +27 @@
-@@ -9976,12 +9976,13 @@ flow_dv_translate_item_gtp_psc(void *matcher, void *key,
+@@ -7927,12 +7927,13 @@ flow_dv_translate_item_gtp(void *matcher, void *key,
@@ -42 +44 @@
-@@ -9994,6 +9995,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
+@@ -7945,6 +7946,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
@@ -65,3 +67,3 @@
-@@ -13474,7 +13491,8 @@ flow_dv_translate(struct rte_eth_dev *dev,
- "cannot create eCPRI parser");
- }
+@@ -10603,7 +10620,8 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ dev_flow->dv.value.size =
+ MLX5_ST_SZ_BYTES(fte_match_param);
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (8 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' " Xueming Li
` (242 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Luca Boccassi, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/83ec79465d8d8a72d22234732e616f16f98a7b64
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Sun, 1 Aug 2021 21:44:30 -0700
Subject: [PATCH] net/bnxt: update ring group after ring stop start
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ]
A Rx ring stop start sequence may result in the FW returning
a different set of Rx ring and AGG ring IDs. If the ring group
is not updated with the new IDs, the HW sees the host driver using
incorrect BD types for the Rx ring and AGG ring. This can cause
the chip to go into a bad state or encounter RE_flush issue
or leak mbufs in the HW.
Fix this by issuing a bnxt_hwrm_ring_grp_free() and an
bnxt_hwrm_ring_grp_alloc() to refresh the ring group information.
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 +++
drivers/net/bnxt/bnxt_ring.c | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 39778e38ef..d8b46f932a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
struct bnxt_ring *ring = rxr->rx_ring_struct;
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
+ if (BNXT_HAS_RING_GRPS(bp))
+ bnxt_hwrm_ring_grp_free(bp, queue_index);
+
bnxt_hwrm_ring_free(bp, ring,
HWRM_RING_FREE_INPUT_RING_TYPE_RX);
if (BNXT_HAS_RING_GRPS(bp))
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 6834244e4c..4cfa818616 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
if (rc)
goto err_out;
+ if (BNXT_HAS_RING_GRPS(bp)) {
+ rc = bnxt_hwrm_ring_grp_alloc(bp, queue_index);
+ if (rc)
+ goto err_out;
+ }
+
if (rxq->rx_started) {
if (bnxt_init_one_rx_ring(rxq)) {
PMD_DRV_LOG(ERR,
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.583326783 +0800
+++ 0010-net-bnxt-update-ring-group-after-ring-stop-start.patch 2021-11-10 14:17:01.750747073 +0800
@@ -1 +1 @@
-From ed0ae3502fc91adbf6eebe7047da887353844230 Mon Sep 17 00:00:00 2001
+From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 73deb41f81..eb9de45cb9 100644
+index 39778e38ef..d8b46f932a 100644
@@ -30 +32 @@
-@@ -2717,6 +2717,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -38,2 +40,2 @@
- HWRM_RING_FREE_INPUT_RING_TYPE_RX,
- cpr->cp_ring_struct->fw_ring_id);
+ HWRM_RING_FREE_INPUT_RING_TYPE_RX);
+ if (BNXT_HAS_RING_GRPS(bp))
@@ -41 +43 @@
-index b05c470766..957b175f1b 100644
+index 6834244e4c..4cfa818616 100644
@@ -44 +46 @@
-@@ -631,6 +631,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -56 +58 @@
- PMD_DRV_LOG(ERR, "bnxt_init_one_rx_ring failed!\n");
+ PMD_DRV_LOG(ERR,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (9 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' " Xueming Li
` (241 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Zhihong Wang; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d53332318f5138201e8ae30f405160145eb867ad
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d53332318f5138201e8ae30f405160145eb867ad Mon Sep 17 00:00:00 2001
From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Date: Fri, 13 Aug 2021 16:05:45 +0800
Subject: [PATCH] app/testpmd: fix Tx retry in flowgen engine
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ea275674a0c65dad334c8ab55ddd1d5a7e243af6 ]
Fix tx_pkt number in tx retry logic.
Fixes: bf56fce1fb45 ("app/testpmd: add retry option")
Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/flowgen.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index cabfc688ff..bb4bf85519 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -181,12 +181,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
/*
* Retry if necessary
*/
- if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) {
+ if (unlikely(nb_tx < nb_pkt) && fs->retry_enabled) {
retry = 0;
- while (nb_tx < nb_rx && retry++ < burst_tx_retry_num) {
+ while (nb_tx < nb_pkt && retry++ < burst_tx_retry_num) {
rte_delay_us(burst_tx_delay_time);
nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
- &pkts_burst[nb_tx], nb_rx - nb_tx);
+ &pkts_burst[nb_tx], nb_pkt - nb_tx);
}
}
fs->tx_packets += nb_tx;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.630682792 +0800
+++ 0011-app-testpmd-fix-Tx-retry-in-flowgen-engine.patch 2021-11-10 14:17:01.750747073 +0800
@@ -1 +1 @@
-From ea275674a0c65dad334c8ab55ddd1d5a7e243af6 Mon Sep 17 00:00:00 2001
+From d53332318f5138201e8ae30f405160145eb867ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ea275674a0c65dad334c8ab55ddd1d5a7e243af6 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 3bf6e1ce97..f2e6255c36 100644
+index cabfc688ff..bb4bf85519 100644
@@ -21 +23 @@
-@@ -192,12 +192,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
+@@ -181,12 +181,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (10 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' " Xueming Li
` (240 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Luca Boccassi, Kalesh AP, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8f75f8b588670e687c5602f369a21244316fd344
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 23 Aug 2021 21:14:53 +0530
Subject: [PATCH] net/bnxt: fix crash after port stop/start
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ]
On chips like Thor, port stop/start sequence could result in a crash
in the application. This is because of false detection of a bad
opaque in the Rx completion and the subsequent kicking-in of the ring
reset code to recover from the condition.
The root cause being that the port stop/start would result in the HW
starting with fresh values, while the driver internal tracker variable
`rx_next_cons` is still pointing to a stale value.
Fix this by resetting rx_next_cons to 0 in bnxt_init_one_rx_ring()
Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 41be74284b..655f09a9bf 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
}
PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");
+ /* Explicitly reset this driver internal tracker on a ring init */
+ rxr->rx_next_cons = 0;
+
return 0;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.672364996 +0800
+++ 0012-net-bnxt-fix-crash-after-port-stop-start.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 61cd4384fabf67d487a3ae85cff5babcdb41558f Mon Sep 17 00:00:00 2001
+From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index aea71703d1..73fbdd17d1 100644
+index 41be74284b..655f09a9bf 100644
@@ -29 +31 @@
-@@ -1379,6 +1379,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
@@ -38 +39,0 @@
-
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (11 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' " Xueming Li
` (239 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3dc611ee158fda0bd0378a4a82207b38b187398d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3dc611ee158fda0bd0378a4a82207b38b187398d Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 16 Aug 2021 12:39:41 +0530
Subject: [PATCH] app/testpmd: fix check without outer checksum
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4219d7670e8535e7d4b43233866a587b015e3f43 ]
Donot use outer metadata when neither outer ip checksum nor
outer udp checksum is enabled. PMD's will ignore the
outer_l2_len and outer_l3_len in cases where none of
the outer checksum is enabled and hence only l2_len and
l3_len will be used to calculate the offsets for L2 or L3
header.
Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/csumonly.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index b0a58e8573..aab59e0934 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -957,8 +957,7 @@ tunnel_update:
(tx_offloads &
DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
(tx_offloads &
- DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
- (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
+ DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
m->outer_l2_len = info.outer_l2_len;
m->outer_l3_len = info.outer_l3_len;
m->l2_len = info.l2_len;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.718926036 +0800
+++ 0013-app-testpmd-fix-check-without-outer-checksum.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 4219d7670e8535e7d4b43233866a587b015e3f43 Mon Sep 17 00:00:00 2001
+From 3dc611ee158fda0bd0378a4a82207b38b187398d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4219d7670e8535e7d4b43233866a587b015e3f43 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 607c889359..38cc256533 100644
+index b0a58e8573..aab59e0934 100644
@@ -26 +28 @@
-@@ -961,8 +961,7 @@ tunnel_update:
+@@ -957,8 +957,7 @@ tunnel_update:
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (12 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' " Xueming Li
` (238 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Nithin Dabilpuram
Cc: Luca Boccassi, Xiaoyun Li, Raslan Darawsheh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6e5dbe158642933be3be666308359a6f58e56571
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 6e5dbe158642933be3be666308359a6f58e56571 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 16 Aug 2021 12:39:42 +0530
Subject: [PATCH] app/testpmd: fix dump of Tx offload flags
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit eeedef704c11bd74c367d62838700bdb8e5b573f ]
Fix verbose mode dump for Tx to dump tx offload flags instead of
Rx offload flags.
Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate function")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>
---
app/test-pmd/util.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index a9e431a8b2..2682259678 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -274,7 +274,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
" - %s queue=0x%x", is_rx ? "Receive" : "Send",
(unsigned int) queue);
MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
- rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+ if (is_rx)
+ rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+ else
+ rte_get_tx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+
MKDUMPSTR(print_buf, buf_size, cur_len,
" ol_flags: %s\n", buf);
if (rte_mbuf_check(mb, 1, &reason) < 0)
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.761982280 +0800
+++ 0014-app-testpmd-fix-dump-of-Tx-offload-flags.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From eeedef704c11bd74c367d62838700bdb8e5b573f Mon Sep 17 00:00:00 2001
+From 6e5dbe158642933be3be666308359a6f58e56571 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eeedef704c11bd74c367d62838700bdb8e5b573f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 5dd7157947..14a9a251fb 100644
+index a9e431a8b2..2682259678 100644
@@ -23 +25 @@
-@@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
+@@ -274,7 +274,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (13 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' " Xueming Li
` (237 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Danny Patel; +Cc: Luca Boccassi, Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e4509540bed8f2a21e17fe47ee90214db00ffecd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e4509540bed8f2a21e17fe47ee90214db00ffecd Mon Sep 17 00:00:00 2001
From: Danny Patel <dannyp@marvell.com>
Date: Fri, 27 Aug 2021 11:03:58 +0530
Subject: [PATCH] crypto/octeontx2: fix unaligned access to device memory
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 05f157b8c5b469173712b0ab7daa91bbe52ec1df ]
Use otx2_mbox_memcpy() instead of memcpy() to prevent unaligned access.
Fixes: a0645ed0d6ef ("crypto/octeontx2: discover capabilities")
Signed-off-by: Danny Patel <dannyp@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/crypto/octeontx2/otx2_cryptodev_mbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
index 75e610db5c..d762baf927 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
@@ -36,7 +36,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
return -EPIPE;
}
- memcpy(hw_caps, rsp->eng_caps,
+ otx2_mbox_memcpy(hw_caps, rsp->eng_caps,
sizeof(union cpt_eng_caps) * CPT_MAX_ENG_TYPES);
return 0;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.803791067 +0800
+++ 0015-crypto-octeontx2-fix-unaligned-access-to-device-memo.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 05f157b8c5b469173712b0ab7daa91bbe52ec1df Mon Sep 17 00:00:00 2001
+From e4509540bed8f2a21e17fe47ee90214db00ffecd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 05f157b8c5b469173712b0ab7daa91bbe52ec1df ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 812515fc1b..1a8edae7eb 100644
+index 75e610db5c..d762baf927 100644
@@ -21 +23,2 @@
-@@ -37,7 +37,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
+@@ -36,7 +36,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
+ return -EPIPE;
@@ -24 +26,0 @@
- vf->cpt_revision = rsp->cpt_revision;
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (14 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi " Xueming Li
` (236 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: David Christensen; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9102608a1cf447c8f3e8ccd9439fa94077cd4c97
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9102608a1cf447c8f3e8ccd9439fa94077cd4c97 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Thu, 2 Sep 2021 15:15:14 -0700
Subject: [PATCH] eal/ppc: ignore GCC 10 stringop-overflow warnings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c13e6177394365d4db1595ea038bd9c3de04d32f ]
Suppress gcc warning "warning: writing 16 bytes into a region of
size 0" for users of the POWER rte_memcpy() function. Existing
rte_memcpy() code takes different code paths based on the actual
size of the move so the warning is already addressed. See also
commit b5b3ea803e47 ("eal/x86: ignore gcc 10 stringop-overflow warnings")
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
lib/librte_eal/ppc/include/rte_memcpy.h | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
index c2a1f356d5..6f388c0234 100644
--- a/lib/librte_eal/ppc/include/rte_memcpy.h
+++ b/lib/librte_eal/ppc/include/rte_memcpy.h
@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: BSD-3-Clause
- * Copyright (C) IBM Corporation 2014.
+ * Copyright (C) IBM Corporation 2014,2021
*/
#ifndef _RTE_MEMCPY_PPC_64_H_
@@ -18,11 +18,16 @@ extern "C" {
#include "generic/rte_memcpy.h"
-#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 90000)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
static inline void
rte_mov16(uint8_t *dst, const uint8_t *src)
{
@@ -198,7 +203,11 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
return ret;
}
-#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic pop
+#endif
+
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 90000)
#pragma GCC diagnostic pop
#endif
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.845231336 +0800
+++ 0016-eal-ppc-ignore-GCC-10-stringop-overflow-warnings.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From c13e6177394365d4db1595ea038bd9c3de04d32f Mon Sep 17 00:00:00 2001
+From 9102608a1cf447c8f3e8ccd9439fa94077cd4c97 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c13e6177394365d4db1595ea038bd9c3de04d32f ]
@@ -12,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -16 +17 @@
- lib/eal/ppc/include/rte_memcpy.h | 15 ++++++++++++---
+ lib/librte_eal/ppc/include/rte_memcpy.h | 15 ++++++++++++---
@@ -19 +20 @@
-diff --git a/lib/eal/ppc/include/rte_memcpy.h b/lib/eal/ppc/include/rte_memcpy.h
+diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
@@ -21,2 +22,2 @@
---- a/lib/eal/ppc/include/rte_memcpy.h
-+++ b/lib/eal/ppc/include/rte_memcpy.h
+--- a/lib/librte_eal/ppc/include/rte_memcpy.h
++++ b/lib/librte_eal/ppc/include/rte_memcpy.h
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi warnings' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (15 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' " Xueming Li
` (235 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: David Christensen; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c3672a36e6fdf7cc3402ea2ce3c475df0d645c2b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c3672a36e6fdf7cc3402ea2ce3c475df0d645c2b Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Thu, 2 Sep 2021 16:53:26 -0700
Subject: [PATCH] config/ppc: ignore GCC 11 psabi warnings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 394407f50c90ca3ce4b882aefb9e26eae4ba6bca ]
Suppress the gcc warning "note: the layout of aggregates containing
vectors with 4-byte alignment has changed in GCC 5" on POWER systems
by setting "-Wno-psabi". Warning was originally added to gcc in
commit https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9832651 to warn
of the vector alignment changes introduced in GCC 5. Older gcc
versions forced vector alignment to 16 bytes due to requirements for
POWER 6 and earlier CPUs, but these restrictions don't apply to CPUs
supported by DPDK.
Bugzilla ID: 739
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
config/ppc/meson.build | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index ed6ea07d24..bea72f86b5 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+# Copyright(c) 2021 IBM Corporation
if not dpdk_conf.get('RTE_ARCH_64')
error('Only 64-bit compiles are supported for this platform type')
@@ -17,6 +18,13 @@ if not power9_supported
dpdk_conf.set('RTE_MACHINE','power8')
endif
+# Suppress the gcc warning "note: the layout of aggregates containing
+# vectors with 4-byte alignment has changed in GCC 5".
+if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
+ cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi')
+ add_project_arguments('-Wno-psabi', language: 'c')
+endif
+
# Certain POWER9 systems can scale as high as 1536 LCORES, but setting such a
# high value can waste memory, cause timeouts in time limited autotests, and is
# unlikely to be used in many production situations. Similarly, keeping the
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.886643807 +0800
+++ 0017-config-ppc-ignore-GCC-11-psabi-warnings.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 394407f50c90ca3ce4b882aefb9e26eae4ba6bca Mon Sep 17 00:00:00 2001
+From c3672a36e6fdf7cc3402ea2ce3c475df0d645c2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 394407f50c90ca3ce4b882aefb9e26eae4ba6bca ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index adf49e1f42..0b1948fc7c 100644
+index ed6ea07d24..bea72f86b5 100644
@@ -33 +35 @@
- error('Only 64-bit compiles are supported for this platform type')
+ error('Only 64-bit compiles are supported for this platform type')
@@ -35 +37 @@
- dpdk_conf.set('RTE_MACHINE','power8')
+ dpdk_conf.set('RTE_MACHINE','power8')
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (16 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' " Xueming Li
` (234 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ciara Power; +Cc: Luca Boccassi, Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/52ed92cfb6b9933746264d9bb696bfdbf4dc230c
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 52ed92cfb6b9933746264d9bb696bfdbf4dc230c Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 23 Aug 2021 12:47:14 +0000
Subject: [PATCH] crypto/openssl: fix CCM processing 0 length source
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 589f5e033d0d8489e0d4bf2f54332febf483f764 ]
When given a source length 0 for CCM, the encryption and decryption
functions did not call the EVP_ENCRYPTUPDATE/EVP_DECRYPTUPDATE functions
with a src and dst, causing some FIPS validation failures for testcases
with PLen=0:
process_openssl_auth_encryption_ccm() line 1131:
Process openssl auth encryption ccm failed
Fixes: 1a4998dc4d94 ("crypto/openssl: support AES-CCM")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..ca4265d2be 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1114,7 +1114,7 @@ process_openssl_auth_encryption_ccm(struct rte_mbuf *mbuf_src, int offset,
if (EVP_EncryptUpdate(ctx, NULL, &len, aad + 18, aadlen) <= 0)
goto process_auth_encryption_ccm_err;
- if (srclen > 0)
+ if (srclen >= 0)
if (process_openssl_encryption_update(mbuf_src, offset, &dst,
srclen, ctx, 0))
goto process_auth_encryption_ccm_err;
@@ -1197,7 +1197,7 @@ process_openssl_auth_decryption_ccm(struct rte_mbuf *mbuf_src, int offset,
if (EVP_DecryptUpdate(ctx, NULL, &len, aad + 18, aadlen) <= 0)
goto process_auth_decryption_ccm_err;
- if (srclen > 0)
+ if (srclen >= 0)
if (process_openssl_decryption_update(mbuf_src, offset, &dst,
srclen, ctx, 0))
return -EFAULT;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.928050624 +0800
+++ 0018-crypto-openssl-fix-CCM-processing-0-length-source.patch 2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 589f5e033d0d8489e0d4bf2f54332febf483f764 Mon Sep 17 00:00:00 2001
+From 52ed92cfb6b9933746264d9bb696bfdbf4dc230c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 589f5e033d0d8489e0d4bf2f54332febf483f764 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 47004337d5..37b969b916 100644
+index 7d3959f550..ca4265d2be 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (17 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' " Xueming Li
` (233 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1f83882dacc679ecc49453e8332f3b499f4a630f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1f83882dacc679ecc49453e8332f3b499f4a630f Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 8 Sep 2021 12:29:51 +0530
Subject: [PATCH] common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c0182d6b752e3fe320f8f8e3db6256cd21234d9a ]
The logic was incorrectly doing conditional swap. It need to
be bit swap always.
Fixes: 73a24060cd70 ("crypto/dpaa2_sec: add sample PDCP descriptor APIs")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/common/dpaax/caamflib/desc/pdcp.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index f084cf1de0..51d40b5dd9 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+
* Copyright 2008-2013 Freescale Semiconductor, Inc.
- * Copyright 2019-2020 NXP
+ * Copyright 2019-2021 NXP
*/
#ifndef __DESC_PDCP_H__
@@ -3710,9 +3710,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
break;
case PDCP_AUTH_TYPE_SNOW:
+ /* IV calculation based on 3GPP specs. 36331, section:5.3.7.4 */
iv[0] = 0xFFFFFFFF;
- iv[1] = swap ? swab32(0x04000000) : 0x04000000;
- iv[2] = swap ? swab32(0xF8000000) : 0xF8000000;
+ iv[1] = swab32(0x04000000);
+ iv[2] = swab32(0xF8000000);
KEY(p, KEY2, authdata->key_enc_flags, authdata->key,
authdata->keylen, INLINE_KEY(authdata));
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:02.970575592 +0800
+++ 0019-common-dpaax-caamflib-fix-IV-for-short-MAC-I-in-SNOW.patch 2021-11-10 14:17:01.757413685 +0800
@@ -1 +1 @@
-From c0182d6b752e3fe320f8f8e3db6256cd21234d9a Mon Sep 17 00:00:00 2001
+From 1f83882dacc679ecc49453e8332f3b499f4a630f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c0182d6b752e3fe320f8f8e3db6256cd21234d9a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 5b3d846099..8e8daf5ba8 100644
+index f084cf1de0..51d40b5dd9 100644
@@ -30 +32 @@
-@@ -3715,9 +3715,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
+@@ -3710,9 +3710,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (18 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' " Xueming Li
` (232 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Heinrich Kuhn; +Cc: Luca Boccassi, Simon Horman, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/877a05209a26c5543d1bf9a2bf8cb023e5d59b94
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 877a05209a26c5543d1bf9a2bf8cb023e5d59b94 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Date: Mon, 23 Aug 2021 09:59:21 +0200
Subject: [PATCH] net/nfp: fix minimum descriptor sizes
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 96289f2b80e5921a3da54650f382b6944d9b39df ]
The NFP4000/6000 supports a minimum of 256 Tx/Rx descriptors and not 64.
Before this patch when a DPDK application configured < 256 Tx
descriptors the hardware read/write pointers would be unmasked and not
wrapped at the expected size of the ring. The PMD logic to determine the
amount of free space in the Tx ring is incompatible with the unmasked
hwqueue pointers and this will result in the PMD not updating the
read pointer at all.The knock-on effect is that under high load the
PMD will potentially re-use a Tx descriptor before the hw has had a
chance to process that particular descriptor. This issue can manifest as
a DMA error when the hardware tries to perform a DMA with info from a
partially populated descriptor.
Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
drivers/net/nfp/nfp_net_pmd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index 1295c5959e..444c1b3773 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -28,10 +28,10 @@ struct nfp_net_adapter;
* DPDK uses uint16_t variables for these values
*/
#define NFP_NET_MAX_TX_DESC (32 * 1024)
-#define NFP_NET_MIN_TX_DESC 64
+#define NFP_NET_MIN_TX_DESC 256
#define NFP_NET_MAX_RX_DESC (32 * 1024)
-#define NFP_NET_MIN_RX_DESC 64
+#define NFP_NET_MIN_RX_DESC 256
/* Descriptor alignment */
#define NFP_ALIGN_RING_DESC 128
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.014728008 +0800
+++ 0020-net-nfp-fix-minimum-descriptor-sizes.patch 2021-11-10 14:17:01.757413685 +0800
@@ -1 +1 @@
-From 96289f2b80e5921a3da54650f382b6944d9b39df Mon Sep 17 00:00:00 2001
+From 877a05209a26c5543d1bf9a2bf8cb023e5d59b94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96289f2b80e5921a3da54650f382b6944d9b39df ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
- drivers/net/nfp/nfp_rxtx.h | 4 ++--
+ drivers/net/nfp/nfp_net_pmd.h | 4 ++--
@@ -27,5 +29,5 @@
-diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
-index d2d0f3f175..b0a8bf81b0 100644
---- a/drivers/net/nfp/nfp_rxtx.h
-+++ b/drivers/net/nfp/nfp_rxtx.h
-@@ -30,10 +30,10 @@
+diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
+index 1295c5959e..444c1b3773 100644
+--- a/drivers/net/nfp/nfp_net_pmd.h
++++ b/drivers/net/nfp/nfp_net_pmd.h
+@@ -28,10 +28,10 @@ struct nfp_net_adapter;
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (19 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' " Xueming Li
` (231 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Haiyue Wang; +Cc: Luca Boccassi, David Marchand, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/34a2e17afc46a0ac011f42293f61514430b247be
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 34a2e17afc46a0ac011f42293f61514430b247be Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Fri, 13 Aug 2021 14:21:54 +0800
Subject: [PATCH] net/ice: fix memzone leak after device init failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 96b25c496aadae16c548ea25c0267a73154dbd64 ]
When flow engine initialization or FXP resource reset failed, it needs
to free the memory zone and unregister the interrupt callback.
Bugzilla ID: 752
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")
Fixes: 7edc7158d771 ("net/ice: cleanup RSS/FDIR profile on device init")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 10 ++++++++--
drivers/net/ice/ice_fdir_filter.c | 2 ++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c153c7ca78..02644deeed 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2258,20 +2258,26 @@ ice_dev_init(struct rte_eth_dev *dev)
ret = ice_flow_init(ad);
if (ret) {
PMD_INIT_LOG(ERR, "Failed to initialize flow");
- return ret;
+ goto err_flow_init;
}
}
ret = ice_reset_fxp_resource(hw);
if (ret) {
PMD_INIT_LOG(ERR, "Failed to reset fxp resource");
- return ret;
+ goto err_flow_init;
}
pf->supported_rxdid = ice_get_supported_rxdid(hw);
return 0;
+err_flow_init:
+ ice_flow_uninit(ad);
+ rte_intr_disable(intr_handle);
+ ice_pf_disable_irq0(hw);
+ rte_intr_callback_unregister(intr_handle,
+ ice_interrupt_handler, dev);
err_pf_setup:
ice_res_pool_destroy(&pf->msix_pool);
err_msix_pool_init:
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 4a071254ce..bb720d1036 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -659,8 +659,10 @@ ice_fdir_teardown(struct ice_pf *pf)
ice_tx_queue_release(pf->fdir.txq);
pf->fdir.txq = NULL;
+ rte_eth_dma_zone_free(eth_dev, "fdir_tx_ring", ICE_FDIR_QUEUE_ID);
ice_rx_queue_release(pf->fdir.rxq);
pf->fdir.rxq = NULL;
+ rte_eth_dma_zone_free(eth_dev, "fdir_rx_ring", ICE_FDIR_QUEUE_ID);
ice_fdir_prof_rm_all(pf);
ice_fdir_prof_free(hw);
ice_release_vsi(vsi);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.056563545 +0800
+++ 0021-net-ice-fix-memzone-leak-after-device-init-failure.patch 2021-11-10 14:17:01.760746991 +0800
@@ -1 +1 @@
-From 96b25c496aadae16c548ea25c0267a73154dbd64 Mon Sep 17 00:00:00 2001
+From 34a2e17afc46a0ac011f42293f61514430b247be Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96b25c496aadae16c548ea25c0267a73154dbd64 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a4cd39c954..0683296584 100644
+index c153c7ca78..02644deeed 100644
@@ -27 +29 @@
-@@ -2139,20 +2139,26 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2258,20 +2258,26 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -57 +59 @@
-index 82adb1fc8b..7ba65b9b04 100644
+index 4a071254ce..bb720d1036 100644
@@ -60 +62 @@
-@@ -651,8 +651,10 @@ ice_fdir_teardown(struct ice_pf *pf)
+@@ -659,8 +659,10 @@ ice_fdir_teardown(struct ice_pf *pf)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (20 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow query' " Xueming Li
` (230 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qi Zhang; +Cc: Luca Boccassi, Zhimin Huang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e244e8c066d4a5473f546ea9e31ec221eb3118cd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e244e8c066d4a5473f546ea9e31ec221eb3118cd Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 17 Aug 2021 11:41:23 +0800
Subject: [PATCH] net/ice: fix RXDID default value in DCF
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit fb50aadcb3c0e137c8751d6c47faf75945df9577 ]
Since DPDK 20.11 the default rxdid is changed from 16 to 22, but the
DCF data path didn't change, the patch fix the gap.
Fixes: 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
---
drivers/net/ice/ice_dcf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 294ddcd2e1..3925a51f12 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -828,7 +828,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
#define IAVF_RXDID_LEGACY_0 0
#define IAVF_RXDID_LEGACY_1 1
-#define IAVF_RXDID_COMMS_GENERIC 16
+#define IAVF_RXDID_COMMS_OVS_1 22
int
ice_dcf_configure_queues(struct ice_dcf_hw *hw)
@@ -876,8 +876,8 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
if (hw->vf_res->vf_cap_flags &
VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC &&
hw->supported_rxdid &
- BIT(IAVF_RXDID_COMMS_GENERIC)) {
- vc_qp->rxq.rxdid = IAVF_RXDID_COMMS_GENERIC;
+ BIT(IAVF_RXDID_COMMS_OVS_1)) {
+ vc_qp->rxq.rxdid = IAVF_RXDID_COMMS_OVS_1;
PMD_DRV_LOG(NOTICE, "request RXDID == %d in "
"Queue[%d]", vc_qp->rxq.rxdid, i);
} else {
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.103181160 +0800
+++ 0022-net-ice-fix-RXDID-default-value-in-DCF.patch 2021-11-10 14:17:01.760746991 +0800
@@ -1 +1 @@
-From fb50aadcb3c0e137c8751d6c47faf75945df9577 Mon Sep 17 00:00:00 2001
+From e244e8c066d4a5473f546ea9e31ec221eb3118cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb50aadcb3c0e137c8751d6c47faf75945df9577 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 4c2e0c7216..5b23cc90e0 100644
+index 294ddcd2e1..3925a51f12 100644
@@ -22 +24 @@
-@@ -847,7 +847,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
+@@ -828,7 +828,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
@@ -31 +33 @@
-@@ -895,8 +895,8 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
+@@ -876,8 +876,8 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix deadlock on flow query' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (21 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix queue config in DCF' " Xueming Li
` (229 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Yu Wenjun; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7722837b520249b1374fa6f30b34db09b34f6ed7
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 7722837b520249b1374fa6f30b34db09b34f6ed7 Mon Sep 17 00:00:00 2001
From: Yu Wenjun <yuwenjun0x@163.com>
Date: Thu, 19 Aug 2021 20:10:02 +0800
Subject: [PATCH] net/ice: fix deadlock on flow query
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 22db014997c68928711e5b9e948ac3986ec1ed58 ]
Default case of the switch statement causes deadlock because it returns
without unlocking the 'flow_ops_lock' lock. Fixing it.
Fixes: 0d6ef740e411 ("net/ice: support flow ops thread safe")
Signed-off-by: Yu Wenjun <yuwenjun0x@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_generic_flow.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 1429cbc3b6..15667c7252 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2360,15 +2360,16 @@ ice_flow_query(struct rte_eth_dev *dev,
ret = flow->engine->query_count(ad, flow, count, error);
break;
default:
- return rte_flow_error_set(error, ENOTSUP,
+ ret = rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION,
actions,
"action not supported");
+ goto out;
}
}
+out:
rte_spinlock_unlock(&pf->flow_ops_lock);
-
return ret;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.145274924 +0800
+++ 0023-net-ice-fix-deadlock-on-flow-query.patch 2021-11-10 14:17:01.764080297 +0800
@@ -1 +1 @@
-From 22db014997c68928711e5b9e948ac3986ec1ed58 Mon Sep 17 00:00:00 2001
+From 7722837b520249b1374fa6f30b34db09b34f6ed7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 22db014997c68928711e5b9e948ac3986ec1ed58 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 66b5743abf..c2fa75f165 100644
+index 1429cbc3b6..15667c7252 100644
@@ -22 +24 @@
-@@ -2518,15 +2518,16 @@ ice_flow_query(struct rte_eth_dev *dev,
+@@ -2360,15 +2360,16 @@ ice_flow_query(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix queue config in DCF' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (22 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow query' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' " Xueming Li
` (228 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Jie Wang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/073599bf922da392da2107290727108ca3d1534c
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 073599bf922da392da2107290727108ca3d1534c Mon Sep 17 00:00:00 2001
From: Jie Wang <jie1x.wang@intel.com>
Date: Tue, 24 Aug 2021 15:13:17 +0000
Subject: [PATCH] net/ice: fix queue config in DCF
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 415363e2fc58ad89caf65d3d170b004751376f1a ]
When DCF configures rx_queues, it may cause the pointer of
rx_queues to go out of bounds.
This patch expands the scope of the judgment condition to
fix this issue.
Fixes: 4b0d391f0eab ("net/ice: add queue config in DCF")
Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_dcf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 3925a51f12..6a24f4f36c 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -863,11 +863,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
}
vc_qp->rxq.vsi_id = hw->vsi_res->vsi_id;
vc_qp->rxq.queue_id = i;
- vc_qp->rxq.max_pkt_size = rxq[i]->max_pkt_len;
if (i >= hw->eth_dev->data->nb_rx_queues)
continue;
+ vc_qp->rxq.max_pkt_size = rxq[i]->max_pkt_len;
vc_qp->rxq.ring_len = rxq[i]->nb_rx_desc;
vc_qp->rxq.dma_ring_addr = rxq[i]->rx_ring_dma;
vc_qp->rxq.databuffer_size = rxq[i]->rx_buf_len;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.187932589 +0800
+++ 0024-net-ice-fix-queue-config-in-DCF.patch 2021-11-10 14:17:01.764080297 +0800
@@ -1 +1 @@
-From 415363e2fc58ad89caf65d3d170b004751376f1a Mon Sep 17 00:00:00 2001
+From 073599bf922da392da2107290727108ca3d1534c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 415363e2fc58ad89caf65d3d170b004751376f1a ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 5b23cc90e0..ee3c85b90d 100644
+index 3925a51f12..6a24f4f36c 100644
@@ -25 +27 @@
-@@ -882,11 +882,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
+@@ -863,11 +863,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (23 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix queue config in DCF' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' " Xueming Li
` (227 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Tudor Cornea; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c660ad64aae2f2174d5160de227ec965b35c0eda
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c660ad64aae2f2174d5160de227ec965b35c0eda Mon Sep 17 00:00:00 2001
From: Tudor Cornea <tudor.cornea@gmail.com>
Date: Thu, 5 Aug 2021 14:35:23 +0300
Subject: [PATCH] net/iavf: fix overflow in maximum packet length config
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7fe741821337f3cbeecac768b8ef3a16bf21c938 ]
The len variable, used in the computation of max_pkt_len could
overflow, if used to store the result of the following computation:
rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS
Since, we could define the mbuf size to have a large value (i.e 13312),
and IAVF_MAX_CHAINED_RX_BUFFERS is defined as 5, the computation
mentioned above could potentially result in a value which might be
bigger than MAX_USHORT.
The result will be that Jumbo Frames will not work properly
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 9671c957d8..885b2a4bd0 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -408,13 +408,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
{
struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct rte_eth_dev_data *dev_data = dev->data;
- uint16_t buf_size, max_pkt_len, len;
+ uint16_t buf_size, max_pkt_len;
buf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
/* Calculate the maximum packet length allowed */
- len = rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS;
- max_pkt_len = RTE_MIN(len, dev->data->dev_conf.rxmode.max_rx_pkt_len);
+ max_pkt_len = RTE_MIN((uint32_t)
+ rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS,
+ dev->data->dev_conf.rxmode.max_rx_pkt_len);
/* Check if the jumbo frame and maximum packet length are set
* correctly.
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.234998975 +0800
+++ 0025-net-iavf-fix-overflow-in-maximum-packet-length-confi.patch 2021-11-10 14:17:01.764080297 +0800
@@ -1 +1 @@
-From 7fe741821337f3cbeecac768b8ef3a16bf21c938 Mon Sep 17 00:00:00 2001
+From c660ad64aae2f2174d5160de227ec965b35c0eda Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7fe741821337f3cbeecac768b8ef3a16bf21c938 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 574cfe055e..dc5cbc22f5 100644
+index 9671c957d8..885b2a4bd0 100644
@@ -31 +33 @@
-@@ -574,13 +574,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
+@@ -408,13 +408,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (24 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' " Xueming Li
` (226 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9f02c498bf8f31e2dda1d2665ff0fe015265dfa6
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9f02c498bf8f31e2dda1d2665ff0fe015265dfa6 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 30 Aug 2021 11:31:57 +0800
Subject: [PATCH] net/ixgbe: fix Rx multicast statistics after reset
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 8908691632a51a81d6ce27d3d12a8781842a7518 ]
In the implementation of the VF driver ixgbevf_update_stats to obtain
statistics, the multicast count hw_stats->vfmprc has been obtained,
but it is not cleared in the corresponding ixgbevf_dev_stats_reset
interface.
Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 61bcf80b47..bf0e850402 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3791,6 +3791,7 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
hw_stats->vfgorc = 0;
hw_stats->vfgptc = 0;
hw_stats->vfgotc = 0;
+ hw_stats->vfmprc = 0;
return 0;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.278987026 +0800
+++ 0026-net-ixgbe-fix-Rx-multicast-statistics-after-reset.patch 2021-11-10 14:17:01.767413603 +0800
@@ -1 +1 @@
-From 8908691632a51a81d6ce27d3d12a8781842a7518 Mon Sep 17 00:00:00 2001
+From 9f02c498bf8f31e2dda1d2665ff0fe015265dfa6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8908691632a51a81d6ce27d3d12a8781842a7518 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index b5371568b5..ccb01ed344 100644
+index 61bcf80b47..bf0e850402 100644
@@ -24 +26 @@
-@@ -3798,6 +3798,7 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
+@@ -3791,6 +3791,7 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (25 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' " Xueming Li
` (225 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Kalesh AP
Cc: Luca Boccassi, Somnath Kotur, Lance Richardson, Ajit Khaparde,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 23 Aug 2021 13:42:12 +0530
Subject: [PATCH] net/bnxt: fix mbuf VLAN in scalar Rx
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ]
In the scalar Rx path, for the VLAN packet, TCI is not saved in
the "mbuf->vlan_tci", however the STRIPPED offload flag is set
along with PKT_RX_VLAN flag.
Fixes: c1b33d40315f ("net/bnxt: use table based mbuf flags handling")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 2 ++
drivers/net/bnxt/bnxt_rxr.h | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 655f09a9bf..6b3603d11f 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
}
#endif
+ bnxt_set_vlan(rxcmp1, mbuf);
+
if (BNXT_TRUFLOW_EN(bp))
mark_id = bnxt_ulp_set_mark_in_mbuf(rxq->bp, rxcmp1, mbuf,
&vfr_flag);
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 46b284024e..0fd5920f0a 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
#define BNXT_PTYPE_TBL_DIM 128
extern uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM];
#endif
+static inline void bnxt_set_vlan(struct rx_pkt_cmpl_hi *rxcmp1,
+ struct rte_mbuf *mbuf)
+{
+ uint32_t metadata = rte_le_to_cpu_32(rxcmp1->metadata);
+
+ mbuf->vlan_tci = metadata & (RX_PKT_CMPL_METADATA_VID_MASK |
+ RX_PKT_CMPL_METADATA_DE |
+ RX_PKT_CMPL_METADATA_PRI_MASK);
+}
+
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.326320246 +0800
+++ 0027-net-bnxt-fix-mbuf-VLAN-in-scalar-Rx.patch 2021-11-10 14:17:01.767413603 +0800
@@ -1 +1 @@
-From 167978c1678fc5fd525e4e731de4c00093aee129 Mon Sep 17 00:00:00 2001
+From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 73fbdd17d1..ccff80b944 100644
+index 655f09a9bf..6b3603d11f 100644
@@ -26,3 +28,3 @@
-@@ -962,6 +962,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
-
- mbuf->packet_type = bnxt_parse_pkt_type(rxcmp, rxcmp1);
+@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+ }
+ #endif
@@ -36 +38 @@
-index dc2b1b7b4f..59adb7242c 100644
+index 46b284024e..0fd5920f0a 100644
@@ -39,2 +41,2 @@
-@@ -185,6 +185,16 @@ bnxt_check_ptype_constants(void)
-
+@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
+ #define BNXT_PTYPE_TBL_DIM 128
@@ -42 +44 @@
-
+ #endif
@@ -53,3 +54,0 @@
- /* Stingray2 specific code for RX completion parsing */
- #define RX_CMP_VLAN_VALID(rxcmp) \
- (((struct rx_pkt_v2_cmpl *)rxcmp)->metadata1_payload_offset & \
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (26 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix ring group free' " Xueming Li
` (224 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Kalesh AP
Cc: Luca Boccassi, Somnath Kotur, Lance Richardson, Ajit Khaparde,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ddc5464088dc5090935ecbde16cdede63867b418
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ddc5464088dc5090935ecbde16cdede63867b418 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 23 Aug 2021 13:42:13 +0530
Subject: [PATCH] net/bnxt: check FW capability for VLAN offloads
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit baedf29794aa7cf8527d6362af17dce5046b1f51 ]
VLAN offload capability may be disabled in the FW. The driver
should not attempt to override or utilize this feature in such
scenarios since it will not work as expected.
Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 6 +++---
drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index f85409878c..c8c6dc4e83 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -567,8 +567,7 @@ struct bnxt_rep_info {
ETH_RSS_NONFRAG_IPV6_UDP | \
ETH_RSS_LEVEL_MASK)
-#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \
- DEV_TX_OFFLOAD_IPV4_CKSUM | \
+#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_IPV4_CKSUM | \
DEV_TX_OFFLOAD_TCP_CKSUM | \
DEV_TX_OFFLOAD_UDP_CKSUM | \
DEV_TX_OFFLOAD_TCP_TSO | \
@@ -581,7 +580,6 @@ struct bnxt_rep_info {
DEV_TX_OFFLOAD_MULTI_SEGS)
#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \
- DEV_RX_OFFLOAD_VLAN_STRIP | \
DEV_RX_OFFLOAD_IPV4_CKSUM | \
DEV_RX_OFFLOAD_UDP_CKSUM | \
DEV_RX_OFFLOAD_TCP_CKSUM | \
@@ -715,12 +713,14 @@ struct bnxt {
#define BNXT_FW_CAP_ADV_FLOW_MGMT BIT(5)
#define BNXT_FW_CAP_ADV_FLOW_COUNTERS BIT(6)
#define BNXT_FW_CAP_LINK_ADMIN BIT(7)
+#define BNXT_FW_CAP_VLAN_TX_INSERT BIT(9)
pthread_mutex_t flow_lock;
uint32_t vnic_cap_flags;
#define BNXT_VNIC_CAP_COS_CLASSIFY BIT(0)
#define BNXT_VNIC_CAP_OUTER_RSS BIT(1)
+#define BNXT_VNIC_CAP_VLAN_RX_STRIP BIT(3)
unsigned int rx_nr_rings;
unsigned int rx_cp_nr_rings;
unsigned int rx_num_qs_per_vnic;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8afe72bd96..a563c2275f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -980,9 +980,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;
if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
+ if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
+ dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT |
dev_info->tx_queue_offload_capa;
+ if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
+ dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d8b46f932a..7d9939d1af 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -826,6 +826,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_LINK_ADMIN_STATUS_SUPPORTED)
bp->fw_cap |= BNXT_FW_CAP_LINK_ADMIN;
+ if (!(flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED)) {
+ bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT;
+ PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n");
+ }
unlock:
HWRM_UNLOCK();
@@ -883,6 +887,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS;
+
+ if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP) {
+ bp->vnic_cap_flags |= BNXT_VNIC_CAP_VLAN_RX_STRIP;
+ PMD_DRV_LOG(DEBUG, "Rx VLAN strip capability enabled\n");
+ }
bp->max_tpa_v2 = rte_le_to_cpu_16(resp->max_aggs_supported);
HWRM_UNLOCK();
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.369223940 +0800
+++ 0028-net-bnxt-check-FW-capability-for-VLAN-offloads.patch 2021-11-10 14:17:01.774080215 +0800
@@ -1 +1 @@
-From baedf29794aa7cf8527d6362af17dce5046b1f51 Mon Sep 17 00:00:00 2001
+From ddc5464088dc5090935ecbde16cdede63867b418 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit baedf29794aa7cf8527d6362af17dce5046b1f51 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 494a1eff37..3ccc06c37c 100644
+index f85409878c..c8c6dc4e83 100644
@@ -27 +29 @@
-@@ -577,8 +577,7 @@ struct bnxt_rep_info {
+@@ -567,8 +567,7 @@ struct bnxt_rep_info {
@@ -37 +39 @@
-@@ -591,7 +590,6 @@ struct bnxt_rep_info {
+@@ -581,7 +580,6 @@ struct bnxt_rep_info {
@@ -45 +47,2 @@
-@@ -737,6 +735,7 @@ struct bnxt {
+@@ -715,12 +713,14 @@ struct bnxt {
+ #define BNXT_FW_CAP_ADV_FLOW_MGMT BIT(5)
@@ -48 +50,0 @@
- #define BNXT_FW_CAP_TRUFLOW_EN BIT(8)
@@ -50 +51,0 @@
- #define BNXT_TRUFLOW_EN(bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN)
@@ -53 +54,2 @@
-@@ -745,6 +744,7 @@ struct bnxt {
+
+ uint32_t vnic_cap_flags;
@@ -56 +57,0 @@
- #define BNXT_VNIC_CAP_RX_CMPL_V2 BIT(2)
@@ -62 +63 @@
-index de34a2f0bb..e072771d14 100644
+index 8afe72bd96..a563c2275f 100644
@@ -65 +66 @@
-@@ -981,9 +981,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -980,9 +980,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -80 +81 @@
-index f29d574235..02613bd00b 100644
+index d8b46f932a..7d9939d1af 100644
@@ -83 +84 @@
-@@ -941,6 +941,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -826,6 +826,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -94,3 +95,3 @@
-@@ -1001,6 +1005,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
- if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP)
- bp->vnic_cap_flags |= BNXT_VNIC_CAP_RX_CMPL_V2;
+@@ -883,6 +887,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
+ if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
+ bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS;
@@ -97,0 +99 @@
++
@@ -102 +103,0 @@
-+
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix ring group free' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (27 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' " Xueming Li
` (223 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Kalesh AP
Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, Somnath Kotur,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8516f354566076ec8b8fd454cf29bf4175282871
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8516f354566076ec8b8fd454cf29bf4175282871 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 30 Aug 2021 09:28:11 +0530
Subject: [PATCH] net/bnxt: fix ring group free
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 8269a4e8af5fa7632578fc1f4fa7d44711440e4f ]
Added an invalid fw_grp_id check inside bnxt_hwrm_ring_grp_free().
This will prevent invalid fw_grp_id to be passed to the FW which can
result in an error.
This fixes the following failure in the "port stop" -> "port start"
sequence:
bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204
bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7d9939d1af..d8ff3c7920 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1761,6 +1761,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
struct hwrm_ring_grp_free_input req = {.req_type = 0 };
struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr;
+ if (bp->grp_info[idx].fw_grp_id == INVALID_HW_RING_ID)
+ return 0;
+
HWRM_PREP(&req, HWRM_RING_GRP_FREE, BNXT_USE_CHIMP_MB);
req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.419181691 +0800
+++ 0029-net-bnxt-fix-ring-group-free.patch 2021-11-10 14:17:01.774080215 +0800
@@ -1 +1 @@
-From 8269a4e8af5fa7632578fc1f4fa7d44711440e4f Mon Sep 17 00:00:00 2001
+From 8516f354566076ec8b8fd454cf29bf4175282871 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8269a4e8af5fa7632578fc1f4fa7d44711440e4f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 02613bd00b..0e0e266589 100644
+index 7d9939d1af..d8ff3c7920 100644
@@ -30 +32 @@
-@@ -1897,6 +1897,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
+@@ -1761,6 +1761,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (28 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix ring group free' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' " Xueming Li
` (222 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fc300c1c4a2ec069fac7cc94f0960fe6c8174375
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From fc300c1c4a2ec069fac7cc94f0960fe6c8174375 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 1 Sep 2021 09:30:01 +0530
Subject: [PATCH] net/bnxt: fix double allocation of ring groups
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 36a97cd23fc916ac475a0b827074b5645fff0cfe ]
After commit "d68249f88266", driver allocates ring groups in
bnxt_alloc_hwrm_rx_ring(). But during port start, driver invokes
bnxt_alloc_hwrm_rx_ring() followed by bnxt_alloc_all_hwrm_ring_grps().
This will cause the FW command failure in bnxt_alloc_all_hwrm_ring_grps()
To fix this, just don't create the ring group if it is already created.
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d8ff3c7920..50b41d82d3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1737,6 +1737,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
struct hwrm_ring_grp_alloc_input req = {.req_type = 0 };
struct hwrm_ring_grp_alloc_output *resp = bp->hwrm_cmd_resp_addr;
+ /* Don't attempt to re-create the ring group if it is already created */
+ if (bp->grp_info[idx].fw_grp_id != INVALID_HW_RING_ID)
+ return 0;
+
HWRM_PREP(&req, HWRM_RING_GRP_ALLOC, BNXT_USE_CHIMP_MB);
req.cr = rte_cpu_to_le_16(bp->grp_info[idx].cp_fw_ring_id);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.464856411 +0800
+++ 0030-net-bnxt-fix-double-allocation-of-ring-groups.patch 2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From 36a97cd23fc916ac475a0b827074b5645fff0cfe Mon Sep 17 00:00:00 2001
+From fc300c1c4a2ec069fac7cc94f0960fe6c8174375 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 36a97cd23fc916ac475a0b827074b5645fff0cfe ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 0e0e266589..585cdeded8 100644
+index d8ff3c7920..50b41d82d3 100644
@@ -27 +29 @@
-@@ -1873,6 +1873,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
+@@ -1737,6 +1737,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (29 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'doc: fix bonding driver name' " Xueming Li
` (221 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Baruch Siach; +Cc: Luca Boccassi, Ciara Loftus, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/af6efb8cb21cb6115a3fa20001f979f7beb6c9e9
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Wed, 25 Aug 2021 13:05:44 +0300
Subject: [PATCH] net/af_xdp: fix zero-copy Tx queue drain
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ]
Call xsk_ring_prod__submit() before kick_tx() so that the kernel
consumer sees the updated state of Tx ring. Otherwise, Tx packets are
stuck in the ring until the next call to af_xdp_tx_zc().
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 3885fb7c78..312e424359 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
rte_pktmbuf_free(local_mbuf);
- kick_tx(txq, cq);
goto out;
}
@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
tx_bytes += mbuf->pkt_len;
}
- kick_tx(txq, cq);
-
out:
xsk_ring_prod__submit(&txq->tx, count);
+ kick_tx(txq, cq);
txq->stats.tx_pkts += count;
txq->stats.tx_bytes += tx_bytes;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.510109335 +0800
+++ 0031-net-af_xdp-fix-zero-copy-Tx-queue-drain.patch 2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From 0f2ffb49ce29351fad043377a6d2f144f3c52afb Mon Sep 17 00:00:00 2001
+From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 74ffa45112..9bea0a895a 100644
+index 3885fb7c78..312e424359 100644
@@ -23 +25 @@
-@@ -527,7 +527,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -31 +33 @@
-@@ -551,10 +550,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'doc: fix bonding driver name' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (30 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' " Xueming Li
` (220 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ben Magistro; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/19acac8cef91b751aa582650c8aa98a69f069db0
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 19acac8cef91b751aa582650c8aa98a69f069db0 Mon Sep 17 00:00:00 2001
From: Ben Magistro <koncept1@gmail.com>
Date: Thu, 26 Aug 2021 23:10:44 +0000
Subject: [PATCH] doc: fix bonding driver name
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c4498cb315d5c6367dc3a9dccb21ffd233336d34 ]
The documentation for the bond driver lists the name as `net/bond`
however the driver should be `net/bonding`.
Fixes: 89c67ae2cba7 ("doc: remove references to make from prog guide")
Signed-off-by: Ben Magistro <koncept1@gmail.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
index 30c56cd375..55ec06a46e 100644
--- a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
+++ b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
@@ -29,7 +29,7 @@ bonded device and its slave devices.
The Link Bonding PMD Library is enabled by default in the build
configuration, the library can be disabled using the meson option
- "-Ddisable_drivers=net/bond".
+ "-Ddisable_drivers=net/bonding".
Link Bonding Modes Overview
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.552464280 +0800
+++ 0032-doc-fix-bonding-driver-name.patch 2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From c4498cb315d5c6367dc3a9dccb21ffd233336d34 Mon Sep 17 00:00:00 2001
+From 19acac8cef91b751aa582650c8aa98a69f069db0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c4498cb315d5c6367dc3a9dccb21ffd233336d34 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (31 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'doc: fix bonding driver name' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' " Xueming Li
` (219 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Chengfeng Ye; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a202064ef3f8953c8762fe39cc732646b2446845
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001
From: Chengfeng Ye <cyeaa@connect.ust.hk>
Date: Thu, 26 Aug 2021 11:55:59 -0700
Subject: [PATCH] net/axgbe: fix unreleased lock in I2C transfer
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ]
The lock pdata->i2c_mutex is not released if the function return in
these two patched branches, which may lead to deadlock problem if
this lock is acquired again.
Bugzilla ID: 777
Fixes: 4ac7516b8b39 ("net/axgbe: add phy init and related APIs")
Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/axgbe/axgbe_i2c.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_i2c.c b/drivers/net/axgbe/axgbe_i2c.c
index ab3738a12e..a2798f484e 100644
--- a/drivers/net/axgbe/axgbe_i2c.c
+++ b/drivers/net/axgbe/axgbe_i2c.c
@@ -233,6 +233,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
ret = axgbe_i2c_disable(pdata);
if (ret) {
PMD_DRV_LOG(ERR, "failed to disable i2c master\n");
+ pthread_mutex_unlock(&pdata->i2c_mutex);
return ret;
}
@@ -249,6 +250,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
ret = axgbe_i2c_enable(pdata);
if (ret) {
PMD_DRV_LOG(ERR, "failed to enable i2c master\n");
+ pthread_mutex_unlock(&pdata->i2c_mutex);
return ret;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.593810284 +0800
+++ 0033-net-axgbe-fix-unreleased-lock-in-I2C-transfer.patch 2021-11-10 14:17:01.780746827 +0800
@@ -1 +1 @@
-From 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 Mon Sep 17 00:00:00 2001
+From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (32 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/hns3: fix queue flow action validation' " Xueming Li
` (218 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6b6aacee7102439684c272bd1513eff6e70cdffd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 6b6aacee7102439684c272bd1513eff6e70cdffd Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 30 Aug 2021 11:01:08 +0800
Subject: [PATCH] net/pcap: fix resource leakage on port probe
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit da0280b3a34c6f67f7e558fcc86c3110816fea28 ]
When the port is probed, if the eth_from_pcaps function fails, the
previously opened pcap resources are not released, causing resource
leakage.
The patch solves the problem of resource leakage caused by abnormal
branch exit during the port probe process.
Fixes: 4c173302c307 ("pcap: add new driver")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/pcap/rte_eth_pcap.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index da4dfe799e..2e8ac55b72 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1366,6 +1366,33 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
return 0;
}
+static void
+eth_release_pcaps(struct pmd_devargs *pcaps,
+ struct pmd_devargs *dumpers,
+ int single_iface)
+{
+ unsigned int i;
+
+ if (single_iface) {
+ if (pcaps->queue[0].pcap)
+ pcap_close(pcaps->queue[0].pcap);
+ return;
+ }
+
+ for (i = 0; i < dumpers->num_of_queue; i++) {
+ if (dumpers->queue[i].dumper)
+ pcap_dump_close(dumpers->queue[i].dumper);
+
+ if (dumpers->queue[i].pcap)
+ pcap_close(dumpers->queue[i].pcap);
+ }
+
+ for (i = 0; i < pcaps->num_of_queue; i++) {
+ if (pcaps->queue[i].pcap)
+ pcap_close(pcaps->queue[i].pcap);
+ }
+}
+
static int
pmd_pcap_probe(struct rte_vdev_device *dev)
{
@@ -1586,6 +1613,9 @@ create_eth:
free_kvlist:
rte_kvargs_free(kvlist);
+ if (ret < 0)
+ eth_release_pcaps(&pcaps, &dumpers, devargs_all.single_iface);
+
return ret;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.635612892 +0800
+++ 0034-net-pcap-fix-resource-leakage-on-port-probe.patch 2021-11-10 14:17:01.780746827 +0800
@@ -1 +1 @@
-From da0280b3a34c6f67f7e558fcc86c3110816fea28 Mon Sep 17 00:00:00 2001
+From 6b6aacee7102439684c272bd1513eff6e70cdffd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit da0280b3a34c6f67f7e558fcc86c3110816fea28 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- drivers/net/pcap/pcap_ethdev.c | 30 ++++++++++++++++++++++++++++++
+ drivers/net/pcap/rte_eth_pcap.c | 30 ++++++++++++++++++++++++++++++
@@ -22,5 +24,5 @@
-diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
-index a8774b7a43..5c4cdbf873 100644
---- a/drivers/net/pcap/pcap_ethdev.c
-+++ b/drivers/net/pcap/pcap_ethdev.c
-@@ -1362,6 +1362,33 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
+diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
+index da4dfe799e..2e8ac55b72 100644
+--- a/drivers/net/pcap/rte_eth_pcap.c
++++ b/drivers/net/pcap/rte_eth_pcap.c
+@@ -1366,6 +1366,33 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
@@ -60 +62 @@
-@@ -1582,6 +1609,9 @@ create_eth:
+@@ -1586,6 +1613,9 @@ create_eth:
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix queue flow action validation' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (33 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' " Xueming Li
` (217 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0c355fecc0a6662a3fb9e97e56186e9565dd678b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0c355fecc0a6662a3fb9e97e56186e9565dd678b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 30 Aug 2021 16:26:49 +0800
Subject: [PATCH] net/hns3: fix queue flow action validation
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit aa3497d4450a603ca18ae4971a96e3890824d887 ]
The used_rx_queues only takes effect after device is started, and
its value is incorrect before the device is started. Therefore, it
is not suitable for flow action to use it to verify the queue index
before the device is started.
E.g. Enable dedicated queue in bonding device will configure a queue
flow action before start its slave devices. The above problem will
make this reasonable flow action configuration fail.
This patch use the nb_rx_queues from the configuration phase to
achieve verification.
Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")
Fixes: f8e7fcbfd0b8 ("net/hns3: support flow action of queue region")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 70c45f6bc5..7f8dd91d11 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -275,10 +275,10 @@ hns3_handle_action_queue(struct rte_eth_dev *dev,
struct hns3_hw *hw = &hns->hw;
queue = (const struct rte_flow_action_queue *)action->conf;
- if (queue->index >= hw->used_rx_queues) {
+ if (queue->index >= hw->data->nb_rx_queues) {
hns3_err(hw, "queue ID(%u) is greater than number of "
"available queue (%u) in driver.",
- queue->index, hw->used_rx_queues);
+ queue->index, hw->data->nb_rx_queues);
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF,
action, "Invalid queue ID in PF");
@@ -308,8 +308,8 @@ hns3_handle_action_queue_region(struct rte_eth_dev *dev,
if ((!rte_is_power_of_2(conf->queue_num)) ||
conf->queue_num > hw->rss_size_max ||
- conf->queue[0] >= hw->used_rx_queues ||
- conf->queue[0] + conf->queue_num > hw->used_rx_queues) {
+ conf->queue[0] >= hw->data->nb_rx_queues ||
+ conf->queue[0] + conf->queue_num > hw->data->nb_rx_queues) {
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF, action,
"Invalid start queue ID and queue num! the start queue "
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.677735225 +0800
+++ 0035-net-hns3-fix-queue-flow-action-validation.patch 2021-11-10 14:17:01.780746827 +0800
@@ -1 +1 @@
-From aa3497d4450a603ca18ae4971a96e3890824d887 Mon Sep 17 00:00:00 2001
+From 0c355fecc0a6662a3fb9e97e56186e9565dd678b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aa3497d4450a603ca18ae4971a96e3890824d887 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index fc77979c5f..841e0b9da3 100644
+index 70c45f6bc5..7f8dd91d11 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (34 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/hns3: fix queue flow action validation' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' " Xueming Li
` (216 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dd8e8fcf1ff916a10ce263280a0f34470cd4ad10
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From dd8e8fcf1ff916a10ce263280a0f34470cd4ad10 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 30 Aug 2021 16:26:50 +0800
Subject: [PATCH] net/hns3: fix taskqueue pair reset command
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3fb0df3138e1f07dd3d79f80306c1d72eb4eaa77 ]
This new taskqueue pair reset command is used incorrectly, resulting in
the new command not taking effect.
This patch fixes the incorrect use.
Fixes: 6911e7c22c61 ("net/hns3: fix long task queue pairs reset time")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index ad9ead47cc..9bfa9eef8a 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -695,7 +695,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_CFG_RST_TRIGGER, false);
req = (struct hns3_reset_cmd *)desc.data;
- hns3_set_bit(req->mac_func_reset, HNS3_CFG_RESET_RCB_B, 1);
+ hns3_set_bit(req->fun_reset_rcb, HNS3_CFG_RESET_RCB_B, 1);
/*
* The start qid should be the global qid of the first tqp of the
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.721604893 +0800
+++ 0036-net-hns3-fix-taskqueue-pair-reset-command.patch 2021-11-10 14:17:01.784080133 +0800
@@ -1 +1 @@
-From 3fb0df3138e1f07dd3d79f80306c1d72eb4eaa77 Mon Sep 17 00:00:00 2001
+From dd8e8fcf1ff916a10ce263280a0f34470cd4ad10 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3fb0df3138e1f07dd3d79f80306c1d72eb4eaa77 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 0f222b37f9..481872e395 100644
+index ad9ead47cc..9bfa9eef8a 100644
@@ -24 +26 @@
-@@ -697,7 +697,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
+@@ -695,7 +695,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (35 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' " Xueming Li
` (215 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ivan Malov; +Cc: Luca Boccassi, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ed49cafb257e1141fc6cf518e2ab5330bdd93fd8
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ed49cafb257e1141fc6cf518e2ab5330bdd93fd8 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 30 Aug 2021 17:35:42 +0300
Subject: [PATCH] net/sfc: set FDIR bit for flow mark in EF100 Rx
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 142dd26a2fbd909f8d10ca25b1e698cd41a2667f ]
According to flow action MARK definition, PMDs must set both
PKT_RX_FDIR and PKT_RX_FDIR_ID if the packet contains a mark.
Fixes: 1aacc3d388d3 ("net/sfc: support user mark and flag Rx for EF100")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_ef100_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index f5fa629f90..061077bcf4 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -413,7 +413,7 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
user_mark = EFX_OWORD_FIELD(rx_prefix[0],
ESF_GZ_RX_PREFIX_USER_MARK);
if (user_mark != SFC_EF100_USER_MARK_INVALID) {
- ol_flags |= PKT_RX_FDIR_ID;
+ ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
m->hash.fdir.hi = user_mark;
}
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.767510974 +0800
+++ 0037-net-sfc-set-FDIR-bit-for-flow-mark-in-EF100-Rx.patch 2021-11-10 14:17:01.784080133 +0800
@@ -1 +1 @@
-From 142dd26a2fbd909f8d10ca25b1e698cd41a2667f Mon Sep 17 00:00:00 2001
+From ed49cafb257e1141fc6cf518e2ab5330bdd93fd8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 142dd26a2fbd909f8d10ca25b1e698cd41a2667f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index d4cb96881c..1bf04f565a 100644
+index f5fa629f90..061077bcf4 100644
@@ -22 +24 @@
-@@ -414,7 +414,7 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
+@@ -413,7 +413,7 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (36 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix queue resource " Xueming Li
` (214 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Tue, 31 Aug 2021 21:24:07 +0800
Subject: [PATCH] net/ixgbe: fix hash handle leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 ]
In the ixgbe_fdir_filter_init and ixgbe_l2_tn_filter_init functions,
after the hash handle is created, the handle is not released in
subsequent abnormal branches.
Fixes: 080e3c0ee989 ("net/ixgbe: store flow director filter")
Fixes: d0c0c416ef1f ("net/ixgbe: store L2 tunnel filter")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index bf0e850402..1af04357cc 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1393,6 +1393,7 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
if (!fdir_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for fdir hash map!");
+ rte_hash_free(fdir_info->hash_handle);
return -ENOMEM;
}
fdir_info->mask_added = FALSE;
@@ -1429,6 +1430,7 @@ static int ixgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
if (!l2_tn_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for L2 TN hash map!");
+ rte_hash_free(l2_tn_info->hash_handle);
return -ENOMEM;
}
l2_tn_info->e_tag_en = FALSE;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.809835755 +0800
+++ 0038-net-ixgbe-fix-hash-handle-leak.patch 2021-11-10 14:17:01.787413440 +0800
@@ -1 +1 @@
-From 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 Mon Sep 17 00:00:00 2001
+From c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 3cd2a094ae..7b198d95c2 100644
+index bf0e850402..1af04357cc 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix queue resource leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (37 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix MAC " Xueming Li
` (213 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5787cc1187ee2bc760a6c240005b234a8d49c344
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 5787cc1187ee2bc760a6c240005b234a8d49c344 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Tue, 31 Aug 2021 21:40:17 +0800
Subject: [PATCH] net/ixgbe: fix queue resource leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 ]
In the ixgbevf_dev_start function, after initializing the rxtx queue, if
an exception occurs in the subsequent function, the rxtx queue needs to
be released. The patch solves the problem of queue resource leakage.
Fixes: 0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 1af04357cc..f15cc7d4ef 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5360,8 +5360,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
* now only one vector is used for Rx queue
*/
intr_vector = 1;
- if (rte_intr_efd_enable(intr_handle, intr_vector))
+ if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+ ixgbe_dev_clear_queues(dev);
return -1;
+ }
}
if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
@@ -5371,6 +5373,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
if (intr_handle->intr_vec == NULL) {
PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
" intr_vec", dev->data->nb_rx_queues);
+ ixgbe_dev_clear_queues(dev);
return -ENOMEM;
}
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.857441182 +0800
+++ 0039-net-ixgbe-fix-queue-resource-leak.patch 2021-11-10 14:17:01.790746745 +0800
@@ -1 +1 @@
-From 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 Mon Sep 17 00:00:00 2001
+From 5787cc1187ee2bc760a6c240005b234a8d49c344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7b198d95c2..3371a7df78 100644
+index 1af04357cc..f15cc7d4ef 100644
@@ -23 +25 @@
-@@ -5362,8 +5362,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5360,8 +5360,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
@@ -35 +37 @@
-@@ -5373,6 +5375,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5371,6 +5373,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix MAC resource leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (38 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix queue resource " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix mbuf " Xueming Li
` (212 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a1ebe4da329713217ef7fa82f179f82bbae1de87
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Wed, 1 Sep 2021 15:12:07 +0800
Subject: [PATCH] net/ixgbe: fix MAC resource leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]
In the eth_ixgbevf_dev_init and eth_ixgbe_dev_init functions, memory is
allocated for the MAC address, and the address is stored in the
eth_dev->data->mac_addrs member variable. If the subsequent function is
abnormal, you need to use the rte_free function to release the MAC
address memory.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f15cc7d4ef..969e31cdbf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1218,6 +1218,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
PMD_INIT_LOG(ERR,
"Failed to allocate %d bytes needed to store MAC addresses",
RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC);
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
return -ENOMEM;
}
@@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
default:
PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag);
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
return -EIO;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.903348317 +0800
+++ 0040-net-ixgbe-fix-MAC-resource-leak.patch 2021-11-10 14:17:01.794080052 +0800
@@ -1 +1 @@
-From cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 Mon Sep 17 00:00:00 2001
+From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 3371a7df78..47693c0c47 100644
+index f15cc7d4ef..969e31cdbf 100644
@@ -34 +36 @@
-@@ -1667,6 +1669,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix mbuf leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (39 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix MAC " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix performance with writeback policy' " Xueming Li
` (211 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d9958c190766e659e9f3d9b24d3331c147390096
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d9958c190766e659e9f3d9b24d3331c147390096 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Wed, 1 Sep 2021 15:22:37 +0800
Subject: [PATCH] net/ixgbe: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ]
A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 3b893b0df0..3d983d4db7 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2948,6 +2948,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+
+ if (rxq->pkt_first_seg != NULL)
+ rte_pktmbuf_free(rxq->pkt_first_seg);
+
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.949497390 +0800
+++ 0041-net-ixgbe-fix-mbuf-leak.patch 2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From d54b51efb6ef12b8cdfc7316316d99e2a762e1cd Mon Sep 17 00:00:00 2001
+From d9958c190766e659e9f3d9b24d3331c147390096 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index c814a28cb4..bfdfd5e755 100644
+index 3b893b0df0..3d983d4db7 100644
@@ -26 +28 @@
-@@ -2981,6 +2981,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
+@@ -2948,6 +2948,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix performance with writeback policy' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (40 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ixgbe: fix mbuf " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' " Xueming Li
` (210 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Qi Zhang; +Cc: Luca Boccassi, Lijuan Tu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8404c8c99a31cd9d29761b3e29ba6f18d78746a6
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8404c8c99a31cd9d29761b3e29ba6f18d78746a6 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 29 Aug 2021 17:24:52 +0800
Subject: [PATCH] net/ice: fix performance with writeback policy
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit af167bcf174b59fa4776297e628a94143cf6a330 ]
Apply the same fix that for iavf to DCF
commit ead06572bd8f ("net/iavf: fix performance with writeback policy")
Fixes: 4b0d391f0eab ("net/ice: add queue config in DCF")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Lijuan Tu <lijuan.tu@intel.com>
---
drivers/net/ice/ice_dcf_ethdev.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 71f8a4b4cc..b523df47e1 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -166,10 +166,15 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,
VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
/* If WB_ON_ITR supports, enable it */
hw->msix_base = IAVF_RX_VEC_START;
+ /* Set the ITR for index zero, to 2us to make sure that
+ * we leave time for aggregation to occur, but don't
+ * increase latency dramatically.
+ */
IAVF_WRITE_REG(&hw->avf,
IAVF_VFINT_DYN_CTLN1(hw->msix_base - 1),
- IAVF_VFINT_DYN_CTLN1_ITR_INDX_MASK |
- IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK);
+ (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
+ IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
+ (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
} else {
/* If no WB_ON_ITR offload flags, need to set
* interrupt for descriptor write back.
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:03.993573642 +0800
+++ 0042-net-ice-fix-performance-with-writeback-policy.patch 2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From af167bcf174b59fa4776297e628a94143cf6a330 Mon Sep 17 00:00:00 2001
+From 8404c8c99a31cd9d29761b3e29ba6f18d78746a6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af167bcf174b59fa4776297e628a94143cf6a330 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 94c6a6e61c..f510bad381 100644
+index 71f8a4b4cc..b523df47e1 100644
@@ -22 +24 @@
-@@ -178,10 +178,15 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -166,10 +166,15 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (41 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/ice: fix performance with writeback policy' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' " Xueming Li
` (209 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Luca Boccassi, William Tu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 20 Aug 2021 02:14:46 +0300
Subject: [PATCH] build: propagate Windows system dependencies to pkg-config
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 ]
Windows EAL depends on some system libraries. They were linked using
add_project_link_arguments('-l<LIB>'), which prevented meson from adding
them to Libs.private of pkg-config file. As a result, applications using
pkg-config to find DPDK hit link errors, for example:
librte_eal.a(eal_windows_eal_debug.c.obj) : error LNK2019: unresolved
external symbol __imp_SymInitialize referenced in function
rte_dump_stack
Reference required libraries in EAL using ext_deps meson variable.
bus/pci and net/pcap depend on lib/eal and will pull them automatically.
Drop advapi32 dependency, as MinGW locates VirtualAlloc2() dynamically.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Fixes: c91717eb75c8 ("eal/windows: support exit and panic")
Reported-by: William Tu <u9012063@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
---
config/meson.build | 13 ++-----------
lib/librte_eal/windows/meson.build | 10 ++++++++++
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index b2734fc0cf..d909d064c2 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -278,7 +278,8 @@ if is_freebsd
endif
if is_windows
- # VirtualAlloc2() is available since Windows 10 / Server 2016.
+ # VirtualAlloc2() is available since Windows 10 / Server 2019.
+ # It's essential for EAL, so we don't support older versions.
add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
@@ -286,16 +287,6 @@ if is_windows
add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
endif
- add_project_link_arguments('-lws2_32', language: 'c')
-
- # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
- # in Windows SDK, while MinGW exports it by advapi32.a.
- if is_ms_linker
- add_project_link_arguments('-lmincore', language: 'c')
- endif
-
- add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
- add_project_link_arguments('-ldbghelp', language: 'c')
endif
if get_option('b_lto')
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 3b2faf29eb..557e3c04a5 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -22,3 +22,13 @@ sources += files(
)
dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
+
+ext_deps += [
+ cc.find_library('dbghelp'),
+ cc.find_library('setupapi'),
+ cc.find_library('ws2_32'),
+]
+if is_ms_linker
+ # Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
+ ext_deps += cc.find_library('mincore')
+endif
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.034409827 +0800
+++ 0043-build-propagate-Windows-system-dependencies-to-pkg-c.patch 2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 Mon Sep 17 00:00:00 2001
+From 91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -27,3 +29,3 @@
- config/meson.build | 14 ++------------
- lib/eal/windows/meson.build | 10 ++++++++++
- 2 files changed, 12 insertions(+), 12 deletions(-)
+ config/meson.build | 13 ++-----------
+ lib/librte_eal/windows/meson.build | 10 ++++++++++
+ 2 files changed, 12 insertions(+), 11 deletions(-)
@@ -32 +34 @@
-index 3b5966ec2f..0b8359404b 100644
+index b2734fc0cf..d909d064c2 100644
@@ -35 +37 @@
-@@ -340,7 +340,8 @@ if is_freebsd
+@@ -278,7 +278,8 @@ if is_freebsd
@@ -39,4 +41,4 @@
-- # VirtualAlloc2() is available since Windows 10 / Server 2016.
-+ # VirtualAlloc2() is available since Windows 10 / Server 2019.
-+ # It's essential for EAL, so we don't support older versions.
- add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
+- # VirtualAlloc2() is available since Windows 10 / Server 2016.
++ # VirtualAlloc2() is available since Windows 10 / Server 2019.
++ # It's essential for EAL, so we don't support older versions.
+ add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
@@ -44,7 +46,6 @@
- # Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
-@@ -352,17 +353,6 @@ if is_windows
- if cc.get_id() == 'clang'
- add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c')
- endif
--
-- add_project_link_arguments('-lws2_32', language: 'c')
+ # Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
+@@ -286,16 +287,6 @@ if is_windows
+ add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
+ endif
+
+- add_project_link_arguments('-lws2_32', language: 'c')
@@ -52,5 +53,5 @@
-- # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
-- # in Windows SDK, while MinGW exports it by advapi32.a.
-- if is_ms_linker
-- add_project_link_arguments('-lmincore', language: 'c')
-- endif
+- # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
+- # in Windows SDK, while MinGW exports it by advapi32.a.
+- if is_ms_linker
+- add_project_link_arguments('-lmincore', language: 'c')
+- endif
@@ -58,2 +59,2 @@
-- add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
-- add_project_link_arguments('-ldbghelp', language: 'c')
+- add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
+- add_project_link_arguments('-ldbghelp', language: 'c')
@@ -63,5 +64,5 @@
-diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
-index fc12fefd0d..845e406ca1 100644
---- a/lib/eal/windows/meson.build
-+++ b/lib/eal/windows/meson.build
-@@ -24,3 +24,13 @@ sources += files(
+diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
+index 3b2faf29eb..557e3c04a5 100644
+--- a/lib/librte_eal/windows/meson.build
++++ b/lib/librte_eal/windows/meson.build
+@@ -22,3 +22,13 @@ sources += files(
@@ -73,3 +74,3 @@
-+ cc.find_library('dbghelp'),
-+ cc.find_library('setupapi'),
-+ cc.find_library('ws2_32'),
++ cc.find_library('dbghelp'),
++ cc.find_library('setupapi'),
++ cc.find_library('ws2_32'),
@@ -78,2 +79,2 @@
-+ # Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
-+ ext_deps += cc.find_library('mincore')
++ # Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
++ ext_deps += cc.find_library('mincore')
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (42 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'examples/service_cores: fix lcore count check' " Xueming Li
` (208 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Joyce Kong
Cc: Luca Boccassi, Ruifeng Wang, Feifei Wang, Olivier Matz,
David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8192dfc388446d9f199f105c244898f1d5843a1e
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8192dfc388446d9f199f105c244898f1d5843a1e Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Sun, 22 Aug 2021 21:57:40 -0500
Subject: [PATCH] test/func_reentrancy: free memzones after test
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit d5559ac589953fa9f018aa581032e0f74bd49729 ]
Function reentrancy test limits maximum number of iterations
simultaneously, however it doesn't free the 'fr_test_once'
memzones after the fact, so introduce freeing 'fr_test_once'
in ring/mempool/hash/fbk/lpm_clean.
Meanwhile, add the missing free for test case on main thread.
Fixes: 104a92bd026f ("app: add reentrancy tests")
Fixes: 995eec619024 ("test: clean up memory for function reentrancy test")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_func_reentrancy.c | 35 ++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 231c99a9eb..838ab6f0f9 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -89,6 +89,10 @@ ring_clean(unsigned int lcore_id)
char ring_name[MAX_STRING_SIZE];
int i;
+ rp = rte_ring_lookup("fr_test_once");
+ if (rp != NULL)
+ rte_ring_free(rp);
+
for (i = 0; i < MAX_ITER_MULTI; i++) {
snprintf(ring_name, sizeof(ring_name),
"fr_test_%d_%d", lcore_id, i);
@@ -148,7 +152,10 @@ mempool_clean(unsigned int lcore_id)
char mempool_name[MAX_STRING_SIZE];
int i;
- /* verify all ring created successful */
+ mp = rte_mempool_lookup("fr_test_once");
+ if (mp != NULL)
+ rte_mempool_free(mp);
+
for (i = 0; i < MAX_ITER_MULTI; i++) {
snprintf(mempool_name, sizeof(mempool_name), "fr_test_%d_%d",
lcore_id, i);
@@ -208,6 +215,10 @@ hash_clean(unsigned lcore_id)
struct rte_hash *handle;
int i;
+ handle = rte_hash_find_existing("fr_test_once");
+ if (handle != NULL)
+ rte_hash_free(handle);
+
for (i = 0; i < MAX_ITER_MULTI; i++) {
snprintf(hash_name, sizeof(hash_name), "fr_test_%d_%d", lcore_id, i);
@@ -272,6 +283,10 @@ fbk_clean(unsigned lcore_id)
struct rte_fbk_hash_table *handle;
int i;
+ handle = rte_fbk_hash_find_existing("fr_test_once");
+ if (handle != NULL)
+ rte_fbk_hash_free(handle);
+
for (i = 0; i < MAX_ITER_MULTI; i++) {
snprintf(fbk_name, sizeof(fbk_name), "fr_test_%d_%d", lcore_id, i);
@@ -338,6 +353,10 @@ lpm_clean(unsigned int lcore_id)
struct rte_lpm *lpm;
int i;
+ lpm = rte_lpm_find_existing("fr_test_once");
+ if (lpm != NULL)
+ rte_lpm_free(lpm);
+
for (i = 0; i < MAX_LPM_ITER_TIMES; i++) {
snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d", lcore_id, i);
@@ -418,11 +437,10 @@ struct test_case test_cases[] = {
static int
launch_test(struct test_case *pt_case)
{
+ unsigned int lcore_id;
+ unsigned int cores;
+ unsigned int count;
int ret = 0;
- unsigned lcore_id;
- unsigned cores_save = rte_lcore_count();
- unsigned cores = RTE_MIN(cores_save, MAX_LCORES);
- unsigned count;
if (pt_case->func == NULL)
return -1;
@@ -430,6 +448,7 @@ launch_test(struct test_case *pt_case)
rte_atomic32_set(&obj_count, 0);
rte_atomic32_set(&synchro, 0);
+ cores = RTE_MIN(rte_lcore_count(), MAX_LCORES);
RTE_LCORE_FOREACH_WORKER(lcore_id) {
if (cores == 1)
break;
@@ -442,14 +461,12 @@ launch_test(struct test_case *pt_case)
if (pt_case->func(pt_case->arg) < 0)
ret = -1;
- cores = cores_save;
RTE_LCORE_FOREACH_WORKER(lcore_id) {
- if (cores == 1)
- break;
- cores--;
if (rte_eal_wait_lcore(lcore_id) < 0)
ret = -1;
+ }
+ RTE_LCORE_FOREACH(lcore_id) {
if (pt_case->clean != NULL)
pt_case->clean(lcore_id);
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.076286617 +0800
+++ 0044-test-func_reentrancy-free-memzones-after-test.patch 2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From d5559ac589953fa9f018aa581032e0f74bd49729 Mon Sep 17 00:00:00 2001
+From 8192dfc388446d9f199f105c244898f1d5843a1e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d5559ac589953fa9f018aa581032e0f74bd49729 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'examples/service_cores: fix lcore count check' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (43 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'eal: fix memory leak when saving arguments' " Xueming Li
` (207 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: Luca Boccassi, Harry van Haaren, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/64c6120185910f01dcf36fe8f42f94c4aa7ad995
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 64c6120185910f01dcf36fe8f42f94c4aa7ad995 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 30 Aug 2021 16:04:12 +0800
Subject: [PATCH] examples/service_cores: fix lcore count check
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 328720c594f235aa44c78fe360e8e6f31b5e989f ]
The example has various profiles to run services on specified
number of lcores. Due to incorrect boundary condition, service
can be dispatched to a core that does not exist. This puts main
core into endless wait.
Max available number of service cores is all detected lcores
excluding main core.
Fixes: 7f6ee6aee717 ("examples/service_cores: check cores before run")
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
examples/service_cores/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/service_cores/main.c b/examples/service_cores/main.c
index c5753cc52d..e0cb4f9acb 100644
--- a/examples/service_cores/main.c
+++ b/examples/service_cores/main.c
@@ -118,7 +118,7 @@ apply_profile(int profile_id)
struct profile *p = &profiles[profile_id];
const uint8_t core_off = 1;
- if (p->num_cores > rte_lcore_count() + 1) {
+ if (p->num_cores > rte_lcore_count() - 1) {
printf("insufficent cores to run (%s)",
p->name);
return;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.118375010 +0800
+++ 0045-examples-service_cores-fix-lcore-count-check.patch 2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From 328720c594f235aa44c78fe360e8e6f31b5e989f Mon Sep 17 00:00:00 2001
+From 64c6120185910f01dcf36fe8f42f94c4aa7ad995 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 328720c594f235aa44c78fe360e8e6f31b5e989f ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 83915b9a53..9f52082254 100644
+index c5753cc52d..e0cb4f9acb 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal: fix memory leak when saving arguments' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (44 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'examples/service_cores: fix lcore count check' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' " Xueming Li
` (206 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Conor Walsh
Cc: Luca Boccassi, Zhihong Peng, Conor Fogarty, Bruce Richardson,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fcece17c517b90e30826955e4a6f6f54df2c0e90
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From fcece17c517b90e30826955e4a6f6f54df2c0e90 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Wed, 1 Sep 2021 09:38:47 +0000
Subject: [PATCH] eal: fix memory leak when saving arguments
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4777674c4428f528fa2890d8afab551f6dd54c24 ]
This patch fixes a memleak which was reported in Bugzilla within the
eal_save_args function. This was caused by the function mistakenly
adding -- to the eal args instead of breaking beforehand.
Bugzilla ID: 722
Fixes: 293c53d8b23c ("eal: add telemetry callbacks")
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/common/eal_common_options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index f8ab47435d..977ba21c51 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -228,9 +228,9 @@ eal_save_args(int argc, char **argv)
return -1;
for (i = 0; i < argc; i++) {
- eal_args[i] = strdup(argv[i]);
if (strcmp(argv[i], "--") == 0)
break;
+ eal_args[i] = strdup(argv[i]);
}
eal_args[i++] = NULL; /* always finish with NULL */
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.159870986 +0800
+++ 0046-eal-fix-memory-leak-when-saving-arguments.patch 2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From 4777674c4428f528fa2890d8afab551f6dd54c24 Mon Sep 17 00:00:00 2001
+From fcece17c517b90e30826955e4a6f6f54df2c0e90 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4777674c4428f528fa2890d8afab551f6dd54c24 ]
@@ -18 +21 @@
- lib/eal/common/eal_common_options.c | 2 +-
+ lib/librte_eal/common/eal_common_options.c | 2 +-
@@ -21,5 +24,5 @@
-diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
-index 6ecf5fd660..eaef57312f 100644
---- a/lib/eal/common/eal_common_options.c
-+++ b/lib/eal/common/eal_common_options.c
-@@ -223,9 +223,9 @@ eal_save_args(int argc, char **argv)
+diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
+index f8ab47435d..977ba21c51 100644
+--- a/lib/librte_eal/common/eal_common_options.c
++++ b/lib/librte_eal/common/eal_common_options.c
+@@ -228,9 +228,9 @@ eal_save_args(int argc, char **argv)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (45 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'eal: fix memory leak when saving arguments' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' " Xueming Li
` (205 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Joyce Kong; +Cc: Luca Boccassi, Ruifeng Wang, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7e0a1eee89176ebfe9f009b7e6f69d5487e1c6fd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 7e0a1eee89176ebfe9f009b7e6f69d5487e1c6fd Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Sun, 5 Sep 2021 21:13:53 -0500
Subject: [PATCH] ethdev: fix typo in Rx queue setup API comment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 97d7b92772603602fed376b6bcf50d55721c659e ]
Fix a typo that mb_pool was misspelt as mp_pool.
Fixes: 4ff702b5dfa9 ("ethdev: introduce Rx buffer split")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 3ec7e9a6b3..de577ca075 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2155,7 +2155,7 @@ rte_eth_dev_is_removed(uint16_t port_id);
* The configuration structure also contains the pointer to the array
* of the receiving buffer segment descriptions, see rx_seg and rx_nseg
* fields, this extended configuration might be used by split offloads like
- * RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT. If mp_pool is not NULL,
+ * RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT. If mb_pool is not NULL,
* the extended configuration fields must be set to NULL and zero.
* @param mb_pool
* The pointer to the memory pool from which to allocate *rte_mbuf* network
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.202628558 +0800
+++ 0047-ethdev-fix-typo-in-Rx-queue-setup-API-comment.patch 2021-11-10 14:17:01.800746663 +0800
@@ -1 +1 @@
-From 97d7b92772603602fed376b6bcf50d55721c659e Mon Sep 17 00:00:00 2001
+From 7e0a1eee89176ebfe9f009b7e6f69d5487e1c6fd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 97d7b92772603602fed376b6bcf50d55721c659e ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/ethdev/rte_ethdev.h | 2 +-
+ lib/librte_ethdev/rte_ethdev.h | 2 +-
@@ -18,5 +20,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 1b9f383e3e..2925845517 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -2190,7 +2190,7 @@ rte_eth_dev_is_removed(uint16_t port_id);
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 3ec7e9a6b3..de577ca075 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2155,7 +2155,7 @@ rte_eth_dev_is_removed(uint16_t port_id);
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (46 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' " Xueming Li
` (204 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Mohsin Kazmi; +Cc: Luca Boccassi, Qi Zhang, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Mon Sep 17 00:00:00 2001
From: Mohsin Kazmi <mohsin.kazmi14@gmail.com>
Date: Tue, 7 Sep 2021 12:49:16 +0200
Subject: [PATCH] net: fix checksum offload for outer IPv4
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 818ce1132ab69c5bb34ede0120776f71969dc091 ]
Preparation of the headers for the hardware offload
misses the outer IPv4 checksum offload.
It results in bad checksum computed by hardware NIC.
This patch fixes the issue by setting the outer IPv4
checksum field to 0.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: Mohsin Kazmi <mohsin.kazmi14@gmail.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_net/rte_net.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
index 434435ffa2..42639bc154 100644
--- a/lib/librte_net/rte_net.h
+++ b/lib/librte_net/rte_net.h
@@ -125,11 +125,22 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
* Mainly it is required to avoid fragmented headers check if
* no offloads are requested.
*/
- if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG)))
+ if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG |
+ PKT_TX_OUTER_IP_CKSUM)))
return 0;
- if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6))
+ if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) {
inner_l3_offset += m->outer_l2_len + m->outer_l3_len;
+ /*
+ * prepare outer IPv4 header checksum by setting it to 0,
+ * in order to be computed by hardware NICs.
+ */
+ if (ol_flags & PKT_TX_OUTER_IP_CKSUM) {
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m,
+ struct rte_ipv4_hdr *, m->outer_l2_len);
+ ipv4_hdr->hdr_checksum = 0;
+ }
+ }
/*
* Check if headers are fragmented.
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.249069977 +0800
+++ 0048-net-fix-checksum-offload-for-outer-IPv4.patch 2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From 818ce1132ab69c5bb34ede0120776f71969dc091 Mon Sep 17 00:00:00 2001
+From 8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 818ce1132ab69c5bb34ede0120776f71969dc091 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/net/rte_net.h | 15 +++++++++++++--
+ lib/librte_net/rte_net.h | 15 +++++++++++++--
@@ -23 +25 @@
-diff --git a/lib/net/rte_net.h b/lib/net/rte_net.h
+diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
@@ -25,2 +27,2 @@
---- a/lib/net/rte_net.h
-+++ b/lib/net/rte_net.h
+--- a/lib/librte_net/rte_net.h
++++ b/lib/librte_net/rte_net.h
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (47 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' " Xueming Li
` (203 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/24ae55b075d60fe8e0f4196108238e35c0b49a8f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 20 Aug 2021 15:47:20 +0300
Subject: [PATCH] net/virtio: fix mbuf count on Rx queue setup
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]
Rx queue setup finish function may report wrong number of
allocated mbufs in case of in-order feature. Fix the
function to not ignore allocation error and count only
successfully allocated number of buffers.
Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 6cfdfc63c2..b5b99d19f8 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
if (unlikely(error)) {
for (i = 0; i < free_cnt; i++)
rte_pktmbuf_free(pkts[i]);
+ } else {
+ nbufs += free_cnt;
}
}
- nbufs += free_cnt;
vq_update_avail_idx(vq);
}
} else {
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.290749180 +0800
+++ 0049-net-virtio-fix-mbuf-count-on-Rx-queue-setup.patch 2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 Mon Sep 17 00:00:00 2001
+From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d0365ce4bf..8a48fba5cc 100644
+index 6cfdfc63c2..b5b99d19f8 100644
@@ -25 +27 @@
-@@ -768,10 +768,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (48 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' " Xueming Li
` (202 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b95404765490eb484a534e7d01aea2c95d046fb9
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b95404765490eb484a534e7d01aea2c95d046fb9 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 20 Aug 2021 15:47:52 +0300
Subject: [PATCH] net/virtio: fix split queue vectorized Rx
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c97e73779c3eb2f7c214a7300673e54b886223b6 ]
Descriptors number may be set less than queue size for split queue
vectorized Rx path. Pointers to mbufs for received packets are
obtained from SW ring, that is initially filled with them in the end
of queue setup in virtio_dev_rx_queue_setup_finish(). The begin of the
SW ring filled up to the size of descriptors number. At queue size
offset from the begin of the SW ring pointers to some fake mbuf are also
set for wrapping purpose. So the ring may contains the hole of invalid
pointers from descriptors number offset to queue size offset, and split
vectorized Rx routines could write to the invalid addresses since they
use the ring up to the queue size. Fix this by setting descriptors
number to queue size on Rx queue setup.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index b5b99d19f8..7fb41f12af 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -711,8 +711,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
}
vq->vq_free_thresh = rx_free_thresh;
- if (nb_desc == 0 || nb_desc > vq->vq_nentries)
+ /*
+ * For split ring vectorized path descriptors number must be
+ * equal to the ring size.
+ */
+ if (nb_desc > vq->vq_nentries ||
+ (!vtpci_packed_queue(hw) && hw->use_vec_rx)) {
nb_desc = vq->vq_nentries;
+ }
vq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);
rxvq = &vq->rxq;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.333221337 +0800
+++ 0050-net-virtio-fix-split-queue-vectorized-Rx.patch 2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From c97e73779c3eb2f7c214a7300673e54b886223b6 Mon Sep 17 00:00:00 2001
+From b95404765490eb484a534e7d01aea2c95d046fb9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c97e73779c3eb2f7c214a7300673e54b886223b6 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 18f03c9fc9..97ed69596a 100644
+index b5b99d19f8..7fb41f12af 100644
@@ -32 +34 @@
-@@ -706,8 +706,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -711,8 +711,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -36 +38 @@
-- if (nb_desc > vq->vq_nentries)
+- if (nb_desc == 0 || nb_desc > vq->vq_nentries)
@@ -42 +44 @@
-+ (!virtio_with_packed_queue(hw) && hw->use_vec_rx)) {
++ (!vtpci_packed_queue(hw) && hw->use_vec_rx)) {
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (49 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' " Xueming Li
` (201 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b00b073569dffc922323abb98fa845f716b6bf08
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b00b073569dffc922323abb98fa845f716b6bf08 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 31 Aug 2021 17:54:10 +0200
Subject: [PATCH] net/virtio: avoid unneeded link interrupt configuration
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 ]
There is no reason to re-register a interrupt handler for LSC if this
feature was not requested in the first place.
A simple use case is when asking for Rx interrupts without LSC interrupt.
Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 520f3fde54..cfdeb40160 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1713,13 +1713,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
}
}
- /* Re-register callback to update max_intr */
- rte_intr_callback_unregister(dev->intr_handle,
- virtio_interrupt_handler,
- dev);
- rte_intr_callback_register(dev->intr_handle,
- virtio_interrupt_handler,
- dev);
+ if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+ /* Re-register callback to update max_intr */
+ rte_intr_callback_unregister(dev->intr_handle,
+ virtio_interrupt_handler,
+ dev);
+ rte_intr_callback_register(dev->intr_handle,
+ virtio_interrupt_handler,
+ dev);
+ }
/* DO NOT try to remove this! This function will enable msix, or QEMU
* will encounter SIGSEGV when DRIVER_OK is sent.
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.375595016 +0800
+++ 0051-net-virtio-avoid-unneeded-link-interrupt-configurati.patch 2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 Mon Sep 17 00:00:00 2001
+From b00b073569dffc922323abb98fa845f716b6bf08 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9690eb4fb2..061d02f666 100644
+index 520f3fde54..cfdeb40160 100644
@@ -23 +25 @@
-@@ -1685,13 +1685,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1713,13 +1713,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (50 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Xueming Li
` (200 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dd6e6e33c7cf046becb5a373f44228489cf01af2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From dd6e6e33c7cf046becb5a373f44228489cf01af2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 31 Aug 2021 17:54:11 +0200
Subject: [PATCH] net/virtio-user: fix Rx interrupts with multi-queue
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 848e93d9001e74fdbcb31b7ac5cdc1991b9e3f03 ]
The callfds[] array stores eventfds sequentially for Rx and Tx vq.
Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index e93e1919ab..73f6fd7313 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -312,7 +312,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
}
for (i = 0; i < dev->max_queue_pairs; ++i)
- eth_dev->intr_handle->efds[i] = dev->callfds[i];
+ eth_dev->intr_handle->efds[i] = dev->callfds[2 * i];
eth_dev->intr_handle->nb_efd = dev->max_queue_pairs;
eth_dev->intr_handle->max_intr = dev->max_queue_pairs + 1;
eth_dev->intr_handle->type = RTE_INTR_HANDLE_VDEV;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.418669644 +0800
+++ 0052-net-virtio-user-fix-Rx-interrupts-with-multi-queue.patch 2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From 848e93d9001e74fdbcb31b7ac5cdc1991b9e3f03 Mon Sep 17 00:00:00 2001
+From dd6e6e33c7cf046becb5a373f44228489cf01af2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 848e93d9001e74fdbcb31b7ac5cdc1991b9e3f03 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 16c58710d7..89f8b2271f 100644
+index e93e1919ab..73f6fd7313 100644
@@ -21 +23 @@
-@@ -416,7 +416,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
+@@ -312,7 +312,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'vhost: fix crash on port deletion' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (51 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' " Xueming Li
` (199 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Gaoxiang Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e543f89ba585ee382549616f9d88b6eeeee142e4
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e543f89ba585ee382549616f9d88b6eeeee142e4 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Thu, 2 Sep 2021 23:45:53 +0800
Subject: [PATCH] vhost: fix crash on port deletion
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 451dc0fad83d07d194e688f52093c7e888d2e317 ]
The rte_vhost_driver_unregister() and vhost_user_read_cb()
can be called at the same time by 2 threads.
when memory of vsocket is freed in rte_vhost_driver_unregister(),
the invalid memory of vsocket is accessed in vhost_user_read_cb().
It's a bug of both mode for vhost as server or client.
E.g., vhostuser port is created as server.
Thread1 calls rte_vhost_driver_unregister().
Before the listen fd is deleted from poll waiting fds,
"vhost-events" thread then calls vhost_user_server_new_connection(),
then a new conn fd is added in fdset when trying to reconnect.
"vhost-events" thread then calls vhost_user_read_cb() and
accesses invalid memory of socket while thread1 frees the memory of
vsocket.
E.g., vhostuser port is created as client.
Thread1 calls rte_vhost_driver_unregister().
Before vsocket of reconn is deleted from reconn list,
"vhost_reconn" thread then calls vhost_user_add_connection()
then a new conn fd is added in fdset when trying to reconnect.
"vhost-events" thread then calls vhost_user_read_cb() and
accesses invalid memory of socket while thread1 frees the memory of
vsocket.
The fix is to move the "fdset_try_del" in front of free memory of conn,
then avoid the race condition.
The core trace is:
Program terminated with signal 11, Segmentation fault.
Fixes: 52d874dc6705 ("vhost: fix crash on closing in client mode")
Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/socket.c | 107 +++++++++++++++++++-------------------
1 file changed, 53 insertions(+), 54 deletions(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 5d0d728d52..d6f9414c4d 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -1023,66 +1023,65 @@ again:
for (i = 0; i < vhost_user.vsocket_cnt; i++) {
struct vhost_user_socket *vsocket = vhost_user.vsockets[i];
+ if (strcmp(vsocket->path, path))
+ continue;
- if (!strcmp(vsocket->path, path)) {
- pthread_mutex_lock(&vsocket->conn_mutex);
- for (conn = TAILQ_FIRST(&vsocket->conn_list);
- conn != NULL;
- conn = next) {
- next = TAILQ_NEXT(conn, next);
-
- /*
- * If r/wcb is executing, release vsocket's
- * conn_mutex and vhost_user's mutex locks, and
- * try again since the r/wcb may use the
- * conn_mutex and mutex locks.
- */
- if (fdset_try_del(&vhost_user.fdset,
- conn->connfd) == -1) {
- pthread_mutex_unlock(
- &vsocket->conn_mutex);
- pthread_mutex_unlock(&vhost_user.mutex);
- goto again;
- }
-
- VHOST_LOG_CONFIG(INFO,
- "free connfd = %d for device '%s'\n",
- conn->connfd, path);
- close(conn->connfd);
- vhost_destroy_device(conn->vid);
- TAILQ_REMOVE(&vsocket->conn_list, conn, next);
- free(conn);
- }
- pthread_mutex_unlock(&vsocket->conn_mutex);
-
- if (vsocket->is_server) {
- /*
- * If r/wcb is executing, release vhost_user's
- * mutex lock, and try again since the r/wcb
- * may use the mutex lock.
- */
- if (fdset_try_del(&vhost_user.fdset,
- vsocket->socket_fd) == -1) {
- pthread_mutex_unlock(&vhost_user.mutex);
- goto again;
- }
-
- close(vsocket->socket_fd);
- unlink(path);
- } else if (vsocket->reconnect) {
- vhost_user_remove_reconnect(vsocket);
+ if (vsocket->is_server) {
+ /*
+ * If r/wcb is executing, release vhost_user's
+ * mutex lock, and try again since the r/wcb
+ * may use the mutex lock.
+ */
+ if (fdset_try_del(&vhost_user.fdset, vsocket->socket_fd) == -1) {
+ pthread_mutex_unlock(&vhost_user.mutex);
+ goto again;
}
+ } else if (vsocket->reconnect) {
+ vhost_user_remove_reconnect(vsocket);
+ }
- pthread_mutex_destroy(&vsocket->conn_mutex);
- vhost_user_socket_mem_free(vsocket);
+ pthread_mutex_lock(&vsocket->conn_mutex);
+ for (conn = TAILQ_FIRST(&vsocket->conn_list);
+ conn != NULL;
+ conn = next) {
+ next = TAILQ_NEXT(conn, next);
- count = --vhost_user.vsocket_cnt;
- vhost_user.vsockets[i] = vhost_user.vsockets[count];
- vhost_user.vsockets[count] = NULL;
- pthread_mutex_unlock(&vhost_user.mutex);
+ /*
+ * If r/wcb is executing, release vsocket's
+ * conn_mutex and vhost_user's mutex locks, and
+ * try again since the r/wcb may use the
+ * conn_mutex and mutex locks.
+ */
+ if (fdset_try_del(&vhost_user.fdset,
+ conn->connfd) == -1) {
+ pthread_mutex_unlock(&vsocket->conn_mutex);
+ pthread_mutex_unlock(&vhost_user.mutex);
+ goto again;
+ }
- return 0;
+ VHOST_LOG_CONFIG(INFO,
+ "free connfd = %d for device '%s'\n",
+ conn->connfd, path);
+ close(conn->connfd);
+ vhost_destroy_device(conn->vid);
+ TAILQ_REMOVE(&vsocket->conn_list, conn, next);
+ free(conn);
+ }
+ pthread_mutex_unlock(&vsocket->conn_mutex);
+
+ if (vsocket->is_server) {
+ close(vsocket->socket_fd);
+ unlink(path);
}
+
+ pthread_mutex_destroy(&vsocket->conn_mutex);
+ vhost_user_socket_mem_free(vsocket);
+
+ count = --vhost_user.vsocket_cnt;
+ vhost_user.vsockets[i] = vhost_user.vsockets[count];
+ vhost_user.vsockets[count] = NULL;
+ pthread_mutex_unlock(&vhost_user.mutex);
+ return 0;
}
pthread_mutex_unlock(&vhost_user.mutex);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.460854189 +0800
+++ 0053-vhost-fix-crash-on-port-deletion.patch 2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 451dc0fad83d07d194e688f52093c7e888d2e317 Mon Sep 17 00:00:00 2001
+From e543f89ba585ee382549616f9d88b6eeeee142e4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 451dc0fad83d07d194e688f52093c7e888d2e317 ]
@@ -37 +39,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
- lib/vhost/socket.c | 107 ++++++++++++++++++++++-----------------------
+ lib/librte_vhost/socket.c | 107 +++++++++++++++++++-------------------
@@ -45 +47 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
@@ -47,2 +49,2 @@
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (52 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:28 ` [dpdk-stable] patch 'vhost: log socket path on adding connection' " Xueming Li
` (198 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Gaoxiang Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e0d08d0c032eb3b1006cb147177fe3702c81c4f2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Tue, 31 Aug 2021 22:39:51 +0800
Subject: [PATCH] net/virtio: fix repeated freeing of virtqueue
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ]
When virtio_init_queue returns error, the memory of vq is freed.
But the value of hw->vqs[queue_idx] does not restore.
If virtio_init_queue returns error, the memory of vq is freed again
in virtio_free_queues.
Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage")
Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index cfdeb40160..25f1b951f9 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -647,6 +647,7 @@ fail_q_alloc:
rte_memzone_free(hdr_mz);
rte_memzone_free(mz);
rte_free(vq);
+ hw->vqs[vtpci_queue_idx] = NULL;
return ret;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.502662683 +0800
+++ 0054-net-virtio-fix-repeated-freeing-of-virtqueue.patch 2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 5d903aee8ad0243320a23d0e1e7b34b96024e007 Mon Sep 17 00:00:00 2001
+From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 061d02f666..51fa85b078 100644
+index cfdeb40160..25f1b951f9 100644
@@ -24 +26,2 @@
-@@ -632,6 +632,7 @@ free_mz:
+@@ -647,6 +647,7 @@ fail_q_alloc:
+ rte_memzone_free(hdr_mz);
@@ -26 +28,0 @@
- free_vq:
@@ -28 +30 @@
-+ hw->vqs[queue_idx] = NULL;
++ hw->vqs[vtpci_queue_idx] = NULL;
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'vhost: log socket path on adding connection' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (53 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' " Xueming Li
@ 2021-11-10 6:28 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' " Xueming Li
` (197 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:28 UTC (permalink / raw)
To: Gaoxiang Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/aafb232afb5115716500219bb5cdd884a4fe39e6
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From aafb232afb5115716500219bb5cdd884a4fe39e6 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Tue, 7 Sep 2021 08:51:27 +0800
Subject: [PATCH] vhost: log socket path on adding connection
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e53084d84b0f2ae67df8d785e8d79df530b21a50 ]
Add log print of socket path in vhost_user_add_connection.
It's useful when adding a mass of socket connections,
because the information of every connection is clearer.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index d6f9414c4d..c6548608a3 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -243,7 +243,7 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
dev->async_copy = 1;
}
- VHOST_LOG_CONFIG(INFO, "new device, handle is %d\n", vid);
+ VHOST_LOG_CONFIG(INFO, "new device, handle is %d, path is %s\n", vid, vsocket->path);
if (vsocket->notify_ops->new_connection) {
ret = vsocket->notify_ops->new_connection(vid);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.545642285 +0800
+++ 0055-vhost-log-socket-path-on-adding-connection.patch 2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From e53084d84b0f2ae67df8d785e8d79df530b21a50 Mon Sep 17 00:00:00 2001
+From aafb232afb5115716500219bb5cdd884a4fe39e6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e53084d84b0f2ae67df8d785e8d79df530b21a50 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/vhost/socket.c | 2 +-
+ lib/librte_vhost/socket.c | 2 +-
@@ -19 +21 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
@@ -21,2 +23,2 @@
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (54 preceding siblings ...)
2021-11-10 6:28 ` [dpdk-stable] patch 'vhost: log socket path on adding connection' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' " Xueming Li
` (196 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/92569f9804d1ea7ab44a916fae55aec220823349
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 92569f9804d1ea7ab44a916fae55aec220823349 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Thu, 2 Sep 2021 17:39:39 +0300
Subject: [PATCH] net/virtio: fix device configure without jumbo Rx offload
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 580f3af31c99824bdd1cc331035096e34de5ca01 ]
Use max-pkt-len only if jumbo frames offload is requested
since otherwise this field isn't valid.
Fixes: 8b90e4358112 ("net/virtio: set offload flag for jumbo frames")
Fixes: 4e8169eb0d2d ("net/virtio: fix Rx scatter offload")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 25f1b951f9..7bbd483952 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2302,10 +2302,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
return ret;
}
- if (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len)
+ if ((rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) &&
+ (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len))
req_features &= ~(1ULL << VIRTIO_NET_F_MTU);
- hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+ if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
+ hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+ else
+ hw->max_rx_pkt_len = ether_hdr_len + dev->data->mtu;
if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM))
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.587367188 +0800
+++ 0056-net-virtio-fix-device-configure-without-jumbo-Rx-off.patch 2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 580f3af31c99824bdd1cc331035096e34de5ca01 Mon Sep 17 00:00:00 2001
+From 92569f9804d1ea7ab44a916fae55aec220823349 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 580f3af31c99824bdd1cc331035096e34de5ca01 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 51fa85b078..da1633d77e 100644
+index 25f1b951f9..7bbd483952 100644
@@ -24 +26 @@
-@@ -2103,10 +2103,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -2302,10 +2302,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (55 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e: fix mbuf leak' " Xueming Li
` (195 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Hanumanth Reddy Pothula; +Cc: Luca Boccassi, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c7afc9980446a742d86fbf758d635f7c4b96a03b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c7afc9980446a742d86fbf758d635f7c4b96a03b Mon Sep 17 00:00:00 2001
From: Hanumanth Reddy Pothula <hpothula@marvell.com>
Date: Tue, 10 Aug 2021 12:51:00 +0530
Subject: [PATCH] net/octeontx2: fix MTU when PTP is enabled
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]
Update MTU value based on PTP enable status and reserve eight
bytes in TX path to accommodate VLAN tags.
If PTP is enabled maximum allowed MTU is 9200 otherwise it's 9208.
Fixes: b5dc3140448e ("net/octeontx2: support base PTP")
Signed-off-by: Hanumanth Reddy Pothula <hpothula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_ethdev_ops.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index f586e9ef59..99ddcb0170 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -17,7 +17,8 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
struct nix_frs_cfg *req;
int rc;
- frame_size += NIX_TIMESYNC_RX_OFFSET * otx2_ethdev_is_ptp_en(dev);
+ if (dev->configured && otx2_ethdev_is_ptp_en(dev))
+ frame_size += NIX_TIMESYNC_RX_OFFSET;
/* Check if MTU is within the allowed range */
if (frame_size < NIX_MIN_FRS || frame_size > NIX_MAX_FRS)
@@ -560,6 +561,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
devinfo->max_vfs = pci_dev->max_vfs;
devinfo->max_mtu = devinfo->max_rx_pktlen - NIX_L2_OVERHEAD;
devinfo->min_mtu = devinfo->min_rx_bufsize - NIX_L2_OVERHEAD;
+ if (dev->configured && otx2_ethdev_is_ptp_en(dev)) {
+ devinfo->max_mtu -= NIX_TIMESYNC_RX_OFFSET;
+ devinfo->min_mtu -= NIX_TIMESYNC_RX_OFFSET;
+ devinfo->max_rx_pktlen -= NIX_TIMESYNC_RX_OFFSET;
+ }
devinfo->rx_offload_capa = dev->rx_offload_capa;
devinfo->tx_offload_capa = dev->tx_offload_capa;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.630227413 +0800
+++ 0057-net-octeontx2-fix-MTU-when-PTP-is-enabled.patch 2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 Mon Sep 17 00:00:00 2001
+From c7afc9980446a742d86fbf758d635f7c4b96a03b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5a4501208e..552e6bd43d 100644
+index f586e9ef59..99ddcb0170 100644
@@ -34 +36 @@
-@@ -547,6 +548,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
+@@ -560,6 +561,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix mbuf leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (56 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e: fix device startup resource release' " Xueming Li
` (194 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/30fcdc4f505bc16ecfd36ab72f9980f33967c119
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 30fcdc4f505bc16ecfd36ab72f9980f33967c119 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 23 Aug 2021 09:50:34 +0800
Subject: [PATCH] net/i40e: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4b458675d3df13d1a35db959fe97a04a132788b2 ]
A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 0e5293fc94..154f649b45 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2488,6 +2488,10 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)
#endif /* RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC */
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+
+ if (rxq->pkt_first_seg != NULL)
+ rte_pktmbuf_free(rxq->pkt_first_seg);
+
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.673186500 +0800
+++ 0058-net-i40e-fix-mbuf-leak.patch 2021-11-10 14:17:01.810746582 +0800
@@ -1 +1 @@
-From 4b458675d3df13d1a35db959fe97a04a132788b2 Mon Sep 17 00:00:00 2001
+From 30fcdc4f505bc16ecfd36ab72f9980f33967c119 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4b458675d3df13d1a35db959fe97a04a132788b2 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 8329cbdd4e..3eb82578b0 100644
+index 0e5293fc94..154f649b45 100644
@@ -26 +28 @@
-@@ -2590,6 +2590,10 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)
+@@ -2488,6 +2488,10 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix device startup resource release' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (57 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e: fix mbuf leak' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' " Xueming Li
` (193 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4fc96ab6c9d3d17054758a9c6ceaf3013043c75f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 4fc96ab6c9d3d17054758a9c6ceaf3013043c75f Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 21 Aug 2021 17:44:35 +0800
Subject: [PATCH] net/i40e: fix device startup resource release
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit daf3332e11ed7ad6cc12e0aa69cbb8b602bc5685 ]
In the eth_i40e_dev_init function, the tunnel and ethertype hash table
resource release interface should be rte_hash_free instead of rte_free,
and the previously registered interrupt handling function also needs to
be removed from the interrupt list. The patch is amended to use the
correct interface to release the hash table resource and release the
interrupt handling function at the same time.
Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5e3b80a6b8..a364338564 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1817,12 +1817,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
return 0;
err_init_fdir_filter_list:
- rte_free(pf->tunnel.hash_table);
+ rte_hash_free(pf->tunnel.hash_table);
rte_free(pf->tunnel.hash_map);
err_init_tunnel_filter_list:
- rte_free(pf->ethertype.hash_table);
+ rte_hash_free(pf->ethertype.hash_table);
rte_free(pf->ethertype.hash_map);
err_init_ethtype_filter_list:
+ rte_intr_callback_unregister(intr_handle,
+ i40e_dev_interrupt_handler, dev);
rte_free(dev->data->mac_addrs);
dev->data->mac_addrs = NULL;
err_mac_alloc:
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.720591875 +0800
+++ 0059-net-i40e-fix-device-startup-resource-release.patch 2021-11-10 14:17:01.817413194 +0800
@@ -1 +1 @@
-From daf3332e11ed7ad6cc12e0aa69cbb8b602bc5685 Mon Sep 17 00:00:00 2001
+From 4fc96ab6c9d3d17054758a9c6ceaf3013043c75f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit daf3332e11ed7ad6cc12e0aa69cbb8b602bc5685 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 7b230e2ed1..7a2a8281d2 100644
+index 5e3b80a6b8..a364338564 100644
@@ -27 +29 @@
-@@ -1760,12 +1760,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1817,12 +1817,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (58 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e: fix device startup resource release' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
` (192 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/af659df64ec34bbf534d7c6bb68ac15acf32b297
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From af659df64ec34bbf534d7c6bb68ac15acf32b297 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Mon, 13 Sep 2021 10:40:02 +0800
Subject: [PATCH] net/ice/base: fix PF ID for DCF
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit f979702337c69c7b73a78a10cbfb700c74b3b508 ]
In original implementation, if DCF is created on PF1, the PF ID is
still 0, but not 1. Without the right PF ID, the ACL will not work.
This patch makes VF to get its parent's physical function ID.
Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/base/ice_switch.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index e6ea04183f..95400dd315 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -2936,6 +2936,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
ICE_AQC_GET_SW_CONF_RESP_TYPE_S);
switch (res_type) {
+ case ICE_AQC_GET_SW_CONF_RESP_VSI:
+ if (hw->dcf_enabled && !is_vf)
+ hw->pf_id = pf_vf_num;
+ break;
case ICE_AQC_GET_SW_CONF_RESP_PHYS_PORT:
case ICE_AQC_GET_SW_CONF_RESP_VIRT_PORT:
if (j == num_total_ports) {
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.768425534 +0800
+++ 0060-net-ice-base-fix-PF-ID-for-DCF.patch 2021-11-10 14:17:01.820746500 +0800
@@ -1 +1 @@
-From f979702337c69c7b73a78a10cbfb700c74b3b508 Mon Sep 17 00:00:00 2001
+From af659df64ec34bbf534d7c6bb68ac15acf32b297 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f979702337c69c7b73a78a10cbfb700c74b3b508 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9179f66c20..93cd79e8ef 100644
+index e6ea04183f..95400dd315 100644
@@ -24 +26 @@
-@@ -3471,6 +3471,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
+@@ -2936,6 +2936,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix mbuf leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (59 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e/base: fix resource leakage' " Xueming Li
` (191 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/012f9cfceb42f1f6c7978dbab893844865590aac
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 012f9cfceb42f1f6c7978dbab893844865590aac Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 11 Sep 2021 09:47:09 +0800
Subject: [PATCH] net/iavf: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a38df1edd6324f922ca46a043e87b2489f7bc17e ]
A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index e1108af7a9..248e3df03b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -192,6 +192,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+
+ if (rxq->pkt_first_seg != NULL)
+ rte_pktmbuf_free(rxq->pkt_first_seg);
+
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
rxq->rxrearm_nb = 0;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.814584567 +0800
+++ 0061-net-iavf-fix-mbuf-leak.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From a38df1edd6324f922ca46a043e87b2489f7bc17e Mon Sep 17 00:00:00 2001
+From 012f9cfceb42f1f6c7978dbab893844865590aac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a38df1edd6324f922ca46a043e87b2489f7bc17e ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index e33fe4576b..7240e70f9e 100644
+index e1108af7a9..248e3df03b 100644
@@ -26 +28 @@
-@@ -225,6 +225,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
+@@ -192,6 +192,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix resource leakage' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (60 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' " Xueming Li
` (190 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/64734ba6e234485e337ac2a3684fdf937ec64d28
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 64734ba6e234485e337ac2a3684fdf937ec64d28 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 21 Aug 2021 14:30:08 +0800
Subject: [PATCH] net/i40e/base: fix resource leakage
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 ]
In the i40e_init_arq function, when the i40e_config_arq_regs function
returns from processing failure, the previously applied arq_bufs resource
is not released, which leads to leakage.
The patch is processed in the same way as the i40e_init_asq function,
maintaining a unified coding style.
Fixes: 49ea51605be4 ("net/i40e/base: gracefully clean the resources")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 0da45f03e4..235667d57a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -468,7 +468,7 @@ enum i40e_status_code i40e_init_arq(struct i40e_hw *hw)
/* initialize base registers */
ret_code = i40e_config_arq_regs(hw);
if (ret_code != I40E_SUCCESS)
- goto init_adminq_free_rings;
+ goto init_config_regs;
/* success! */
hw->aq.arq.count = hw->aq.num_arq_entries;
@@ -476,6 +476,10 @@ enum i40e_status_code i40e_init_arq(struct i40e_hw *hw)
init_adminq_free_rings:
i40e_free_adminq_arq(hw);
+ return ret_code;
+
+init_config_regs:
+ i40e_free_arq_bufs(hw);
init_adminq_exit:
return ret_code;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.855993663 +0800
+++ 0062-net-i40e-base-fix-resource-leakage.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 Mon Sep 17 00:00:00 2001
+From 64734ba6e234485e337ac2a3684fdf937ec64d28 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (61 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e/base: fix resource leakage' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' " Xueming Li
` (189 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/88719f1273a4bc3aada347a97dc87e8e1637f6ee
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 88719f1273a4bc3aada347a97dc87e8e1637f6ee Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 11 Sep 2021 10:07:56 +0800
Subject: [PATCH] net/iavf: fix Rx queue buffer size alignment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ]
The RTE_ALIGN macro is aligned upwards. If the buf_size variable is not
aligned with 1 << I40E_RXQ_CTX_DBUFF_SHIFT, the rx_buf_len is larger than
the actual mbuf memory after the operation. When receiving the packet, if
the packet is larger than the configured buf_size, it will cause a memory
stepping event.
The patch uses the RTE_ALIGN_FLOOR down alignment macro to correct the
problem.
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 248e3df03b..b0e86f022b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -560,7 +560,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
rxq->vsi = vsi;
len = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
- rxq->rx_buf_len = RTE_ALIGN(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT));
+ rxq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT));
/* Allocate the software ring. */
len = nb_desc + IAVF_RX_MAX_BURST;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.896631253 +0800
+++ 0063-net-iavf-fix-Rx-queue-buffer-size-alignment.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From c9c45beb1b97eed3fbf05095e376823fc58c9aa7 Mon Sep 17 00:00:00 2001
+From 88719f1273a4bc3aada347a97dc87e8e1637f6ee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 7240e70f9e..6de8ad3fe3 100644
+index 248e3df03b..b0e86f022b 100644
@@ -28,2 +30,2 @@
-@@ -619,7 +619,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
- rxq->crc_len = 0;
+@@ -560,7 +560,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+ rxq->vsi = vsi;
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (62 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
` (188 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ben Pfaff; +Cc: Luca Boccassi, David Marchand, Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d593c0569e90e31b105cebf7444236279baf6ac5
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d593c0569e90e31b105cebf7444236279baf6ac5 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@ovn.org>
Date: Mon, 13 Sep 2021 11:46:43 -0700
Subject: [PATCH] doc: fix numbers power of 2 in LPM6 guide
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e0ad8d2bdafcd74eb960bf96507fed11cc97d58c ]
Fixes: fc1f2750a3ec ("doc: programmers guide")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
doc/guides/prog_guide/lpm6_lib.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guides/prog_guide/lpm6_lib.rst b/doc/guides/prog_guide/lpm6_lib.rst
index d1aea91ca9..8425d14805 100644
--- a/doc/guides/prog_guide/lpm6_lib.rst
+++ b/doc/guides/prog_guide/lpm6_lib.rst
@@ -64,9 +64,9 @@ that are most commonly used in IPv6.
The main data structure is built using the following elements:
-* A table with 224 entries
+* A table with 2^24 entries
-* A number of tables, configurable by the user through the API, with 28 entries
+* A number of tables, configurable by the user through the API, with 2^8 entries
The first table, called tbl24, is indexed using the first 24 bits of the IP address be looked up,
while the rest of the tables, called tbl8s,
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.938858967 +0800
+++ 0064-doc-fix-numbers-power-of-2-in-LPM6-guide.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From e0ad8d2bdafcd74eb960bf96507fed11cc97d58c Mon Sep 17 00:00:00 2001
+From d593c0569e90e31b105cebf7444236279baf6ac5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e0ad8d2bdafcd74eb960bf96507fed11cc97d58c ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (63 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' " Xueming Li
` (187 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Pallavi Kadam; +Cc: Luca Boccassi, Vipin Varghese, Tal Shnaiderman, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2a5a4216585632e05be9ddfcd55bc7b9d98e7d39
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2a5a4216585632e05be9ddfcd55bc7b9d98e7d39 Mon Sep 17 00:00:00 2001
From: Pallavi Kadam <pallavi.kadam@intel.com>
Date: Wed, 22 Sep 2021 14:19:06 -0700
Subject: [PATCH] bus/pci: fix unknown NUMA node value on Windows
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit bf7cf1f947bd18aa1b9673ea4188a5802741d05a ]
On older CPUs, currently numa_node returns value only for socket 0.
Instead, application should be able to make correct decision and
also to keep consistent with the Linux code,
replace the return value to -1.
Fixes: ac7c98d04f2c ("bus/pci: ignore missing NUMA node on Windows")
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
drivers/bus/pci/windows/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index ad9d65efd8..12a46ae370 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -5,6 +5,7 @@
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_eal.h>
+#include <rte_memory.h>
#include "private.h"
#include "pci_netuio.h"
@@ -240,7 +241,7 @@ get_device_resource_info(HDEVINFO dev_info,
DWORD error = GetLastError();
if (error == ERROR_NOT_FOUND) {
/* On older CPUs, NUMA is not bound to PCIe locality. */
- dev->device.numa_node = 0;
+ dev->device.numa_node = SOCKET_ID_ANY;
return ERROR_SUCCESS;
}
RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:04.979479110 +0800
+++ 0065-bus-pci-fix-unknown-NUMA-node-value-on-Windows.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From bf7cf1f947bd18aa1b9673ea4188a5802741d05a Mon Sep 17 00:00:00 2001
+From 2a5a4216585632e05be9ddfcd55bc7b9d98e7d39 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bf7cf1f947bd18aa1b9673ea4188a5802741d05a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d39a7748b8..343ef6f33b 100644
+index ad9d65efd8..12a46ae370 100644
@@ -33 +35 @@
-@@ -243,7 +244,7 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -240,7 +241,7 @@ get_device_resource_info(HDEVINFO dev_info,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (64 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' " Xueming Li
` (186 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Xueming Li; +Cc: Luca Boccassi, Kevin Traynor, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 23 Sep 2021 16:11:21 +0800
Subject: [PATCH] sched: get 64-bit greatest common divisor
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit eb5636e879a568a323cbed4c356162011e7312be ]
This patch adds new function that compute the greatest common
divisor of 64 bits, also changes the original 32 bits function
to call this new 64-bit version.
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
lib/librte_sched/rte_sched_common.h | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/librte_sched/rte_sched_common.h b/lib/librte_sched/rte_sched_common.h
index 96706df7bd..e4cbbd9077 100644
--- a/lib/librte_sched/rte_sched_common.h
+++ b/lib/librte_sched/rte_sched_common.h
@@ -51,10 +51,10 @@ rte_min_pos_4_u16(uint16_t *x)
* gcd(a, b) = gcd(b, a mod b)
*
*/
-static inline uint32_t
-rte_get_gcd(uint32_t a, uint32_t b)
+static inline uint64_t
+rte_get_gcd64(uint64_t a, uint64_t b)
{
- uint32_t c;
+ uint64_t c;
if (a == 0)
return b;
@@ -76,6 +76,15 @@ rte_get_gcd(uint32_t a, uint32_t b)
return a;
}
+/*
+ * 32-bit version of Greatest Common Divisor (GCD).
+ */
+static inline uint32_t
+rte_get_gcd(uint32_t a, uint32_t b)
+{
+ return rte_get_gcd64(a, b);
+}
+
/*
* Compute the Lowest Common Denominator (LCD) of two numbers.
* This implementation computes GCD first:
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.019503122 +0800
+++ 0066-sched-get-64-bit-greatest-common-divisor.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From eb5636e879a568a323cbed4c356162011e7312be Mon Sep 17 00:00:00 2001
+From bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eb5636e879a568a323cbed4c356162011e7312be ]
@@ -10,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -15 +16 @@
- lib/sched/rte_sched_common.h | 15 ++++++++++++---
+ lib/librte_sched/rte_sched_common.h | 15 ++++++++++++---
@@ -18 +19 @@
-diff --git a/lib/sched/rte_sched_common.h b/lib/sched/rte_sched_common.h
+diff --git a/lib/librte_sched/rte_sched_common.h b/lib/librte_sched/rte_sched_common.h
@@ -20,2 +21,2 @@
---- a/lib/sched/rte_sched_common.h
-+++ b/lib/sched/rte_sched_common.h
+--- a/lib/librte_sched/rte_sched_common.h
++++ b/lib/librte_sched/rte_sched_common.h
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (65 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'stack: fix reload head when pop fails' " Xueming Li
` (185 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Xueming Li; +Cc: Luca Boccassi, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6f7c9fde7173f84c2a245acac1b71bf941b217f8
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 6f7c9fde7173f84c2a245acac1b71bf941b217f8 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 23 Sep 2021 16:11:22 +0800
Subject: [PATCH] vdpa/mlx5: fix large VM memory region registration
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6e914454d5083046497bbd764ff5ae1547e8c6b1 ]
When VM size is larger than 4G (u32) and memory region is larger than 4G,
the 32-bit GCD function overflowed and returned wrong value
that resulted in memory registration failure.
This patch calls 64-bit GCD function to avoid overflow.
Fixes: cc07a42da250 ("vdpa/mlx5: prepare memory regions")
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
index f8861d5d26..c5ab652a6b 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
@@ -103,15 +103,15 @@ mlx5_vdpa_vhost_mem_regions_prepare(int vid, uint8_t *mode, uint64_t *mem_size,
size = mem->regions[i].guest_phys_addr -
(mem->regions[i - 1].guest_phys_addr +
mem->regions[i - 1].size);
- *gcd = rte_get_gcd(*gcd, size);
+ *gcd = rte_get_gcd64(*gcd, size);
klm_entries_num += KLM_NUM_MAX_ALIGN(size);
}
size = mem->regions[i].size;
- *gcd = rte_get_gcd(*gcd, size);
+ *gcd = rte_get_gcd64(*gcd, size);
klm_entries_num += KLM_NUM_MAX_ALIGN(size);
}
if (*gcd > MLX5_MAX_KLM_BYTE_COUNT)
- *gcd = rte_get_gcd(*gcd, MLX5_MAX_KLM_BYTE_COUNT);
+ *gcd = rte_get_gcd64(*gcd, MLX5_MAX_KLM_BYTE_COUNT);
if (!RTE_IS_POWER_OF_2(*gcd)) {
uint64_t candidate_gcd = rte_align64prevpow2(*gcd);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.060201766 +0800
+++ 0067-vdpa-mlx5-fix-large-VM-memory-region-registration.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 6e914454d5083046497bbd764ff5ae1547e8c6b1 Mon Sep 17 00:00:00 2001
+From 6f7c9fde7173f84c2a245acac1b71bf941b217f8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6e914454d5083046497bbd764ff5ae1547e8c6b1 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 59ce4e891c..a06681b494 100644
+index f8861d5d26..c5ab652a6b 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'stack: fix reload head when pop fails' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (66 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' " Xueming Li
` (184 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Julien Meunier; +Cc: Luca Boccassi, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e78d085e36db1df8a90bb3e87fdeca69bd4b85a4
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Tue, 21 Sep 2021 18:17:24 +0200
Subject: [PATCH] stack: fix reload head when pop fails
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ]
The previous commit 18effad9cfa7 ("stack: reload head when pop fails")
only changed C11 implementation, not generic implementation.
List head must be loaded right before continue (when failed to find the
new head). Without this, one thread might keep trying and failing to pop
items without ever loading the new correct head.
Fixes: 3340202f5954 ("stack: add lock-free implementation")
Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_stack/rte_stack_lf_generic.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
index 4850a05ee7..7fa29cedb2 100644
--- a/lib/librte_stack/rte_stack_lf_generic.h
+++ b/lib/librte_stack/rte_stack_lf_generic.h
@@ -128,8 +128,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
/* If NULL was encountered, the list was modified while
* traversing it. Retry.
*/
- if (i != num)
+ if (i != num) {
+ old_head = list->head;
continue;
+ }
new_head.top = tmp;
new_head.cnt = old_head.cnt + 1;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.100432366 +0800
+++ 0068-stack-fix-reload-head-when-pop-fails.patch 2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 6ded44bce4d3e5f4fce66f00ce0638ebc866911f Mon Sep 17 00:00:00 2001
+From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/stack/rte_stack_lf_generic.h | 4 +++-
+ lib/librte_stack/rte_stack_lf_generic.h | 4 +++-
@@ -22 +24 @@
-diff --git a/lib/stack/rte_stack_lf_generic.h b/lib/stack/rte_stack_lf_generic.h
+diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
@@ -24,2 +26,2 @@
---- a/lib/stack/rte_stack_lf_generic.h
-+++ b/lib/stack/rte_stack_lf_generic.h
+--- a/lib/librte_stack/rte_stack_lf_generic.h
++++ b/lib/librte_stack/rte_stack_lf_generic.h
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (67 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'stack: fix reload head when pop fails' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'test/compress: fix buffer overflow' " Xueming Li
` (183 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8f07dfbc181609e27ea5f4eab74660b345277890
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8f07dfbc181609e27ea5f4eab74660b345277890 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Thu, 16 Sep 2021 11:37:51 +0530
Subject: [PATCH] examples/ipsec-secgw: fix parsing of flow queue
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 8131b7eb5041d481c74318bff3cafa8905ac3558 ]
Documentation specifies that flow port & queue is provided as,
<...> port 0 queue 0
But code is expecting the same as,
<...> port 0 0
Fix the above to match documentation.
Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/ipsec-secgw/flow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/ipsec-secgw/flow.c b/examples/ipsec-secgw/flow.c
index 69f8405d15..1a1ec7861c 100644
--- a/examples/ipsec-secgw/flow.c
+++ b/examples/ipsec-secgw/flow.c
@@ -188,7 +188,9 @@ parse_flow_tokens(char **tokens, uint32_t n_tokens,
return;
rule->port = atoi(tokens[ti]);
+ }
+ if (strcmp(tokens[ti], "queue") == 0) {
INCREMENT_TOKEN_INDEX(ti, n_tokens, status);
if (status->status < 0)
return;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.140997234 +0800
+++ 0069-examples-ipsec-secgw-fix-parsing-of-flow-queue.patch 2021-11-10 14:17:01.827413112 +0800
@@ -1 +1 @@
-From 8131b7eb5041d481c74318bff3cafa8905ac3558 Mon Sep 17 00:00:00 2001
+From 8f07dfbc181609e27ea5f4eab74660b345277890 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8131b7eb5041d481c74318bff3cafa8905ac3558 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/compress: fix buffer overflow' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (68 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' " Xueming Li
` (182 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Rebecca Troy; +Cc: Luca Boccassi, Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/25533b38a694b9fee04712a766b56014f5c84161
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 25533b38a694b9fee04712a766b56014f5c84161 Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Fri, 17 Sep 2021 15:12:07 +0000
Subject: [PATCH] test/compress: fix buffer overflow
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 96fe84f42a361382b89f462873edae7c1236c303 ]
Fixes stack buffer overflow bug in compressdev autotest, which
was caused by the use of buf_idx in the debug logs. Originally, buf_idx
was treated as an array instead of the reference of an integer.
This was fixed by replacing the use of buf_idx[priv_data->orig_idx] with
the variable i.
Fixes: 466a2c4bb5f4 ("test/compress: improve debug logs")
Fixes: 6bbc5a923625 ("test/compress: refactor unit tests")
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
app/test/test_compressdev.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
index 0571c17ecb..a1b9f06250 100644
--- a/app/test/test_compressdev.c
+++ b/app/test/test_compressdev.c
@@ -1411,7 +1411,6 @@ test_deflate_comp_finalize(const struct interim_data_params *int_data,
/* from int_data: */
unsigned int num_xforms = int_data->num_xforms;
struct rte_comp_xform **compress_xforms = int_data->compress_xforms;
- uint16_t *buf_idx = int_data->buf_idx;
unsigned int num_bufs = int_data->num_bufs;
/* from test_priv_data: */
@@ -1442,7 +1441,7 @@ test_deflate_comp_finalize(const struct interim_data_params *int_data,
RTE_LOG(DEBUG, USER1, "Buffer %u compressed by %s from %u to"
" %u bytes (level = %d, huffman = %s)\n",
- buf_idx[priv_data->orig_idx], engine,
+ i, engine,
ops_processed[i]->consumed, ops_processed[i]->produced,
compress_xform->level,
huffman_type_strings[huffman_type]);
@@ -1734,7 +1733,6 @@ test_deflate_decomp_finalize(const struct interim_data_params *int_data,
static unsigned int step;
/* from int_data: */
- uint16_t *buf_idx = int_data->buf_idx;
unsigned int num_bufs = int_data->num_bufs;
const char * const *test_bufs = int_data->test_bufs;
struct rte_comp_xform **compress_xforms = int_data->compress_xforms;
@@ -1766,7 +1764,7 @@ test_deflate_decomp_finalize(const struct interim_data_params *int_data,
strlcpy(engine, "pmd", sizeof(engine));
RTE_LOG(DEBUG, USER1,
"Buffer %u decompressed by %s from %u to %u bytes\n",
- buf_idx[priv_data->orig_idx], engine,
+ i, engine,
ops_processed[i]->consumed, ops_processed[i]->produced);
ops[i] = NULL;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.181382630 +0800
+++ 0070-test-compress-fix-buffer-overflow.patch 2021-11-10 14:17:01.827413112 +0800
@@ -1 +1 @@
-From 96fe84f42a361382b89f462873edae7c1236c303 Mon Sep 17 00:00:00 2001
+From 25533b38a694b9fee04712a766b56014f5c84161 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96fe84f42a361382b89f462873edae7c1236c303 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (69 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'test/compress: fix buffer overflow' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' " Xueming Li
` (181 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8532dae4d660e197c618399a1350d658cbc8c38b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8532dae4d660e197c618399a1350d658cbc8c38b Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 15 Sep 2021 13:08:02 +0800
Subject: [PATCH] net/bonding: fix memory leak on closing device
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ccf0f002d2ec5455102c0259f44535944aa4b154 ]
If the bond device was created by vdev mode, the kvlist was not free
after the bond device was closed.
This patch fixes it.
Fixes: 144dc4739975 ("net/bonding: fix leak on remove")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a1d3703e96..baa01b17e5 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2152,6 +2152,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
*/
rte_mempool_free(internals->mode6.mempool);
+ if (internals->kvlist != NULL)
+ rte_kvargs_free(internals->kvlist);
+
return 0;
}
@@ -3467,8 +3470,6 @@ bond_remove(struct rte_vdev_device *dev)
ret = bond_ethdev_stop(eth_dev);
bond_ethdev_close(eth_dev);
}
- if (internals->kvlist != NULL)
- rte_kvargs_free(internals->kvlist);
rte_eth_dev_release_port(eth_dev);
return ret;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.226143855 +0800
+++ 0071-net-bonding-fix-memory-leak-on-closing-device.patch 2021-11-10 14:17:01.830746418 +0800
@@ -1 +1 @@
-From ccf0f002d2ec5455102c0259f44535944aa4b154 Mon Sep 17 00:00:00 2001
+From 8532dae4d660e197c618399a1350d658cbc8c38b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ccf0f002d2ec5455102c0259f44535944aa4b154 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 8ed9e036f4..54987d96b3 100644
+index a1d3703e96..baa01b17e5 100644
@@ -24 +26 @@
-@@ -2159,6 +2159,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
+@@ -2152,6 +2152,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
@@ -34 +36 @@
-@@ -3471,8 +3474,6 @@ bond_remove(struct rte_vdev_device *dev)
+@@ -3467,8 +3470,6 @@ bond_remove(struct rte_vdev_device *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (70 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
` (180 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qi Zhang; +Cc: Luca Boccassi, Dan Nowlin, Junfeng Guo, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/60974c7c2c2e6b18c0dccd7a8e235718ac55e5e2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 60974c7c2c2e6b18c0dccd7a8e235718ac55e5e2 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 16 Sep 2021 17:52:53 +0800
Subject: [PATCH] net/ice/base: calculate logical PF ID
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3affa0ef2d4b229d69eb3dc50cf0540b33fbebe2 ]
In some devices, the function numbers used are non-contiguous. For
example, some two port devices will report as functions 0 and 2.
When distributing RSS and FDIR masks, which are global resources across
the active devices, it is required to have a contiguous PF id, which can
be described as a logical PF id. In the case above, function 0 would
have a logical PF id of 0, and function 2 would have a logical PF id of
1.
Using logical PF id can properly describe which slice of resources can
be used by a particular PF.
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
---
drivers/net/ice/base/ice_common.c | 19 +++++++++++++++++++
drivers/net/ice/base/ice_flex_pipe.c | 2 +-
drivers/net/ice/base/ice_type.h | 1 +
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index be33ee252d..2b53f78512 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -2017,6 +2017,23 @@ ice_parse_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p,
ice_recalc_port_limited_caps(hw, &func_p->common_cap);
}
+/**
+ * ice_func_id_to_logical_id - map from function id to logical pf id
+ * @active_function_bitmap: active function bitmap
+ * @pf_id: function number of device
+ */
+static int ice_func_id_to_logical_id(u32 active_function_bitmap, u8 pf_id)
+{
+ u8 logical_id = 0;
+ u8 i;
+
+ for (i = 0; i < pf_id; i++)
+ if (active_function_bitmap & BIT(i))
+ logical_id++;
+
+ return logical_id;
+}
+
/**
* ice_parse_valid_functions_cap - Parse ICE_AQC_CAPS_VALID_FUNCTIONS caps
* @hw: pointer to the HW struct
@@ -2034,6 +2051,8 @@ ice_parse_valid_functions_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
dev_p->num_funcs = ice_hweight32(number);
ice_debug(hw, ICE_DBG_INIT, "dev caps: num_funcs = %d\n",
dev_p->num_funcs);
+
+ hw->logical_pf_id = ice_func_id_to_logical_id(number, hw->pf_id);
}
/**
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index d74fecbf5b..42eda0b4b4 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
per_pf = ICE_PROF_MASK_COUNT / hw->dev_caps.num_funcs;
hw->blk[blk].masks.count = per_pf;
- hw->blk[blk].masks.first = hw->pf_id * per_pf;
+ hw->blk[blk].masks.first = hw->logical_pf_id * per_pf;
ice_memset(hw->blk[blk].masks.masks, 0,
sizeof(hw->blk[blk].masks.masks), ICE_NONDMA_MEM);
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index 6b8d44f0b4..1aae9fe721 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -864,6 +864,7 @@ struct ice_hw {
u8 revision_id;
u8 pf_id; /* device profile info */
+ u8 logical_pf_id;
u16 max_burst_size; /* driver sets this value */
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.270966334 +0800
+++ 0072-net-ice-base-calculate-logical-PF-ID.patch 2021-11-10 14:17:01.834079724 +0800
@@ -1 +1 @@
-From 3affa0ef2d4b229d69eb3dc50cf0540b33fbebe2 Mon Sep 17 00:00:00 2001
+From 60974c7c2c2e6b18c0dccd7a8e235718ac55e5e2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3affa0ef2d4b229d69eb3dc50cf0540b33fbebe2 ]
@@ -18,2 +20,0 @@
-Cc: stable@dpdk.org
-
@@ -30 +31 @@
-index 641859f752..6004c95625 100644
+index be33ee252d..2b53f78512 100644
@@ -33 +34 @@
-@@ -2535,6 +2535,23 @@ ice_parse_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p,
+@@ -2017,6 +2017,23 @@ ice_parse_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p,
@@ -57 +58 @@
-@@ -2552,6 +2569,8 @@ ice_parse_valid_functions_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
+@@ -2034,6 +2051,8 @@ ice_parse_valid_functions_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
@@ -67 +68 @@
-index fd98b3837d..8a6fc8a9a5 100644
+index d74fecbf5b..42eda0b4b4 100644
@@ -70 +71 @@
-@@ -3432,7 +3432,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
+@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
@@ -80 +81 @@
-index 56ee628f10..b1e03b10ff 100644
+index 6b8d44f0b4..1aae9fe721 100644
@@ -83 +84 @@
-@@ -1132,6 +1132,7 @@ struct ice_hw {
+@@ -864,6 +864,7 @@ struct ice_hw {
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix mbuf leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (71 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' " Xueming Li
` (179 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/474bbafd6f2d216f7d7a2a09e2e98200597f20ad
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 474bbafd6f2d216f7d7a2a09e2e98200597f20ad Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Thu, 16 Sep 2021 22:04:00 +0800
Subject: [PATCH] net/iavf: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 1028e5bc36b4dd4ae51580eb3e45410b6c82e153 ]
In the iavf_dev_rx_queue_start function, if the iavf_switch_queue
or iavf_switch_queue_lv function fails, the previously applied mbuf
is not released, resulting in leakage. The patch fixes the problem.
Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index b0e86f022b..b475aa0cc5 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -245,11 +245,15 @@ alloc_rxq_mbufs(struct iavf_rx_queue *rxq)
volatile union iavf_rx_desc *rxd;
struct rte_mbuf *mbuf = NULL;
uint64_t dma_addr;
- uint16_t i;
+ uint16_t i, j;
for (i = 0; i < rxq->nb_rx_desc; i++) {
mbuf = rte_mbuf_raw_alloc(rxq->mp);
if (unlikely(!mbuf)) {
+ for (j = 0; j < i; j++) {
+ rte_pktmbuf_free_seg(rxq->sw_ring[j]);
+ rxq->sw_ring[j] = NULL;
+ }
PMD_DRV_LOG(ERR, "Failed to allocate mbuf for RX");
return -ENOMEM;
}
@@ -757,12 +761,14 @@ iavf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
else
err = iavf_switch_queue_lv(adapter, rx_queue_id, true, true);
- if (err)
+ if (err) {
+ release_rxq_mbufs(rxq);
PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
rx_queue_id);
- else
+ } else {
dev->data->rx_queue_state[rx_queue_id] =
RTE_ETH_QUEUE_STATE_STARTED;
+ }
return err;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.321815673 +0800
+++ 0073-net-iavf-fix-mbuf-leak.patch 2021-11-10 14:17:01.837413030 +0800
@@ -1 +1 @@
-From 1028e5bc36b4dd4ae51580eb3e45410b6c82e153 Mon Sep 17 00:00:00 2001
+From 474bbafd6f2d216f7d7a2a09e2e98200597f20ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1028e5bc36b4dd4ae51580eb3e45410b6c82e153 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 6de8ad3fe3..87afc0b4cb 100644
+index b0e86f022b..b475aa0cc5 100644
@@ -23 +25 @@
-@@ -278,11 +278,15 @@ alloc_rxq_mbufs(struct iavf_rx_queue *rxq)
+@@ -245,11 +245,15 @@ alloc_rxq_mbufs(struct iavf_rx_queue *rxq)
@@ -40 +42 @@
-@@ -852,12 +856,14 @@ iavf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -757,12 +761,14 @@ iavf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (72 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' " Xueming Li
` (178 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Harman Kalra; +Cc: Luca Boccassi, David George, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4649ead943c2a16ced41cde27e9354eae57ded79
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 4649ead943c2a16ced41cde27e9354eae57ded79 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 20 Sep 2021 20:19:25 +0530
Subject: [PATCH] net/octeontx: fix access to indirect buffers
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9eb5cb3b11cc97e8e0c61ee216bd586b4793335f ]
Issue has been observed where fields of indirect buffers are
accessed after being set free by the diver. Also fixing freeing
of direct buffers to correct aura.
Fixes: 5cbe184802aa ("net/octeontx: support fast mbuf free")
Signed-off-by: David George <david.george@sophos.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx/octeontx_rxtx.h | 69 ++++++++++++++++++----------
1 file changed, 46 insertions(+), 23 deletions(-)
diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h
index 7c24d8b4fd..dde0d6277b 100644
--- a/drivers/net/octeontx/octeontx_rxtx.h
+++ b/drivers/net/octeontx/octeontx_rxtx.h
@@ -161,7 +161,7 @@ ptype_table[PTYPE_SIZE][PTYPE_SIZE][PTYPE_SIZE] = {
static __rte_always_inline uint64_t
-octeontx_pktmbuf_detach(struct rte_mbuf *m)
+octeontx_pktmbuf_detach(struct rte_mbuf *m, struct rte_mbuf **m_tofree)
{
struct rte_mempool *mp = m->pool;
uint32_t mbuf_size, buf_len;
@@ -171,6 +171,8 @@ octeontx_pktmbuf_detach(struct rte_mbuf *m)
/* Update refcount of direct mbuf */
md = rte_mbuf_from_indirect(m);
+ /* The real data will be in the direct buffer, inform callers this */
+ *m_tofree = md;
refcount = rte_mbuf_refcnt_update(md, -1);
priv_size = rte_pktmbuf_priv_size(mp);
@@ -203,18 +205,18 @@ octeontx_pktmbuf_detach(struct rte_mbuf *m)
}
static __rte_always_inline uint64_t
-octeontx_prefree_seg(struct rte_mbuf *m)
+octeontx_prefree_seg(struct rte_mbuf *m, struct rte_mbuf **m_tofree)
{
if (likely(rte_mbuf_refcnt_read(m) == 1)) {
if (!RTE_MBUF_DIRECT(m))
- return octeontx_pktmbuf_detach(m);
+ return octeontx_pktmbuf_detach(m, m_tofree);
m->next = NULL;
m->nb_segs = 1;
return 0;
} else if (rte_mbuf_refcnt_update(m, -1) == 0) {
if (!RTE_MBUF_DIRECT(m))
- return octeontx_pktmbuf_detach(m);
+ return octeontx_pktmbuf_detach(m, m_tofree);
rte_mbuf_refcnt_set(m, 1);
m->next = NULL;
@@ -315,6 +317,14 @@ __octeontx_xmit_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
const uint16_t flag)
{
uint16_t gaura_id, nb_desc = 0;
+ struct rte_mbuf *m_tofree;
+ rte_iova_t iova;
+ uint16_t data_len;
+
+ m_tofree = tx_pkt;
+
+ data_len = tx_pkt->data_len;
+ iova = rte_mbuf_data_iova(tx_pkt);
/* Setup PKO_SEND_HDR_S */
cmd_buf[nb_desc++] = tx_pkt->data_len & 0xffff;
@@ -329,22 +339,23 @@ __octeontx_xmit_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
* not, as SG_DESC[I] and SEND_HDR[II] are clear.
*/
if (flag & OCCTX_TX_OFFLOAD_MBUF_NOFF_F)
- cmd_buf[0] |= (octeontx_prefree_seg(tx_pkt) <<
+ cmd_buf[0] |= (octeontx_prefree_seg(tx_pkt, &m_tofree) <<
58);
/* Mark mempool object as "put" since it is freed by PKO */
if (!(cmd_buf[0] & (1ULL << 58)))
- __mempool_check_cookies(tx_pkt->pool, (void **)&tx_pkt,
+ __mempool_check_cookies(m_tofree->pool, (void **)&m_tofree,
1, 0);
/* Get the gaura Id */
- gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)tx_pkt->pool->pool_id);
+ gaura_id =
+ octeontx_fpa_bufpool_gaura((uintptr_t)m_tofree->pool->pool_id);
/* Setup PKO_SEND_BUFLINK_S */
cmd_buf[nb_desc++] = PKO_SEND_BUFLINK_SUBDC |
PKO_SEND_BUFLINK_LDTYPE(0x1ull) |
PKO_SEND_BUFLINK_GAUAR((long)gaura_id) |
- tx_pkt->data_len;
- cmd_buf[nb_desc++] = rte_mbuf_data_iova(tx_pkt);
+ data_len;
+ cmd_buf[nb_desc++] = iova;
return nb_desc;
}
@@ -355,7 +366,9 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
{
uint16_t nb_segs, nb_desc = 0;
uint16_t gaura_id, len = 0;
- struct rte_mbuf *m_next = NULL;
+ struct rte_mbuf *m_next = NULL, *m_tofree;
+ rte_iova_t iova;
+ uint16_t data_len;
nb_segs = tx_pkt->nb_segs;
/* Setup PKO_SEND_HDR_S */
@@ -369,40 +382,50 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
do {
m_next = tx_pkt->next;
- /* To handle case where mbufs belong to diff pools, like
- * fragmentation
+ /* Get TX parameters up front, octeontx_prefree_seg might change
+ * them
*/
- gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)
- tx_pkt->pool->pool_id);
+ m_tofree = tx_pkt;
+ data_len = tx_pkt->data_len;
+ iova = rte_mbuf_data_iova(tx_pkt);
/* Setup PKO_SEND_GATHER_S */
- cmd_buf[nb_desc] = PKO_SEND_GATHER_SUBDC |
- PKO_SEND_GATHER_LDTYPE(0x1ull) |
- PKO_SEND_GATHER_GAUAR((long)gaura_id) |
- tx_pkt->data_len;
+ cmd_buf[nb_desc] = 0;
/* SG_DESC[I] bit controls if buffer is to be freed or
* not, as SEND_HDR[DF] and SEND_HDR[II] are clear.
*/
if (flag & OCCTX_TX_OFFLOAD_MBUF_NOFF_F) {
cmd_buf[nb_desc] |=
- (octeontx_prefree_seg(tx_pkt) << 57);
+ (octeontx_prefree_seg(tx_pkt, &m_tofree) << 57);
}
+ /* To handle case where mbufs belong to diff pools, like
+ * fragmentation
+ */
+ gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)
+ m_tofree->pool->pool_id);
+
+ /* Setup PKO_SEND_GATHER_S */
+ cmd_buf[nb_desc] |= PKO_SEND_GATHER_SUBDC |
+ PKO_SEND_GATHER_LDTYPE(0x1ull) |
+ PKO_SEND_GATHER_GAUAR((long)gaura_id) |
+ data_len;
+
/* Mark mempool object as "put" since it is freed by
* PKO.
*/
if (!(cmd_buf[nb_desc] & (1ULL << 57))) {
tx_pkt->next = NULL;
- __mempool_check_cookies(tx_pkt->pool,
- (void **)&tx_pkt, 1, 0);
+ __mempool_check_cookies(m_tofree->pool,
+ (void **)&m_tofree, 1, 0);
}
nb_desc++;
- cmd_buf[nb_desc++] = rte_mbuf_data_iova(tx_pkt);
+ cmd_buf[nb_desc++] = iova;
nb_segs--;
- len += tx_pkt->data_len;
+ len += data_len;
tx_pkt = m_next;
} while (nb_segs);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.365018094 +0800
+++ 0074-net-octeontx-fix-access-to-indirect-buffers.patch 2021-11-10 14:17:01.837413030 +0800
@@ -1 +1 @@
-From 9eb5cb3b11cc97e8e0c61ee216bd586b4793335f Mon Sep 17 00:00:00 2001
+From 4649ead943c2a16ced41cde27e9354eae57ded79 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9eb5cb3b11cc97e8e0c61ee216bd586b4793335f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 2ed28ea563..e0723ac26a 100644
+index 7c24d8b4fd..dde0d6277b 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (73 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' " Xueming Li
` (177 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5d3374aff1b527d7421339ec1c1017e82ee63400
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 5d3374aff1b527d7421339ec1c1017e82ee63400 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Sun, 12 Sep 2021 13:36:23 +0300
Subject: [PATCH] net/mlx5: fix memory leak on context allocation failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c76db6a4964e91a79d877a009d15d5c62507136a ]
In shared device context creation, there is a missing validation when
one of the btree memory allocation fails that will cause a memory leak.
This adds a proper check to clean resources in case of failure.
Fixes: 632f0f19056f ("net/mlx5: manage shared counters in three-level table")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d6e780d50c..cb984debcc 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1021,6 +1021,8 @@ error:
MLX5_ASSERT(sh);
if (sh->cnt_id_tbl)
mlx5_l3t_destroy(sh->cnt_id_tbl);
+ if (sh->share_cache.cache.table)
+ mlx5_mr_btree_free(&sh->share_cache.cache);
if (sh->tis)
claim_zero(mlx5_devx_cmd_destroy(sh->tis));
if (sh->td)
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.406904962 +0800
+++ 0075-net-mlx5-fix-memory-leak-on-context-allocation-failu.patch 2021-11-10 14:17:01.837413030 +0800
@@ -1 +1 @@
-From c76db6a4964e91a79d877a009d15d5c62507136a Mon Sep 17 00:00:00 2001
+From 5d3374aff1b527d7421339ec1c1017e82ee63400 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c76db6a4964e91a79d877a009d15d5c62507136a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index f84e061fe7..f0ec2d1279 100644
+index d6e780d50c..cb984debcc 100644
@@ -24 +26 @@
-@@ -1254,6 +1254,8 @@ error:
+@@ -1021,6 +1021,8 @@ error:
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (74 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/memif: fix chained mbuf determination' " Xueming Li
` (176 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/39f117c3b5eb3ee6e3fa7b0aff026222bcd191e3
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 39f117c3b5eb3ee6e3fa7b0aff026222bcd191e3 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Wed, 1 Sep 2021 11:07:52 +0300
Subject: [PATCH] net/mlx5: fix shared RSS destruction
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit f2f5879efb733460933dacf691887b22dfe9aa08 ]
Shared RSS resources were released before checking that the shared RSS
has no more references. If it had, the destruction was aborted, leaving
the shared RSS in an invalid state where it could no longer be used.
Move reference counter check before resource release.
Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0b1a488edb..e8d4a006d4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11761,12 +11761,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"invalid shared action");
- remaining = __flow_dv_action_rss_hrxqs_release(dev, shared_rss);
- if (remaining)
- return rte_flow_error_set(error, EBUSY,
- RTE_FLOW_ERROR_TYPE_ACTION,
- NULL,
- "shared rss hrxq has references");
if (!__atomic_compare_exchange_n(&shared_rss->refcnt, &old_refcnt,
0, 0, __ATOMIC_ACQUIRE,
__ATOMIC_RELAXED))
@@ -11774,6 +11768,12 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
"shared rss has references");
+ remaining = __flow_dv_action_rss_hrxqs_release(dev, shared_rss);
+ if (remaining)
+ return rte_flow_error_set(error, EBUSY,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ NULL,
+ "shared rss hrxq has references");
queue = shared_rss->ind_tbl->queues;
remaining = mlx5_ind_table_obj_release(dev, shared_rss->ind_tbl, true);
if (remaining)
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.450499949 +0800
+++ 0076-net-mlx5-fix-shared-RSS-destruction.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From f2f5879efb733460933dacf691887b22dfe9aa08 Mon Sep 17 00:00:00 2001
+From 39f117c3b5eb3ee6e3fa7b0aff026222bcd191e3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f2f5879efb733460933dacf691887b22dfe9aa08 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 626513ce56..15ca5cd2b4 100644
+index 0b1a488edb..e8d4a006d4 100644
@@ -24 +26 @@
-@@ -14761,12 +14761,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11761,12 +11761,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
@@ -37 +39 @@
-@@ -14774,6 +14768,12 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11774,6 +11768,12 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/memif: fix chained mbuf determination' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (75 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'kvargs: fix comments style' " Xueming Li
` (175 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Junxiao Shi; +Cc: Luca Boccassi, Jakub Grajciar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/edfd68842c44515e006f83e1e4ee47f8260776b6
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From edfd68842c44515e006f83e1e4ee47f8260776b6 Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Thu, 9 Sep 2021 14:42:06 +0000
Subject: [PATCH] net/memif: fix chained mbuf determination
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3e3f736e50fba910d1d484b9c763d884dff6688f ]
Previously, TX functions call rte_pktmbuf_is_contiguous to determine
whether an mbuf is chained. However, rte_pktmbuf_is_contiguous is
designed to work on the first mbuf of a packet only. In case a packet
contains three or more segment mbufs in a chain, it may cause truncated
packets or rte_mbuf_sanity_check panics.
This patch updates TX functions to determine chained mbufs using
mbuf_head->nb_segs field, which works in all cases. Moreover, it
maintains that the second cacheline is only accessed when chained mbuf
is actually present.
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
drivers/net/memif/rte_eth_memif.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 15284b3d2c..aded2ac134 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -199,6 +199,7 @@ memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *de
dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
dev_info->min_rx_bufsize = 0;
+ dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS;
return 0;
}
@@ -566,7 +567,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
rte_eth_devices[mq->in_port].process_private;
memif_ring_t *ring = memif_get_ring_from_queue(proc_private, mq);
uint16_t slot, saved_slot, n_free, ring_size, mask, n_tx_pkts = 0;
- uint16_t src_len, src_off, dst_len, dst_off, cp_len;
+ uint16_t src_len, src_off, dst_len, dst_off, cp_len, nb_segs;
memif_ring_type_t type = mq->type;
memif_desc_t *d0;
struct rte_mbuf *mbuf;
@@ -614,6 +615,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (n_tx_pkts < nb_pkts && n_free) {
mbuf_head = *bufs++;
+ nb_segs = mbuf_head->nb_segs;
mbuf = mbuf_head;
saved_slot = slot;
@@ -657,7 +659,7 @@ next_in_chain:
d0->length = dst_off;
}
- if (rte_pktmbuf_is_contiguous(mbuf) == 0) {
+ if (--nb_segs > 0) {
mbuf = mbuf->next;
goto next_in_chain;
}
@@ -694,6 +696,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
uint16_t slot, uint16_t n_free)
{
memif_desc_t *d0;
+ uint16_t nb_segs = mbuf->nb_segs;
int used_slots = 1;
next_in_chain:
@@ -714,7 +717,7 @@ next_in_chain:
d0->flags = 0;
/* check if buffer is chained */
- if (rte_pktmbuf_is_contiguous(mbuf) == 0) {
+ if (--nb_segs > 0) {
if (n_free < 2)
return 0;
/* mark buffer as chained */
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.501718884 +0800
+++ 0077-net-memif-fix-chained-mbuf-determination.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 3e3f736e50fba910d1d484b9c763d884dff6688f Mon Sep 17 00:00:00 2001
+From edfd68842c44515e006f83e1e4ee47f8260776b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3e3f736e50fba910d1d484b9c763d884dff6688f ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index de6becd45e..fd9e877c3d 100644
+index 15284b3d2c..aded2ac134 100644
@@ -39 +41 @@
-@@ -567,7 +568,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -566,7 +567,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -48 +50 @@
-@@ -615,6 +616,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -614,6 +615,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -56 +58 @@
-@@ -659,7 +661,7 @@ next_in_chain:
+@@ -657,7 +659,7 @@ next_in_chain:
@@ -65 +67 @@
-@@ -696,6 +698,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
+@@ -694,6 +696,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
@@ -73 +75 @@
-@@ -716,7 +719,7 @@ next_in_chain:
+@@ -714,7 +717,7 @@ next_in_chain:
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'kvargs: fix comments style' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (76 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/memif: fix chained mbuf determination' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
` (174 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Olivier Matz; +Cc: Luca Boccassi, David Marchand, Ray Kinsella, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7b3cdb7c64913233b571b1649e188350fc94b5d3
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 7b3cdb7c64913233b571b1649e188350fc94b5d3 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 29 Sep 2021 23:39:43 +0200
Subject: [PATCH] kvargs: fix comments style
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit f0e18cb4a872d2f0cc4ba51557c837b81c8af024 ]
A '*' is missing at 2 places, add them.
Fixes: e1a00536c8ed ("kvargs: add a new library to parse key/value arguments")
Fixes: 3ab385063cb9 ("kvargs: add get by key")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
---
lib/librte_kvargs/rte_kvargs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
index eff598e08b..5b2e164287 100644
--- a/lib/librte_kvargs/rte_kvargs.h
+++ b/lib/librte_kvargs/rte_kvargs.h
@@ -145,7 +145,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
* The rte_kvargs structure
* @param key_match
* The key that should match, or NULL to count all associations
-
+ *
* @return
* The number of entries
*/
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.540699899 +0800
+++ 0078-kvargs-fix-comments-style.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From f0e18cb4a872d2f0cc4ba51557c837b81c8af024 Mon Sep 17 00:00:00 2001
+From 7b3cdb7c64913233b571b1649e188350fc94b5d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f0e18cb4a872d2f0cc4ba51557c837b81c8af024 ]
@@ -16,2 +19,2 @@
- lib/kvargs/rte_kvargs.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ lib/librte_kvargs/rte_kvargs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -19,14 +22,5 @@
-diff --git a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h
-index 3c1754c3d9..359a9f5b09 100644
---- a/lib/kvargs/rte_kvargs.h
-+++ b/lib/kvargs/rte_kvargs.h
-@@ -125,7 +125,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);
- * A list of rte_kvargs pair of 'key=value'.
- * @param key
- * The matching key.
--
-+ *
- * @return
- * NULL if no key matches the input,
- * a value associated with a matching key otherwise.
-@@ -190,7 +190,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
+diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
+index eff598e08b..5b2e164287 100644
+--- a/lib/librte_kvargs/rte_kvargs.h
++++ b/lib/librte_kvargs/rte_kvargs.h
+@@ -145,7 +145,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (77 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'kvargs: fix comments style' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/windows: export version function' " Xueming Li
` (173 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Pallavi Kadam; +Cc: Luca Boccassi, Vipin Varghese, Ranjit Menon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/196cda0e31b1ac4a41a525f186aa5506b3654237
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 196cda0e31b1ac4a41a525f186aa5506b3654237 Mon Sep 17 00:00:00 2001
From: Pallavi Kadam <pallavi.kadam@intel.com>
Date: Mon, 27 Sep 2021 11:43:22 -0700
Subject: [PATCH] bus/pci: fix unknown NUMA node value on Windows
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3c6e581025109926c166bbd2f7ea678f07c3bbce ]
Based on the rte_eth_dev_socket_id() documentation,
set the default numa_node to -1. When the API is unsuccessful,
set numa_node to 0.
This change more correctly resembles the Linux code.
Fixes: bf7cf1f947bd ("bus/pci: fix unknown NUMA node value on Windows")
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
drivers/bus/pci/windows/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 12a46ae370..4944c21f67 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -234,6 +234,7 @@ get_device_resource_info(HDEVINFO dev_info,
}
/* Get NUMA node using DEVPKEY_Device_Numa_Node */
+ dev->device.numa_node = SOCKET_ID_ANY;
res = SetupDiGetDevicePropertyW(dev_info, dev_info_data,
&DEVPKEY_Device_Numa_Node, &property_type,
(BYTE *)&numa_node, sizeof(numa_node), NULL, 0);
@@ -241,7 +242,7 @@ get_device_resource_info(HDEVINFO dev_info,
DWORD error = GetLastError();
if (error == ERROR_NOT_FOUND) {
/* On older CPUs, NUMA is not bound to PCIe locality. */
- dev->device.numa_node = SOCKET_ID_ANY;
+ dev->device.numa_node = 0;
return ERROR_SUCCESS;
}
RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.579301066 +0800
+++ 0079-bus-pci-fix-unknown-NUMA-node-value-on-Windows.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 3c6e581025109926c166bbd2f7ea678f07c3bbce Mon Sep 17 00:00:00 2001
+From 196cda0e31b1ac4a41a525f186aa5506b3654237 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c6e581025109926c166bbd2f7ea678f07c3bbce ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 343ef6f33b..644c452c76 100644
+index 12a46ae370..4944c21f67 100644
@@ -25 +27 @@
-@@ -237,6 +237,7 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -234,6 +234,7 @@ get_device_resource_info(HDEVINFO dev_info,
@@ -33 +35 @@
-@@ -244,7 +245,7 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -241,7 +242,7 @@ get_device_resource_info(HDEVINFO dev_info,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/windows: export version function' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (78 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'eal: remove Windows-specific list of common files' " Xueming Li
` (172 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: William Tu; +Cc: Luca Boccassi, Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8a43d7c5f437814d1c8f5d33353d96a9b989bc81
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8a43d7c5f437814d1c8f5d33353d96a9b989bc81 Mon Sep 17 00:00:00 2001
From: William Tu <u9012063@gmail.com>
Date: Thu, 5 Aug 2021 17:48:19 +0000
Subject: [PATCH] eal/windows: export version function
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit fe81e52a91d4b1beef15cfc152274498322446b4 ]
When OVS inits, it calls rte_version to get the DPDK's version.
The patch fixes the error below by exposing rte_version symbol.
libopenvswitch.a(dpdk.c.obj) : error LNK2019: unresolved external symbol
rte_version referenced in function dpdk_init
Fixes: 5b637a848195 ("eal: fix querying DPDK version at runtime")
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/librte_eal/version.map | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
index 1eeb5f3371..fe065a41d9 100644
--- a/lib/librte_eal/version.map
+++ b/lib/librte_eal/version.map
@@ -198,6 +198,7 @@ DPDK_21 {
rte_uuid_is_null;
rte_uuid_parse;
rte_uuid_unparse;
+ rte_version;
rte_vfio_clear_group;
rte_vfio_container_create;
rte_vfio_container_destroy;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.618873137 +0800
+++ 0080-eal-windows-export-version-function.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From fe81e52a91d4b1beef15cfc152274498322446b4 Mon Sep 17 00:00:00 2001
+From 8a43d7c5f437814d1c8f5d33353d96a9b989bc81 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fe81e52a91d4b1beef15cfc152274498322446b4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- lib/eal/version.map | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ lib/librte_eal/version.map | 1 +
+ 1 file changed, 1 insertion(+)
@@ -20,9 +22,8 @@
-diff --git a/lib/eal/version.map b/lib/eal/version.map
-index b436359596..d800090db0 100644
---- a/lib/eal/version.map
-+++ b/lib/eal/version.map
-@@ -267,7 +267,7 @@ DPDK_22 {
- rte_uuid_is_null; # WINDOWS_NO_EXPORT
- rte_uuid_parse; # WINDOWS_NO_EXPORT
- rte_uuid_unparse; # WINDOWS_NO_EXPORT
-- rte_version; # WINDOWS_NO_EXPORT
+diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
+index 1eeb5f3371..fe065a41d9 100644
+--- a/lib/librte_eal/version.map
++++ b/lib/librte_eal/version.map
+@@ -198,6 +198,7 @@ DPDK_21 {
+ rte_uuid_is_null;
+ rte_uuid_parse;
+ rte_uuid_unparse;
@@ -30,3 +31,3 @@
- rte_vfio_clear_group; # WINDOWS_NO_EXPORT
- rte_vfio_container_create; # WINDOWS_NO_EXPORT
- rte_vfio_container_destroy; # WINDOWS_NO_EXPORT
+ rte_vfio_clear_group;
+ rte_vfio_container_create;
+ rte_vfio_container_destroy;
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal: remove Windows-specific list of common files' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (79 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/windows: export version function' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' " Xueming Li
` (171 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Luca Boccassi, William Tu, Ranjit Menon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/51a9cd2327f3bc2f1d0535e140d94f2ae48ef3bd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 51a9cd2327f3bc2f1d0535e140d94f2ae48ef3bd Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Sun, 29 Aug 2021 05:16:01 +0300
Subject: [PATCH] eal: remove Windows-specific list of common files
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit cf665406b1f834baf3436bb6e829b38efca55fd9 ]
The majority of common EAL sources that are built for all platforms were
listed separately for Windows and for other OS. It seems that developers
adding modules to EAL perceived this as if Windows supported
only a limited subset of modules and only added new ones into another.
Factor the truly common modules into a shared list,
then extend it with modules supported by different platforms.
When the two lists were created, UUID API implementation was removed
from Windows build (apparently by mistake), then excluded from the
export list for no reason other than not being built. Restore it.
Fixes: df3ff6be2b33 ("eal: simplify meson build of common directory")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
lib/librte_eal/common/meson.build | 59 ++++++++-----------------------
1 file changed, 15 insertions(+), 44 deletions(-)
diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index 39abf7a0a4..e7ea0fd388 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -5,51 +5,16 @@ includes += include_directories('.')
cflags += [ '-DABI_VERSION="@0@"'.format(abi_version) ]
-if is_windows
- sources += files(
- 'eal_common_bus.c',
- 'eal_common_class.c',
- 'eal_common_config.c',
- 'eal_common_debug.c',
- 'eal_common_dev.c',
- 'eal_common_devargs.c',
- 'eal_common_dynmem.c',
- 'eal_common_errno.c',
- 'eal_common_fbarray.c',
- 'eal_common_hexdump.c',
- 'eal_common_launch.c',
- 'eal_common_lcore.c',
- 'eal_common_log.c',
- 'eal_common_mcfg.c',
- 'eal_common_memalloc.c',
- 'eal_common_memory.c',
- 'eal_common_memzone.c',
- 'eal_common_options.c',
- 'eal_common_string_fns.c',
- 'eal_common_tailqs.c',
- 'eal_common_thread.c',
- 'eal_common_trace_points.c',
- 'malloc_elem.c',
- 'malloc_heap.c',
- 'rte_malloc.c',
- 'eal_common_timer.c',
- 'rte_service.c',
- )
- subdir_done()
-endif
-
sources += files(
'eal_common_bus.c',
- 'eal_common_cpuflags.c',
'eal_common_class.c',
'eal_common_config.c',
'eal_common_debug.c',
- 'eal_common_devargs.c',
'eal_common_dev.c',
+ 'eal_common_devargs.c',
'eal_common_errno.c',
'eal_common_fbarray.c',
'eal_common_hexdump.c',
- 'eal_common_hypervisor.c',
'eal_common_launch.c',
'eal_common_lcore.c',
'eal_common_log.c',
@@ -58,27 +23,33 @@ sources += files(
'eal_common_memory.c',
'eal_common_memzone.c',
'eal_common_options.c',
- 'eal_common_proc.c',
'eal_common_string_fns.c',
'eal_common_tailqs.c',
'eal_common_thread.c',
'eal_common_timer.c',
- 'eal_common_trace.c',
- 'eal_common_trace_ctf.c',
'eal_common_trace_points.c',
- 'eal_common_trace_utils.c',
'eal_common_uuid.c',
'hotplug_mp.c',
'malloc_elem.c',
'malloc_heap.c',
- 'malloc_mp.c',
- 'rte_keepalive.c',
'rte_malloc.c',
'rte_random.c',
'rte_reciprocal.c',
'rte_service.c',
)
-
-if is_linux
+if is_linux or is_windows
sources += files('eal_common_dynmem.c')
endif
+if not is_windows
+ sources += files(
+ 'eal_common_cpuflags.c',
+ 'eal_common_hypervisor.c',
+ 'eal_common_proc.c',
+ 'eal_common_trace.c',
+ 'eal_common_trace_ctf.c',
+ 'eal_common_trace_utils.c',
+ 'hotplug_mp.c',
+ 'malloc_mp.c',
+ 'rte_keepalive.c',
+ )
+endif
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.658069403 +0800
+++ 0081-eal-remove-Windows-specific-list-of-common-files.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From cf665406b1f834baf3436bb6e829b38efca55fd9 Mon Sep 17 00:00:00 2001
+From 51a9cd2327f3bc2f1d0535e140d94f2ae48ef3bd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf665406b1f834baf3436bb6e829b38efca55fd9 ]
@@ -23,9 +26,8 @@
- lib/eal/common/meson.build | 63 +++++++++-----------------------------
- lib/eal/version.map | 8 ++---
- 2 files changed, 19 insertions(+), 52 deletions(-)
-
-diff --git a/lib/eal/common/meson.build b/lib/eal/common/meson.build
-index edfca77779..6d01b0f072 100644
---- a/lib/eal/common/meson.build
-+++ b/lib/eal/common/meson.build
-@@ -5,54 +5,16 @@ includes += include_directories('.')
+ lib/librte_eal/common/meson.build | 59 ++++++++-----------------------
+ 1 file changed, 15 insertions(+), 44 deletions(-)
+
+diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
+index 39abf7a0a4..e7ea0fd388 100644
+--- a/lib/librte_eal/common/meson.build
++++ b/lib/librte_eal/common/meson.build
+@@ -5,51 +5,16 @@ includes += include_directories('.')
@@ -36,33 +38,30 @@
-- sources += files(
-- 'eal_common_bus.c',
-- 'eal_common_class.c',
-- 'eal_common_config.c',
-- 'eal_common_debug.c',
-- 'eal_common_dev.c',
-- 'eal_common_devargs.c',
-- 'eal_common_dynmem.c',
-- 'eal_common_errno.c',
-- 'eal_common_fbarray.c',
-- 'eal_common_hexdump.c',
-- 'eal_common_launch.c',
-- 'eal_common_lcore.c',
-- 'eal_common_log.c',
-- 'eal_common_mcfg.c',
-- 'eal_common_memalloc.c',
-- 'eal_common_memory.c',
-- 'eal_common_memzone.c',
-- 'eal_common_options.c',
-- 'eal_common_string_fns.c',
-- 'eal_common_tailqs.c',
-- 'eal_common_thread.c',
-- 'eal_common_trace_points.c',
-- 'malloc_elem.c',
-- 'malloc_heap.c',
-- 'rte_malloc.c',
-- 'eal_common_timer.c',
-- 'rte_random.c',
-- 'rte_reciprocal.c',
-- 'rte_service.c',
-- 'rte_version.c',
-- )
-- subdir_done()
+- sources += files(
+- 'eal_common_bus.c',
+- 'eal_common_class.c',
+- 'eal_common_config.c',
+- 'eal_common_debug.c',
+- 'eal_common_dev.c',
+- 'eal_common_devargs.c',
+- 'eal_common_dynmem.c',
+- 'eal_common_errno.c',
+- 'eal_common_fbarray.c',
+- 'eal_common_hexdump.c',
+- 'eal_common_launch.c',
+- 'eal_common_lcore.c',
+- 'eal_common_log.c',
+- 'eal_common_mcfg.c',
+- 'eal_common_memalloc.c',
+- 'eal_common_memory.c',
+- 'eal_common_memzone.c',
+- 'eal_common_options.c',
+- 'eal_common_string_fns.c',
+- 'eal_common_tailqs.c',
+- 'eal_common_thread.c',
+- 'eal_common_trace_points.c',
+- 'malloc_elem.c',
+- 'malloc_heap.c',
+- 'rte_malloc.c',
+- 'eal_common_timer.c',
+- 'rte_service.c',
+- )
+- subdir_done()
@@ -72,39 +71,38 @@
- 'eal_common_bus.c',
-- 'eal_common_cpuflags.c',
- 'eal_common_class.c',
- 'eal_common_config.c',
- 'eal_common_debug.c',
-- 'eal_common_devargs.c',
- 'eal_common_dev.c',
-+ 'eal_common_devargs.c',
- 'eal_common_errno.c',
- 'eal_common_fbarray.c',
- 'eal_common_hexdump.c',
-- 'eal_common_hypervisor.c',
- 'eal_common_launch.c',
- 'eal_common_lcore.c',
- 'eal_common_log.c',
-@@ -61,28 +23,33 @@ sources += files(
- 'eal_common_memory.c',
- 'eal_common_memzone.c',
- 'eal_common_options.c',
-- 'eal_common_proc.c',
- 'eal_common_string_fns.c',
- 'eal_common_tailqs.c',
- 'eal_common_thread.c',
- 'eal_common_timer.c',
-- 'eal_common_trace.c',
-- 'eal_common_trace_ctf.c',
- 'eal_common_trace_points.c',
-- 'eal_common_trace_utils.c',
- 'eal_common_uuid.c',
-- 'hotplug_mp.c',
- 'malloc_elem.c',
- 'malloc_heap.c',
-- 'malloc_mp.c',
-- 'rte_keepalive.c',
- 'rte_malloc.c',
- 'rte_random.c',
- 'rte_reciprocal.c',
- 'rte_service.c',
- 'rte_version.c',
+ 'eal_common_bus.c',
+- 'eal_common_cpuflags.c',
+ 'eal_common_class.c',
+ 'eal_common_config.c',
+ 'eal_common_debug.c',
+- 'eal_common_devargs.c',
+ 'eal_common_dev.c',
++ 'eal_common_devargs.c',
+ 'eal_common_errno.c',
+ 'eal_common_fbarray.c',
+ 'eal_common_hexdump.c',
+- 'eal_common_hypervisor.c',
+ 'eal_common_launch.c',
+ 'eal_common_lcore.c',
+ 'eal_common_log.c',
+@@ -58,27 +23,33 @@ sources += files(
+ 'eal_common_memory.c',
+ 'eal_common_memzone.c',
+ 'eal_common_options.c',
+- 'eal_common_proc.c',
+ 'eal_common_string_fns.c',
+ 'eal_common_tailqs.c',
+ 'eal_common_thread.c',
+ 'eal_common_timer.c',
+- 'eal_common_trace.c',
+- 'eal_common_trace_ctf.c',
+ 'eal_common_trace_points.c',
+- 'eal_common_trace_utils.c',
+ 'eal_common_uuid.c',
+ 'hotplug_mp.c',
+ 'malloc_elem.c',
+ 'malloc_heap.c',
+- 'malloc_mp.c',
+- 'rte_keepalive.c',
+ 'rte_malloc.c',
+ 'rte_random.c',
+ 'rte_reciprocal.c',
+ 'rte_service.c',
@@ -115 +113 @@
- sources += files('eal_common_dynmem.c')
+ sources += files('eal_common_dynmem.c')
@@ -118,11 +116,11 @@
-+ sources += files(
-+ 'eal_common_cpuflags.c',
-+ 'eal_common_hypervisor.c',
-+ 'eal_common_proc.c',
-+ 'eal_common_trace.c',
-+ 'eal_common_trace_ctf.c',
-+ 'eal_common_trace_utils.c',
-+ 'hotplug_mp.c',
-+ 'malloc_mp.c',
-+ 'rte_keepalive.c',
-+ )
++ sources += files(
++ 'eal_common_cpuflags.c',
++ 'eal_common_hypervisor.c',
++ 'eal_common_proc.c',
++ 'eal_common_trace.c',
++ 'eal_common_trace_ctf.c',
++ 'eal_common_trace_utils.c',
++ 'hotplug_mp.c',
++ 'malloc_mp.c',
++ 'rte_keepalive.c',
++ )
@@ -130,19 +127,0 @@
-diff --git a/lib/eal/version.map b/lib/eal/version.map
-index d800090db0..1d916cd74e 100644
---- a/lib/eal/version.map
-+++ b/lib/eal/version.map
-@@ -263,10 +263,10 @@ DPDK_22 {
- rte_thread_get_affinity;
- rte_thread_set_affinity;
- rte_thread_setname;
-- rte_uuid_compare; # WINDOWS_NO_EXPORT
-- rte_uuid_is_null; # WINDOWS_NO_EXPORT
-- rte_uuid_parse; # WINDOWS_NO_EXPORT
-- rte_uuid_unparse; # WINDOWS_NO_EXPORT
-+ rte_uuid_compare;
-+ rte_uuid_is_null;
-+ rte_uuid_parse;
-+ rte_uuid_unparse;
- rte_version;
- rte_vfio_clear_group; # WINDOWS_NO_EXPORT
- rte_vfio_container_create; # WINDOWS_NO_EXPORT
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (80 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'eal: remove Windows-specific list of common files' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'bitrate: fix registration to match API description' " Xueming Li
` (170 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Cian Ferriter; +Cc: Luca Boccassi, Honnappa Nagarahalli, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1e697abcfd978d22c3b56c9b9a00ffb294718dbe
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1e697abcfd978d22c3b56c9b9a00ffb294718dbe Mon Sep 17 00:00:00 2001
From: Cian Ferriter <cian.ferriter@intel.com>
Date: Mon, 23 Aug 2021 18:28:44 +0100
Subject: [PATCH] ring: fix Doxygen comment of internal function
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0203a14c72da4ae726056a147cb6e51622c9c28e ]
Change "enqueue" to "dequeue" because the __rte_ring_move_cons_head()
function is updating the consumer head for dequeue.
Fixes: 0dfc98c507b1 ("ring: separate out head index manipulation")
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
lib/librte_ring/rte_ring_c11_mem.h | 2 +-
lib/librte_ring/rte_ring_generic.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index 0fb73a3371..ae886532ee 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -111,7 +111,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
* @param is_sc
* Indicates whether multi-consumer path is needed or not
* @param n
- * The number of elements we will want to enqueue, i.e. how far should the
+ * The number of elements we will want to dequeue, i.e. how far should the
* head be moved
* @param behavior
* RTE_RING_QUEUE_FIXED: Dequeue a fixed number of items from a ring
diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h
index 953cdbbd5e..79ae4ecb14 100644
--- a/lib/librte_ring/rte_ring_generic.h
+++ b/lib/librte_ring/rte_ring_generic.h
@@ -107,7 +107,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
* @param is_sc
* Indicates whether multi-consumer path is needed or not
* @param n
- * The number of elements we will want to enqueue, i.e. how far should the
+ * The number of elements we will want to dequeue, i.e. how far should the
* head be moved
* @param behavior
* RTE_RING_QUEUE_FIXED: Dequeue a fixed number of items from a ring
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.697840966 +0800
+++ 0082-ring-fix-Doxygen-comment-of-internal-function.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 0203a14c72da4ae726056a147cb6e51622c9c28e Mon Sep 17 00:00:00 2001
+From 1e697abcfd978d22c3b56c9b9a00ffb294718dbe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0203a14c72da4ae726056a147cb6e51622c9c28e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +17,2 @@
- lib/ring/rte_ring_c11_pvt.h | 2 +-
- lib/ring/rte_ring_generic_pvt.h | 2 +-
+ lib/librte_ring/rte_ring_c11_mem.h | 2 +-
+ lib/librte_ring/rte_ring_generic.h | 2 +-
@@ -19,4 +21,4 @@
-diff --git a/lib/ring/rte_ring_c11_pvt.h b/lib/ring/rte_ring_c11_pvt.h
-index 37e0b2afd6..f895950df4 100644
---- a/lib/ring/rte_ring_c11_pvt.h
-+++ b/lib/ring/rte_ring_c11_pvt.h
+diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
+index 0fb73a3371..ae886532ee 100644
+--- a/lib/librte_ring/rte_ring_c11_mem.h
++++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -32,5 +34,5 @@
-diff --git a/lib/ring/rte_ring_generic_pvt.h b/lib/ring/rte_ring_generic_pvt.h
-index c95ad7e12c..5acb6e59be 100644
---- a/lib/ring/rte_ring_generic_pvt.h
-+++ b/lib/ring/rte_ring_generic_pvt.h
-@@ -106,7 +106,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
+diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h
+index 953cdbbd5e..79ae4ecb14 100644
+--- a/lib/librte_ring/rte_ring_generic.h
++++ b/lib/librte_ring/rte_ring_generic.h
+@@ -107,7 +107,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'bitrate: fix registration to match API description' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (81 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'bitrate: fix calculation " Xueming Li
` (169 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/102d6df14d5608223a6d354896780e9056fafc34
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 102d6df14d5608223a6d354896780e9056fafc34 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 9 Jul 2021 16:19:36 +0100
Subject: [PATCH] bitrate: fix registration to match API description
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f ]
rte_stats_bitrate_reg() API states it returns 'Zero on success'.
However, the implementation directly returns the return of
rte_metrics_reg_names() which may be zero or positive on success,
with a positive value also indicating the index.
The user of rte_stats_bitrate_reg() should not care about the
index as it is stored in the opaque rte_stats_bitrates struct.
Change the implementation of rte_stats_bitrate_reg() to match
the API description by always returning zero on success.
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
lib/librte_bitratestats/rte_bitrate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index 8fd9f47288..e23e38bc94 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -55,8 +55,10 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
return -EINVAL;
return_value = rte_metrics_reg_names(&names[0], RTE_DIM(names));
- if (return_value >= 0)
+ if (return_value >= 0) {
bitrate_data->id_stats_set = return_value;
+ return 0;
+ }
return return_value;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.746374041 +0800
+++ 0083-bitrate-fix-registration-to-match-API-description.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f Mon Sep 17 00:00:00 2001
+From 102d6df14d5608223a6d354896780e9056fafc34 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f ]
@@ -22 +25 @@
- lib/bitratestats/rte_bitrate.c | 4 +++-
+ lib/librte_bitratestats/rte_bitrate.c | 4 +++-
@@ -25 +28 @@
-diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c
+diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
@@ -27,2 +30,2 @@
---- a/lib/bitratestats/rte_bitrate.c
-+++ b/lib/bitratestats/rte_bitrate.c
+--- a/lib/librte_bitratestats/rte_bitrate.c
++++ b/lib/librte_bitratestats/rte_bitrate.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'bitrate: fix calculation to match API description' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (82 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'bitrate: fix registration to match API description' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' " Xueming Li
` (168 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/45f9d14e11cc844015f00bbcf782f9caf6644d9a
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 45f9d14e11cc844015f00bbcf782f9caf6644d9a Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 9 Jul 2021 16:19:37 +0100
Subject: [PATCH] bitrate: fix calculation to match API description
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit bdd478eede455611245593edd43dc49a1d821449 ]
rte_stats_bitrate_calc() API states it returns 'Negative value on error'.
However, the implementation will return the error code from
rte_eth_stats_get() which may be non-zero on error.
Change the implementation of rte_stats_bitrate_calc() to match
the API description by always returning a negative value on error.
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
lib/librte_bitratestats/rte_bitrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index e23e38bc94..1664e4863b 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -80,7 +80,7 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
ret_code = rte_eth_stats_get(port_id, ð_stats);
if (ret_code != 0)
- return ret_code;
+ return ret_code < 0 ? ret_code : -ret_code;
port_data = &bitrate_data->port_stats[port_id];
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.787203870 +0800
+++ 0084-bitrate-fix-calculation-to-match-API-description.patch 2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From bdd478eede455611245593edd43dc49a1d821449 Mon Sep 17 00:00:00 2001
+From 45f9d14e11cc844015f00bbcf782f9caf6644d9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bdd478eede455611245593edd43dc49a1d821449 ]
@@ -18 +21 @@
- lib/bitratestats/rte_bitrate.c | 2 +-
+ lib/librte_bitratestats/rte_bitrate.c | 2 +-
@@ -21 +24 @@
-diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c
+diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
@@ -23,2 +26,2 @@
---- a/lib/bitratestats/rte_bitrate.c
-+++ b/lib/bitratestats/rte_bitrate.c
+--- a/lib/librte_bitratestats/rte_bitrate.c
++++ b/lib/librte_bitratestats/rte_bitrate.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (83 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'bitrate: fix calculation " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' " Xueming Li
` (167 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Luca Boccassi, Ciara Power, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Sep 2021 11:51:36 +0100
Subject: [PATCH] usertools: fix handling EOF for telemetry input pipe
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 744e9a87c582d687d5d20b61b7ee0835da421541 ]
To allow the script to take queries from input pipes e.g. "echo
/ethdev/stats,0 | dpdk-telemetry.py", we need to handle the case of EOF
correctly without crashing with an exception. Do this by using a
try-except block around the input handling.
Fixes: 6a2967c112a3 ("usertools: add new telemetry script")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
usertools/dpdk-telemetry.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py
index 181859658f..a71f1e9ff9 100755
--- a/usertools/dpdk-telemetry.py
+++ b/usertools/dpdk-telemetry.py
@@ -51,13 +51,17 @@ def handle_socket(path):
CMDS = read_socket(sock, output_buf_len, False)["/"]
# interactive prompt
- text = input('--> ').strip()
- while text != "quit":
- if text.startswith('/'):
- sock.send(text.encode())
- read_socket(sock, output_buf_len)
+ try:
text = input('--> ').strip()
- sock.close()
+ while text != "quit":
+ if text.startswith('/'):
+ sock.send(text.encode())
+ read_socket(sock, output_buf_len)
+ text = input('--> ').strip()
+ except EOFError:
+ pass
+ finally:
+ sock.close()
def readline_complete(text, state):
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.827601818 +0800
+++ 0085-usertools-fix-handling-EOF-for-telemetry-input-pipe.patch 2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 744e9a87c582d687d5d20b61b7ee0835da421541 Mon Sep 17 00:00:00 2001
+From ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 744e9a87c582d687d5d20b61b7ee0835da421541 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index bdc617db18..7ebbb64fce 100755
+index 181859658f..a71f1e9ff9 100755
@@ -24 +26 @@
-@@ -69,13 +69,17 @@ def handle_socket(path):
+@@ -51,13 +51,17 @@ def handle_socket(path):
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (84 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' " Xueming Li
` (166 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/95934ebba9b415b9f234dbe7e65319395d1a7a24
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 95934ebba9b415b9f234dbe7e65319395d1a7a24 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Sep 2021 15:08:48 +0100
Subject: [PATCH] eal/freebsd: lock memory device to prevent conflicts
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 47a4f2650c71d9197231a95c5df8f89d0f65e882 ]
Only a single DPDK process on the system can be using the /dev/contigmem
mappings at a time, but this was never explicitly enforced, e.g. when
using --in-memory flag on two processes. To prevent possible conflict
issues, we lock the dev node when it's in use, preventing other DPDK
processes from starting up and causing problems for us.
Fixes: 764bf26873b9 ("add FreeBSD support")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/freebsd/eal_hugepage_info.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_eal/freebsd/eal_hugepage_info.c b/lib/librte_eal/freebsd/eal_hugepage_info.c
index 408f054f7a..9dbe375bd3 100644
--- a/lib/librte_eal/freebsd/eal_hugepage_info.c
+++ b/lib/librte_eal/freebsd/eal_hugepage_info.c
@@ -90,6 +90,10 @@ eal_hugepage_info_init(void)
RTE_LOG(ERR, EAL, "could not open "CONTIGMEM_DEV"\n");
return -1;
}
+ if (flock(fd, LOCK_EX | LOCK_NB) < 0) {
+ RTE_LOG(ERR, EAL, "could not lock memory. Is another DPDK process running?\n");
+ return -1;
+ }
if (buffer_size >= 1<<30)
RTE_LOG(INFO, EAL, "Contigmem driver has %d buffers, each of size %dGB\n",
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.868796238 +0800
+++ 0086-eal-freebsd-lock-memory-device-to-prevent-conflicts.patch 2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 47a4f2650c71d9197231a95c5df8f89d0f65e882 Mon Sep 17 00:00:00 2001
+From 95934ebba9b415b9f234dbe7e65319395d1a7a24 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 47a4f2650c71d9197231a95c5df8f89d0f65e882 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/eal/freebsd/eal_hugepage_info.c | 4 ++++
+ lib/librte_eal/freebsd/eal_hugepage_info.c | 4 ++++
@@ -21 +23 @@
-diff --git a/lib/eal/freebsd/eal_hugepage_info.c b/lib/eal/freebsd/eal_hugepage_info.c
+diff --git a/lib/librte_eal/freebsd/eal_hugepage_info.c b/lib/librte_eal/freebsd/eal_hugepage_info.c
@@ -23,2 +25,2 @@
---- a/lib/eal/freebsd/eal_hugepage_info.c
-+++ b/lib/eal/freebsd/eal_hugepage_info.c
+--- a/lib/librte_eal/freebsd/eal_hugepage_info.c
++++ b/lib/librte_eal/freebsd/eal_hugepage_info.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (85 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' " Xueming Li
` (165 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Luca Boccassi, Brandon Lo, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/192d2f2dcd46753c888c987eeaa26677457fcea6
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 192d2f2dcd46753c888c987eeaa26677457fcea6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 17 Sep 2021 16:09:17 +0100
Subject: [PATCH] test/mem: fix memory autotests on FreeBSD
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 086d426406bd3f6fac96a15bbd871c7fe714bc2d ]
The memory autotests were failing on FreeBSD, due to an incorrect errno
variable being checked for ENOTSUP. The test checked "errno" while the
DPDK API sets "rte_errno". Changing to check the right variable makes
the test behave properly.
Fixes: c3e35a0966b8 ("test/mem: check segment fd API")
Reported-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 7d5ae99bab..dbf6871e71 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -6,6 +6,7 @@
#include <stdint.h>
#include <rte_eal.h>
+#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
@@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* ENOTSUP means segment is valid, but there is not support for
* segment fd API (e.g. on FreeBSD).
*/
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
/* all other errors are treated as failures */
return -1;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.909401957 +0800
+++ 0087-test-mem-fix-memory-autotests-on-FreeBSD.patch 2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 086d426406bd3f6fac96a15bbd871c7fe714bc2d Mon Sep 17 00:00:00 2001
+From 192d2f2dcd46753c888c987eeaa26677457fcea6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 086d426406bd3f6fac96a15bbd871c7fe714bc2d ]
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (86 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' " Xueming Li
` (164 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Eugenio Pérez
Cc: Luca Boccassi, Pei Zhang, Maxime Coquelin, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9786a89ed40dbbbdc5a2162a57b5a3937dc43fae
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9786a89ed40dbbbdc5a2162a57b5a3937dc43fae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
Date: Fri, 27 Aug 2021 18:12:31 +0200
Subject: [PATCH] vhost: clean IOTLB cache on vring stop
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e7cb7fdf5471d96edd586dd318511d8a892c41ca ]
Old IOVA cache entries are left when there is a change on virtio driver
in VM. In case that all these old entries have iova addresses lesser
than new iova entries, vhost code will need to iterate all the cache to
find the new ones. In case of just a new iova entry needed for the new
translations, this condition will last forever.
This has been observed in virtio-net to testpmd's vfio-pci driver
transition, reducing the performance from more than 10Mpps to less than
0.07Mpps if the hugepage address was higher than the networking
buffers. Since all new buffers are contained in this new gigantic page,
vhost needs to scan IOTLB_CACHE_SIZE - 1 for each translation at worst.
Fixes: 69c90e98f483 ("vhost: enable IOMMU support")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reported-by: Pei Zhang <pezhang@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/vhost_user.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 8a2a3e9ab5..843bfbbfd9 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2012,6 +2012,8 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
msg->size = sizeof(msg->payload.state);
msg->fd_num = 0;
+ vhost_user_iotlb_flush_all(vq);
+
vring_invalidate(dev, vq);
return RTE_VHOST_MSG_RESULT_REPLY;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.949770386 +0800
+++ 0088-vhost-clean-IOTLB-cache-on-vring-stop.patch 2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From e7cb7fdf5471d96edd586dd318511d8a892c41ca Mon Sep 17 00:00:00 2001
+From 9786a89ed40dbbbdc5a2162a57b5a3937dc43fae Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e7cb7fdf5471d96edd586dd318511d8a892c41ca ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
- lib/vhost/vhost_user.c | 2 ++
+ lib/librte_vhost/vhost_user.c | 2 ++
@@ -32,5 +34,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 7b9f26b656..5a894ca0cc 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2113,6 +2113,8 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 8a2a3e9ab5..843bfbbfd9 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2012,6 +2012,8 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (87 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' " Xueming Li
` (163 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0da178c94e72f8a8a9e5673e3d66929b68d398cf
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Wed, 15 Sep 2021 12:19:41 +0300
Subject: [PATCH] net/virtio: fix Tx cleanup functions to have same signature
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ]
There is a family of cleanup from completed transmits functions.
Fix packed virtqueues cleanup functions to have the same signature
as split virtqueues have. This lets all functions of the family to
match the same callback prototype.
Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtqueue.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 42c4c9882f..c169518ec8 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
}
static void
-virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
+virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, uint16_t num)
{
uint16_t used_idx, id, curr_id, free_cnt = 0;
uint16_t size = vq->vq_nentries;
struct vring_packed_desc *desc = vq->vq_packed.ring.desc;
struct vq_desc_extra *dxp;
+ int nb = num;
used_idx = vq->vq_used_cons_idx;
/* desc_is_used has a load-acquire or rte_io_rmb inside
* and wait for used desc in virtqueue.
*/
- while (num > 0 && desc_is_used(&desc[used_idx], vq)) {
+ while (nb > 0 && desc_is_used(&desc[used_idx], vq)) {
id = desc[used_idx].id;
do {
curr_id = used_idx;
dxp = &vq->vq_descx[used_idx];
used_idx += dxp->ndescs;
free_cnt += dxp->ndescs;
- num -= dxp->ndescs;
+ nb -= dxp->ndescs;
if (used_idx >= size) {
used_idx -= size;
vq->vq_packed.used_wrap_counter ^= 1;
@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
}
static void
-virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
+virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, uint16_t num)
{
uint16_t used_idx, id;
uint16_t size = vq->vq_nentries;
@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
/* Cleanup from completed transmits. */
static inline void
-virtio_xmit_cleanup_packed(struct virtqueue *vq, int num, int in_order)
+virtio_xmit_cleanup_packed(struct virtqueue *vq, uint16_t num, int in_order)
{
if (in_order)
virtio_xmit_cleanup_inorder_packed(vq, num);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:05.991845129 +0800
+++ 0089-net-virtio-fix-Tx-cleanup-functions-to-have-same-sig.patch 2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From e2ca43a35ea60e6194a72d37c964d52827fcff71 Mon Sep 17 00:00:00 2001
+From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 03957b2bd0..d0c48ca415 100644
+index 42c4c9882f..c169518ec8 100644
@@ -25 +27 @@
-@@ -803,25 +803,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
+@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
@@ -55 +57 @@
-@@ -837,7 +838,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
+@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
@@ -64 +66 @@
-@@ -867,7 +868,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
+@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (88 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: do not use PMD log type' " Xueming Li
` (162 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/758eb05f2b576e4bd2267dca6b3142247f98d963
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 758eb05f2b576e4bd2267dca6b3142247f98d963 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Wed, 15 Sep 2021 12:19:42 +0300
Subject: [PATCH] net/virtio: fix Tx completed mbuf leak on device stop
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9de76dfb929807f6fbf0b7ceec4bc8274221ddde ]
Free Tx completed mbufs on device stop. Not completed Tx mbufs cannot be
freed since they are still in use.
Fixes: c1f86306a026 ("virtio: add new driver")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 31 ++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 7bbd483952..ed20b1427e 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2590,6 +2590,35 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
PMD_INIT_LOG(DEBUG, "%d mbufs freed", mbuf_num);
}
+static void
+virtio_tx_completed_cleanup(struct rte_eth_dev *dev)
+{
+ struct virtio_hw *hw = dev->data->dev_private;
+ struct virtqueue *vq;
+ uint32_t qidx;
+ void (*xmit_cleanup)(struct virtqueue *vq, uint16_t nb_used);
+
+ if (vtpci_packed_queue(hw)) {
+ if (hw->use_vec_tx)
+ xmit_cleanup = &virtio_xmit_cleanup_inorder_packed;
+ else if (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER))
+ xmit_cleanup = &virtio_xmit_cleanup_inorder_packed;
+ else
+ xmit_cleanup = &virtio_xmit_cleanup_normal_packed;
+ } else {
+ if (hw->use_inorder_tx)
+ xmit_cleanup = &virtio_xmit_cleanup_inorder;
+ else
+ xmit_cleanup = &virtio_xmit_cleanup;
+ }
+
+ for (qidx = 0; qidx < hw->max_queue_pairs; qidx++) {
+ vq = hw->vqs[2 * qidx + VTNET_SQ_TQ_QUEUE_IDX];
+ if (vq != NULL)
+ xmit_cleanup(vq, virtqueue_nused(vq));
+ }
+}
+
/*
* Stop device: disable interrupt and mark link down
*/
@@ -2608,6 +2637,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
goto out_unlock;
hw->started = false;
+ virtio_tx_completed_cleanup(dev);
+
if (intr_conf->lsc || intr_conf->rxq) {
virtio_intr_disable(dev);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.032792987 +0800
+++ 0090-net-virtio-fix-Tx-completed-mbuf-leak-on-device-stop.patch 2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 9de76dfb929807f6fbf0b7ceec4bc8274221ddde Mon Sep 17 00:00:00 2001
+From 758eb05f2b576e4bd2267dca6b3142247f98d963 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9de76dfb929807f6fbf0b7ceec4bc8274221ddde ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index da1633d77e..3e3b42eaf6 100644
+index 7bbd483952..ed20b1427e 100644
@@ -23 +25 @@
-@@ -2401,6 +2401,35 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
+@@ -2590,6 +2590,35 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
@@ -32 +34 @@
-+ int qidx;
++ uint32_t qidx;
@@ -35 +37 @@
-+ if (virtio_with_packed_queue(hw)) {
++ if (vtpci_packed_queue(hw)) {
@@ -38 +40 @@
-+ else if (virtio_with_feature(hw, VIRTIO_F_IN_ORDER))
++ else if (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER))
@@ -59 +61 @@
-@@ -2419,6 +2448,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
+@@ -2608,6 +2637,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
@@ -61 +63 @@
- hw->started = 0;
+ hw->started = false;
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/virtio: do not use PMD log type' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (89 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' " Xueming Li
` (161 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/49a2b0ca693e364b05ab14d500382f0edb609719
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 49a2b0ca693e364b05ab14d500382f0edb609719 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 16 Sep 2021 15:25:02 +0200
Subject: [PATCH] net/virtio: do not use PMD log type
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit db48aaa2340047e6fbadbe0db9a76ff712e86ec4 ]
Fixes: 1982462eadea ("net/virtio: add Rx free threshold setting")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 7fb41f12af..bb7f3a36d4 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -695,16 +695,16 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
RTE_MIN(vq->vq_nentries / 4, DEFAULT_RX_FREE_THRESH);
if (rx_free_thresh & 0x3) {
- RTE_LOG(ERR, PMD, "rx_free_thresh must be multiples of four."
- " (rx_free_thresh=%u port=%u queue=%u)\n",
+ PMD_INIT_LOG(ERR, "rx_free_thresh must be multiples of four."
+ " (rx_free_thresh=%u port=%u queue=%u)",
rx_free_thresh, dev->data->port_id, queue_idx);
return -EINVAL;
}
if (rx_free_thresh >= vq->vq_nentries) {
- RTE_LOG(ERR, PMD, "rx_free_thresh must be less than the "
+ PMD_INIT_LOG(ERR, "rx_free_thresh must be less than the "
"number of RX entries (%u)."
- " (rx_free_thresh=%u port=%u queue=%u)\n",
+ " (rx_free_thresh=%u port=%u queue=%u)",
vq->vq_nentries,
rx_free_thresh, dev->data->port_id, queue_idx);
return -EINVAL;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.076203488 +0800
+++ 0091-net-virtio-do-not-use-PMD-log-type.patch 2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From db48aaa2340047e6fbadbe0db9a76ff712e86ec4 Mon Sep 17 00:00:00 2001
+From 49a2b0ca693e364b05ab14d500382f0edb609719 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit db48aaa2340047e6fbadbe0db9a76ff712e86ec4 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
-index 501ca1582d..b9d7c8d18f 100644
+index 7fb41f12af..bb7f3a36d4 100644
@@ -19 +21 @@
-@@ -690,16 +690,16 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -695,16 +695,16 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (90 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/virtio: do not use PMD log type' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' " Xueming Li
` (160 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1900a185181403d1c08a72ef25cd80ea97df139c
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1900a185181403d1c08a72ef25cd80ea97df139c Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 11 Sep 2021 12:02:21 +0800
Subject: [PATCH] net/iavf: fix high CPU usage on frequent command
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit de5bef335eeac3a0b1e29eb2c5fabbcadb9549eb ]
There is currently a scenario test, which will continuously obtain port
statistics, causing the CPU usage to soar, which does not meet the
demand. After positioning analysis, it is found that the VF and PF
command interaction is completed through the iavf_execute_vf_cmd
function.
After the message is sent, it needs to wait for the interrupt thread to
obtain the response from the PF. For the data, the rte_delay_ms
interface is used here to wait, but the CPU will not be released during
the waiting period of this interface, which will cause the statistics to
keep occupying the CPU. This is also the root cause of the soaring CPU.
The command interaction should belong to the control plane, and there
will not be too high requirements for performance. It is recommended to
wait for the interface iavf_msec_delay to complete without taking up the
CPU time.
Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_vchnl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 1021108ff5..00f868b3c7 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -180,7 +180,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
args->out_buffer);
if (result == IAVF_MSG_CMD)
break;
- rte_delay_ms(ASQ_DELAY_MS);
+ iavf_msec_delay(ASQ_DELAY_MS);
} while (i++ < MAX_TRY_TIMES);
if (i >= MAX_TRY_TIMES ||
vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
@@ -206,7 +206,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
err = -1;
break;
}
- rte_delay_ms(ASQ_DELAY_MS);
+ iavf_msec_delay(ASQ_DELAY_MS);
/* If don't read msg or read sys event, continue */
} while (i++ < MAX_TRY_TIMES);
if (i >= MAX_TRY_TIMES ||
@@ -224,7 +224,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
do {
if (vf->pend_cmd == VIRTCHNL_OP_UNKNOWN)
break;
- rte_delay_ms(ASQ_DELAY_MS);
+ iavf_msec_delay(ASQ_DELAY_MS);
/* If don't read msg or read sys event, continue */
} while (i++ < MAX_TRY_TIMES);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.117468053 +0800
+++ 0092-net-iavf-fix-high-CPU-usage-on-frequent-command.patch 2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From de5bef335eeac3a0b1e29eb2c5fabbcadb9549eb Mon Sep 17 00:00:00 2001
+From 1900a185181403d1c08a72ef25cd80ea97df139c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit de5bef335eeac3a0b1e29eb2c5fabbcadb9549eb ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 050e5f7232..3275687927 100644
+index 1021108ff5..00f868b3c7 100644
@@ -35 +37 @@
-@@ -182,7 +182,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -180,7 +180,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
@@ -44 +46 @@
-@@ -208,7 +208,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -206,7 +206,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
@@ -53 +55 @@
-@@ -226,7 +226,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -224,7 +224,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (91 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' " Xueming Li
` (159 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Luca Boccassi, Simei Su, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cd90c7a5b2ed9bb585579e387b6832c219ccb1da
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From cd90c7a5b2ed9bb585579e387b6832c219ccb1da Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 3 Sep 2021 18:04:11 +0800
Subject: [PATCH] net/ice: fix double free ACL flow entry
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e360df56477a0b5963a743d82f399efd468ec10c ]
If call ice_flow_rem_entry() directly without checking entry_id, may
cause an ACL flow entry to be freed more than once.
This patch tries to find entry_id first, then call ice_flow_rem_entry()
to avoid the defect.
Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Reviewed-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/ice_acl_filter.c | 33 +++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index 95b235e470..7e44751d64 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -45,7 +45,7 @@ static struct ice_flow_parser ice_acl_parser;
struct acl_rule {
enum ice_fltr_ptype flow_type;
- uint32_t entry_id[4];
+ uint64_t entry_id[4];
};
static struct
@@ -440,7 +440,7 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
PMD_DRV_LOG(ERR, "Fail to add entry.");
return ret;
}
- rule->entry_id[entry_idx] = slot_id;
+ rule->entry_id[entry_idx] = entry_id;
pf->acl.hw_entry_id[slot_id] = hw_entry;
} else {
PMD_DRV_LOG(ERR, "Exceed the maximum entry number(%d)"
@@ -451,18 +451,28 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
return 0;
}
+static inline void
+ice_acl_del_entry(struct ice_hw *hw, uint64_t entry_id)
+{
+ uint64_t hw_entry;
+
+ hw_entry = ice_flow_find_entry(hw, ICE_BLK_ACL, entry_id);
+ ice_flow_rem_entry(hw, ICE_BLK_ACL, hw_entry);
+}
+
static inline void
ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx)
{
uint32_t slot_id;
int32_t i;
+ uint64_t entry_id;
struct ice_hw *hw = ICE_PF_TO_HW(pf);
for (i = 0; i < entry_idx; i++) {
- slot_id = rule->entry_id[i];
+ entry_id = rule->entry_id[i];
+ slot_id = ICE_LO_DWORD(entry_id);
rte_bitmap_set(pf->acl.slots, slot_id);
- ice_flow_rem_entry(hw, ICE_BLK_ACL,
- pf->acl.hw_entry_id[slot_id]);
+ ice_acl_del_entry(hw, entry_id);
}
}
@@ -562,6 +572,7 @@ ice_acl_destroy_filter(struct ice_adapter *ad,
{
struct acl_rule *rule = (struct acl_rule *)flow->rule;
uint32_t slot_id, i;
+ uint64_t entry_id;
struct ice_pf *pf = &ad->pf;
struct ice_hw *hw = ICE_PF_TO_HW(pf);
int ret = 0;
@@ -569,19 +580,19 @@ ice_acl_destroy_filter(struct ice_adapter *ad,
switch (rule->flow_type) {
case ICE_FLTR_PTYPE_NONF_IPV4_OTHER:
for (i = 0; i < 4; i++) {
- slot_id = rule->entry_id[i];
+ entry_id = rule->entry_id[i];
+ slot_id = ICE_LO_DWORD(entry_id);
rte_bitmap_set(pf->acl.slots, slot_id);
- ice_flow_rem_entry(hw, ICE_BLK_ACL,
- pf->acl.hw_entry_id[slot_id]);
+ ice_acl_del_entry(hw, entry_id);
}
break;
case ICE_FLTR_PTYPE_NONF_IPV4_UDP:
case ICE_FLTR_PTYPE_NONF_IPV4_TCP:
case ICE_FLTR_PTYPE_NONF_IPV4_SCTP:
- slot_id = rule->entry_id[0];
+ entry_id = rule->entry_id[0];
+ slot_id = ICE_LO_DWORD(entry_id);
rte_bitmap_set(pf->acl.slots, slot_id);
- ice_flow_rem_entry(hw, ICE_BLK_ACL,
- pf->acl.hw_entry_id[slot_id]);
+ ice_acl_del_entry(hw, entry_id);
break;
default:
rte_flow_error_set(error, EINVAL,
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.158587552 +0800
+++ 0093-net-ice-fix-double-free-ACL-flow-entry.patch 2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From e360df56477a0b5963a743d82f399efd468ec10c Mon Sep 17 00:00:00 2001
+From cd90c7a5b2ed9bb585579e387b6832c219ccb1da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e360df56477a0b5963a743d82f399efd468ec10c ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 614bd44e23..8fe6f5aeb0 100644
+index 95b235e470..7e44751d64 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (92 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'common/iavf: fix ARQ " Xueming Li
` (158 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eca9795521b483007ed13c06affb580921cbab09
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From eca9795521b483007ed13c06affb580921cbab09 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Fri, 10 Sep 2021 14:54:57 +0800
Subject: [PATCH] net/iavf: fix Rx queue IRQ resource leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ad5629de9a7ba367886c6619a1eeb56c36fd2748 ]
In the iavf_config_rx_queues_irqs function, the memory pointed to by the
intr_handle->intr_vec and qv_map addresses is not released in the
subsequent hook branch, resulting in resource leakage.
Fixes: f593944fc988 ("net/iavf: enable IRQ mapping configuration for large VF")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 885b2a4bd0..6bc3108631 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -509,7 +509,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
if (!qv_map) {
PMD_DRV_LOG(ERR, "Failed to allocate %d queue-vector map",
dev->data->nb_rx_queues);
- return -1;
+ goto qv_map_alloc_err;
}
if (!dev->data->dev_conf.intr_conf.rxq ||
@@ -594,7 +594,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
if (!vf->lv_enabled) {
if (iavf_config_irq_map(adapter)) {
PMD_DRV_LOG(ERR, "config interrupt mapping failed");
- return -1;
+ goto config_irq_map_err;
}
} else {
uint16_t num_qv_maps = dev->data->nb_rx_queues;
@@ -604,7 +604,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
if (iavf_config_irq_map_lv(adapter,
IAVF_IRQ_MAP_NUM_PER_BUF, index)) {
PMD_DRV_LOG(ERR, "config interrupt mapping for large VF failed");
- return -1;
+ goto config_irq_map_err;
}
num_qv_maps -= IAVF_IRQ_MAP_NUM_PER_BUF;
index += IAVF_IRQ_MAP_NUM_PER_BUF;
@@ -612,10 +612,20 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
if (iavf_config_irq_map_lv(adapter, num_qv_maps, index)) {
PMD_DRV_LOG(ERR, "config interrupt mapping for large VF failed");
- return -1;
+ goto config_irq_map_err;
}
}
return 0;
+
+config_irq_map_err:
+ rte_free(vf->qv_map);
+ vf->qv_map = NULL;
+
+qv_map_alloc_err:
+ rte_free(intr_handle->intr_vec);
+ intr_handle->intr_vec = NULL;
+
+ return -1;
}
static int
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.199417331 +0800
+++ 0094-net-iavf-fix-Rx-queue-IRQ-resource-leak.patch 2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From ad5629de9a7ba367886c6619a1eeb56c36fd2748 Mon Sep 17 00:00:00 2001
+From eca9795521b483007ed13c06affb580921cbab09 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad5629de9a7ba367886c6619a1eeb56c36fd2748 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c004e72486..5a5a7f59e1 100644
+index 885b2a4bd0..6bc3108631 100644
@@ -23 +25 @@
-@@ -676,7 +676,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -509,7 +509,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -32 +34 @@
-@@ -761,7 +761,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -594,7 +594,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -41 +43 @@
-@@ -771,7 +771,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -604,7 +604,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -50 +52 @@
-@@ -779,10 +779,20 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -612,10 +612,20 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'common/iavf: fix ARQ resource leak' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (93 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' " Xueming Li
` (157 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/90d7fd5b10ec48ae9cb0397d34043ce198c110f1
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 90d7fd5b10ec48ae9cb0397d34043ce198c110f1 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Fri, 10 Sep 2021 11:12:49 +0800
Subject: [PATCH] common/iavf: fix ARQ resource leak
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 395d41fbb1dd2faa21e143865ce12c195ec8194b ]
In the iavf_init_arq function, if an exception occurs in the
iavf_config_arq_regs function, and the previously applied ARQ (Admin
Receive Queue) bufs resource is released. This patch maintains the same
modification as the iavf_init_asq function to roll back resources.
Fixes: 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/iavf_adminq.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c
index 8bae51a46a..8d03de0553 100644
--- a/drivers/common/iavf/iavf_adminq.c
+++ b/drivers/common/iavf/iavf_adminq.c
@@ -417,7 +417,7 @@ enum iavf_status iavf_init_arq(struct iavf_hw *hw)
/* initialize base registers */
ret_code = iavf_config_arq_regs(hw);
if (ret_code != IAVF_SUCCESS)
- goto init_adminq_free_rings;
+ goto init_config_regs;
/* success! */
hw->aq.arq.count = hw->aq.num_arq_entries;
@@ -425,6 +425,10 @@ enum iavf_status iavf_init_arq(struct iavf_hw *hw)
init_adminq_free_rings:
iavf_free_adminq_arq(hw);
+ return ret_code;
+
+init_config_regs:
+ iavf_free_arq_bufs(hw);
init_adminq_exit:
return ret_code;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.242456542 +0800
+++ 0095-common-iavf-fix-ARQ-resource-leak.patch 2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From 395d41fbb1dd2faa21e143865ce12c195ec8194b Mon Sep 17 00:00:00 2001
+From 90d7fd5b10ec48ae9cb0397d34043ce198c110f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 395d41fbb1dd2faa21e143865ce12c195ec8194b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 0bf5af0cbe..9c36e8908e 100644
+index 8bae51a46a..8d03de0553 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (94 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'common/iavf: fix ARQ " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' " Xueming Li
` (156 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c9eddf61f5d527436bb08c406bc7a29cddd00b25
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c9eddf61f5d527436bb08c406bc7a29cddd00b25 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 24 Sep 2021 16:08:20 +0800
Subject: [PATCH] net/ice: retry getting VF VSI map after failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit b71573ec2fc239e814a3f329a7c88f4067e91eae ]
The request of getting VF VSI map request may fail when DCF is busy,
this patch adds retry mechanism to make it able to succeed.
Fixes: b09d34ac8584 ("net/ice: fix flow redirector")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/ice_dcf.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 6a24f4f36c..e371b3dc67 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -529,15 +529,26 @@ int
ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
{
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(hw->eth_dev);
- int err = 0;
+ int i = 0;
+ int err = -1;
rte_spinlock_lock(&hw->vc_cmd_send_lock);
rte_intr_disable(&pci_dev->intr_handle);
ice_dcf_disable_irq0(hw);
- if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
- err = -1;
+ for (;;) {
+ if (ice_dcf_get_vf_resource(hw) == 0 &&
+ ice_dcf_get_vf_vsi_map(hw) >= 0) {
+ err = 0;
+ break;
+ }
+
+ if (++i >= ICE_DCF_ARQ_MAX_RETRIES)
+ break;
+
+ rte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);
+ }
rte_intr_enable(&pci_dev->intr_handle);
ice_dcf_enable_irq0(hw);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.285199445 +0800
+++ 0096-net-ice-retry-getting-VF-VSI-map-after-failure.patch 2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From b71573ec2fc239e814a3f329a7c88f4067e91eae Mon Sep 17 00:00:00 2001
+From c9eddf61f5d527436bb08c406bc7a29cddd00b25 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b71573ec2fc239e814a3f329a7c88f4067e91eae ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 38e9a84698..c9c01a14e3 100644
+index 6a24f4f36c..e371b3dc67 100644
@@ -22 +24 @@
-@@ -534,15 +534,26 @@ int
+@@ -529,15 +529,26 @@ int
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (95 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' " Xueming Li
` (155 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Kalesh AP
Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, Somnath Kotur,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ea39d70a5080365fd746c61532bdedc6599e0d94
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ea39d70a5080365fd746c61532bdedc6599e0d94 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 22 Sep 2021 14:00:44 +0530
Subject: [PATCH] net/bnxt: fix function driver register/unregister
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 61ad5c1ac9de245e7d20a67375d56682c70bebde ]
1. Fix to use correct fields in the request structure of
HWRM_FUNC_DRV_RGTR.
2. Remove the "flags" argument to bnxt_hwrm_func_driver_unregister()
as it is not needed.
Fixes: beb3087f5056 ("net/bnxt: add driver register/unregister")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_hwrm.c | 9 ++++-----
drivers/net/bnxt/bnxt_hwrm.h | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index a563c2275f..3c0ab629c3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5792,7 +5792,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
bp->pf->vf_req_buf = NULL;
}
- rc = bnxt_hwrm_func_driver_unregister(bp, 0);
+ rc = bnxt_hwrm_func_driver_unregister(bp);
bp->flags &= ~BNXT_FLAG_REGISTERED;
bnxt_free_ctx_mem(bp);
if (!reconfig_dev) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 50b41d82d3..a3800cf6b1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -941,9 +941,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
HWRM_PREP(&req, HWRM_FUNC_DRV_RGTR, BNXT_USE_CHIMP_MB);
req.enables = rte_cpu_to_le_32(HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER |
HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD);
- req.ver_maj = RTE_VER_YEAR;
- req.ver_min = RTE_VER_MONTH;
- req.ver_upd = RTE_VER_MINOR;
+ req.ver_maj_8b = RTE_VER_YEAR;
+ req.ver_min_8b = RTE_VER_MONTH;
+ req.ver_upd_8b = RTE_VER_MINOR;
if (BNXT_PF(bp)) {
req.enables |= rte_cpu_to_le_32(
@@ -1240,7 +1240,7 @@ error:
return rc;
}
-int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
+int bnxt_hwrm_func_driver_unregister(struct bnxt *bp)
{
int rc;
struct hwrm_func_drv_unrgtr_input req = {.req_type = 0 };
@@ -1250,7 +1250,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
return 0;
HWRM_PREP(&req, HWRM_FUNC_DRV_UNRGTR, BNXT_USE_CHIMP_MB);
- req.flags = flags;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 82010e675b..934a2056b8 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -141,7 +141,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);
int bnxt_hwrm_func_driver_register(struct bnxt *bp);
int bnxt_hwrm_func_qcaps(struct bnxt *bp);
int bnxt_hwrm_func_reset(struct bnxt *bp);
-int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags);
+int bnxt_hwrm_func_driver_unregister(struct bnxt *bp);
int bnxt_hwrm_func_qstats(struct bnxt *bp, uint16_t fid,
struct rte_eth_stats *stats,
struct hwrm_func_qstats_output *func_qstats);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.327175471 +0800
+++ 0097-net-bnxt-fix-function-driver-register-unregister.patch 2021-11-10 14:17:01.857412867 +0800
@@ -1 +1 @@
-From 61ad5c1ac9de245e7d20a67375d56682c70bebde Mon Sep 17 00:00:00 2001
+From ea39d70a5080365fd746c61532bdedc6599e0d94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 61ad5c1ac9de245e7d20a67375d56682c70bebde ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 097dd10de9..dc7dee1d2a 100644
+index a563c2275f..3c0ab629c3 100644
@@ -28 +30 @@
-@@ -6156,7 +6156,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5792,7 +5792,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
@@ -38 +40 @@
-index 585cdeded8..d4d8581af1 100644
+index 50b41d82d3..a3800cf6b1 100644
@@ -41 +43 @@
-@@ -1059,9 +1059,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
+@@ -941,9 +941,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
@@ -54 +56 @@
-@@ -1370,7 +1370,7 @@ error:
+@@ -1240,7 +1240,7 @@ error:
@@ -63 +65 @@
-@@ -1380,7 +1380,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
+@@ -1250,7 +1250,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
@@ -72 +74 @@
-index b311ff59c0..6dc23b93ac 100644
+index 82010e675b..934a2056b8 100644
@@ -75 +77 @@
-@@ -145,7 +145,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);
+@@ -141,7 +141,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (96 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' " Xueming Li
` (154 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f1c89a7eddcb815390761140a83539bb91a4ae72
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f1c89a7eddcb815390761140a83539bb91a4ae72 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 17 Sep 2021 13:20:45 -0700
Subject: [PATCH] net/bnxt: fix Tx queue startup state
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0f22fe124bffcbfa15a8179b9cc835ae64b1a3fe ]
Default queue state of Tx queues on startup is not correct.
Fix this by setting the state when the port is started.
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++
drivers/net/bnxt/bnxt_txq.c | 5 -----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3c0ab629c3..55034bccb5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -805,6 +805,16 @@ skip_cosq_cfg:
goto err_out;
}
+ for (j = 0; j < bp->tx_nr_rings; j++) {
+ struct bnxt_tx_queue *txq = bp->tx_queues[j];
+
+ if (!txq->tx_deferred_start) {
+ bp->eth_dev->data->tx_queue_state[j] =
+ RTE_ETH_QUEUE_STATE_STARTED;
+ txq->tx_started = true;
+ }
+ }
+
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
if (rc) {
PMD_DRV_LOG(ERR,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 795056e457..6c5e6948a7 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -164,11 +164,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
eth_dev->data->tx_queues[queue_idx] = txq;
- if (txq->tx_deferred_start)
- txq->tx_started = false;
- else
- txq->tx_started = true;
-
return 0;
err:
bnxt_tx_queue_release_op(txq);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.372807544 +0800
+++ 0098-net-bnxt-fix-Tx-queue-startup-state.patch 2021-11-10 14:17:01.860746172 +0800
@@ -1 +1 @@
-From 0f22fe124bffcbfa15a8179b9cc835ae64b1a3fe Mon Sep 17 00:00:00 2001
+From f1c89a7eddcb815390761140a83539bb91a4ae72 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f22fe124bffcbfa15a8179b9cc835ae64b1a3fe ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index dc7dee1d2a..08537d8b87 100644
+index 3c0ab629c3..55034bccb5 100644
@@ -23,2 +25,2 @@
-@@ -814,6 +814,16 @@ skip_cosq_cfg:
- }
+@@ -805,6 +805,16 @@ skip_cosq_cfg:
+ goto err_out;
@@ -41 +43 @@
-index 830416af3d..3ffc334cff 100644
+index 795056e457..6c5e6948a7 100644
@@ -44 +46 @@
-@@ -166,11 +166,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -164,11 +164,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (97 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' " Xueming Li
` (153 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5b3f9bec58acdcb8b2bcd194ba529019f81cf811
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 5b3f9bec58acdcb8b2bcd194ba529019f81cf811 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 20 Sep 2021 16:11:51 -0700
Subject: [PATCH] net/bnxt: fix memzone free for Tx and Rx rings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 64a4d59df5d668e18762a80d360a1aa8a9e8d81d ]
The device cleanup logic was freeing most of the ring related memory,
but was not freeing up the memzone associated with the rings.
This patch fixes the issue.
Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 3 +++
drivers/net/bnxt/bnxt_txr.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 6b3603d11f..c1893bb940 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1134,6 +1134,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
rte_free(rxq->cp_ring->cp_ring_struct);
rte_free(rxq->cp_ring);
+ rte_memzone_free(rxq->mz);
+ rxq->mz = NULL;
+
rte_free(rxq);
bp->rx_queues[i] = NULL;
}
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index ad78fa1bea..78d7329f2b 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -37,6 +37,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
rte_free(txq->cp_ring->cp_ring_struct);
rte_free(txq->cp_ring);
+ rte_memzone_free(txq->mz);
+ txq->mz = NULL;
+
rte_free(txq);
bp->tx_queues[i] = NULL;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.415107018 +0800
+++ 0099-net-bnxt-fix-memzone-free-for-Tx-and-Rx-rings.patch 2021-11-10 14:17:01.860746172 +0800
@@ -1 +1 @@
-From 64a4d59df5d668e18762a80d360a1aa8a9e8d81d Mon Sep 17 00:00:00 2001
+From 5b3f9bec58acdcb8b2bcd194ba529019f81cf811 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 64a4d59df5d668e18762a80d360a1aa8a9e8d81d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index a40fa50138..4c1ee4294e 100644
+index 6b3603d11f..c1893bb940 100644
@@ -26 +28 @@
-@@ -1207,6 +1207,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
+@@ -1134,6 +1134,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
@@ -37 +39 @@
-index 47824334ae..9e45ddd7a8 100644
+index ad78fa1bea..78d7329f2b 100644
@@ -40 +42 @@
-@@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
+@@ -37,6 +37,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (98 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/mlx5: fix flow tables double release' " Xueming Li
` (152 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/95cf6a360f53518035593218892362d7d3c402cd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 95cf6a360f53518035593218892362d7d3c402cd Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 24 Sep 2021 12:52:47 -0700
Subject: [PATCH] net/bnxt: fix tunnel port accounting
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ]
Fix the tunnel port counting logic.
Currently we are incrementing the port count without checking
the if bnxt_hwrm_tunnel_dst_port_alloc would return success or failure.
Modify the logic to increment it only if the firmware returns success.
Fixes: 10d074b2022d ("net/bnxt: support tunneling")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 55034bccb5..e67e83ea7a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2286,7 +2286,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
}
tunnel_type =
HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN;
- bp->vxlan_port_cnt++;
break;
case RTE_TUNNEL_TYPE_GENEVE:
if (bp->geneve_port_cnt) {
@@ -2301,7 +2300,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
}
tunnel_type =
HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE;
- bp->geneve_port_cnt++;
break;
default:
PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
@@ -2309,6 +2307,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
}
rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port,
tunnel_type);
+
+ if (rc != 0)
+ return rc;
+
+ if (tunnel_type ==
+ HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN)
+ bp->vxlan_port_cnt++;
+
+ if (tunnel_type ==
+ HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE)
+ bp->geneve_port_cnt++;
+
return rc;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.455855459 +0800
+++ 0100-net-bnxt-fix-tunnel-port-accounting.patch 2021-11-10 14:17:01.860746172 +0800
@@ -1 +1 @@
-From 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 Mon Sep 17 00:00:00 2001
+From 95cf6a360f53518035593218892362d7d3c402cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 857da91c9d..aa7e7fdc85 100644
+index 55034bccb5..e67e83ea7a 100644
@@ -24 +26 @@
-@@ -2369,7 +2369,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -2286,7 +2286,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
@@ -32 +34 @@
-@@ -2384,7 +2383,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -2301,7 +2300,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
@@ -40 +42 @@
-@@ -2392,6 +2390,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -2309,6 +2307,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix flow tables double release' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (99 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' " Xueming Li
` (151 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Bing Zhao; +Cc: Luca Boccassi, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3df90648847edefb376cc3cd8fcafd37d3c1d943
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3df90648847edefb376cc3cd8fcafd37d3c1d943 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Tue, 28 Sep 2021 07:08:51 +0300
Subject: [PATCH] net/mlx5: fix flow tables double release
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a6b57ff48708e659ad35aed499c32805de85d3cd ]
In the function mlx5_alloc_shared_dr(), there are various reasons
to result in a failure and error clean up process. While in the
caller of mlx5_dev_spawn(), once there is a error occurring after
the mlx5_alloc_shared_dr(), the mlx5_os_free_shared_dr() is called
to release all the resources.
To prevent a double release, the pointers of the resources should
be checked before the releasing and set to NULL after done.
In the mlx5_free_table_hash_list(), after the releasing, the pointer
was missed to set to NULL and a double release may cause a crash.
By setting the tables pointer to NULL as done for other resources,
the double release and crash could be solved.
Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index cb984debcc..48588d4cd5 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1130,6 +1130,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
if (!sh->flow_tbls)
return;
mlx5_hlist_destroy(sh->flow_tbls);
+ sh->flow_tbls = NULL;
}
/**
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.499231911 +0800
+++ 0101-net-mlx5-fix-flow-tables-double-release.patch 2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From a6b57ff48708e659ad35aed499c32805de85d3cd Mon Sep 17 00:00:00 2001
+From 3df90648847edefb376cc3cd8fcafd37d3c1d943 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a6b57ff48708e659ad35aed499c32805de85d3cd ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index aa428366b3..45ccfe2784 100644
+index cb984debcc..48588d4cd5 100644
@@ -34 +36 @@
-@@ -1372,6 +1372,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
+@@ -1130,6 +1130,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (100 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/mlx5: fix flow tables double release' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'test/latency: fix loop boundary' " Xueming Li
` (150 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Long Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a00d38a2e164c755bfb96192c3da52cc7db4d935
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From a00d38a2e164c755bfb96192c3da52cc7db4d935 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 2 Oct 2021 18:24:30 +0200
Subject: [PATCH] bus/vmbus: fix leak on device scan
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c6c865d7e2e47a3a1a65a091103cca056bb073ef ]
Caught running ASAN.
The device name was leaked on scan.
rte_device name field being a const, use a local pointer and release
in error path.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Long Li <longli@microsoft.com>
---
drivers/bus/vmbus/linux/vmbus_bus.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c
index 3c924eee14..68f6cc5742 100644
--- a/drivers/bus/vmbus/linux/vmbus_bus.c
+++ b/drivers/bus/vmbus/linux/vmbus_bus.c
@@ -236,13 +236,14 @@ vmbus_scan_one(const char *name)
char filename[PATH_MAX];
char dirname[PATH_MAX];
unsigned long tmp;
+ char *dev_name;
dev = calloc(1, sizeof(*dev));
if (dev == NULL)
return -1;
dev->device.bus = &rte_vmbus_bus.bus;
- dev->device.name = strdup(name);
+ dev->device.name = dev_name = strdup(name);
if (!dev->device.name)
goto error;
@@ -261,6 +262,7 @@ vmbus_scan_one(const char *name)
/* skip non-network devices */
if (rte_uuid_compare(dev->class_id, vmbus_nic_uuid) != 0) {
+ free(dev_name);
free(dev);
return 0;
}
@@ -312,6 +314,7 @@ vmbus_scan_one(const char *name)
} else { /* already registered */
VMBUS_LOG(NOTICE,
"%s already registered", name);
+ free(dev_name);
free(dev);
}
return 0;
@@ -322,6 +325,7 @@ vmbus_scan_one(const char *name)
error:
VMBUS_LOG(DEBUG, "failed");
+ free(dev_name);
free(dev);
return -1;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.540125205 +0800
+++ 0102-bus-vmbus-fix-leak-on-device-scan.patch 2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From c6c865d7e2e47a3a1a65a091103cca056bb073ef Mon Sep 17 00:00:00 2001
+From a00d38a2e164c755bfb96192c3da52cc7db4d935 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c6c865d7e2e47a3a1a65a091103cca056bb073ef ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/latency: fix loop boundary' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (101 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' " Xueming Li
` (149 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Reshma Pattan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1b8fac0312d57d969fec4334f8c18450a338fcb5
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1b8fac0312d57d969fec4334f8c18450a338fcb5 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 2 Oct 2021 18:24:31 +0200
Subject: [PATCH] test/latency: fix loop boundary
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit cb3dd14c77f4a44c204b7ac10898ecc33afeb9a0 ]
Caught running ASAN.
lat_stats_strings[] is an array containing NUM_STATS strings.
Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
app/test/test_latencystats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c
index 427339904d..724acbc315 100644
--- a/app/test/test_latencystats.c
+++ b/app/test/test_latencystats.c
@@ -80,7 +80,7 @@ static int test_latencystats_get_names(void)
/* Success Test: Valid names and size */
size = NUM_STATS;
ret = rte_latencystats_get_names(names, size);
- for (i = 0; i <= NUM_STATS; i++) {
+ for (i = 0; i < NUM_STATS; i++) {
if (strcmp(lat_stats_strings[i].name, names[i].name) == 0)
printf(" %s\n", names[i].name);
else
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.579007732 +0800
+++ 0103-test-latency-fix-loop-boundary.patch 2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From cb3dd14c77f4a44c204b7ac10898ecc33afeb9a0 Mon Sep 17 00:00:00 2001
+From 1b8fac0312d57d969fec4334f8c18450a338fcb5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cb3dd14c77f4a44c204b7ac10898ecc33afeb9a0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (102 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'test/latency: fix loop boundary' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'common/dpaax: fix physical address conversion' " Xueming Li
` (148 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Mohamad Noor Alim Hussin
Cc: Luca Boccassi, Tianfei Zhang, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a7bb99fc8602421e9ba3d527d2640b4e8ed25776
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From a7bb99fc8602421e9ba3d527d2640b4e8ed25776 Mon Sep 17 00:00:00 2001
From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Date: Tue, 28 Sep 2021 12:36:10 +0800
Subject: [PATCH] raw/ifpga/base: fix linking with librt
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 829c5946b55f569e56df399b94ab51c473f6696e ]
Finding with "librt" keyword would give the output with
full path of librt such as
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/librt.so
instead of -lrt in libdpdk.pc pkg-config file.
Assume find_library() will prepend "lib", thus remove
"lib" from "librt" keyword. The output will shows
as -lrt.
This will cause an issue when compile DPDK app with
static library as the path of librt has been hard-coded
in the libdpdk.pc file.
Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in multi-process")
Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/raw/ifpga/base/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
index da2d6e33ca..949f7f1271 100644
--- a/drivers/raw/ifpga/base/meson.build
+++ b/drivers/raw/ifpga/base/meson.build
@@ -25,7 +25,7 @@ sources = [
rtdep = dependency('librt', required: false)
if not rtdep.found()
- rtdep = cc.find_library('librt', required: false)
+ rtdep = cc.find_library('rt', required: false)
endif
if not rtdep.found()
build = false
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.618084008 +0800
+++ 0104-raw-ifpga-base-fix-linking-with-librt.patch 2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From 829c5946b55f569e56df399b94ab51c473f6696e Mon Sep 17 00:00:00 2001
+From a7bb99fc8602421e9ba3d527d2640b4e8ed25776 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 829c5946b55f569e56df399b94ab51c473f6696e ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index db602cee69..2de8e7ea22 100644
+index da2d6e33ca..949f7f1271 100644
@@ -33 +35 @@
-@@ -27,7 +27,7 @@ sources = [
+@@ -25,7 +25,7 @@ sources = [
@@ -37,2 +39,2 @@
-- rtdep = cc.find_library('librt', required: false)
-+ rtdep = cc.find_library('rt', required: false)
+- rtdep = cc.find_library('librt', required: false)
++ rtdep = cc.find_library('rt', required: false)
@@ -41 +43 @@
- build = false
+ build = false
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'common/dpaax: fix physical address conversion' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (103 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' " Xueming Li
` (147 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Luca Boccassi, Nipun Gupta, Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b4108eb62c345e0caf91e5d31180aef0b8131f06
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b4108eb62c345e0caf91e5d31180aef0b8131f06 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 6 Oct 2021 22:31:31 +0530
Subject: [PATCH] common/dpaax: fix physical address conversion
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c5e6bc12a319d4500d931ca84d4227e4d7495956 ]
If some of the VA entries of table are somehow not populated and are
NULL, it can add offset to NULL and return the invalid VA in PA to
VA conversion.
In this patch, adding a check if the VA entry has valid address only
then add offset and return VA.
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/common/dpaax/dpaax_iova_table.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index 230fba8ba0..b1f2300c52 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2021 NXP
*/
#ifndef _DPAAX_IOVA_TABLE_H_
@@ -101,6 +101,12 @@ dpaax_iova_table_get_va(phys_addr_t paddr) {
/* paddr > entry->start && paddr <= entry->(start+len) */
index = (paddr_align - entry[i].start)/DPAAX_MEM_SPLIT;
+ /* paddr is within range, but no vaddr entry ever written
+ * at index
+ */
+ if ((void *)(uintptr_t)entry[i].pages[index] == NULL)
+ return NULL;
+
vaddr = (void *)((uintptr_t)entry[i].pages[index] + offset);
break;
} while (1);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.656966517 +0800
+++ 0105-common-dpaax-fix-physical-address-conversion.patch 2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From c5e6bc12a319d4500d931ca84d4227e4d7495956 Mon Sep 17 00:00:00 2001
+From b4108eb62c345e0caf91e5d31180aef0b8131f06 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c5e6bc12a319d4500d931ca84d4227e4d7495956 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (104 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'common/dpaax: fix physical address conversion' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' " Xueming Li
` (146 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8f825b3b132ba3f0f0a30ff8e6c135af3495320a
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8f825b3b132ba3f0f0a30ff8e6c135af3495320a Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 1 Oct 2021 12:07:19 +0300
Subject: [PATCH] ethdev: fix xstats by ID API documentation
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit bc5112ca599c1e565c0f2d3dc3de0f73381a8c05 ]
Document valid combinations of input arguments in accordance with
current implementation in ethdev.
Fixes: 79c913a42f0e ("ethdev: retrieve xstats by ID")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 35 ++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index de577ca075..57a2edf363 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2835,21 +2835,23 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
* @param port_id
* The port identifier of the Ethernet device.
* @param xstats_names
- * An rte_eth_xstat_name array of at least *size* elements to
- * be filled. If set to NULL, the function returns the required number
- * of elements.
- * @param ids
- * IDs array given by app to retrieve specific statistics
+ * Array to be filled in with names of requested device statistics.
+ * Must not be NULL if @p ids are specified (not NULL).
* @param size
- * The size of the xstats_names array (number of elements).
+ * Number of elements in @p xstats_names array (if not NULL) and in
+ * @p ids array (if not NULL). Must be 0 if both array pointers are NULL.
+ * @param ids
+ * IDs array given by app to retrieve specific statistics. May be NULL to
+ * retrieve names of all available statistics or, if @p xstats_names is
+ * NULL as well, just the number of available statistics.
* @return
* - A positive value lower or equal to size: success. The return value
* is the number of entries filled in the stats table.
- * - A positive value higher than size: error, the given statistics table
+ * - A positive value higher than size: success. The given statistics table
* is too small. The return value corresponds to the size that should
* be given to succeed. The entries in the table are not valid and
* shall not be used by the caller.
- * - A negative value on error (invalid port id).
+ * - A negative value on error.
*/
int
rte_eth_xstats_get_names_by_id(uint16_t port_id,
@@ -2862,22 +2864,23 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,
* @param port_id
* The port identifier of the Ethernet device.
* @param ids
- * A pointer to an ids array passed by application. This tells which
- * statistics values function should retrieve. This parameter
- * can be set to NULL if size is 0. In this case function will retrieve
- * all available statistics.
+ * IDs array given by app to retrieve specific statistics. May be NULL to
+ * retrieve all available statistics or, if @p values is NULL as well,
+ * just the number of available statistics.
* @param values
- * A pointer to a table to be filled with device statistics values.
+ * Array to be filled in with requested device statistics.
+ * Must not be NULL if ids are specified (not NULL).
* @param size
- * The size of the ids array (number of elements).
+ * Number of elements in @p values array (if not NULL) and in @p ids
+ * array (if not NULL). Must be 0 if both array pointers are NULL.
* @return
* - A positive value lower or equal to size: success. The return value
* is the number of entries filled in the stats table.
- * - A positive value higher than size: error, the given statistics table
+ * - A positive value higher than size: success: The given statistics table
* is too small. The return value corresponds to the size that should
* be given to succeed. The entries in the table are not valid and
* shall not be used by the caller.
- * - A negative value on error (invalid port id).
+ * - A negative value on error.
*/
int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
uint64_t *values, unsigned int size);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.696319804 +0800
+++ 0106-ethdev-fix-xstats-by-ID-API-documentation.patch 2021-11-10 14:17:01.867412785 +0800
@@ -1 +1 @@
-From bc5112ca599c1e565c0f2d3dc3de0f73381a8c05 Mon Sep 17 00:00:00 2001
+From 8f825b3b132ba3f0f0a30ff8e6c135af3495320a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bc5112ca599c1e565c0f2d3dc3de0f73381a8c05 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- lib/ethdev/rte_ethdev.h | 35 +++++++++++++++++++----------------
+ lib/librte_ethdev/rte_ethdev.h | 35 ++++++++++++++++++----------------
@@ -20,5 +22,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index afdc53b674..2ad2bf2019 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -2896,21 +2896,23 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index de577ca075..57a2edf363 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2835,21 +2835,23 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
@@ -56 +58 @@
-@@ -2923,22 +2925,23 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,
+@@ -2862,22 +2864,23 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (105 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice: " Xueming Li
` (145 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b51d3a497044316f72fc87a1707ab2033a998ea4
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b51d3a497044316f72fc87a1707ab2033a998ea4 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:28:20 +0800
Subject: [PATCH] net/e1000: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 09cbfa2da4268b4f789ffd34587365b51fa656b4 ]
Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:
rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>em_rx_queue_release
rte_eth_dev_close
-->eth_em_close
---->em_dev_free_queues
------>em_rx_queue_release
(not been called due to nb_rx_queues and nb_tx_queues are 0)
And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.
Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/e1000/em_rxtx.c | 8 ++++++--
drivers/net/e1000/igb_rxtx.c | 9 +++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 19e3bffd46..a7439c3aa7 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -104,6 +104,7 @@ struct em_rx_queue {
uint8_t hthresh; /**< Host threshold register. */
uint8_t wthresh; /**< Write-back threshold register. */
uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise. */
+ const struct rte_memzone *mz;
};
/**
@@ -173,6 +174,7 @@ struct em_tx_queue {
struct em_ctx_info ctx_cache;
/**< Hardware context history.*/
uint64_t offloads; /**< offloads of DEV_TX_OFFLOAD_* */
+ const struct rte_memzone *mz;
};
#if 1
@@ -1116,6 +1118,7 @@ em_tx_queue_release(struct em_tx_queue *txq)
if (txq != NULL) {
em_tx_queue_release_mbufs(txq);
rte_free(txq->sw_ring);
+ rte_memzone_free(txq->mz);
rte_free(txq);
}
}
@@ -1286,6 +1289,7 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE)) == NULL)
return -ENOMEM;
+ txq->mz = tz;
/* Allocate software ring */
if ((txq->sw_ring = rte_zmalloc("txq->sw_ring",
sizeof(txq->sw_ring[0]) * nb_desc,
@@ -1338,6 +1342,7 @@ em_rx_queue_release(struct em_rx_queue *rxq)
if (rxq != NULL) {
em_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -1452,6 +1457,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE)) == NULL)
return -ENOMEM;
+ rxq->mz = rz;
/* Allocate software ring. */
if ((rxq->sw_ring = rte_zmalloc("rxq->sw_ring",
sizeof (rxq->sw_ring[0]) * nb_desc,
@@ -1611,14 +1617,12 @@ em_dev_free_queues(struct rte_eth_dev *dev)
for (i = 0; i < dev->data->nb_rx_queues; i++) {
eth_em_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "rx_ring", i);
}
dev->data->nb_rx_queues = 0;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
eth_em_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "tx_ring", i);
}
dev->data->nb_tx_queues = 0;
}
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 3bf13d1420..620281232e 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -112,6 +112,7 @@ struct igb_rx_queue {
uint8_t drop_en; /**< If not 0, set SRRCTL.Drop_En. */
uint32_t flags; /**< RX flags. */
uint64_t offloads; /**< offloads of DEV_RX_OFFLOAD_* */
+ const struct rte_memzone *mz;
};
/**
@@ -186,6 +187,7 @@ struct igb_tx_queue {
struct igb_advctx_info ctx_cache[IGB_CTX_NUM];
/**< Hardware context history.*/
uint64_t offloads; /**< offloads of DEV_TX_OFFLOAD_* */
+ const struct rte_memzone *mz;
};
#if 1
@@ -1276,6 +1278,7 @@ igb_tx_queue_release(struct igb_tx_queue *txq)
if (txq != NULL) {
igb_tx_queue_release_mbufs(txq);
rte_free(txq->sw_ring);
+ rte_memzone_free(txq->mz);
rte_free(txq);
}
}
@@ -1545,6 +1548,7 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->pthresh = tx_conf->tx_thresh.pthresh;
txq->hthresh = tx_conf->tx_thresh.hthresh;
@@ -1601,6 +1605,7 @@ igb_rx_queue_release(struct igb_rx_queue *rxq)
if (rxq != NULL) {
igb_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -1746,6 +1751,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
igb_rx_queue_release(rxq);
return -ENOMEM;
}
+
+ rxq->mz = rz;
rxq->rdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDT(rxq->reg_idx));
rxq->rdh_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDH(rxq->reg_idx));
rxq->rx_ring_phys_addr = rz->iova;
@@ -1885,14 +1892,12 @@ igb_dev_free_queues(struct rte_eth_dev *dev)
for (i = 0; i < dev->data->nb_rx_queues; i++) {
eth_igb_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "rx_ring", i);
}
dev->data->nb_rx_queues = 0;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
eth_igb_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "tx_ring", i);
}
dev->data->nb_tx_queues = 0;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.740388092 +0800
+++ 0107-net-e1000-fix-memzone-leak-on-queue-re-configure.patch 2021-11-10 14:17:01.867412785 +0800
@@ -1 +1 @@
-From 09cbfa2da4268b4f789ffd34587365b51fa656b4 Mon Sep 17 00:00:00 2001
+From b51d3a497044316f72fc87a1707ab2033a998ea4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 09cbfa2da4268b4f789ffd34587365b51fa656b4 ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 00a8af6d39..8542a15320 100644
+index 19e3bffd46..a7439c3aa7 100644
@@ -91 +93 @@
- eth_em_rx_queue_release(dev, i);
+ eth_em_rx_queue_release(dev->data->rx_queues[i]);
@@ -98 +100 @@
- eth_em_tx_queue_release(dev, i);
+ eth_em_tx_queue_release(dev->data->tx_queues[i]);
@@ -105 +107 @@
-index d97ca1a011..8d64d7397a 100644
+index 3bf13d1420..620281232e 100644
@@ -159 +161 @@
- eth_igb_rx_queue_release(dev, i);
+ eth_igb_rx_queue_release(dev->data->rx_queues[i]);
@@ -166 +168 @@
- eth_igb_tx_queue_release(dev, i);
+ eth_igb_tx_queue_release(dev->data->tx_queues[i]);
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ice: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (106 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e: " Xueming Li
` (144 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8b56d276440b7e97f35858362ae766ac4ac4a012
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8b56d276440b7e97f35858362ae766ac4ac4a012 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:28:36 +0800
Subject: [PATCH] net/ice: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit d3778bf39a1dd36181b11459ad3936501ca17f4d ]
Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:
rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>ice_rx_queue_release
rte_eth_dev_close
-->ice_dev_close
---->ice_free_queues
------>ice_rx_queue_release
(not been called due to nb_rx_queues and nb_tx_queues are 0)
And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.
Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 2 --
drivers/net/ice/ice_rxtx.c | 8 ++++++--
drivers/net/ice/ice_rxtx.h | 2 ++
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index bb720d1036..4a071254ce 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -659,10 +659,8 @@ ice_fdir_teardown(struct ice_pf *pf)
ice_tx_queue_release(pf->fdir.txq);
pf->fdir.txq = NULL;
- rte_eth_dma_zone_free(eth_dev, "fdir_tx_ring", ICE_FDIR_QUEUE_ID);
ice_rx_queue_release(pf->fdir.rxq);
pf->fdir.rxq = NULL;
- rte_eth_dma_zone_free(eth_dev, "fdir_rx_ring", ICE_FDIR_QUEUE_ID);
ice_fdir_prof_rm_all(pf);
ice_fdir_prof_free(hw);
ice_release_vsi(vsi);
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 8ac9411083..906fca15b0 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1096,6 +1096,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/* Zero all the descriptors in the ring. */
memset(rz->addr, 0, ring_size);
@@ -1151,6 +1152,7 @@ ice_rx_queue_release(void *rxq)
q->rx_rel_mbufs(q);
rte_free(q->sw_ring);
+ rte_memzone_free(q->mz);
rte_free(q);
}
@@ -1297,6 +1299,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_rs_thresh = tx_rs_thresh;
txq->tx_free_thresh = tx_free_thresh;
@@ -1347,6 +1350,7 @@ ice_tx_queue_release(void *txq)
q->tx_rel_mbufs(q);
rte_free(q->sw_ring);
+ rte_memzone_free(q->mz);
rte_free(q);
}
@@ -2037,7 +2041,6 @@ ice_free_queues(struct rte_eth_dev *dev)
continue;
ice_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "rx_ring", i);
}
dev->data->nb_rx_queues = 0;
@@ -2046,7 +2049,6 @@ ice_free_queues(struct rte_eth_dev *dev)
continue;
ice_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "tx_ring", i);
}
dev->data->nb_tx_queues = 0;
}
@@ -2093,6 +2095,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = ICE_FDIR_NUM_TX_DESC;
txq->queue_id = ICE_FDIR_QUEUE_ID;
txq->reg_idx = pf->fdir.fdir_vsi->base_queue;
@@ -2151,6 +2154,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
return -ENOMEM;
}
+ rxq->mz = rz;
rxq->nb_rx_desc = ICE_FDIR_NUM_RX_DESC;
rxq->queue_id = ICE_FDIR_QUEUE_ID;
rxq->reg_idx = pf->fdir.fdir_vsi->base_queue;
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index e9edb7bb29..4bea2bc2be 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -88,6 +88,7 @@ struct ice_rx_queue {
uint64_t xtr_ol_flag; /* Protocol extraction offload flag */
ice_rxd_to_pkt_fields_t rxd_to_pkt_fields; /* handle FlexiMD by RXDID */
ice_rx_release_mbufs_t rx_rel_mbufs;
+ const struct rte_memzone *mz;
};
struct ice_tx_entry {
@@ -132,6 +133,7 @@ struct ice_tx_queue {
bool tx_deferred_start; /* don't start this queue in dev start */
bool q_set; /* indicate if tx queue has been configured */
ice_tx_release_mbufs_t tx_rel_mbufs;
+ const struct rte_memzone *mz;
};
/* Offload features */
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.787205309 +0800
+++ 0108-net-ice-fix-memzone-leak-on-queue-re-configure.patch 2021-11-10 14:17:01.870746091 +0800
@@ -1 +1 @@
-From d3778bf39a1dd36181b11459ad3936501ca17f4d Mon Sep 17 00:00:00 2001
+From 8b56d276440b7e97f35858362ae766ac4ac4a012 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d3778bf39a1dd36181b11459ad3936501ca17f4d ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index e0cca7cb3c..afc956e0a2 100644
+index bb720d1036..4a071254ce 100644
@@ -42 +44 @@
-@@ -651,10 +651,8 @@ ice_fdir_teardown(struct ice_pf *pf)
+@@ -659,10 +659,8 @@ ice_fdir_teardown(struct ice_pf *pf)
@@ -54 +56 @@
-index 3f9de55a42..7a2220daa4 100644
+index 8ac9411083..906fca15b0 100644
@@ -57 +59 @@
-@@ -1152,6 +1152,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1096,6 +1096,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
@@ -65 +67 @@
-@@ -1207,6 +1208,7 @@ ice_rx_queue_release(void *rxq)
+@@ -1151,6 +1152,7 @@ ice_rx_queue_release(void *rxq)
@@ -73 +75 @@
-@@ -1353,6 +1355,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -1297,6 +1299,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
@@ -81 +83 @@
-@@ -1415,6 +1418,7 @@ ice_tx_queue_release(void *txq)
+@@ -1347,6 +1350,7 @@ ice_tx_queue_release(void *txq)
@@ -89 +91 @@
-@@ -2156,7 +2160,6 @@ ice_free_queues(struct rte_eth_dev *dev)
+@@ -2037,7 +2041,6 @@ ice_free_queues(struct rte_eth_dev *dev)
@@ -97 +99 @@
-@@ -2165,7 +2168,6 @@ ice_free_queues(struct rte_eth_dev *dev)
+@@ -2046,7 +2049,6 @@ ice_free_queues(struct rte_eth_dev *dev)
@@ -105 +107 @@
-@@ -2212,6 +2214,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
+@@ -2093,6 +2095,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
@@ -113 +115 @@
-@@ -2270,6 +2273,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
+@@ -2151,6 +2154,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
@@ -122 +124 @@
-index 0a38740f45..c5ec6b7d1a 100644
+index e9edb7bb29..4bea2bc2be 100644
@@ -125 +127,3 @@
-@@ -93,6 +93,7 @@ struct ice_rx_queue {
+@@ -88,6 +88,7 @@ struct ice_rx_queue {
+ uint64_t xtr_ol_flag; /* Protocol extraction offload flag */
+ ice_rxd_to_pkt_fields_t rxd_to_pkt_fields; /* handle FlexiMD by RXDID */
@@ -127,2 +130,0 @@
- uint64_t offloads;
- uint32_t time_high;
@@ -133 +135 @@
-@@ -137,6 +138,7 @@ struct ice_tx_queue {
+@@ -132,6 +133,7 @@ struct ice_tx_queue {
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (107 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ice: " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ixgbe: " Xueming Li
` (143 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4e60a45559807ed5b18caca0006f03c335f3b538
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 4e60a45559807ed5b18caca0006f03c335f3b538 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:29:36 +0800
Subject: [PATCH] net/i40e: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e3188d5f9925d378be535bb48ccb5f26834605aa ]
Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:
rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>i40e_dev_rx_queue_release
rte_eth_dev_close
-->i40e_dev_close
---->i40e_dev_free_queues
------>i40e_dev_rx_queue_release
(not been called due to nb_rx_queues and nb_tx_queues are 0)
And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.
Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 3 ---
drivers/net/i40e/i40e_rxtx.c | 8 ++++++--
drivers/net/i40e/i40e_rxtx.h | 2 ++
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 05fdcef24f..6af71ed23d 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -283,7 +283,6 @@ i40e_fdir_teardown(struct i40e_pf *pf)
{
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
struct i40e_vsi *vsi;
- struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
vsi = pf->fdir.fdir_vsi;
if (!vsi)
@@ -300,10 +299,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
if (err)
PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
- rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
i40e_dev_rx_queue_release(pf->fdir.rxq);
pf->fdir.rxq = NULL;
- rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id);
i40e_dev_tx_queue_release(pf->fdir.txq);
pf->fdir.txq = NULL;
i40e_vsi_release(vsi);
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 154f649b45..d1659ef060 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1932,6 +1932,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/* Zero all the descriptors in the ring. */
memset(rz->addr, 0, ring_size);
@@ -2011,6 +2012,7 @@ i40e_dev_rx_queue_release(void *rxq)
i40e_rx_queue_release_mbufs(q);
rte_free(q->sw_ring);
+ rte_memzone_free(q->mz);
rte_free(q);
}
@@ -2331,6 +2333,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_rs_thresh = tx_rs_thresh;
txq->tx_free_thresh = tx_free_thresh;
@@ -2404,6 +2407,7 @@ i40e_dev_tx_queue_release(void *txq)
i40e_tx_queue_release_mbufs(q);
rte_free(q->sw_ring);
+ rte_memzone_free(q->mz);
rte_free(q);
}
@@ -2941,7 +2945,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
continue;
i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "rx_ring", i);
}
for (i = 0; i < dev->data->nb_tx_queues; i++) {
@@ -2949,7 +2952,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
continue;
i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "tx_ring", i);
}
}
@@ -2992,6 +2994,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
return I40E_ERR_NO_MEMORY;
}
+ txq->mz = tz;
txq->nb_tx_desc = I40E_FDIR_NUM_TX_DESC;
txq->queue_id = I40E_FDIR_QUEUE_ID;
txq->reg_idx = pf->fdir.fdir_vsi->base_queue;
@@ -3050,6 +3053,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
return I40E_ERR_NO_MEMORY;
}
+ rxq->mz = rz;
rxq->nb_rx_desc = I40E_FDIR_NUM_RX_DESC;
rxq->queue_id = I40E_FDIR_QUEUE_ID;
rxq->reg_idx = pf->fdir.fdir_vsi->base_queue;
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 57d7b4160b..0671750779 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -121,6 +121,7 @@ struct i40e_rx_queue {
uint16_t rx_using_sse; /**<flag indicate the usage of vPMD for rx */
uint8_t dcb_tc; /**< Traffic class of rx queue */
uint64_t offloads; /**< Rx offload flags of DEV_RX_OFFLOAD_* */
+ const struct rte_memzone *mz;
};
struct i40e_tx_entry {
@@ -162,6 +163,7 @@ struct i40e_tx_queue {
bool tx_deferred_start; /**< don't start this queue in dev start */
uint8_t dcb_tc; /**< Traffic class of tx queue */
uint64_t offloads; /**< Tx offload flags of DEV_RX_OFFLOAD_* */
+ const struct rte_memzone *mz;
};
/** Offload features */
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.833106642 +0800
+++ 0109-net-i40e-fix-memzone-leak-on-queue-re-configure.patch 2021-11-10 14:17:01.874079397 +0800
@@ -1 +1 @@
-From e3188d5f9925d378be535bb48ccb5f26834605aa Mon Sep 17 00:00:00 2001
+From 4e60a45559807ed5b18caca0006f03c335f3b538 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e3188d5f9925d378be535bb48ccb5f26834605aa ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 105a6a657f..df2a5aaecc 100644
+index 05fdcef24f..6af71ed23d 100644
@@ -42 +44 @@
-@@ -284,7 +284,6 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -283,7 +283,6 @@ i40e_fdir_teardown(struct i40e_pf *pf)
@@ -50 +52 @@
-@@ -301,10 +300,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -300,10 +299,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
@@ -55 +57 @@
- i40e_rx_queue_release(pf->fdir.rxq);
+ i40e_dev_rx_queue_release(pf->fdir.rxq);
@@ -58 +60 @@
- i40e_tx_queue_release(pf->fdir.txq);
+ i40e_dev_tx_queue_release(pf->fdir.txq);
@@ -62 +64 @@
-index caab66e433..807e1a4133 100644
+index 154f649b45..d1659ef060 100644
@@ -65 +67 @@
-@@ -2024,6 +2024,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1932,6 +1932,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -73 +75 @@
-@@ -2115,6 +2116,7 @@ i40e_rx_queue_release(void *rxq)
+@@ -2011,6 +2012,7 @@ i40e_dev_rx_queue_release(void *rxq)
@@ -81 +83 @@
-@@ -2427,6 +2429,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2331,6 +2333,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -89 +91 @@
-@@ -2500,6 +2503,7 @@ i40e_tx_queue_release(void *txq)
+@@ -2404,6 +2407,7 @@ i40e_dev_tx_queue_release(void *txq)
@@ -97 +99 @@
-@@ -3056,7 +3060,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2941,7 +2945,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
@@ -99 +101 @@
- i40e_rx_queue_release(dev->data->rx_queues[i]);
+ i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
@@ -105 +107 @@
-@@ -3064,7 +3067,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2949,7 +2952,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
@@ -107 +109 @@
- i40e_tx_queue_release(dev->data->tx_queues[i]);
+ i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
@@ -113 +115 @@
-@@ -3107,6 +3109,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
+@@ -2992,6 +2994,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
@@ -121 +123 @@
-@@ -3165,6 +3168,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
+@@ -3050,6 +3053,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
@@ -130 +132 @@
-index 8d6ab16b4f..5a99da1d3e 100644
+index 57d7b4160b..0671750779 100644
@@ -141 +143 @@
-@@ -166,6 +167,7 @@ struct i40e_tx_queue {
+@@ -162,6 +163,7 @@ struct i40e_tx_queue {
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (108 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/i40e: " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' " Xueming Li
` (142 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2adcdc8cc791f517ada0cf99f9f7138d4cd4bbe5
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2adcdc8cc791f517ada0cf99f9f7138d4cd4bbe5 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:30:04 +0800
Subject: [PATCH] net/ixgbe: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a4ae7f51d21af6f59d6ce1e1117de227b352a4cc ]
Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:
rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>ixgbe_dev_rx_queue_release
rte_eth_dev_close
-->ixgbe_dev_close
---->ixgbe_dev_free_queues
------>ixgbe_dev_rx_queue_release
(not been called due to nb_rx_queues and nb_tx_queues are 0)
And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.
Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++++--
drivers/net/ixgbe/ixgbe_rxtx.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 3d983d4db7..c0ab36ad86 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2449,6 +2449,7 @@ ixgbe_tx_queue_release(struct ixgbe_tx_queue *txq)
if (txq != NULL && txq->ops != NULL) {
txq->ops->release_mbufs(txq);
txq->ops->free_swring(txq);
+ rte_memzone_free(txq->mz);
rte_free(txq);
}
}
@@ -2730,6 +2731,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_rs_thresh = tx_rs_thresh;
txq->tx_free_thresh = tx_free_thresh;
@@ -2854,6 +2856,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq)
ixgbe_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
rte_free(rxq->sw_sc_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -3129,6 +3132,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/*
* Zero init all the descriptors in the ring.
*/
@@ -3400,14 +3404,12 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev)
for (i = 0; i < dev->data->nb_rx_queues; i++) {
ixgbe_dev_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "rx_ring", i);
}
dev->data->nb_rx_queues = 0;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
ixgbe_dev_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
- rte_eth_dma_zone_free(dev, "tx_ring", i);
}
dev->data->nb_tx_queues = 0;
}
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index bcadaf79ce..d18cac29bf 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -138,6 +138,7 @@ struct ixgbe_rx_queue {
struct rte_mbuf fake_mbuf;
/** hold packets to return to application */
struct rte_mbuf *rx_stage[RTE_PMD_IXGBE_RX_MAX_BURST*2];
+ const struct rte_memzone *mz;
};
/**
@@ -236,6 +237,7 @@ struct ixgbe_tx_queue {
uint8_t using_ipsec;
/**< indicates that IPsec TX feature is in use */
#endif
+ const struct rte_memzone *mz;
};
struct ixgbe_txq_ops {
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.879051789 +0800
+++ 0110-net-ixgbe-fix-memzone-leak-on-queue-re-configure.patch 2021-11-10 14:17:01.877412703 +0800
@@ -1 +1 @@
-From a4ae7f51d21af6f59d6ce1e1117de227b352a4cc Mon Sep 17 00:00:00 2001
+From 2adcdc8cc791f517ada0cf99f9f7138d4cd4bbe5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a4ae7f51d21af6f59d6ce1e1117de227b352a4cc ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 176daaff9d..349180e7c1 100644
+index 3d983d4db7..c0ab36ad86 100644
@@ -41 +43 @@
-@@ -2482,6 +2482,7 @@ ixgbe_tx_queue_release(struct ixgbe_tx_queue *txq)
+@@ -2449,6 +2449,7 @@ ixgbe_tx_queue_release(struct ixgbe_tx_queue *txq)
@@ -49 +51 @@
-@@ -2763,6 +2764,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2730,6 +2731,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -57 +59 @@
-@@ -2887,6 +2889,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq)
+@@ -2854,6 +2856,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq)
@@ -65 +67 @@
-@@ -3162,6 +3165,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -3129,6 +3132,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -73 +75 @@
-@@ -3433,14 +3437,12 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev)
+@@ -3400,14 +3404,12 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev)
@@ -75 +77 @@
- ixgbe_dev_rx_queue_release(dev, i);
+ ixgbe_dev_rx_queue_release(dev->data->rx_queues[i]);
@@ -82 +84 @@
- ixgbe_dev_tx_queue_release(dev, i);
+ ixgbe_dev_tx_queue_release(dev->data->tx_queues[i]);
@@ -89 +91 @@
-index 476ef62cfd..a1764f2b08 100644
+index bcadaf79ce..d18cac29bf 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (109 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/ixgbe: " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'net: fix checksum API documentation' " Xueming Li
` (141 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/288a450bb909e5e1acb8fc323cc555b3eb645f59
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 288a450bb909e5e1acb8fc323cc555b3eb645f59 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 22 Sep 2021 11:41:52 +0800
Subject: [PATCH] net/hns3: fix input parameters of MAC functions
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 60a6b4a574cf3b9415c73c31173eb42deb5ca92b ]
When adding multicast and unicast MAC addresses, three descriptors and
one descriptor are required for querying or adding MAC VLAN table,
respectively. This patch uses the number of descriptors as input
parameter to complete this task to make the function more secure.
Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_cmd.h | 3 +-
drivers/net/hns3/hns3_ethdev.c | 88 +++++++++++++++++++---------------
2 files changed, 51 insertions(+), 40 deletions(-)
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 041f2fa789..0463acb215 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -812,7 +812,8 @@ enum hns3_mac_vlan_add_resp_code {
HNS3_ADD_MC_OVERFLOW, /* ADD failed for MC overflow */
};
-#define HNS3_MC_MAC_VLAN_ADD_DESC_NUM 3
+#define HNS3_MC_MAC_VLAN_OPS_DESC_NUM 3
+#define HNS3_UC_MAC_VLAN_OPS_DESC_NUM 1
#define HNS3_MAC_VLAN_BIT0_EN_B 0
#define HNS3_MAC_VLAN_BIT1_EN_B 1
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index abe31c841e..d318b9b7f7 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1344,28 +1344,31 @@ hns3_get_mac_vlan_cmd_status(struct hns3_hw *hw, uint16_t cmdq_resp,
static int
hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
struct hns3_mac_vlan_tbl_entry_cmd *req,
- struct hns3_cmd_desc *desc, bool is_mc)
+ struct hns3_cmd_desc *desc, uint8_t desc_num)
{
uint8_t resp_code;
uint16_t retval;
int ret;
+ int i;
- hns3_cmd_setup_basic_desc(&desc[0], HNS3_OPC_MAC_VLAN_ADD, true);
- if (is_mc) {
- desc[0].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
- memcpy(desc[0].data, req,
- sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
- hns3_cmd_setup_basic_desc(&desc[1], HNS3_OPC_MAC_VLAN_ADD,
- true);
- desc[1].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
- hns3_cmd_setup_basic_desc(&desc[2], HNS3_OPC_MAC_VLAN_ADD,
+ if (desc_num == HNS3_MC_MAC_VLAN_OPS_DESC_NUM) {
+ for (i = 0; i < desc_num - 1; i++) {
+ hns3_cmd_setup_basic_desc(&desc[i],
+ HNS3_OPC_MAC_VLAN_ADD, true);
+ desc[i].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
+ if (i == 0)
+ memcpy(desc[i].data, req,
+ sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
+ }
+ hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_MAC_VLAN_ADD,
true);
- ret = hns3_cmd_send(hw, desc, HNS3_MC_MAC_VLAN_ADD_DESC_NUM);
} else {
+ hns3_cmd_setup_basic_desc(&desc[0], HNS3_OPC_MAC_VLAN_ADD,
+ true);
memcpy(desc[0].data, req,
sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
- ret = hns3_cmd_send(hw, desc, 1);
}
+ ret = hns3_cmd_send(hw, desc, desc_num);
if (ret) {
hns3_err(hw, "lookup mac addr failed for cmd_send, ret =%d.",
ret);
@@ -1381,38 +1384,40 @@ hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
static int
hns3_add_mac_vlan_tbl(struct hns3_hw *hw,
struct hns3_mac_vlan_tbl_entry_cmd *req,
- struct hns3_cmd_desc *mc_desc)
+ struct hns3_cmd_desc *desc, uint8_t desc_num)
{
uint8_t resp_code;
uint16_t retval;
int cfg_status;
int ret;
+ int i;
- if (mc_desc == NULL) {
- struct hns3_cmd_desc desc;
-
- hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MAC_VLAN_ADD, false);
- memcpy(desc.data, req,
+ if (desc_num == HNS3_UC_MAC_VLAN_OPS_DESC_NUM) {
+ hns3_cmd_setup_basic_desc(desc, HNS3_OPC_MAC_VLAN_ADD, false);
+ memcpy(desc->data, req,
sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
- ret = hns3_cmd_send(hw, &desc, 1);
- resp_code = (rte_le_to_cpu_32(desc.data[0]) >> 8) & 0xff;
- retval = rte_le_to_cpu_16(desc.retval);
+ ret = hns3_cmd_send(hw, desc, desc_num);
+ resp_code = (rte_le_to_cpu_32(desc->data[0]) >> 8) & 0xff;
+ retval = rte_le_to_cpu_16(desc->retval);
cfg_status = hns3_get_mac_vlan_cmd_status(hw, retval, resp_code,
HNS3_MAC_VLAN_ADD);
} else {
- hns3_cmd_reuse_desc(&mc_desc[0], false);
- mc_desc[0].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
- hns3_cmd_reuse_desc(&mc_desc[1], false);
- mc_desc[1].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
- hns3_cmd_reuse_desc(&mc_desc[2], false);
- mc_desc[2].flag &= rte_cpu_to_le_16(~HNS3_CMD_FLAG_NEXT);
- memcpy(mc_desc[0].data, req,
+ for (i = 0; i < desc_num; i++) {
+ hns3_cmd_reuse_desc(&desc[i], false);
+ if (i == desc_num - 1)
+ desc[i].flag &=
+ rte_cpu_to_le_16(~HNS3_CMD_FLAG_NEXT);
+ else
+ desc[i].flag |=
+ rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
+ }
+ memcpy(desc[0].data, req,
sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
- mc_desc[0].retval = 0;
- ret = hns3_cmd_send(hw, mc_desc, HNS3_MC_MAC_VLAN_ADD_DESC_NUM);
- resp_code = (rte_le_to_cpu_32(mc_desc[0].data[0]) >> 8) & 0xff;
- retval = rte_le_to_cpu_16(mc_desc[0].retval);
+ desc[0].retval = 0;
+ ret = hns3_cmd_send(hw, desc, desc_num);
+ resp_code = (rte_le_to_cpu_32(desc[0].data[0]) >> 8) & 0xff;
+ retval = rte_le_to_cpu_16(desc[0].retval);
cfg_status = hns3_get_mac_vlan_cmd_status(hw, retval, resp_code,
HNS3_MAC_VLAN_ADD);
@@ -1457,7 +1462,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
struct hns3_mac_vlan_tbl_entry_cmd req;
struct hns3_pf *pf = &hns->pf;
- struct hns3_cmd_desc desc[3];
+ struct hns3_cmd_desc desc;
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
uint16_t egress_port = 0;
uint8_t vf_id;
@@ -1491,10 +1496,12 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
* it if the entry is inexistent. Repeated unicast entry
* is not allowed in the mac vlan table.
*/
- ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, false);
+ ret = hns3_lookup_mac_vlan_tbl(hw, &req, &desc,
+ HNS3_UC_MAC_VLAN_OPS_DESC_NUM);
if (ret == -ENOENT) {
if (!hns3_is_umv_space_full(hw)) {
- ret = hns3_add_mac_vlan_tbl(hw, &req, NULL);
+ ret = hns3_add_mac_vlan_tbl(hw, &req, &desc,
+ HNS3_UC_MAC_VLAN_OPS_DESC_NUM);
if (!ret)
hns3_update_umv_space(hw, false);
return ret;
@@ -1799,8 +1806,8 @@ hns3_update_desc_vfid(struct hns3_cmd_desc *desc, uint8_t vfid, bool clr)
static int
hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
{
+ struct hns3_cmd_desc desc[HNS3_MC_MAC_VLAN_OPS_DESC_NUM];
struct hns3_mac_vlan_tbl_entry_cmd req;
- struct hns3_cmd_desc desc[3];
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
uint8_t vf_id;
int ret;
@@ -1817,7 +1824,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
memset(&req, 0, sizeof(req));
hns3_set_bit(req.entry_type, HNS3_MAC_VLAN_BIT0_EN_B, 0);
hns3_prepare_mac_addr(&req, mac_addr->addr_bytes, true);
- ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, true);
+ ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc,
+ HNS3_MC_MAC_VLAN_OPS_DESC_NUM);
if (ret) {
/* This mac addr do not exist, add new entry for it */
memset(desc[0].data, 0, sizeof(desc[0].data));
@@ -1831,7 +1839,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
*/
vf_id = HNS3_PF_FUNC_ID;
hns3_update_desc_vfid(desc, vf_id, false);
- ret = hns3_add_mac_vlan_tbl(hw, &req, desc);
+ ret = hns3_add_mac_vlan_tbl(hw, &req, desc,
+ HNS3_MC_MAC_VLAN_OPS_DESC_NUM);
if (ret) {
if (ret == -ENOSPC)
hns3_err(hw, "mc mac vlan table is full");
@@ -1864,7 +1873,8 @@ hns3_remove_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
memset(&req, 0, sizeof(req));
hns3_set_bit(req.entry_type, HNS3_MAC_VLAN_BIT0_EN_B, 0);
hns3_prepare_mac_addr(&req, mac_addr->addr_bytes, true);
- ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, true);
+ ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc,
+ HNS3_MC_MAC_VLAN_OPS_DESC_NUM);
if (ret == 0) {
/*
* This mac addr exist, remove this handle's VFID for it.
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.925876972 +0800
+++ 0111-net-hns3-fix-input-parameters-of-MAC-functions.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 60a6b4a574cf3b9415c73c31173eb42deb5ca92b Mon Sep 17 00:00:00 2001
+From 288a450bb909e5e1acb8fc323cc555b3eb645f59 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 60a6b4a574cf3b9415c73c31173eb42deb5ca92b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index a4683de0aa..81bc9e9d98 100644
+index 041f2fa789..0463acb215 100644
@@ -25 +27 @@
-@@ -923,7 +923,8 @@ enum hns3_mac_vlan_add_resp_code {
+@@ -812,7 +812,8 @@ enum hns3_mac_vlan_add_resp_code {
@@ -36 +38 @@
-index 5c8ac5754f..cabf73ffbc 100644
+index abe31c841e..d318b9b7f7 100644
@@ -39 +41 @@
-@@ -1427,28 +1427,31 @@ hns3_get_mac_vlan_cmd_status(struct hns3_hw *hw, uint16_t cmdq_resp,
+@@ -1344,28 +1344,31 @@ hns3_get_mac_vlan_cmd_status(struct hns3_hw *hw, uint16_t cmdq_resp,
@@ -83 +85 @@
-@@ -1464,38 +1467,40 @@ hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
+@@ -1381,38 +1384,40 @@ hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
@@ -144 +146 @@
-@@ -1540,7 +1545,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1457,7 +1462,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -153 +155 @@
-@@ -1574,10 +1579,12 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1491,10 +1496,12 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -168 +170 @@
-@@ -1867,8 +1874,8 @@ hns3_update_desc_vfid(struct hns3_cmd_desc *desc, uint8_t vfid, bool clr)
+@@ -1799,8 +1806,8 @@ hns3_update_desc_vfid(struct hns3_cmd_desc *desc, uint8_t vfid, bool clr)
@@ -178 +180 @@
-@@ -1885,7 +1892,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1817,7 +1824,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -188 +190 @@
-@@ -1899,7 +1907,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1831,7 +1839,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -198 +200 @@
-@@ -1932,7 +1941,8 @@ hns3_remove_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1864,7 +1873,8 @@ hns3_remove_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net: fix checksum API documentation' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (110 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/windows: fix CPU cores counting' " Xueming Li
` (140 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Lance Richardson; +Cc: Luca Boccassi, Ferruh Yigit, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/449612955b72ef975de4babf525e3626e714d836
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 449612955b72ef975de4babf525e3626e714d836 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Tue, 21 Sep 2021 10:59:24 -0400
Subject: [PATCH] net: fix checksum API documentation
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit dc954ae73aab9aaf45b8d5ce42f4490773dd1fab ]
Minor corrections and improvements to documentation
for checksum APIs.
Fixes: 6006818cfb26 ("net: new checksum functions")
Fixes: 45a08ef55e44 ("net: introduce functions to verify L4 checksums")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_net/rte_ip.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index b59c4d67a3..b188616ab8 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -444,15 +444,15 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
/**
* Process the IPv6 UDP or TCP checksum.
*
- * The IPv4 header should not contains options. The layer 4 checksum
- * must be set to 0 in the packet by the caller.
+ * The IPv6 header must not be followed by extension headers. The layer 4
+ * checksum must be set to 0 in the L4 header by the caller.
*
* @param ipv6_hdr
* The pointer to the contiguous IPv6 header.
* @param l4_hdr
* The pointer to the beginning of the L4 header.
* @return
- * The complemented checksum to set in the IP packet.
+ * The complemented checksum to set in the L4 header.
*/
static inline uint16_t
rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:06.972957044 +0800
+++ 0112-net-fix-checksum-API-documentation.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From dc954ae73aab9aaf45b8d5ce42f4490773dd1fab Mon Sep 17 00:00:00 2001
+From 449612955b72ef975de4babf525e3626e714d836 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dc954ae73aab9aaf45b8d5ce42f4490773dd1fab ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- lib/net/rte_ip.h | 13 ++++++-------
- 1 file changed, 6 insertions(+), 7 deletions(-)
+ lib/librte_net/rte_ip.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
@@ -20,32 +22,5 @@
-diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
-index bbd8650962..b3d45e85db 100644
---- a/lib/net/rte_ip.h
-+++ b/lib/net/rte_ip.h
-@@ -372,15 +372,14 @@ __rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
- /**
- * Process the IPv4 UDP or TCP checksum.
- *
-- * The IP and layer 4 checksum must be set to 0 in the packet by
-- * the caller.
-+ * The layer 4 checksum must be set to 0 in the L4 header by the caller.
- *
- * @param ipv4_hdr
- * The pointer to the contiguous IPv4 header.
- * @param l4_hdr
- * The pointer to the beginning of the L4 header.
- * @return
-- * The complemented checksum to set in the IP packet.
-+ * The complemented checksum to set in the L4 header.
- */
- static inline uint16_t
- rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
-@@ -489,7 +488,7 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
- }
-
- /**
-- * @internal Calculate the non-complemented IPv4 L4 checksum
-+ * @internal Calculate the non-complemented IPv6 L4 checksum
- */
- static inline uint16_t
- __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
-@@ -510,15 +509,15 @@ __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
+diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
+index b59c4d67a3..b188616ab8 100644
+--- a/lib/librte_net/rte_ip.h
++++ b/lib/librte_net/rte_ip.h
+@@ -444,15 +444,15 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/windows: fix CPU cores counting' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (111 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'net: fix checksum API documentation' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/windows: do not install virt2phys header' " Xueming Li
` (139 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Narcisa Vasile; +Cc: Luca Boccassi, Dmitry Kozlyuk, Pallavi Kadam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/822f885986d147ff689f6b7c0ae55995bacbb12d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 822f885986d147ff689f6b7c0ae55995bacbb12d Mon Sep 17 00:00:00 2001
From: Narcisa Vasile <navasile@microsoft.com>
Date: Wed, 18 Aug 2021 06:46:00 -0700
Subject: [PATCH] eal/windows: fix CPU cores counting
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 694c81721ef0a04432cd725642cfe74075a32f19 ]
On Windows, -l/--lcores EAL option was unable to process CPU sets
containing CPUs other than 0 and 1, because CPU_COUNT() macro
only checked these CPUs in the set. Fix CPU_COUNT() by enumerating
all possible CPU indices.
Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")
Signed-off-by: Narcisa Vasile <navasile@microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
lib/librte_eal/windows/include/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
index ff572b5dcb..bc31cc8465 100644
--- a/lib/librte_eal/windows/include/sched.h
+++ b/lib/librte_eal/windows/include/sched.h
@@ -49,7 +49,7 @@ count_cpu(rte_cpuset_t *s)
unsigned int _i;
int count = 0;
- for (_i = 0; _i < _NUM_SETS(CPU_SETSIZE); _i++)
+ for (_i = 0; _i < CPU_SETSIZE; _i++)
if (CPU_ISSET(_i, s) != 0LL)
count++;
return count;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.014519227 +0800
+++ 0113-eal-windows-fix-CPU-cores-counting.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 694c81721ef0a04432cd725642cfe74075a32f19 Mon Sep 17 00:00:00 2001
+From 822f885986d147ff689f6b7c0ae55995bacbb12d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 694c81721ef0a04432cd725642cfe74075a32f19 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/eal/windows/include/sched.h | 2 +-
+ lib/librte_eal/windows/include/sched.h | 2 +-
@@ -21 +23 @@
-diff --git a/lib/eal/windows/include/sched.h b/lib/eal/windows/include/sched.h
+diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
@@ -23,2 +25,2 @@
---- a/lib/eal/windows/include/sched.h
-+++ b/lib/eal/windows/include/sched.h
+--- a/lib/librte_eal/windows/include/sched.h
++++ b/lib/librte_eal/windows/include/sched.h
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/windows: do not install virt2phys header' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (112 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/windows: fix CPU cores counting' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:29 ` [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' " Xueming Li
` (138 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6d4f5a16392c75f31001d9e7b836011614e16710
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 6d4f5a16392c75f31001d9e7b836011614e16710 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 1 Oct 2021 19:37:25 +0300
Subject: [PATCH] eal/windows: do not install virt2phys header
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit d47dd941623c12bebd8a283ec440ac92faf235c0 ]
The header was not intended to be a public one.
DPDK users should use `rte_mem_virt2iova()` to translate addresses.
Other virt2phys users should use the header from the driver instead.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/librte_eal/windows/include/meson.build | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_eal/windows/include/meson.build b/lib/librte_eal/windows/include/meson.build
index b3534b025f..5fb1962ac7 100644
--- a/lib/librte_eal/windows/include/meson.build
+++ b/lib/librte_eal/windows/include/meson.build
@@ -5,6 +5,5 @@ includes += include_directories('.')
headers += files(
'rte_os.h',
- 'rte_virt2phys.h',
'rte_windows.h',
)
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.055968604 +0800
+++ 0114-eal-windows-do-not-install-virt2phys-header.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From d47dd941623c12bebd8a283ec440ac92faf235c0 Mon Sep 17 00:00:00 2001
+From 6d4f5a16392c75f31001d9e7b836011614e16710 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d47dd941623c12bebd8a283ec440ac92faf235c0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/eal/windows/include/meson.build | 1 -
+ lib/librte_eal/windows/include/meson.build | 1 -
@@ -18 +20 @@
-diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build
+diff --git a/lib/librte_eal/windows/include/meson.build b/lib/librte_eal/windows/include/meson.build
@@ -20,2 +22,2 @@
---- a/lib/eal/windows/include/meson.build
-+++ b/lib/eal/windows/include/meson.build
+--- a/lib/librte_eal/windows/include/meson.build
++++ b/lib/librte_eal/windows/include/meson.build
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (113 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'eal/windows: do not install virt2phys header' " Xueming Li
@ 2021-11-10 6:29 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' " Xueming Li
` (137 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:29 UTC (permalink / raw)
To: Ciara Power; +Cc: Luca Boccassi, Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1aab8371d34dce3a596ddb1792618c32653cf9f9
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1aab8371d34dce3a596ddb1792618c32653cf9f9 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 12 Aug 2021 14:24:34 +0000
Subject: [PATCH] examples/fips_validation: remove unused allocation
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 25d392e1999b3d766f3a9f142372cc1220fa2c97 ]
The val.val pointer is allocated memory, however this memory is then
freed in get_writeback_data() without being used beforehand.
The pointer is then allocated memory again before use,
so the very first allocation is removed as it was unnecessary.
Fixes: f4797bae0050 ("examples/fips_validation: support plain SHA")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
examples/fips_validation/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index a7259173ec..cb38d40b66 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1617,7 +1617,6 @@ fips_mct_sha_test(void)
int ret;
uint32_t i, j;
- val.val = rte_malloc(NULL, (MAX_DIGEST_SIZE*SHA_MD_BLOCK), 0);
for (i = 0; i < SHA_MD_BLOCK; i++)
md[i].val = rte_malloc(NULL, (MAX_DIGEST_SIZE*2), 0);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.097433692 +0800
+++ 0115-examples-fips_validation-remove-unused-allocation.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 25d392e1999b3d766f3a9f142372cc1220fa2c97 Mon Sep 17 00:00:00 2001
+From 1aab8371d34dce3a596ddb1792618c32653cf9f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 25d392e1999b3d766f3a9f142372cc1220fa2c97 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index a8daad1f48..c0e68b8848 100644
+index a7259173ec..cb38d40b66 100644
@@ -24 +26 @@
-@@ -1632,7 +1632,6 @@ fips_mct_sha_test(void)
+@@ -1617,7 +1617,6 @@ fips_mct_sha_test(void)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (114 preceding siblings ...)
2021-11-10 6:29 ` [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' " Xueming Li
` (136 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Ciara Power; +Cc: Luca Boccassi, Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/de983dfa6d961e92bbdf0abdd415ed15abd6331a
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From de983dfa6d961e92bbdf0abdd415ed15abd6331a Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 12 Aug 2021 14:24:35 +0000
Subject: [PATCH] examples/fips_validation: fix resetting pointer
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 ]
The env.digest memory was freed, but the pointer was not set to NULL
afterwards. This caused an "Invalid Memory" error, as the pointer tries
to free twice.
Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
examples/fips_validation/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index cb38d40b66..dee9272880 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1828,8 +1828,10 @@ error_one_case:
fips_test_clear();
- if (env.digest)
+ if (env.digest) {
rte_free(env.digest);
+ env.digest = NULL;
+ }
if (env.mbuf)
rte_pktmbuf_free(env.mbuf);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.139566073 +0800
+++ 0116-examples-fips_validation-fix-resetting-pointer.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 Mon Sep 17 00:00:00 2001
+From de983dfa6d961e92bbdf0abdd415ed15abd6331a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c0e68b8848..b0de3d269a 100644
+index cb38d40b66..dee9272880 100644
@@ -23 +25 @@
-@@ -1843,8 +1843,10 @@ error_one_case:
+@@ -1828,8 +1828,10 @@ error_one_case:
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (115 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'test/service: fix some comment' " Xueming Li
` (135 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Shijith Thotton; +Cc: Luca Boccassi, Abhinandan Gujjar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cd24395f653ffd99abc1a5fc544e96a50708079e
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From cd24395f653ffd99abc1a5fc544e96a50708079e Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Mon, 27 Sep 2021 20:59:13 +0530
Subject: [PATCH] test/event_crypto: fix event crypto metadata write
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ]
Using memcpy to update event crypto metadata fields (request/response)
will result in one overwriting the other. To avoid this, fields of each
structure should be updated one by one.
Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
app/test/test_event_crypto_adapter.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 71b58fcbb8..c7517e215c 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less)
if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
/* Fill in private user data information */
- rte_memcpy(&m_data.response_info, &response_info,
- sizeof(response_info));
- rte_memcpy(&m_data.request_info, &request_info,
- sizeof(request_info));
+ m_data.request_info.cdev_id = request_info.cdev_id;
+ m_data.request_info.queue_pair_id =
+ request_info.queue_pair_id;
+ m_data.response_info.event = response_info.event;
rte_cryptodev_sym_session_set_user_data(sess,
&m_data, sizeof(m_data));
}
@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less)
uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
op->private_data_offset = len;
/* Fill in private data information */
- rte_memcpy(&m_data.response_info, &response_info,
- sizeof(response_info));
- rte_memcpy(&m_data.request_info, &request_info,
- sizeof(request_info));
+ m_data.request_info.cdev_id = request_info.cdev_id;
+ m_data.request_info.queue_pair_id = request_info.queue_pair_id;
+ m_data.response_info.event = response_info.event;
rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data));
}
@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less)
if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
/* Fill in private user data information */
- rte_memcpy(&m_data.response_info, &response_info,
- sizeof(m_data));
+ m_data.response_info.event = response_info.event;
rte_cryptodev_sym_session_set_user_data(sess,
&m_data, sizeof(m_data));
}
@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)
uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
op->private_data_offset = len;
/* Fill in private data information */
- rte_memcpy(&m_data.response_info, &response_info,
- sizeof(m_data));
+ m_data.response_info.event = response_info.event;
rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data));
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.181933373 +0800
+++ 0117-test-event_crypto-fix-event-crypto-metadata-write.patch 2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 67c8baecaee2ef312330102544b1f1e892a95502 Mon Sep 17 00:00:00 2001
+From cd24395f653ffd99abc1a5fc544e96a50708079e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 3ad20921e2..0c7ebe6981 100644
+index 71b58fcbb8..c7517e215c 100644
@@ -23 +25 @@
-@@ -212,10 +212,10 @@ test_op_forward_mode(uint8_t session_less)
+@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less)
@@ -38 +40 @@
-@@ -231,10 +231,9 @@ test_op_forward_mode(uint8_t session_less)
+@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less)
@@ -52 +54 @@
-@@ -405,8 +404,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less)
@@ -62 +64 @@
-@@ -425,8 +423,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/service: fix some comment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (116 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'test/service: fix race in attr check' " Xueming Li
` (134 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Joyce Kong; +Cc: Luca Boccassi, Ruifeng Wang, Harry van Haaren, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3ee8970823038ab3abbc7bf478b627fc805aeea7
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3ee8970823038ab3abbc7bf478b627fc805aeea7 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Thu, 19 Aug 2021 01:11:25 -0500
Subject: [PATCH] test/service: fix some comment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 79afbbfeea44f624242ad93c28072d73da631e1b ]
Change the inaccurate comment of 'set pass flag' to 'clear pass flag'
as the '*pass_test = 0' code actually implements clearing.
Fixes: f038a81e1c56 ("service: add unit tests")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
app/test/test_service_cores.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index 37d7172d53..8b61dcfd30 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -66,7 +66,7 @@ static int32_t dummy_mt_unsafe_cb(void *args)
rte_delay_ms(250);
rte_atomic32_clear((rte_atomic32_t *)atomic_lock);
} else {
- /* 2nd thread will fail to take lock, so set pass flag */
+ /* 2nd thread will fail to take lock, so clear pass flag */
*pass_test = 0;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.226607023 +0800
+++ 0118-test-service-fix-some-comment.patch 2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 79afbbfeea44f624242ad93c28072d73da631e1b Mon Sep 17 00:00:00 2001
+From 3ee8970823038ab3abbc7bf478b627fc805aeea7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 79afbbfeea44f624242ad93c28072d73da631e1b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index ece104054e..8659a1526c 100644
+index 37d7172d53..8b61dcfd30 100644
@@ -23 +25 @@
-@@ -68,7 +68,7 @@ static int32_t dummy_mt_unsafe_cb(void *args)
+@@ -66,7 +66,7 @@ static int32_t dummy_mt_unsafe_cb(void *args)
@@ -25 +27 @@
- __atomic_store_n(lock, 0, __ATOMIC_RELAXED);
+ rte_atomic32_clear((rte_atomic32_t *)atomic_lock);
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/service: fix race in attr check' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (117 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'test/service: fix some comment' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' " Xueming Li
` (133 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Aaron Conole, Harry van Haaren, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cc7ded572d96e2438836ae07bba0473f9aa5f055
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From cc7ded572d96e2438836ae07bba0473f9aa5f055 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 11 Oct 2021 16:54:30 +0200
Subject: [PATCH] test/service: fix race in attr check
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4a985f4e84c56fa6d562b4e920c4912203b95eb6 ]
The CI reported rare (and cryptic) failures like:
RTE>>service_autotest
+ ------------------------------------------------------- +
+ Test Suite : service core test suite
+ ------------------------------------------------------- +
+ TestCase [ 0] : unregister_all succeeded
+ TestCase [ 1] : service_name succeeded
+ TestCase [ 2] : service_get_by_name succeeded
Service dummy_service Summary
dummy_service: stats 1 calls 0 cycles 0 avg: 0
Service dummy_service Summary
dummy_service: stats 0 calls 0 cycles 0 avg: 0
+ TestCase [ 3] : service_dump succeeded
+ TestCase [ 4] : service_attr_get failed
+ TestCase [ 5] : service_lcore_attr_get succeeded
+ TestCase [ 6] : service_probe_capability succeeded
+ TestCase [ 7] : service_start_stop succeeded
+ TestCase [ 8] : service_lcore_add_del succeeded
+ TestCase [ 9] : service_lcore_start_stop succeeded
+ TestCase [10] : service_lcore_en_dis_able succeeded
+ TestCase [11] : service_mt_unsafe_poll succeeded
+ TestCase [12] : service_mt_safe_poll succeeded
perf test for MT Safe: 42.7 cycles per call
+ TestCase [13] : service_app_lcore_mt_safe succeeded
perf test for MT Unsafe: 73.3 cycles per call
+ TestCase [14] : service_app_lcore_mt_unsafe succeeded
+ TestCase [15] : service_may_be_active succeeded
+ TestCase [16] : service_active_two_cores succeeded
+ ------------------------------------------------------- +
+ Test Suite Summary : service core test suite
+ ------------------------------------------------------- +
+ Tests Total : 17
+ Tests Skipped : 0
+ Tests Executed : 17
+ Tests Unsupported: 0
+ Tests Passed : 16
+ Tests Failed : 1
+ ------------------------------------------------------- +
Test Failed
RTE>>
stderr:
EAL: Detected CPU lcores: 16
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/service_autotest/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available 1048576 kB hugepages reported
EAL: VFIO support initialized
EAL: Device 0000:03:00.0 is not NUMA-aware, defaulting socket to 0
APP: HPET is not enabled, using TSC as default timer
EAL: Test assert service_attr_get line 340 failed: attr_get() call didn't
get call count (zero)
According to API, trying to stop a service lcore is not possible if this
lcore is the only one associated to a service.
Doing this will result in a -EBUSY return code from
rte_service_lcore_stop() which the service_attr_get subtest was not
checking.
This left the service lcore running, and a race existed with the main
lcore on checking the service attributes which triggered this CI
failure.
To fix this, dissociate the service lcore with current service.
Once fixed this first issue, a race still exists, because the
wait_slcore_inactive helper added in a previous fix was not
paired with a check that the service lcore _did_ stop.
Add missing check on rte_service_lcore_may_be_active.
Fixes: 4d55194d76a4 ("service: add attribute get function")
Fixes: 52bb6be259ff ("test/service: fix race condition on stopping lcore")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
app/test/test_service_cores.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index 8b61dcfd30..0aee8c04e3 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -314,10 +314,16 @@ service_attr_get(void)
TEST_ASSERT_EQUAL(1, cycles_gt_zero,
"attr_get() failed to get cycles (expected > zero)");
- rte_service_lcore_stop(slcore_id);
+ TEST_ASSERT_EQUAL(0, rte_service_map_lcore_set(id, slcore_id, 0),
+ "Disabling valid service and core failed");
+ TEST_ASSERT_EQUAL(0, rte_service_lcore_stop(slcore_id),
+ "Failed to stop service lcore");
wait_slcore_inactive(slcore_id);
+ TEST_ASSERT_EQUAL(0, rte_service_lcore_may_be_active(slcore_id),
+ "Service lcore not stopped after waiting.");
+
TEST_ASSERT_EQUAL(0, rte_service_attr_get(id, attr_calls, &attr_value),
"Valid attr_get() call didn't return success");
TEST_ASSERT_EQUAL(1, (attr_value > 0),
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.269361164 +0800
+++ 0119-test-service-fix-race-in-attr-check.patch 2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 4a985f4e84c56fa6d562b4e920c4912203b95eb6 Mon Sep 17 00:00:00 2001
+From cc7ded572d96e2438836ae07bba0473f9aa5f055 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4a985f4e84c56fa6d562b4e920c4912203b95eb6 ]
@@ -79 +81,0 @@
-Cc: stable@dpdk.org
@@ -89 +91 @@
-index 8659a1526c..ced6ed0081 100644
+index 8b61dcfd30..0aee8c04e3 100644
@@ -92 +94 @@
-@@ -318,10 +318,16 @@ service_attr_get(void)
+@@ -314,10 +314,16 @@ service_attr_get(void)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (118 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'test/service: fix race in attr check' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' " Xueming Li
` (132 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c41706bb6e702b4173116a3c29afaf52640a50d1
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c41706bb6e702b4173116a3c29afaf52640a50d1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 8 Oct 2021 14:07:14 +0200
Subject: [PATCH] eal/x86: fix some CPU extended features definitions
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit aae3037ab1e020f68fa9e662aab31321cffcdc31 ]
Caught while checking CPUID related stuff in OVS.
According to [1], for Structured Extended Feature Flags Enumeration Leaf
(EAX = 0x07H, ECX = 0):
- BMI1 is associated to EBX, bit 3 (was incorrectly 2),
- SMEP is associated to EBX, bit 7 (was incorrectly 6),
- BMI2 is associated to EBX, bit 8 (was incorrectly 7),
- ERMS is associated to EBX, bit 9 (was incorrectly 8),
1: https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf
Fixes: af75078fece3 ("first public release")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/x86/rte_cpuflags.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/x86/rte_cpuflags.c b/lib/librte_eal/x86/rte_cpuflags.c
index a96312ff7f..2fc9e84666 100644
--- a/lib/librte_eal/x86/rte_cpuflags.c
+++ b/lib/librte_eal/x86/rte_cpuflags.c
@@ -100,12 +100,12 @@ const struct feature_entry rte_cpu_feature_table[] = {
FEAT_DEF(ENERGY_EFF, 0x00000006, 0, RTE_REG_ECX, 3)
FEAT_DEF(FSGSBASE, 0x00000007, 0, RTE_REG_EBX, 0)
- FEAT_DEF(BMI1, 0x00000007, 0, RTE_REG_EBX, 2)
+ FEAT_DEF(BMI1, 0x00000007, 0, RTE_REG_EBX, 3)
FEAT_DEF(HLE, 0x00000007, 0, RTE_REG_EBX, 4)
FEAT_DEF(AVX2, 0x00000007, 0, RTE_REG_EBX, 5)
- FEAT_DEF(SMEP, 0x00000007, 0, RTE_REG_EBX, 6)
- FEAT_DEF(BMI2, 0x00000007, 0, RTE_REG_EBX, 7)
- FEAT_DEF(ERMS, 0x00000007, 0, RTE_REG_EBX, 8)
+ FEAT_DEF(SMEP, 0x00000007, 0, RTE_REG_EBX, 7)
+ FEAT_DEF(BMI2, 0x00000007, 0, RTE_REG_EBX, 8)
+ FEAT_DEF(ERMS, 0x00000007, 0, RTE_REG_EBX, 9)
FEAT_DEF(INVPCID, 0x00000007, 0, RTE_REG_EBX, 10)
FEAT_DEF(RTM, 0x00000007, 0, RTE_REG_EBX, 11)
FEAT_DEF(AVX512F, 0x00000007, 0, RTE_REG_EBX, 16)
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.311515722 +0800
+++ 0120-eal-x86-fix-some-CPU-extended-features-definitions.patch 2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From aae3037ab1e020f68fa9e662aab31321cffcdc31 Mon Sep 17 00:00:00 2001
+From c41706bb6e702b4173116a3c29afaf52640a50d1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aae3037ab1e020f68fa9e662aab31321cffcdc31 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
- lib/eal/x86/rte_cpuflags.c | 8 ++++----
+ lib/librte_eal/x86/rte_cpuflags.c | 8 ++++----
@@ -27,4 +29,4 @@
-diff --git a/lib/eal/x86/rte_cpuflags.c b/lib/eal/x86/rte_cpuflags.c
-index d339734a8c..378fc95396 100644
---- a/lib/eal/x86/rte_cpuflags.c
-+++ b/lib/eal/x86/rte_cpuflags.c
+diff --git a/lib/librte_eal/x86/rte_cpuflags.c b/lib/librte_eal/x86/rte_cpuflags.c
+index a96312ff7f..2fc9e84666 100644
+--- a/lib/librte_eal/x86/rte_cpuflags.c
++++ b/lib/librte_eal/x86/rte_cpuflags.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (119 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' " Xueming Li
` (131 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Long Li; +Cc: Luca Boccassi, Jonathan Erb, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/be9717a4ccb476be8188ec94dd010aeb86d53a75
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From be9717a4ccb476be8188ec94dd010aeb86d53a75 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 29 Sep 2021 13:46:10 -0700
Subject: [PATCH] bus/vmbus: fix ring buffer mapping in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 70cdd92e041acd7a0aad295f639f435fbe688190 ]
The driver code had wrong assumption that all the addresses to ring buffers
in the secondary process are the same as those in the primary process. This
is not always correct as the channels could be mapped to different
addresses in the secondary process.
Fix this by keeping track of all the mapped addresses from the primary
process in the shared uio_res, and have second process map to the same
addresses.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Reported-by: Jonathan Erb <jonathan.erb@banduracyber.com>
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <sthemmin@microsoft.com>
---
drivers/bus/vmbus/linux/vmbus_uio.c | 99 +++++++++++++++-------------
drivers/bus/vmbus/private.h | 15 ++++-
drivers/bus/vmbus/vmbus_channel.c | 4 +-
drivers/bus/vmbus/vmbus_common_uio.c | 52 +++++++++++----
4 files changed, 107 insertions(+), 63 deletions(-)
diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 5dc0c47de6..fd64be93b0 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -11,6 +11,7 @@
#include <sys/stat.h>
#include <sys/mman.h>
+#include <rte_eal.h>
#include <rte_log.h>
#include <rte_bus.h>
#include <rte_memory.h>
@@ -203,6 +204,37 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
struct stat sb;
void *mapaddr;
int fd;
+ struct mapped_vmbus_resource *uio_res;
+ int channel_idx;
+
+ uio_res = vmbus_uio_find_resource(dev);
+ if (!uio_res) {
+ VMBUS_LOG(ERR, "can not find resources for mapping subchan");
+ return -ENOMEM;
+ }
+
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ if (uio_res->nb_subchannels >= UIO_MAX_SUBCHANNEL) {
+ VMBUS_LOG(ERR,
+ "exceeding max subchannels UIO_MAX_SUBCHANNEL(%d)",
+ UIO_MAX_SUBCHANNEL);
+ VMBUS_LOG(ERR, "Change UIO_MAX_SUBCHANNEL and recompile");
+ return -ENOMEM;
+ }
+ } else {
+ for (channel_idx = 0; channel_idx < uio_res->nb_subchannels;
+ channel_idx++)
+ if (uio_res->subchannel_maps[channel_idx].relid ==
+ chan->relid)
+ break;
+ if (channel_idx == uio_res->nb_subchannels) {
+ VMBUS_LOG(ERR,
+ "couldn't find sub channel %d from shared mapping in primary",
+ chan->relid);
+ return -ENOMEM;
+ }
+ vmbus_map_addr = uio_res->subchannel_maps[channel_idx].addr;
+ }
snprintf(ring_path, sizeof(ring_path),
"%s/%s/channels/%u/ring",
@@ -239,58 +271,33 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
if (mapaddr == MAP_FAILED)
return -EIO;
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+
+ /* Add this mapping to uio_res for use by secondary */
+ uio_res->subchannel_maps[uio_res->nb_subchannels].relid =
+ chan->relid;
+ uio_res->subchannel_maps[uio_res->nb_subchannels].addr =
+ mapaddr;
+ uio_res->subchannel_maps[uio_res->nb_subchannels].size =
+ file_size;
+ uio_res->nb_subchannels++;
+
+ vmbus_map_addr = RTE_PTR_ADD(mapaddr, file_size);
+ } else {
+ if (mapaddr != vmbus_map_addr) {
+ VMBUS_LOG(ERR, "failed to map channel %d to addr %p",
+ chan->relid, mapaddr);
+ vmbus_unmap_resource(mapaddr, file_size);
+ return -EIO;
+ }
+ }
+
*ring_size = file_size / 2;
*ring_buf = mapaddr;
- vmbus_map_addr = RTE_PTR_ADD(mapaddr, file_size);
return 0;
}
-int
-vmbus_uio_map_secondary_subchan(const struct rte_vmbus_device *dev,
- const struct vmbus_channel *chan)
-{
- const struct vmbus_br *br = &chan->txbr;
- char ring_path[PATH_MAX];
- void *mapaddr, *ring_buf;
- uint32_t ring_size;
- int fd;
-
- snprintf(ring_path, sizeof(ring_path),
- "%s/%s/channels/%u/ring",
- SYSFS_VMBUS_DEVICES, dev->device.name,
- chan->relid);
-
- ring_buf = br->vbr;
- ring_size = br->dsize + sizeof(struct vmbus_bufring);
- VMBUS_LOG(INFO, "secondary ring_buf %p size %u",
- ring_buf, ring_size);
-
- fd = open(ring_path, O_RDWR);
- if (fd < 0) {
- VMBUS_LOG(ERR, "Cannot open %s: %s",
- ring_path, strerror(errno));
- return -errno;
- }
-
- mapaddr = vmbus_map_resource(ring_buf, fd, 0, 2 * ring_size, 0);
- close(fd);
-
- if (mapaddr == ring_buf)
- return 0;
-
- if (mapaddr == MAP_FAILED)
- VMBUS_LOG(ERR,
- "mmap subchan %u in secondary failed", chan->relid);
- else {
- VMBUS_LOG(ERR,
- "mmap subchan %u in secondary address mismatch",
- chan->relid);
- vmbus_unmap_resource(mapaddr, 2 * ring_size);
- }
- return -1;
-}
-
int vmbus_uio_map_rings(struct vmbus_channel *chan)
{
const struct rte_vmbus_device *dev = chan->device;
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index f19b14e4a6..74ef948282 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -36,6 +36,13 @@ struct vmbus_map {
uint64_t size; /* length */
};
+#define UIO_MAX_SUBCHANNEL 128
+struct subchannel_map {
+ uint16_t relid;
+ void *addr;
+ uint64_t size;
+};
+
/*
* For multi-process we need to reproduce all vmbus mappings in secondary
* processes, so save them in a tailq.
@@ -44,10 +51,14 @@ struct mapped_vmbus_resource {
TAILQ_ENTRY(mapped_vmbus_resource) next;
rte_uuid_t id;
+
int nb_maps;
- struct vmbus_channel *primary;
struct vmbus_map maps[VMBUS_MAX_RESOURCE];
+
char path[PATH_MAX];
+
+ int nb_subchannels;
+ struct subchannel_map subchannel_maps[UIO_MAX_SUBCHANNEL];
};
TAILQ_HEAD(mapped_vmbus_res_list, mapped_vmbus_resource);
@@ -108,8 +119,6 @@ bool vmbus_uio_subchannels_supported(const struct rte_vmbus_device *dev,
int vmbus_uio_get_subchan(struct vmbus_channel *primary,
struct vmbus_channel **subchan);
int vmbus_uio_map_rings(struct vmbus_channel *chan);
-int vmbus_uio_map_secondary_subchan(const struct rte_vmbus_device *dev,
- const struct vmbus_channel *chan);
void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen);
diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c
index f67f1c438a..119b9b367e 100644
--- a/drivers/bus/vmbus/vmbus_channel.c
+++ b/drivers/bus/vmbus/vmbus_channel.c
@@ -351,10 +351,8 @@ int rte_vmbus_chan_open(struct rte_vmbus_device *device,
err = vmbus_chan_create(device, device->relid, 0,
device->monitor_id, new_chan);
- if (!err) {
+ if (!err)
device->primary = *new_chan;
- uio_res->primary = *new_chan;
- }
return err;
}
diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c
index a689bf11b3..158e05c889 100644
--- a/drivers/bus/vmbus/vmbus_common_uio.c
+++ b/drivers/bus/vmbus/vmbus_common_uio.c
@@ -69,8 +69,10 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev)
fd, offset,
uio_res->maps[i].size, 0);
- if (mapaddr == uio_res->maps[i].addr)
+ if (mapaddr == uio_res->maps[i].addr) {
+ dev->resource[i].addr = mapaddr;
continue; /* successful map */
+ }
if (mapaddr == MAP_FAILED)
VMBUS_LOG(ERR,
@@ -88,19 +90,39 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev)
/* fd is not needed in secondary process, close it */
close(fd);
- dev->primary = uio_res->primary;
- if (!dev->primary) {
- VMBUS_LOG(ERR, "missing primary channel");
- return -1;
+ /* Create and map primary channel */
+ if (vmbus_chan_create(dev, dev->relid, 0,
+ dev->monitor_id, &dev->primary)) {
+ VMBUS_LOG(ERR, "cannot create primary channel");
+ goto failed_primary;
}
- STAILQ_FOREACH(chan, &dev->primary->subchannel_list, next) {
- if (vmbus_uio_map_secondary_subchan(dev, chan) != 0) {
- VMBUS_LOG(ERR, "cannot map secondary subchan");
- return -1;
+ /* Create and map sub channels */
+ for (i = 0; i < uio_res->nb_subchannels; i++) {
+ if (rte_vmbus_subchan_open(dev->primary, &chan)) {
+ VMBUS_LOG(ERR,
+ "failed to create subchannel at index %d", i);
+ goto failed_secondary;
}
}
+
return 0;
+
+failed_secondary:
+ while (!STAILQ_EMPTY(&dev->primary->subchannel_list)) {
+ chan = STAILQ_FIRST(&dev->primary->subchannel_list);
+ vmbus_unmap_resource(chan->txbr.vbr, chan->txbr.dsize * 2);
+ rte_vmbus_chan_close(chan);
+ }
+ rte_vmbus_chan_close(dev->primary);
+
+failed_primary:
+ for (i = 0; i != uio_res->nb_maps; i++) {
+ vmbus_unmap_resource(
+ uio_res->maps[i].addr, uio_res->maps[i].size);
+ }
+
+ return -1;
}
static int
@@ -188,6 +210,11 @@ vmbus_uio_unmap(struct mapped_vmbus_resource *uio_res)
if (uio_res == NULL)
return;
+ for (i = 0; i < uio_res->nb_subchannels; i++) {
+ vmbus_unmap_resource(uio_res->subchannel_maps[i].addr,
+ uio_res->subchannel_maps[i].size);
+ }
+
for (i = 0; i != uio_res->nb_maps; i++) {
vmbus_unmap_resource(uio_res->maps[i].addr,
(size_t)uio_res->maps[i].size);
@@ -211,8 +238,11 @@ vmbus_uio_unmap_resource(struct rte_vmbus_device *dev)
return;
/* secondary processes - just free maps */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return vmbus_uio_unmap(uio_res);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+ vmbus_uio_unmap(uio_res);
+ rte_free(dev->primary);
+ return;
+ }
TAILQ_REMOVE(uio_res_list, uio_res, next);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.352933455 +0800
+++ 0121-bus-vmbus-fix-ring-buffer-mapping-in-secondary-proce.patch 2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 70cdd92e041acd7a0aad295f639f435fbe688190 Mon Sep 17 00:00:00 2001
+From be9717a4ccb476be8188ec94dd010aeb86d53a75 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 70cdd92e041acd7a0aad295f639f435fbe688190 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index b52ca5bf1d..70b0d098e0 100644
+index 5dc0c47de6..fd64be93b0 100644
@@ -159 +161 @@
-index 528d60a42f..1bca147e12 100644
+index f19b14e4a6..74ef948282 100644
@@ -162 +164 @@
-@@ -33,6 +33,13 @@ struct vmbus_map {
+@@ -36,6 +36,13 @@ struct vmbus_map {
@@ -176 +178 @@
-@@ -41,10 +48,14 @@ struct mapped_vmbus_resource {
+@@ -44,10 +51,14 @@ struct mapped_vmbus_resource {
@@ -192 +194 @@
-@@ -105,8 +116,6 @@ bool vmbus_uio_subchannels_supported(const struct rte_vmbus_device *dev,
+@@ -108,8 +119,6 @@ bool vmbus_uio_subchannels_supported(const struct rte_vmbus_device *dev,
@@ -218 +220 @@
-index 8582e32c1d..041712fe75 100644
+index a689bf11b3..158e05c889 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (120 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'telemetry: fix JSON output buffer length' " Xueming Li
` (130 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/341804051a43c954a195b11163529eda40f27063
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 341804051a43c954a195b11163529eda40f27063 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Sep 2021 15:34:24 +0100
Subject: [PATCH] eal/freebsd: ignore in-memory option
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0faa4cfc50275751a86ed17147175c78a36f0da2 ]
The in-memory option is not supported on FreeBSD so print a warning and
ignore the flag when it is specified for BSD apps. The lack of support
is due to the different way in which memory is managed on FreeBSD using
the contigmem driver rather than via a hugetlbfs filesystem.
Fixes: 14de8734c401 ("eal: add --in-memory option")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/freebsd/eal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 77b42de416..d784437669 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -716,6 +716,10 @@ rte_eal_init(int argc, char **argv)
/* FreeBSD always uses legacy memory model */
internal_conf->legacy_mem = true;
+ if (internal_conf->in_memory) {
+ RTE_LOG(WARNING, EAL, "Warning: ignoring unsupported flag, '%s'\n", OPT_IN_MEMORY);
+ internal_conf->in_memory = false;
+ }
if (eal_plugins_init() < 0) {
rte_eal_init_alert("Cannot init plugins");
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.395501533 +0800
+++ 0122-eal-freebsd-ignore-in-memory-option.patch 2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 0faa4cfc50275751a86ed17147175c78a36f0da2 Mon Sep 17 00:00:00 2001
+From 341804051a43c954a195b11163529eda40f27063 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0faa4cfc50275751a86ed17147175c78a36f0da2 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eal/freebsd/eal.c | 4 ++++
+ lib/librte_eal/freebsd/eal.c | 4 ++++
@@ -19,5 +21,5 @@
-diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
-index 6cee5ae369..fb734012a4 100644
---- a/lib/eal/freebsd/eal.c
-+++ b/lib/eal/freebsd/eal.c
-@@ -718,6 +718,10 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
+index 77b42de416..d784437669 100644
+--- a/lib/librte_eal/freebsd/eal.c
++++ b/lib/librte_eal/freebsd/eal.c
+@@ -716,6 +716,10 @@ rte_eal_init(int argc, char **argv)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'telemetry: fix JSON output buffer length' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (121 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'mbuf: fix typo in comment' " Xueming Li
` (129 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Luca Boccassi, Ciara Power, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/aa4a2ef3fee892f204a04bef2329e65775510f38
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From aa4a2ef3fee892f204a04bef2329e65775510f38 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 11 Oct 2021 16:24:43 +0530
Subject: [PATCH] telemetry: fix JSON output buffer length
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit b76731683b048337d853cca4fa1530218b82aa40 ]
Earlier, JSON message length was limited to 1024 which would not
allow data more than this size. Removed this limitation by creating
output buffer based on requested data length.
Fixes: 52af6ccb2b39 ("telemetry: add utility functions for creating JSON")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
lib/librte_telemetry/telemetry_json.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h
index ad270b9b30..f02a12f5b0 100644
--- a/lib/librte_telemetry/telemetry_json.h
+++ b/lib/librte_telemetry/telemetry_json.h
@@ -9,6 +9,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <rte_common.h>
+#include <rte_telemetry.h>
/**
* @file
@@ -23,13 +24,13 @@
* @internal
* Copies a value into a buffer if the buffer has enough available space.
* Nothing written to buffer if an overflow ocurs.
- * This function is not for use for values larger than 1k.
+ * This function is not for use for values larger than given buffer length.
*/
__rte_format_printf(3, 4)
static inline int
__json_snprintf(char *buf, const int len, const char *format, ...)
{
- char tmp[1024];
+ char tmp[len];
va_list ap;
int ret;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.437541909 +0800
+++ 0123-telemetry-fix-JSON-output-buffer-length.patch 2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From b76731683b048337d853cca4fa1530218b82aa40 Mon Sep 17 00:00:00 2001
+From aa4a2ef3fee892f204a04bef2329e65775510f38 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b76731683b048337d853cca4fa1530218b82aa40 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/telemetry/telemetry_json.h | 5 +++--
+ lib/librte_telemetry/telemetry_json.h | 5 +++--
@@ -19 +21 @@
-diff --git a/lib/telemetry/telemetry_json.h b/lib/telemetry/telemetry_json.h
+diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h
@@ -21,2 +23,2 @@
---- a/lib/telemetry/telemetry_json.h
-+++ b/lib/telemetry/telemetry_json.h
+--- a/lib/librte_telemetry/telemetry_json.h
++++ b/lib/librte_telemetry/telemetry_json.h
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'mbuf: fix typo in comment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (122 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'telemetry: fix JSON output buffer length' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' " Xueming Li
` (128 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Luca Boccassi, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2bd66f32c915d16366be10ade4b3e51361e9fb59
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2bd66f32c915d16366be10ade4b3e51361e9fb59 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 1 Sep 2021 16:49:44 -0700
Subject: [PATCH] mbuf: fix typo in comment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit d75eed0fbe4b942bc6df2e2908a8b5c2c30c99aa ]
Misspelling of 'copied'
Fixes: c3a90c381daa ("mbuf: add a copy routine")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_mbuf/rte_mbuf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index c4c9ebfaa0..3aece65e9d 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1450,7 +1450,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp);
* set of mbufs. The private data are is not copied.
*
* @param m
- * The packet mbuf to be copiedd.
+ * The packet mbuf to be copied.
* @param mp
* The mempool from which the "clone" mbufs are allocated.
* @param offset
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.476346348 +0800
+++ 0124-mbuf-fix-typo-in-comment.patch 2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From d75eed0fbe4b942bc6df2e2908a8b5c2c30c99aa Mon Sep 17 00:00:00 2001
+From 2bd66f32c915d16366be10ade4b3e51361e9fb59 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d75eed0fbe4b942bc6df2e2908a8b5c2c30c99aa ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -14 +16 @@
- lib/mbuf/rte_mbuf.h | 2 +-
+ lib/librte_mbuf/rte_mbuf.h | 2 +-
@@ -17,5 +19,5 @@
-diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
-index a3bfc9fe9a..ec2f4bb188 100644
---- a/lib/mbuf/rte_mbuf.h
-+++ b/lib/mbuf/rte_mbuf.h
-@@ -1430,7 +1430,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp);
+diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
+index c4c9ebfaa0..3aece65e9d 100644
+--- a/lib/librte_mbuf/rte_mbuf.h
++++ b/lib/librte_mbuf/rte_mbuf.h
+@@ -1450,7 +1450,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp);
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (123 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'mbuf: fix typo in comment' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:57 ` Huichao Cai
2021-11-10 6:30 ` [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' " Xueming Li
` (127 subsequent siblings)
252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Huichao Cai; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8250620e98bcc548945a3879d861ad9d9ee542c3
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8250620e98bcc548945a3879d861ad9d9ee542c3 Mon Sep 17 00:00:00 2001
From: Huichao Cai <chcchc88@163.com>
Date: Sat, 9 Oct 2021 15:27:04 +0800
Subject: [PATCH] ip_frag: fix fragmenting IPv4 fragment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 567473433b7e63e12943be29926c13bd491bcca6 ]
Current implementation of rte_ipv4_fragment_packet() doesn’t take
into account offset and flag values of the given packet, but blindly
assumes they are always zero (original packet is not fragmented).
According to RFC791, fragment and flag values for new fragment
should take into account values provided in the original IPv4 packet.
Fixes: 4c38e5532a07 ("ip_frag: refactor IPv4 fragmentation into a proper library")
Signed-off-by: Huichao Cai <chcchc88@163.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
index 2e7739d027..fead5a985a 100644
--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
+++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -75,7 +75,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
uint32_t out_pkt_pos, in_seg_data_pos;
uint32_t more_in_segs;
uint16_t fragment_offset, flag_offset, frag_size, header_len;
- uint16_t frag_bytes_remaining;
+ uint16_t frag_bytes_remaining, not_last_frag;
/*
* Formal parameter checking.
@@ -116,7 +116,9 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
in_seg = pkt_in;
in_seg_data_pos = header_len;
out_pkt_pos = 0;
- fragment_offset = 0;
+ fragment_offset = (uint16_t)((flag_offset &
+ RTE_IPV4_HDR_OFFSET_MASK) << RTE_IPV4_HDR_FO_SHIFT);
+ not_last_frag = (uint16_t)(flag_offset & IPV4_HDR_MF_MASK);
more_in_segs = 1;
while (likely(more_in_segs)) {
@@ -186,7 +188,8 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
__fill_ipv4hdr_frag(out_hdr, in_hdr, header_len,
(uint16_t)out_pkt->pkt_len,
- flag_offset, fragment_offset, more_in_segs);
+ flag_offset, fragment_offset,
+ not_last_frag || more_in_segs);
fragment_offset = (uint16_t)(fragment_offset +
out_pkt->pkt_len - header_len);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.516214039 +0800
+++ 0125-ip_frag-fix-fragmenting-IPv4-fragment.patch 2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From 567473433b7e63e12943be29926c13bd491bcca6 Mon Sep 17 00:00:00 2001
+From 8250620e98bcc548945a3879d861ad9d9ee542c3 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 567473433b7e63e12943be29926c13bd491bcca6 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- lib/ip_frag/rte_ipv4_fragmentation.c | 9 ++++++---
+ lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 ++++++---
@@ -24 +26 @@
-diff --git a/lib/ip_frag/rte_ipv4_fragmentation.c b/lib/ip_frag/rte_ipv4_fragmentation.c
+diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -26,2 +28,2 @@
---- a/lib/ip_frag/rte_ipv4_fragmentation.c
-+++ b/lib/ip_frag/rte_ipv4_fragmentation.c
+--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
++++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (124 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' " Xueming Li
` (126 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: David Christensen; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0f93cfa12ee8255eed7ca9a92ecb56f886922d7a
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0f93cfa12ee8255eed7ca9a92ecb56f886922d7a Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Wed, 8 Sep 2021 10:48:20 -0700
Subject: [PATCH] test/atomic: fix 128-bit atomic test with many cores
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 17a042376be17f6c615b93b189a53eaca1b8bd48 ]
When checking the results of the rte_atomic128_cmp_exchange() function,
current code compares the values of a uint32_t and a uint64_t variable.
If the number of lcores used by the test is large, or the value of the
iteration count N is increased, the variable size mismatch can cause a
false test failure. Modify the comparison to compare uint64_t values.
Fixes: fa3253c534b1 ("test/atomic: add 128-bit atomic compare exchange test")
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
app/test/test_atomic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index f10f555af8..ce0c259bd7 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -591,7 +591,7 @@ test_atomic(void)
rte_atomic32_clear(&synchro);
iterations = count128.val[0] - count128.val[1];
- if (iterations != 4*N*(rte_lcore_count()-1)) {
+ if (iterations != (uint64_t)4*N*(rte_lcore_count()-1)) {
printf("128-bit compare and swap failed\n");
return -1;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.555331570 +0800
+++ 0126-test-atomic-fix-128-bit-atomic-test-with-many-cores.patch 2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From 17a042376be17f6c615b93b189a53eaca1b8bd48 Mon Sep 17 00:00:00 2001
+From 0f93cfa12ee8255eed7ca9a92ecb56f886922d7a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 17a042376be17f6c615b93b189a53eaca1b8bd48 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (125 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'mempool: deprecate unused physical page defines' " Xueming Li
` (125 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: David Marchand
Cc: Luca Boccassi, Stephen Hemminger, Andrew Rybchenko, Ray Kinsella,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c24b889037a2852b55fb03e90797afa7c2f5bafa
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c24b889037a2852b55fb03e90797afa7c2f5bafa Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 12 Oct 2021 21:39:57 +0200
Subject: [PATCH] mbuf: enforce no option for dynamic fields and flags
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e9123c467dbb471a2d41ea896423a81886ef89d7 ]
As stated in the API, dynamic field and flags should be created with no
additional flag (simply in the API for future changes).
Fix the dynamic flag register helper which was not enforcing it and add
unit tests.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
---
app/test/test_mbuf.c | 18 ++++++++++++++++++
lib/librte_mbuf/rte_mbuf_dyn.c | 4 ++++
2 files changed, 22 insertions(+)
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 5bb4786e5a..2bccaa03b1 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2577,6 +2577,16 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
.align = 3,
.flags = 0,
};
+ const struct rte_mbuf_dynfield dynfield_fail_flag = {
+ .name = "test-dynfield",
+ .size = sizeof(uint8_t),
+ .align = __alignof__(uint8_t),
+ .flags = 1,
+ };
+ const struct rte_mbuf_dynflag dynflag_fail_flag = {
+ .name = "test-dynflag",
+ .flags = 1,
+ };
const struct rte_mbuf_dynflag dynflag = {
.name = "test-dynflag",
.flags = 0,
@@ -2638,6 +2648,14 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
if (ret != -1)
GOTO_FAIL("dynamic field creation should fail (not avail)");
+ ret = rte_mbuf_dynfield_register(&dynfield_fail_flag);
+ if (ret != -1)
+ GOTO_FAIL("dynamic field creation should fail (invalid flag)");
+
+ ret = rte_mbuf_dynflag_register(&dynflag_fail_flag);
+ if (ret != -1)
+ GOTO_FAIL("dynamic flag creation should fail (invalid flag)");
+
flag = rte_mbuf_dynflag_register(&dynflag);
if (flag == -1)
GOTO_FAIL("failed to register dynamic flag, flag=%d: %s",
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index ca46eb279e..d55e162a68 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -498,6 +498,10 @@ rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params,
{
int ret;
+ if (params->flags != 0) {
+ rte_errno = EINVAL;
+ return -1;
+ }
if (req >= RTE_SIZEOF_FIELD(struct rte_mbuf, ol_flags) * CHAR_BIT &&
req != UINT_MAX) {
rte_errno = EINVAL;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.594619788 +0800
+++ 0127-mbuf-enforce-no-option-for-dynamic-fields-and-flags.patch 2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From e9123c467dbb471a2d41ea896423a81886ef89d7 Mon Sep 17 00:00:00 2001
+From c24b889037a2852b55fb03e90797afa7c2f5bafa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e9123c467dbb471a2d41ea896423a81886ef89d7 ]
@@ -19,2 +22,2 @@
- app/test/test_mbuf.c | 18 ++++++++++++++++++
- lib/mbuf/rte_mbuf_dyn.c | 4 ++++
+ app/test/test_mbuf.c | 18 ++++++++++++++++++
+ lib/librte_mbuf/rte_mbuf_dyn.c | 4 ++++
@@ -24 +27 @@
-index 9a248dfaea..82777109dc 100644
+index 5bb4786e5a..2bccaa03b1 100644
@@ -59 +62 @@
-diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c
+diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -61,2 +64,2 @@
---- a/lib/mbuf/rte_mbuf_dyn.c
-+++ b/lib/mbuf/rte_mbuf_dyn.c
+--- a/lib/librte_mbuf/rte_mbuf_dyn.c
++++ b/lib/librte_mbuf/rte_mbuf_dyn.c
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'mempool: deprecate unused physical page defines' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (126 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' " Xueming Li
` (124 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: Luca Boccassi, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f4860fc14a96f04d552b3580ac337a3cd23f00ae
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f4860fc14a96f04d552b3580ac337a3cd23f00ae Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Tue, 19 Oct 2021 20:40:22 +0300
Subject: [PATCH] mempool: deprecate unused physical page defines
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit fb11ae88165cdea37cc3b86f045ac0e899aa4e77 ]
MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.
Fixes: fd943c764a63 ("mempool: deprecate xmem functions")
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
doc/guides/contributing/documentation.rst | 4 ++--
doc/guides/rel_notes/deprecation.rst | 3 +++
lib/librte_mempool/rte_mempool.h | 7 ++++---
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 1e998fd214..7c76b32dbf 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -649,7 +649,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
/**< Virtual address of the first mempool object. */
uintptr_t elt_va_end;
/**< Virtual address of the <size + 1> mempool object. */
- phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT];
+ phys_addr_t elt_pa[1];
/**< Array of physical page addresses for the mempool buffer. */
This doesn't have an effect on the rendered documentation but it is confusing for the developer reading the code.
@@ -668,7 +668,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
/** Virtual address of the <size + 1> mempool object. */
uintptr_t elt_va_end;
/** Array of physical page addresses for the mempool buffer. */
- phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT];
+ phys_addr_t elt_pa[1];
* Read the rendered section of the documentation that you have added for correctness, clarity and consistency
with the surrounding text.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c0d7efaba8..cf11196748 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -40,6 +40,9 @@ Deprecation Notices
``__atomic_thread_fence`` must be used for patches that need to be merged in
20.08 onwards. This change will not introduce any performance degradation.
+* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
+ will be removed in DPDK 22.11.
+
* lib: will fix extending some enum/define breaking the ABI. There are multiple
samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
used by iterators, and arrays holding these values are sized with this
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index c551cf733a..9c990a5593 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -112,10 +112,11 @@ struct rte_mempool_objsz {
/* "MP_<name>" */
#define RTE_MEMPOOL_MZ_FORMAT RTE_MEMPOOL_MZ_PREFIX "%s"
-#define MEMPOOL_PG_SHIFT_MAX (sizeof(uintptr_t) * CHAR_BIT - 1)
+#define MEMPOOL_PG_SHIFT_MAX \
+ RTE_DEPRECATED(MEMPOOL_PG_SHIFT_MAX) (sizeof(uintptr_t) * CHAR_BIT - 1)
-/** Mempool over one chunk of physically continuous memory */
-#define MEMPOOL_PG_NUM_DEFAULT 1
+/** Deprecated. Mempool over one chunk of physically continuous memory */
+#define MEMPOOL_PG_NUM_DEFAULT RTE_DEPRECATED(MEMPOOL_PG_NUM_DEFAULT) 1
#ifndef RTE_MEMPOOL_ALIGN
/**
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.635858274 +0800
+++ 0128-mempool-deprecate-unused-physical-page-defines.patch 2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From fb11ae88165cdea37cc3b86f045ac0e899aa4e77 Mon Sep 17 00:00:00 2001
+From f4860fc14a96f04d552b3580ac337a3cd23f00ae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb11ae88165cdea37cc3b86f045ac0e899aa4e77 ]
@@ -15,3 +18,2 @@
- doc/guides/rel_notes/release_21_11.rst | 3 +++
- lib/mempool/rte_mempool.h | 7 ++++---
- 4 files changed, 12 insertions(+), 5 deletions(-)
+ lib/librte_mempool/rte_mempool.h | 7 ++++---
+ 3 files changed, 9 insertions(+), 5 deletions(-)
@@ -20 +22 @@
-index 8cbd4a0f6f..7fcbb7fc43 100644
+index 1e998fd214..7c76b32dbf 100644
@@ -23 +25 @@
-@@ -705,7 +705,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
+@@ -649,7 +649,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
@@ -32 +34 @@
-@@ -724,7 +724,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
+@@ -668,7 +668,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
@@ -42 +44 @@
-index 0095d48084..c59dd5ca98 100644
+index c0d7efaba8..cf11196748 100644
@@ -45,17 +47,3 @@
-@@ -47,6 +47,9 @@ Deprecation Notices
- deprecated and will be removed in DPDK 22.11. Use replacement macro
- ``RTE_MEMPOOL_REGISTER_OPS()``.
-
-+* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
-+ will be removed in DPDK 22.11.
-+
- * mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
- A compatibility layer will be kept until DPDK 22.11, except for the flags
- that are already deprecated (``PKT_RX_L4_CKSUM_BAD``, ``PKT_RX_IP_CKSUM_BAD``,
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index a8dd8031c0..bdaefd236d 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -239,6 +239,9 @@ API Changes
- * mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
- deprecated. Use replacement ``RTE_MEMPOOL_REGISTER_OPS()``.
+@@ -40,6 +40,9 @@ Deprecation Notices
+ ``__atomic_thread_fence`` must be used for patches that need to be merged in
+ 20.08 onwards. This change will not introduce any performance degradation.
@@ -66,8 +54,8 @@
- * net: Renamed ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure
- to ``src_addr`` and ``dst_addr``, respectively.
-
-diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
-index 657233ce45..300dbdea4a 100644
---- a/lib/mempool/rte_mempool.h
-+++ b/lib/mempool/rte_mempool.h
-@@ -116,10 +116,11 @@ struct rte_mempool_objsz {
+ * lib: will fix extending some enum/define breaking the ABI. There are multiple
+ samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
+ used by iterators, and arrays holding these values are sized with this
+diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
+index c551cf733a..9c990a5593 100644
+--- a/lib/librte_mempool/rte_mempool.h
++++ b/lib/librte_mempool/rte_mempool.h
+@@ -112,10 +112,11 @@ struct rte_mempool_objsz {
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (127 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'mempool: deprecate unused physical page defines' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' " Xueming Li
` (123 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Przemyslaw Zegan; +Cc: Luca Boccassi, Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2c8268b307e45be2a6dc8137e55b5e8389a4ca89
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2c8268b307e45be2a6dc8137e55b5e8389a4ca89 Mon Sep 17 00:00:00 2001
From: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Date: Tue, 12 Oct 2021 12:56:11 +0000
Subject: [PATCH] app/crypto-perf: fix AAD template copy overrun
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 ]
This patch fixes a possible buffer overrun problem in crypto perf test.
Previously when user configured AAD size is over 12 bytes the copy
of template AAD will cause a buffer overrun.
The problem is fixed by only copy up to 12 bytes of AAD template.
Fixes: 8a5b494a7f99 ("app/test-crypto-perf: add AEAD parameters")
Signed-off-by: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
app/test-crypto-perf/cperf_test_vectors.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c
index 0af01ff911..167bf87bc4 100644
--- a/app/test-crypto-perf/cperf_test_vectors.c
+++ b/app/test-crypto-perf/cperf_test_vectors.c
@@ -554,6 +554,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
rte_free(t_vec);
return NULL;
}
+
+ if (options->aead_aad_sz > sizeof(aad))
+ options->aead_aad_sz = sizeof(aad);
+
memcpy(t_vec->aad.data, aad, options->aead_aad_sz);
t_vec->aad.phys_addr = rte_malloc_virt2iova(t_vec->aad.data);
t_vec->aad.length = options->aead_aad_sz;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.678303986 +0800
+++ 0129-app-crypto-perf-fix-AAD-template-copy-overrun.patch 2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 Mon Sep 17 00:00:00 2001
+From 2c8268b307e45be2a6dc8137e55b5e8389a4ca89 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 4bba405961..7da1a8fa2e 100644
+index 0af01ff911..167bf87bc4 100644
@@ -24 +26 @@
-@@ -590,6 +590,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
+@@ -554,6 +554,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (128 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' " Xueming Li
` (122 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Gagandeep Singh
Cc: Luca Boccassi, Konstantin Ananyev, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3d67f2c1c3f1ea58d87fcccdb673f045d4f67082
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3d67f2c1c3f1ea58d87fcccdb673f045d4f67082 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 14 Oct 2021 00:30:21 +0530
Subject: [PATCH] cryptodev: fix multi-segment raw vector processing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 8edcb68fd01b6a1e47549be389335cfef042ea05 ]
If no next segment available the “for” loop will fail and it still
returns i+1 i.e. 2, which is wrong as it has filled only 1 buffer.
Fixes: 7adf992fb9bf ("cryptodev: introduce CPU crypto API")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
lib/librte_cryptodev/rte_crypto_sym.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 9d572ec057..406c5c7a5c 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -963,6 +963,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
/* whole requested data is completed */
vec[i].len = left;
left = 0;
+ i++;
break;
}
@@ -972,7 +973,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
}
RTE_ASSERT(left == 0);
- return i + 1;
+ return i;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.723070176 +0800
+++ 0130-cryptodev-fix-multi-segment-raw-vector-processing.patch 2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From 8edcb68fd01b6a1e47549be389335cfef042ea05 Mon Sep 17 00:00:00 2001
+From 3d67f2c1c3f1ea58d87fcccdb673f045d4f67082 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8edcb68fd01b6a1e47549be389335cfef042ea05 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/cryptodev/rte_crypto_sym.h | 3 ++-
+ lib/librte_cryptodev/rte_crypto_sym.h | 3 ++-
@@ -22,5 +24,5 @@
-diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
-index c907b1646d..daa090b978 100644
---- a/lib/cryptodev/rte_crypto_sym.h
-+++ b/lib/cryptodev/rte_crypto_sym.h
-@@ -990,6 +990,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
+diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
+index 9d572ec057..406c5c7a5c 100644
+--- a/lib/librte_cryptodev/rte_crypto_sym.h
++++ b/lib/librte_cryptodev/rte_crypto_sym.h
+@@ -963,6 +963,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
@@ -34 +36 @@
-@@ -999,7 +1000,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
+@@ -972,7 +973,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (129 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/af_xdp: disable secondary process support' " Xueming Li
` (121 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: Luca Boccassi, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9f78abfa183b2b85f21d55d9684aed32b4f6ac54
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9f78abfa183b2b85f21d55d9684aed32b4f6ac54 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Mon, 18 Oct 2021 14:40:52 +0100
Subject: [PATCH] test/bpf: fix undefined behavior with clang
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3ac2dffae88e8eb5c374b1fdd40d605014526510 ]
test_shift1_check() function fails with clang build.
The reason for that is that clang uses 64-bit shift instruction for
what expected to be 32-bit operation.
To be more specific, this C code:
r2 = (uint32_t)r2 >> r4;
With clang produces:
41a4eb: 48 d3 ef shr %cl,%rdi
In that particular case it is an allowed choice, as from one side
left-operand value is known to fit into 32 bits, from other side
according to 'C' standard:
"...if the value of the right operand is negative or is greater than
or equal to the width of the promoted left operand, the behavior is
undefined."
The problem is that on x86 behavior for 64-bit and 32-bit shift
operation might differ.
The fix avoids undefined behavior by making sure
that right operand will not exceed width of the promoted left operand.
Bugzilla ID: 811
Fixes: 9f8f9d91a701 ("test/bpf: introduce functional test")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_bpf.c | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 527c06b807..7002c6a734 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -59,6 +59,9 @@ struct dummy_mbuf {
#define TEST_SHIFT_1 15
#define TEST_SHIFT_2 33
+#define TEST_SHIFT32_MASK (CHAR_BIT * sizeof(uint32_t) - 1)
+#define TEST_SHIFT64_MASK (CHAR_BIT * sizeof(uint64_t) - 1)
+
#define TEST_JCC_1 0
#define TEST_JCC_2 -123
#define TEST_JCC_3 5678
@@ -548,15 +551,25 @@ static const struct ebpf_insn test_shift1_prog[] = {
.off = offsetof(struct dummy_vect8, out[1].u64),
},
{
- .code = (BPF_ALU | BPF_RSH | BPF_X),
- .dst_reg = EBPF_REG_2,
- .src_reg = EBPF_REG_4,
+ .code = (BPF_ALU | BPF_AND | BPF_K),
+ .dst_reg = EBPF_REG_4,
+ .imm = TEST_SHIFT64_MASK,
},
{
.code = (EBPF_ALU64 | BPF_LSH | BPF_X),
.dst_reg = EBPF_REG_3,
.src_reg = EBPF_REG_4,
},
+ {
+ .code = (BPF_ALU | BPF_AND | BPF_K),
+ .dst_reg = EBPF_REG_4,
+ .imm = TEST_SHIFT32_MASK,
+ },
+ {
+ .code = (BPF_ALU | BPF_RSH | BPF_X),
+ .dst_reg = EBPF_REG_2,
+ .src_reg = EBPF_REG_4,
+ },
{
.code = (BPF_STX | BPF_MEM | EBPF_DW),
.dst_reg = EBPF_REG_1,
@@ -590,7 +603,7 @@ static const struct ebpf_insn test_shift1_prog[] = {
{
.code = (BPF_ALU | BPF_AND | BPF_K),
.dst_reg = EBPF_REG_2,
- .imm = sizeof(uint64_t) * CHAR_BIT - 1,
+ .imm = TEST_SHIFT64_MASK,
},
{
.code = (EBPF_ALU64 | EBPF_ARSH | BPF_X),
@@ -600,7 +613,7 @@ static const struct ebpf_insn test_shift1_prog[] = {
{
.code = (BPF_ALU | BPF_AND | BPF_K),
.dst_reg = EBPF_REG_2,
- .imm = sizeof(uint32_t) * CHAR_BIT - 1,
+ .imm = TEST_SHIFT32_MASK,
},
{
.code = (BPF_ALU | BPF_LSH | BPF_X),
@@ -666,8 +679,10 @@ test_shift1_check(uint64_t rc, const void *arg)
dve.out[0].u64 = r2;
dve.out[1].u64 = r3;
- r2 = (uint32_t)r2 >> r4;
+ r4 &= TEST_SHIFT64_MASK;
r3 <<= r4;
+ r4 &= TEST_SHIFT32_MASK;
+ r2 = (uint32_t)r2 >> r4;
dve.out[2].u64 = r2;
dve.out[3].u64 = r3;
@@ -676,9 +691,9 @@ test_shift1_check(uint64_t rc, const void *arg)
r3 = dvt->in[1].u64;
r4 = dvt->in[2].u32;
- r2 &= sizeof(uint64_t) * CHAR_BIT - 1;
+ r2 &= TEST_SHIFT64_MASK;
r3 = (int64_t)r3 >> r2;
- r2 &= sizeof(uint32_t) * CHAR_BIT - 1;
+ r2 &= TEST_SHIFT32_MASK;
r4 = (uint32_t)r4 << r2;
dve.out[4].u64 = r4;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.765826756 +0800
+++ 0131-test-bpf-fix-undefined-behavior-with-clang.patch 2021-11-10 14:17:01.894079233 +0800
@@ -1 +1 @@
-From 3ac2dffae88e8eb5c374b1fdd40d605014526510 Mon Sep 17 00:00:00 2001
+From 9f78abfa183b2b85f21d55d9684aed32b4f6ac54 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3ac2dffae88e8eb5c374b1fdd40d605014526510 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index 8118a1849b..7fcf92e716 100644
+index 527c06b807..7002c6a734 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/af_xdp: disable secondary process support' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (130 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'app/testpmd: update forward engine beginning' " Xueming Li
` (120 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Luca Boccassi, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/effeb912ca7ac50e18db307f40e3bf1e35af8d19
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From effeb912ca7ac50e18db307f40e3bf1e35af8d19 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Fri, 8 Oct 2021 07:50:20 +0000
Subject: [PATCH] net/af_xdp: disable secondary process support
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0668d829085c4e92a6a1117e2b7cb8653eff8038 ]
Since the AF_XDP PMD does not work for secondary processes as reported
in Bugzilla 805, check for the process type at the beginning of probe
and return ENOTSUP if the process type is secondary.
It is planned that secondary processes will be supported by the PMD in
full in a future release by using rte_mp_msg to pass the state to the
secondary process that it requires in order to work.
Bugzilla ID: 805
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 312e424359..3e2e621993 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1597,16 +1597,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
rte_vdev_device_name(dev));
name = rte_vdev_device_name(dev);
- if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
- strlen(rte_vdev_device_args(dev)) == 0) {
- eth_dev = rte_eth_dev_attach_secondary(name);
- if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
- return -EINVAL;
- }
- eth_dev->dev_ops = &ops;
- rte_eth_dev_probing_finish(eth_dev);
- return 0;
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+ AF_XDP_LOG(ERR, "Failed to probe %s. "
+ "AF_XDP PMD does not support secondary processes.\n",
+ name);
+ return -ENOTSUP;
}
kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.808782386 +0800
+++ 0132-net-af_xdp-disable-secondary-process-support.patch 2021-11-10 14:17:01.894079233 +0800
@@ -1 +1 @@
-From 0668d829085c4e92a6a1117e2b7cb8653eff8038 Mon Sep 17 00:00:00 2001
+From effeb912ca7ac50e18db307f40e3bf1e35af8d19 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0668d829085c4e92a6a1117e2b7cb8653eff8038 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,19 +24,3 @@
- doc/guides/rel_notes/release_21_11.rst | 4 ++++
- drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
- 2 files changed, 9 insertions(+), 10 deletions(-)
-
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index 30175246c7..48e0bb60a1 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -85,6 +85,10 @@ New Features
- * Default VLAN strip behavior was changed. VLAN tag won't be stripped
- unless ``DEV_RX_OFFLOAD_VLAN_STRIP`` offload is enabled.
-
-+* **Updated AF_XDP PMD.**
-+
-+ * Disabled secondary process support.
-+
- * **Updated Broadcom bnxt PMD.**
-
- * Added flow offload support for Thor.
+ drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
@@ -42 +28 @@
-index a619dd218d..b362ccdcd3 100644
+index 312e424359..3e2e621993 100644
@@ -45 +31 @@
-@@ -1783,16 +1783,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
+@@ -1597,16 +1597,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/testpmd: update forward engine beginning' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (131 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'net/af_xdp: disable secondary process support' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' " Xueming Li
` (119 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Alvin Zhang; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f8466ee10ff01f35dd4de5ad9b0df1eb59a91f82
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f8466ee10ff01f35dd4de5ad9b0df1eb59a91f82 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 23 Sep 2021 16:01:28 +0800
Subject: [PATCH] app/testpmd: update forward engine beginning
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a78040c990cb7beac2a7daac8f18646c54e2fd07 ]
For each forward engine, there may be some special conditions
must be met before the forwarding runs.
Adding checks for these conditions in configuring is not suitable,
because one condition may rely on multiple configurations, and the
conditions required by each forward engine is not general.
The best solution is each forward engine has a callback to check
whether these conditions are met, and then testpmd can call the
callback to determine whether the forwarding can be started.
There was a void callback 'port_fwd_begin' in forward engine,
it did some initialization for forwarding, this patch updates its
return value then we can add some checks in it to confirm whether
the forwarding can be started. In addition, this patch calls the
callback before the forwarding stats is reset and then launches the
forwarding engine.
Bugzilla ID: 797
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/ieee1588fwd.c | 3 ++-
app/test-pmd/noisy_vnf.c | 4 +++-
app/test-pmd/testpmd.c | 38 ++++++++++++++++++++++++++------------
app/test-pmd/testpmd.h | 2 +-
app/test-pmd/txonly.c | 3 ++-
5 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0c..a949d24d5c 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -198,10 +198,11 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
port_ieee1588_tx_timestamp_check(fs->rx_port);
}
-static void
+static int
port_ieee1588_fwd_begin(portid_t pi)
{
rte_eth_timesync_enable(pi);
+ return 0;
}
static void
diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
index 382a4c2aae..e4434bea95 100644
--- a/app/test-pmd/noisy_vnf.c
+++ b/app/test-pmd/noisy_vnf.c
@@ -231,7 +231,7 @@ noisy_fwd_end(portid_t pi)
rte_free(noisy_cfg[pi]);
}
-static void
+static int
noisy_fwd_begin(portid_t pi)
{
struct noisy_config *n;
@@ -273,6 +273,8 @@ noisy_fwd_begin(portid_t pi)
rte_exit(EXIT_FAILURE,
"--noisy-lkup-memory-size must be > 0\n");
}
+
+ return 0;
}
struct fwd_engine noisy_vnf_engine = {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5288c04ab6..75714ff648 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2074,16 +2074,10 @@ run_one_txonly_burst_on_core(void *fwd_arg)
static void
launch_packet_forwarding(lcore_function_t *pkt_fwd_on_lcore)
{
- port_fwd_begin_t port_fwd_begin;
unsigned int i;
unsigned int lc_id;
int diag;
- port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
- if (port_fwd_begin != NULL) {
- for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
- (*port_fwd_begin)(fwd_ports_ids[i]);
- }
for (i = 0; i < cur_fwd_config.nb_fwd_lcores; i++) {
lc_id = fwd_lcores_cpuids[i];
if ((interactive == 0) || (lc_id != rte_lcore_id())) {
@@ -2128,10 +2122,35 @@ start_packet_forwarding(int with_tx_first)
printf("Packet forwarding already started\n");
return;
}
- test_done = 0;
fwd_config_setup();
+ port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
+ if (port_fwd_begin != NULL) {
+ for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
+ if (port_fwd_begin(fwd_ports_ids[i])) {
+ fprintf(stderr,
+ "Packet forwarding is not ready\n");
+ return;
+ }
+ }
+ }
+
+ if (with_tx_first) {
+ port_fwd_begin = tx_only_engine.port_fwd_begin;
+ if (port_fwd_begin != NULL) {
+ for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
+ if (port_fwd_begin(fwd_ports_ids[i])) {
+ fprintf(stderr,
+ "Packet forwarding is not ready\n");
+ return;
+ }
+ }
+ }
+ }
+
+ test_done = 0;
+
if(!no_flush_rx)
flush_fwd_rx_queues();
@@ -2140,11 +2159,6 @@ start_packet_forwarding(int with_tx_first)
fwd_stats_reset();
if (with_tx_first) {
- port_fwd_begin = tx_only_engine.port_fwd_begin;
- if (port_fwd_begin != NULL) {
- for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
- (*port_fwd_begin)(fwd_ports_ids[i]);
- }
while (with_tx_first--) {
launch_packet_forwarding(
run_one_txonly_burst_on_core);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 927ca587d3..b54958165a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -266,7 +266,7 @@ struct fwd_lcore {
* Forwards packets unchanged on the same port.
* Check that sent IEEE1588 PTP packets are timestamped by the hardware.
*/
-typedef void (*port_fwd_begin_t)(portid_t pi);
+typedef int (*port_fwd_begin_t)(portid_t pi);
typedef void (*port_fwd_end_t)(portid_t pi);
typedef void (*packet_fwd_t)(struct fwd_stream *fs);
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index d55ee7ca00..93d121fd57 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -423,7 +423,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
get_end_cycles(fs, start_tsc);
}
-static void
+static int
tx_only_begin(portid_t pi)
{
uint16_t pkt_data_len;
@@ -455,6 +455,7 @@ tx_only_begin(portid_t pi)
timestamp_init_req++;
/* Make sure all settings are visible on forwarding cores.*/
rte_wmb();
+ return 0;
}
struct fwd_engine tx_only_engine = {
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.851812489 +0800
+++ 0133-app-testpmd-update-forward-engine-beginning.patch 2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From a78040c990cb7beac2a7daac8f18646c54e2fd07 Mon Sep 17 00:00:00 2001
+From f8466ee10ff01f35dd4de5ad9b0df1eb59a91f82 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a78040c990cb7beac2a7daac8f18646c54e2fd07 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -30 +31,0 @@
- app/test-pmd/flowgen.c | 3 ++-
@@ -36 +37 @@
- 6 files changed, 36 insertions(+), 17 deletions(-)
+ 5 files changed, 34 insertions(+), 16 deletions(-)
@@ -38,17 +38,0 @@
-diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
-index a96169e680..7ebed9fed3 100644
---- a/app/test-pmd/flowgen.c
-+++ b/app/test-pmd/flowgen.c
-@@ -201,10 +201,11 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
- get_end_cycles(fs, start_tsc);
- }
-
--static void
-+static int
- flowgen_begin(portid_t pi)
- {
- printf(" number of flows for port %u: %d\n", pi, nb_flows_flowgen);
-+ return 0;
- }
-
- struct fwd_engine flow_gen_engine = {
@@ -56 +40 @@
-index 9cf10c1c50..b85a4aa87b 100644
+index e3b98e3e0c..a949d24d5c 100644
@@ -95 +79 @@
-index 97ae52e17e..eec4f1b81d 100644
+index 5288c04ab6..75714ff648 100644
@@ -98 +82 @@
-@@ -2172,16 +2172,10 @@ run_one_txonly_burst_on_core(void *fwd_arg)
+@@ -2074,16 +2074,10 @@ run_one_txonly_burst_on_core(void *fwd_arg)
@@ -115,2 +99,2 @@
-@@ -2227,10 +2221,35 @@ start_packet_forwarding(int with_tx_first)
- fprintf(stderr, "Packet forwarding already started\n");
+@@ -2128,10 +2122,35 @@ start_packet_forwarding(int with_tx_first)
+ printf("Packet forwarding already started\n");
@@ -152 +136 @@
-@@ -2239,11 +2258,6 @@ start_packet_forwarding(int with_tx_first)
+@@ -2140,11 +2159,6 @@ start_packet_forwarding(int with_tx_first)
@@ -165 +149 @@
-index 5863b2f43f..e9d9db06ce 100644
+index 927ca587d3..b54958165a 100644
@@ -168 +152 @@
-@@ -268,7 +268,7 @@ struct fwd_lcore {
+@@ -266,7 +266,7 @@ struct fwd_lcore {
@@ -178 +162 @@
-index 40655801cc..6b3651f855 100644
+index d55ee7ca00..93d121fd57 100644
@@ -181 +165 @@
-@@ -435,7 +435,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
+@@ -423,7 +423,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
@@ -190 +174 @@
-@@ -467,6 +467,7 @@ tx_only_begin(portid_t pi)
+@@ -455,6 +455,7 @@ tx_only_begin(portid_t pi)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (132 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'app/testpmd: update forward engine beginning' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' " Xueming Li
` (118 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Alvin Zhang; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4942dcf261c3e6cc21aadfe22a0689e5240e6ffd
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 4942dcf261c3e6cc21aadfe22a0689e5240e6ffd Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 23 Sep 2021 16:01:29 +0800
Subject: [PATCH] app/testpmd: fix txonly forwarding
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 02220e5305d72b70585f8798043409eb49d9f30c ]
When random number of Tx segments is enabled, because the actual
number of segments may be only one, the first segment of the Tx
packets must accommodate a complete being sending Eth/IP/UDP packet.
Besides, if multiple flow is enabled, the forwarding will update
the IP and UDP header, these headers shouldn't cross segments.
This also requires the first Tx segment can accommodate a complete
Eth/IP/UDP packet.
In addition, if time stamp is enabled, the forwarding needs more
Tx segment space for time stamp information.
This patch adds checks in beginning of forward engine to make sure
all above conditions are met.
Bugzilla ID: 797
Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets")
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/txonly.c | 67 +++++++++++++++++++++++++++++++++++--------
1 file changed, 55 insertions(+), 12 deletions(-)
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 93d121fd57..671ace3008 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -40,6 +40,13 @@
#include "testpmd.h"
+struct tx_timestamp {
+ rte_be32_t signature;
+ rte_be16_t pkt_idx;
+ rte_be16_t queue_idx;
+ rte_be64_t ts;
+};
+
/* use RFC863 Discard Protocol */
uint16_t tx_udp_src_port = 9;
uint16_t tx_udp_dst_port = 9;
@@ -257,12 +264,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
if (unlikely(timestamp_enable)) {
uint64_t skew = RTE_PER_LCORE(timestamp_qskew);
- struct {
- rte_be32_t signature;
- rte_be16_t pkt_idx;
- rte_be16_t queue_idx;
- rte_be64_t ts;
- } timestamp_mark;
+ struct tx_timestamp timestamp_mark;
if (unlikely(timestamp_init_req !=
RTE_PER_LCORE(timestamp_idone))) {
@@ -426,13 +428,23 @@ pkt_burst_transmit(struct fwd_stream *fs)
static int
tx_only_begin(portid_t pi)
{
- uint16_t pkt_data_len;
+ uint16_t pkt_hdr_len, pkt_data_len;
int dynf;
- pkt_data_len = (uint16_t) (tx_pkt_length - (
- sizeof(struct rte_ether_hdr) +
- sizeof(struct rte_ipv4_hdr) +
- sizeof(struct rte_udp_hdr)));
+ pkt_hdr_len = (uint16_t)(sizeof(struct rte_ether_hdr) +
+ sizeof(struct rte_ipv4_hdr) +
+ sizeof(struct rte_udp_hdr));
+ pkt_data_len = tx_pkt_length - pkt_hdr_len;
+
+ if ((tx_pkt_split == TX_PKT_SPLIT_RND || txonly_multi_flow) &&
+ tx_pkt_seg_lengths[0] < pkt_hdr_len) {
+ TESTPMD_LOG(ERR,
+ "Random segment number or multiple flow is enabled, "
+ "but tx_pkt_seg_lengths[0] %u < %u (needed)\n",
+ tx_pkt_seg_lengths[0], pkt_hdr_len);
+ return -EINVAL;
+ }
+
setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);
timestamp_enable = false;
@@ -451,8 +463,39 @@ tx_only_begin(portid_t pi)
timestamp_mask &&
timestamp_off >= 0 &&
!rte_eth_read_clock(pi, ×tamp_initial[pi]);
- if (timestamp_enable)
+
+ if (timestamp_enable) {
+ pkt_hdr_len += sizeof(struct tx_timestamp);
+
+ if (tx_pkt_split == TX_PKT_SPLIT_RND) {
+ if (tx_pkt_seg_lengths[0] < pkt_hdr_len) {
+ TESTPMD_LOG(ERR,
+ "Time stamp and random segment number are enabled, "
+ "but tx_pkt_seg_lengths[0] %u < %u (needed)\n",
+ tx_pkt_seg_lengths[0], pkt_hdr_len);
+ return -EINVAL;
+ }
+ } else {
+ uint16_t total = 0;
+ uint8_t i;
+
+ for (i = 0; i < tx_pkt_nb_segs; i++) {
+ total += tx_pkt_seg_lengths[i];
+ if (total >= pkt_hdr_len)
+ break;
+ }
+
+ if (total < pkt_hdr_len) {
+ TESTPMD_LOG(ERR,
+ "Not enough Tx segment space for time stamp info, "
+ "total %u < %u (needed)\n",
+ total, pkt_hdr_len);
+ return -EINVAL;
+ }
+ }
timestamp_init_req++;
+ }
+
/* Make sure all settings are visible on forwarding cores.*/
rte_wmb();
return 0;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.898359572 +0800
+++ 0134-app-testpmd-fix-txonly-forwarding.patch 2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From 02220e5305d72b70585f8798043409eb49d9f30c Mon Sep 17 00:00:00 2001
+From 4942dcf261c3e6cc21aadfe22a0689e5240e6ffd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 02220e5305d72b70585f8798043409eb49d9f30c ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 6b3651f855..e45f8840c9 100644
+index 93d121fd57..671ace3008 100644
@@ -63 +65 @@
-@@ -438,13 +440,23 @@ pkt_burst_transmit(struct fwd_stream *fs)
+@@ -426,13 +428,23 @@ pkt_burst_transmit(struct fwd_stream *fs)
@@ -92 +94 @@
-@@ -463,8 +475,39 @@ tx_only_begin(portid_t pi)
+@@ -451,8 +463,39 @@ tx_only_begin(portid_t pi)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (133 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/bonding: fix RSS key length' " Xueming Li
` (117 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/59556c7e7a6ed3021349a88a6758fec07190e73b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 22 Sep 2021 15:09:12 +0800
Subject: [PATCH] net/bonding: fix dedicated queue mode in vector burst
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ]
If the vector burst mode is selected, the dedicated queue mode will not
take effect on some PMDs because these PMDs may have some limitations
in vector burst mode. For example, the limit on burst size. Currently,
both hns3 and intel I40E require four alignments when receiving packets
in vector mode. As a result, they can't accept packets if burst size
below four. However, in dedicated queue mode, the burst size of periodic
packets processing is one.
This patch fixes the above problem by modifying the burst size to 32.
This approach also makes the packet processing of the dedicated queue
mode more reasonable. Currently, if multiple LACP protocol packets are
received in the hardware queue in a cycle, only one LACP packet will be
processed in this cycle, and the left packets will be processed in the
following cycle. After the modification, all the LACP packets will be
processed at one time, which seems more reasonable and closer to the
behavior of the bonding driver when the dedicated queue is not turned on.
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 32 ++++++++++++++++-------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 128754f459..478c28afee 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -838,6 +838,27 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
rx_machine(internals, slave_id, NULL);
}
+static void
+bond_mode_8023ad_dedicated_rxq_process(struct bond_dev_private *internals,
+ uint16_t slave_id)
+{
+#define DEDICATED_QUEUE_BURST_SIZE 32
+ struct rte_mbuf *lacp_pkt[DEDICATED_QUEUE_BURST_SIZE];
+ uint16_t rx_count = rte_eth_rx_burst(slave_id,
+ internals->mode4.dedicated_queues.rx_qid,
+ lacp_pkt, DEDICATED_QUEUE_BURST_SIZE);
+
+ if (rx_count) {
+ uint16_t i;
+
+ for (i = 0; i < rx_count; i++)
+ bond_mode_8023ad_handle_slow_pkt(internals, slave_id,
+ lacp_pkt[i]);
+ } else {
+ rx_machine_update(internals, slave_id, NULL);
+ }
+}
+
static void
bond_mode_8023ad_periodic_cb(void *arg)
{
@@ -926,15 +947,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
rx_machine_update(internals, slave_id, lacp_pkt);
} else {
- uint16_t rx_count = rte_eth_rx_burst(slave_id,
- internals->mode4.dedicated_queues.rx_qid,
- &lacp_pkt, 1);
-
- if (rx_count == 1)
- bond_mode_8023ad_handle_slow_pkt(internals,
- slave_id, lacp_pkt);
- else
- rx_machine_update(internals, slave_id, NULL);
+ bond_mode_8023ad_dedicated_rxq_process(internals,
+ slave_id);
}
periodic_machine(internals, slave_id);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.940208311 +0800
+++ 0135-net-bonding-fix-dedicated-queue-mode-in-vector-burst.patch 2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From b8cfca26aed14354a6594d416a37881f494e2cfc Mon Sep 17 00:00:00 2001
+From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index 3558644232..2029955c10 100644
+index 128754f459..478c28afee 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix RSS key length' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (134 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' " Xueming Li
` (116 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/709c5b655fe8e51cdca93ea063a58099c8996932
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 709c5b655fe8e51cdca93ea063a58099c8996932 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 22 Sep 2021 15:09:13 +0800
Subject: [PATCH] net/bonding: fix RSS key length
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6b1a001ec54635d63ed3f91eaef5164abee7a089 ]
Currently the hash_key_size information has not been set. So, apps can
not get the key size from dev_info(), this make some problem.
e.g, in testpmd, the hash_key_size will be checked before configure
or get the hash key:
testpmd> show port 4 rss-hash
dev_info did not provide a valid hash key size
testpmd> show port 4 rss-hash key
dev_info did not provide a valid hash key size
testpmd> port config 4 rss-hash-key ipv4 (hash key)
dev_info did not provide a valid hash key size
In this patch, the meaning of rss_key_len has been modified. It only
indicated the length of the configured hash key before. Therefore,
its value depends on the user's configuration. This seems unreasonable.
And now, it indicates the minimum hash key length required by the
bonded device. Its value will be the shortest hash key among all slave
drivers.
Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_api.c | 6 ++++
drivers/net/bonding/rte_eth_bond_pmd.c | 44 ++++++++++++++++----------
2 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 44775f61e5..c751a1242d 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -290,6 +290,7 @@ eth_bond_slave_inherit_dev_info_rx_first(struct bond_dev_private *internals,
struct rte_eth_rxconf *rxconf_i = &internals->default_rxconf;
internals->reta_size = di->reta_size;
+ internals->rss_key_len = di->hash_key_size;
/* Inherit Rx offload capabilities from the first slave device */
internals->rx_offload_capa = di->rx_offload_capa;
@@ -385,6 +386,11 @@ eth_bond_slave_inherit_dev_info_rx_next(struct bond_dev_private *internals,
*/
if (internals->reta_size > di->reta_size)
internals->reta_size = di->reta_size;
+ if (internals->rss_key_len > di->hash_key_size) {
+ RTE_BOND_LOG(WARNING, "slave has different rss key size, "
+ "configuring rss may fail");
+ internals->rss_key_len = di->hash_key_size;
+ }
if (!internals->max_rx_pktlen &&
di->max_rx_pktlen < internals->candidate_max_rx_pktlen)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index baa01b17e5..fb430be549 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1705,14 +1705,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
/* If RSS is enabled for bonding, try to enable it for slaves */
if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
- if (internals->rss_key_len != 0) {
- slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len =
+ /* rss_key won't be empty if RSS is configured in bonded dev */
+ slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len =
internals->rss_key_len;
- slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key =
+ slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key =
internals->rss_key;
- } else {
- slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
- }
slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf =
bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
@@ -2244,6 +2241,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
dev_info->reta_size = internals->reta_size;
+ dev_info->hash_key_size = internals->rss_key_len;
return 0;
}
@@ -3033,13 +3031,15 @@ bond_ethdev_rss_hash_update(struct rte_eth_dev *dev,
if (bond_rss_conf.rss_hf != 0)
dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf = bond_rss_conf.rss_hf;
- if (bond_rss_conf.rss_key && bond_rss_conf.rss_key_len <
- sizeof(internals->rss_key)) {
- if (bond_rss_conf.rss_key_len == 0)
- bond_rss_conf.rss_key_len = 40;
- internals->rss_key_len = bond_rss_conf.rss_key_len;
+ if (bond_rss_conf.rss_key) {
+ if (bond_rss_conf.rss_key_len < internals->rss_key_len)
+ return -EINVAL;
+ else if (bond_rss_conf.rss_key_len > internals->rss_key_len)
+ RTE_BOND_LOG(WARNING, "rss_key will be truncated");
+
memcpy(internals->rss_key, bond_rss_conf.rss_key,
internals->rss_key_len);
+ bond_rss_conf.rss_key_len = internals->rss_key_len;
}
for (i = 0; i < internals->slave_count; i++) {
@@ -3502,14 +3502,24 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
* Fall back to default RSS key if the key is not specified
*/
if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
- if (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key != NULL) {
- internals->rss_key_len =
- dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len;
- memcpy(internals->rss_key,
- dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key,
+ struct rte_eth_rss_conf *rss_conf =
+ &dev->data->dev_conf.rx_adv_conf.rss_conf;
+ if (rss_conf->rss_key != NULL) {
+ if (internals->rss_key_len > rss_conf->rss_key_len) {
+ RTE_BOND_LOG(ERR, "Invalid rss key length(%u)",
+ rss_conf->rss_key_len);
+ return -EINVAL;
+ }
+
+ memcpy(internals->rss_key, rss_conf->rss_key,
internals->rss_key_len);
} else {
- internals->rss_key_len = sizeof(default_rss_key);
+ if (internals->rss_key_len > sizeof(default_rss_key)) {
+ RTE_BOND_LOG(ERR,
+ "There is no suitable default hash key");
+ return -EINVAL;
+ }
+
memcpy(internals->rss_key, default_rss_key,
internals->rss_key_len);
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:07.982241182 +0800
+++ 0136-net-bonding-fix-RSS-key-length.patch 2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From 6b1a001ec54635d63ed3f91eaef5164abee7a089 Mon Sep 17 00:00:00 2001
+From 709c5b655fe8e51cdca93ea063a58099c8996932 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b1a001ec54635d63ed3f91eaef5164abee7a089 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index eb8d15d160..5140ef14c2 100644
+index 44775f61e5..c751a1242d 100644
@@ -60 +62 @@
-index 542c6633b5..4c604d6aec 100644
+index baa01b17e5..fb430be549 100644
@@ -63 +65 @@
-@@ -1701,14 +1701,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1705,14 +1705,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
@@ -81 +83 @@
-@@ -2251,6 +2248,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2244,6 +2241,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -89 +91 @@
-@@ -3044,13 +3042,15 @@ bond_ethdev_rss_hash_update(struct rte_eth_dev *dev,
+@@ -3033,13 +3031,15 @@ bond_ethdev_rss_hash_update(struct rte_eth_dev *dev,
@@ -110 +112 @@
-@@ -3510,14 +3510,24 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3502,14 +3502,24 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (135 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'net/bonding: fix RSS key length' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' " Xueming Li
` (115 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Huisong Li; +Cc: Luca Boccassi, Min Hu, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/07c572ba8224a09e5a696cb7a0e4535c4d4a7579
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 07c572ba8224a09e5a696cb7a0e4535c4d4a7579 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 11 Oct 2021 17:12:46 +0800
Subject: [PATCH] app/testpmd: retain all original dev conf when config DCB
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee ]
When configuring DCB, testpmd retains the rx_mode/tx_mode configuration in
rte_port->dev_conf. But some configurations, such as the link_speed, were
not saved if they were set before configuring DCB.
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/testpmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 75714ff648..466df37a2a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3574,10 +3574,8 @@ init_port_dcb_config(portid_t pid,
rte_port = &ports[pid];
- memset(&port_conf, 0, sizeof(struct rte_eth_conf));
-
- port_conf.rxmode = rte_port->dev_conf.rxmode;
- port_conf.txmode = rte_port->dev_conf.txmode;
+ /* retain the original device configuration. */
+ memcpy(&port_conf, &rte_port->dev_conf, sizeof(struct rte_eth_conf));
/*set configuration of DCB in vt mode and DCB in non-vt mode*/
retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:08.026653589 +0800
+++ 0137-app-testpmd-retain-all-original-dev-conf-when-config.patch 2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee Mon Sep 17 00:00:00 2001
+From 07c572ba8224a09e5a696cb7a0e4535c4d4a7579 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index eec4f1b81d..12a0db8796 100644
+index 75714ff648..466df37a2a 100644
@@ -24,2 +26,2 @@
-@@ -3729,10 +3729,8 @@ init_port_dcb_config(portid_t pid,
- }
+@@ -3574,10 +3574,8 @@ init_port_dcb_config(portid_t pid,
+
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (136 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/sfc: update comment about representor support' " Xueming Li
` (114 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Viacheslav Galaktionov
Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/af0aaab086f605cee539c67ff80cea9785d2f850
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From af0aaab086f605cee539c67ff80cea9785d2f850 Mon Sep 17 00:00:00 2001
From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Date: Mon, 11 Oct 2021 17:48:46 +0300
Subject: [PATCH] net/sfc: free MAE lock once switch domain is assigned
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c7e64eea525241a383dc66c467358a9c91c5ed4a ]
If for some reason the hardware switch ID initialization function fails,
MAE lock is still held after the function finishes. This patch fixes that.
Fixes: 1e7fbdf0ba19 ("net/sfc: support concept of switch domains/ports")
Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c
index bdea2a2446..4aa9ab3060 100644
--- a/drivers/net/sfc/sfc_switch.c
+++ b/drivers/net/sfc/sfc_switch.c
@@ -214,9 +214,9 @@ fail_domain_alloc:
fail_mem_alloc:
sfc_hw_switch_id_fini(sa, hw_switch_id);
- rte_spinlock_unlock(&sfc_mae_switch.lock);
fail_hw_switch_id_init:
+ rte_spinlock_unlock(&sfc_mae_switch.lock);
return rc;
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:08.070479983 +0800
+++ 0138-net-sfc-free-MAE-lock-once-switch-domain-is-assigned.patch 2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From c7e64eea525241a383dc66c467358a9c91c5ed4a Mon Sep 17 00:00:00 2001
+From af0aaab086f605cee539c67ff80cea9785d2f850 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c7e64eea525241a383dc66c467358a9c91c5ed4a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c37cdf4a61..80c884a599 100644
+index bdea2a2446..4aa9ab3060 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/sfc: update comment about representor support' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (137 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' " Xueming Li
` (113 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Viacheslav Galaktionov
Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/65c0176f3ce8416d43939c19fc156f140562debe
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 65c0176f3ce8416d43939c19fc156f140562debe Mon Sep 17 00:00:00 2001
From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Date: Mon, 11 Oct 2021 17:48:57 +0300
Subject: [PATCH] net/sfc: update comment about representor support
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e28938e6213ac7d550219db1c5db3b7c1409ebf2 ]
The representor support has been implemented to some extent, and the fact
that ethdev mport is equivalent to entity mport is by design.
Fixes: 1fb65e4dae8a ("net/sfc: support flow action port ID in transfer rules")
Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_mae.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index dc01257ace..02f189eca5 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -68,10 +68,7 @@ sfc_mae_attach(struct sfc_adapter *sa)
sfc_log_init(sa, "assign RTE switch port");
switch_port_request.type = SFC_MAE_SWITCH_PORT_INDEPENDENT;
switch_port_request.entity_mportp = &entity_mport;
- /*
- * As of now, the driver does not support representors, so
- * RTE ethdev MPORT simply matches that of the entity.
- */
+ /* RTE ethdev MPORT matches that of the entity for independent ports. */
switch_port_request.ethdev_mportp = &entity_mport;
switch_port_request.ethdev_port_id = sas->port_id;
rc = sfc_mae_assign_switch_port(mae->switch_domain_id,
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:08.112112150 +0800
+++ 0139-net-sfc-update-comment-about-representor-support.patch 2021-11-10 14:17:01.904079151 +0800
@@ -1 +1 @@
-From e28938e6213ac7d550219db1c5db3b7c1409ebf2 Mon Sep 17 00:00:00 2001
+From 65c0176f3ce8416d43939c19fc156f140562debe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e28938e6213ac7d550219db1c5db3b7c1409ebf2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7be77054ab..fa60c948ca 100644
+index dc01257ace..02f189eca5 100644
@@ -23 +25 @@
-@@ -228,10 +228,7 @@ sfc_mae_attach(struct sfc_adapter *sa)
+@@ -68,10 +68,7 @@ sfc_mae_attach(struct sfc_adapter *sa)
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (138 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'net/sfc: update comment about representor support' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/ixgbe: fix queue release' " Xueming Li
` (112 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Alvin Zhang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b450a88df85f86e5e431aadaf9e7bd965fd18b76
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b450a88df85f86e5e431aadaf9e7bd965fd18b76 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 30 Sep 2021 13:19:57 +0800
Subject: [PATCH] net/i40e: fix Rx packet statistics
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 39e4a2577fd05199f53182b7c8509aeed40dc07f ]
Some packets are discarded by the NIC because they are larger than
the MTU, these packets should be counted as "RX error" instead of
"RX packet", for example:
pkt1 = Ether()/IP()/Raw('x' * 1400)
pkt2 = Ether()/IP()/Raw('x' * 1500)
---------------- Forward statistics for port 0 -----------------
RX-packets: 2 RX-dropped: 0 RX-total: 2
TX-packets: 1 TX-dropped: 0 TX-total: 1
----------------------------------------------------------------
Here the packet pkt2 has been discarded, but still was counted
by "RX-packets"
The register 'GL_RXERR1' can count above discarded packets.
This patch adds reading and calculation of the 'GL_RXERR1' counter
when reporting DPDK statistics.
Fixes: f4a91c38b4ad ("i40e: add extended stats")
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 16 +++++++++++++---
drivers/net/i40e/i40e_ethdev.h | 10 ++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a364338564..f8c1035f8f 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -534,7 +534,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
/* store statistics names and its offset in stats structure */
struct rte_i40e_xstats_name_off {
char name[RTE_ETH_XSTATS_NAME_SIZE];
- unsigned offset;
+ int offset;
};
static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
@@ -544,6 +544,8 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
{"rx_dropped_packets", offsetof(struct i40e_eth_stats, rx_discards)},
{"rx_unknown_protocol_packets", offsetof(struct i40e_eth_stats,
rx_unknown_protocol)},
+ {"rx_size_error_packets", offsetof(struct i40e_pf, rx_err1) -
+ offsetof(struct i40e_pf, stats)},
{"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_unicast)},
{"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_multicast)},
{"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_broadcast)},
@@ -3295,6 +3297,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
pf->offset_loaded,
&os->eth.rx_unknown_protocol,
&ns->eth.rx_unknown_protocol);
+ i40e_stat_update_48(hw, I40E_GL_RXERR1_H(hw->pf_id + I40E_MAX_VF),
+ I40E_GL_RXERR1_L(hw->pf_id + I40E_MAX_VF),
+ pf->offset_loaded, &pf->rx_err1_offset,
+ &pf->rx_err1);
i40e_stat_update_48_in_64(hw, I40E_GLPRT_GOTCH(hw->port),
I40E_GLPRT_GOTCL(hw->port),
pf->offset_loaded, &os->eth.tx_bytes,
@@ -3494,7 +3500,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->ipackets = pf->main_vsi->eth_stats.rx_unicast +
pf->main_vsi->eth_stats.rx_multicast +
pf->main_vsi->eth_stats.rx_broadcast -
- pf->main_vsi->eth_stats.rx_discards;
+ pf->main_vsi->eth_stats.rx_discards -
+ pf->rx_err1;
stats->opackets = ns->eth.tx_unicast +
ns->eth.tx_multicast +
ns->eth.tx_broadcast;
@@ -3508,7 +3515,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
pf->main_vsi->eth_stats.rx_discards;
stats->ierrors = ns->crc_errors +
ns->rx_length_errors + ns->rx_undersize +
- ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
+ ns->rx_oversize + ns->rx_fragments + ns->rx_jabber +
+ pf->rx_err1;
if (pf->vfs) {
for (i = 0; i < pf->vf_num; i++) {
@@ -6289,6 +6297,8 @@ i40e_pf_setup(struct i40e_pf *pf)
memset(&pf->stats_offset, 0, sizeof(struct i40e_hw_port_stats));
memset(&pf->internal_stats, 0, sizeof(struct i40e_eth_stats));
memset(&pf->internal_stats_offset, 0, sizeof(struct i40e_eth_stats));
+ pf->rx_err1 = 0;
+ pf->rx_err1_offset = 0;
ret = i40e_pf_get_switch_config(pf);
if (ret != I40E_SUCCESS) {
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index d80316d2f7..f32d853071 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -17,6 +17,13 @@
#include "base/i40e_register.h"
+/**
+ * _i=0...143,
+ * counters 0-127 are for the 128 VFs,
+ * counters 128-143 are for the 16 PFs
+ */
+#define I40E_GL_RXERR1_H(_i) (0x00318004 + ((_i) * 8))
+
#define I40E_VLAN_TAG_SIZE 4
#define I40E_AQ_LEN 32
@@ -1114,6 +1121,9 @@ struct i40e_pf {
struct i40e_hw_port_stats stats_offset;
struct i40e_hw_port_stats stats;
+ u64 rx_err1; /* rxerr1 */
+ u64 rx_err1_offset;
+
/* internal packet statistics, it should be excluded from the total */
struct i40e_eth_stats internal_stats_offset;
struct i40e_eth_stats internal_stats;
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:08.155841416 +0800
+++ 0140-net-i40e-fix-Rx-packet-statistics.patch 2021-11-10 14:17:01.910745763 +0800
@@ -1 +1 @@
-From 39e4a2577fd05199f53182b7c8509aeed40dc07f Mon Sep 17 00:00:00 2001
+From b450a88df85f86e5e431aadaf9e7bd965fd18b76 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 39e4a2577fd05199f53182b7c8509aeed40dc07f ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index a2e35ebcfe..0027563034 100644
+index a364338564..f8c1035f8f 100644
@@ -39 +41 @@
-@@ -520,7 +520,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
+@@ -534,7 +534,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
@@ -48 +50 @@
-@@ -530,6 +530,8 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
+@@ -544,6 +544,8 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
@@ -57 +59 @@
-@@ -3202,6 +3204,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
+@@ -3295,6 +3297,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
@@ -68 +70 @@
-@@ -3401,7 +3407,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3494,7 +3500,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -78 +80 @@
-@@ -3415,7 +3422,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3508,7 +3515,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -88 +90 @@
-@@ -6197,6 +6205,8 @@ i40e_pf_setup(struct i40e_pf *pf)
+@@ -6289,6 +6297,8 @@ i40e_pf_setup(struct i40e_pf *pf)
@@ -98 +100 @@
-index 8a68b363f9..1d57b9617e 100644
+index d80316d2f7..f32d853071 100644
@@ -101,3 +103,3 @@
-@@ -20,6 +20,13 @@
- #include "base/i40e_type.h"
- #include "base/virtchnl.h"
+@@ -17,6 +17,13 @@
+
+ #include "base/i40e_register.h"
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix queue release' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
` (139 preceding siblings ...)
2021-11-10 6:30 ` [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' " Xueming Li
@ 2021-11-10 6:30 ` Xueming Li
2021-11-10 6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters' " Xueming Li
` (111 subsequent siblings)
252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10 6:30 UTC (permalink / raw)
To: Julien Meunier; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d55700c3a0f711a2e374609b7b8319cdc1576509
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d55700c3a0f711a2e374609b7b8319cdc1576509 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Tue, 28 Sep 2021 10:12:38 +0200
Subject: [PATCH] net/ixgbe: fix queue release
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6507e67af817183c69b684e81d820791eef18259 ]
On the vector implementation, during the tear-down, the mbufs not
drained in the RxQ and TxQ are freed based on an algorithm which
supposed that the number of descriptors is a power of 2 (max_desc).
Based on this hypothesis, this algorithm uses a bitmask in order to
detect an index overflow during the iteration, and to restart the loop
from 0.
However, there is no such power of 2 requirement in the ixgbe for the
number of descriptors in the RxQ / TxQ. The only requirement is to have
a number correctly aligned.
If a user requested to configure a number of descriptors which is not a
power of 2, as a consequence, during the tear-down, it was possible to
be in an infinite loop, and to never reach the exit loop condition.
By removing the bitmask and changing the loop method, we can avoid this
issue, and allow the user to configure a RxQ / TxQ which is not a power
of 2.
Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h
index a97c27189b..e650feac82 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h
@@ -152,7 +152,7 @@ _ixgbe_tx_queue_release_mbufs_vec(struct ixgbe_tx_queue *txq)
/* release the used mbufs in sw_ring */
for (i = txq->tx_next_dd - (txq->tx_rs_thresh - 1);
i != txq->tx_tail;
- i = (i + 1) & max_desc) {
+ i = (i + 1) % txq->nb_tx_desc) {
txe = &txq->sw_ring_v[i];
rte_pktmbuf_free_seg(txe->mbuf);
}
@@ -168,7 +168,6 @@ _ixgbe_tx_queue_release_mbufs_vec(struct ixgbe_tx_queue *txq)
static inline void
_ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)
{
- const unsigned int mask = rxq->nb_rx_desc - 1;
unsigned int i;
if (rxq->sw_ring == NULL || rxq->rxrearm_nb >= rxq->nb_rx_desc)
@@ -183,7 +182,7 @@ _ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)
} else {
for (i = rxq->rx_tail;
i != rxq->rxrearm_start;
- i = (i + 1) & mask) {
+ i = (i + 1) % rxq->nb_rx_desc) {
if (rxq->sw_ring[i].mbuf != NULL)
rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:08.207121592 +0800
+++ 0141-net-ixgbe-fix-queue-release.patch 2021-11-10 14:17:01.910745763 +0800
@@ -1 +1 @@
-From 6507e67af817183c69b684e81d820791eef18259 Mon Sep 17 00:00:00 2001
+From d55700c3a0f711a2e374609b7b8319cdc1576509 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6507e67af817183c69b684e81d820791eef18259 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index adba855ca3..005e60668a 100644
+index a97c27189b..e650feac82 100644
^ permalink raw reply [flat|nested] 345+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters' has been queued to stable release 20.11.4
2021-11-10 6:28 [dpdk-stable] patches queued to stable relea