* patch 'event/dlb2: remove superfluous memcpy' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'test/event: fix crash in Tx adapter freeing' " Kevin Traynor
` (31 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Morten Brørup; +Cc: Stephen Hemminger, Abdullah Sevincer, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c87e76f66b66a2d604c707e7f47c9f6f15b6bc2c
Thanks.
Kevin
---
From c87e76f66b66a2d604c707e7f47c9f6f15b6bc2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>
Date: Mon, 16 Jan 2023 14:07:22 +0100
Subject: [PATCH] event/dlb2: remove superfluous memcpy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit c1b086d2abdb7773700b4d216f323bd9278ace7a ]
Copying with the same src and dst address has no effect; removed to
avoid compiler warning with decorated rte_memcpy.
Fixes: e7c9971a857a ("event/dlb2: add probe-time hardware init")
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
---
drivers/event/dlb2/dlb2.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index f76f1c26b0..3560ae768a 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -113,5 +113,4 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
{
struct dlb2_hw_dev *handle = &dlb2->qm_instance;
- struct dlb2_hw_resource_info *dlb2_info = &handle->info;
int ret;
@@ -171,6 +170,4 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
dlb2->hw_rsrc_query_results.num_hist_list_entries;
- rte_memcpy(dlb2_info, &handle->info.hw_rsrc_max, sizeof(*dlb2_info));
-
return 0;
}
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.136332977 +0000
+++ 0002-event-dlb2-remove-superfluous-memcpy.patch 2024-03-08 13:47:48.975686535 +0000
@@ -1 +1 @@
-From c1b086d2abdb7773700b4d216f323bd9278ace7a Mon Sep 17 00:00:00 2001
+From c87e76f66b66a2d604c707e7f47c9f6f15b6bc2c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c1b086d2abdb7773700b4d216f323bd9278ace7a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 271bbce54a..628ddef649 100644
+index f76f1c26b0..3560ae768a 100644
@@ -26 +27 @@
-@@ -164,5 +164,4 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
+@@ -113,5 +113,4 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
@@ -30 +30,0 @@
- int num_ldb_ports;
@@ -32 +32,2 @@
-@@ -226,6 +225,4 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
+
+@@ -171,6 +170,4 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'test/event: fix crash in Tx adapter freeing' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
2024-03-08 14:27 ` patch 'event/dlb2: remove superfluous memcpy' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'eventdev: improve Doxygen comments on configure struct' " Kevin Traynor
` (30 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Ganapati Kundapura; +Cc: Pavan Nikhilesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/34342122cdc25539473b94c82075f95fc7c11494
Thanks.
Kevin
---
From 34342122cdc25539473b94c82075f95fc7c11494 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Mon, 26 Feb 2024 02:30:03 -0600
Subject: [PATCH] test/event: fix crash in Tx adapter freeing
[ upstream commit 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 ]
Uninitialized mbufs are enqueued to eventdev which causes segfault
on freeing the mbuf in Tx adapter.
Fixed by initializing mbufs before enqueuing to eventdev.
Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
app/test/test_event_eth_tx_adapter.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c
index cfcc784351..a75f1bb51f 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -472,4 +472,8 @@ tx_adapter_service(void)
uint32_t cap;
+ /* Initialize mbufs */
+ for (i = 0; i < RING_SIZE; i++)
+ rte_pktmbuf_reset(&bufs[i]);
+
memset(&dev_conf, 0, sizeof(dev_conf));
err = rte_event_eth_tx_adapter_caps_get(TEST_DEV_ID, TEST_ETHDEV_ID,
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.165938846 +0000
+++ 0003-test-event-fix-crash-in-Tx-adapter-freeing.patch 2024-03-08 13:47:48.978686544 +0000
@@ -1 +1 @@
-From 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 Mon Sep 17 00:00:00 2001
+From 34342122cdc25539473b94c82075f95fc7c11494 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index dbd22f6800..482b8e69e3 100644
+index cfcc784351..a75f1bb51f 100644
@@ -23 +24 @@
-@@ -485,4 +485,8 @@ tx_adapter_service(void)
+@@ -472,4 +472,8 @@ tx_adapter_service(void)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'eventdev: improve Doxygen comments on configure struct' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
2024-03-08 14:27 ` patch 'event/dlb2: remove superfluous memcpy' " Kevin Traynor
2024-03-08 14:27 ` patch 'test/event: fix crash in Tx adapter freeing' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'eventdev: fix Doxygen processing of vector " Kevin Traynor
` (29 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Pavan Nikhilesh, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5730dc49bad387fcd542179594688029c9efe164
Thanks.
Kevin
---
From 5730dc49bad387fcd542179594688029c9efe164 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 21 Feb 2024 10:32:15 +0000
Subject: [PATCH] eventdev: improve Doxygen comments on configure struct
[ upstream commit 1203462c5ada21bdace88e009db5a8f17f88528a ]
General rewording and cleanup on the rte_event_dev_config structure.
Improved the wording of some sentences and created linked
cross-references out of the existing references to the dev_info
structure.
As part of the rework, fix issue with how single-link port-queue pairs
were counted in the rte_event_dev_config structure. This did not match
the actual implementation and, if following the documentation, certain
valid port/queue configurations would have been impossible to configure.
Fix this by changing the documentation to match the implementation
Bugzilla ID: 1368
Fixes: 75d113136f38 ("eventdev: express DLB/DLB2 PMD constraints")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
lib/eventdev/rte_eventdev.h | 61 ++++++++++++++++++++++---------------
1 file changed, 37 insertions(+), 24 deletions(-)
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index 476bcbcc21..dfaa3e9cb1 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -476,7 +476,7 @@ struct rte_event_dev_config {
uint32_t dequeue_timeout_ns;
/**< rte_event_dequeue_burst() timeout on this device.
- * This value should be in the range of *min_dequeue_timeout_ns* and
- * *max_dequeue_timeout_ns* which previously provided in
- * rte_event_dev_info_get()
+ * This value should be in the range of @ref rte_event_dev_info.min_dequeue_timeout_ns and
+ * @ref rte_event_dev_info.max_dequeue_timeout_ns returned by
+ * @ref rte_event_dev_info_get()
* The value 0 is allowed, in which case, default dequeue timeout used.
* @see RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT
@@ -486,38 +486,51 @@ struct rte_event_dev_config {
* events that can be inflight in the eventdev at a given time. The
* limit is required to ensure that the finite space in a closed system
- * is not overwhelmed. The value cannot exceed the *max_num_events*
- * as provided by rte_event_dev_info_get().
- * This value should be set to -1 for *open system*.
+ * is not exhausted.
+ * The value cannot exceed @ref rte_event_dev_info.max_num_events
+ * returned by rte_event_dev_info_get().
+ *
+ * This value should be set to -1 for *open systems*, that is,
+ * those systems returning -1 in @ref rte_event_dev_info.max_num_events.
+ *
+ * @see rte_event_port_conf.new_event_threshold
*/
uint8_t nb_event_queues;
/**< Number of event queues to configure on this device.
- * This value cannot exceed the *max_event_queues* which previously
- * provided in rte_event_dev_info_get()
+ * This value *includes* any single-link queue-port pairs to be used.
+ * This value cannot exceed @ref rte_event_dev_info.max_event_queues +
+ * @ref rte_event_dev_info.max_single_link_event_port_queue_pairs
+ * returned by rte_event_dev_info_get().
+ * The number of non-single-link queues i.e. this value less
+ * *nb_single_link_event_port_queues* in this struct, cannot exceed
+ * @ref rte_event_dev_info.max_event_queues
*/
uint8_t nb_event_ports;
/**< Number of event ports to configure on this device.
- * This value cannot exceed the *max_event_ports* which previously
- * provided in rte_event_dev_info_get()
+ * This value *includes* any single-link queue-port pairs to be used.
+ * This value cannot exceed @ref rte_event_dev_info.max_event_ports +
+ * @ref rte_event_dev_info.max_single_link_event_port_queue_pairs
+ * returned by rte_event_dev_info_get().
+ * The number of non-single-link ports i.e. this value less
+ * *nb_single_link_event_port_queues* in this struct, cannot exceed
+ * @ref rte_event_dev_info.max_event_ports
*/
uint32_t nb_event_queue_flows;
- /**< Number of flows for any event queue on this device.
- * This value cannot exceed the *max_event_queue_flows* which previously
- * provided in rte_event_dev_info_get()
+ /**< Max number of flows needed for a single event queue on this device.
+ * This value cannot exceed @ref rte_event_dev_info.max_event_queue_flows
+ * returned by rte_event_dev_info_get()
*/
uint32_t nb_event_port_dequeue_depth;
- /**< Maximum number of events can be dequeued at a time from an
- * event port by this device.
- * This value cannot exceed the *max_event_port_dequeue_depth*
- * which previously provided in rte_event_dev_info_get().
+ /**< Max number of events that can be dequeued at a time from an event port on this device.
+ * This value cannot exceed @ref rte_event_dev_info.max_event_port_dequeue_depth
+ * returned by rte_event_dev_info_get().
* Ignored when device is not RTE_EVENT_DEV_CAP_BURST_MODE capable.
- * @see rte_event_port_setup()
+ * @see rte_event_port_setup() rte_event_dequeue_burst()
*/
uint32_t nb_event_port_enqueue_depth;
- /**< Maximum number of events can be enqueued at a time from an
- * event port by this device.
- * This value cannot exceed the *max_event_port_enqueue_depth*
- * which previously provided in rte_event_dev_info_get().
+ /**< Maximum number of events can be enqueued at a time to an event port on this device.
+ * This value cannot exceed @ref rte_event_dev_info.max_event_port_enqueue_depth
+ * returned by rte_event_dev_info_get().
* Ignored when device is not RTE_EVENT_DEV_CAP_BURST_MODE capable.
- * @see rte_event_port_setup()
+ * @see rte_event_port_setup() rte_event_enqueue_burst()
*/
uint32_t event_dev_cfg;
@@ -529,5 +542,5 @@ struct rte_event_dev_config {
* *nb_event_queues*. If the device has ports and queues that are
* optimized for single-link usage, this field is a hint for how many
- * to allocate; otherwise, regular event ports and queues can be used.
+ * to allocate; otherwise, regular event ports and queues will be used.
*/
};
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.192146349 +0000
+++ 0004-eventdev-improve-Doxygen-comments-on-configure-struc.patch 2024-03-08 13:47:48.983686558 +0000
@@ -1 +1 @@
-From 1203462c5ada21bdace88e009db5a8f17f88528a Mon Sep 17 00:00:00 2001
+From 5730dc49bad387fcd542179594688029c9efe164 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1203462c5ada21bdace88e009db5a8f17f88528a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 9808889625..fb1c4429f0 100644
+index 476bcbcc21..dfaa3e9cb1 100644
@@ -32 +33 @@
-@@ -685,7 +685,7 @@ struct rte_event_dev_config {
+@@ -476,7 +476,7 @@ struct rte_event_dev_config {
@@ -43 +44 @@
-@@ -695,38 +695,51 @@ struct rte_event_dev_config {
+@@ -486,38 +486,51 @@ struct rte_event_dev_config {
@@ -115 +116 @@
-@@ -738,5 +751,5 @@ struct rte_event_dev_config {
+@@ -529,5 +542,5 @@ struct rte_event_dev_config {
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'eventdev: fix Doxygen processing of vector struct' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (2 preceding siblings ...)
2024-03-08 14:27 ` patch 'eventdev: improve Doxygen comments on configure struct' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'app/crypto-perf: fix out-of-place mbuf size' " Kevin Traynor
` (28 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Pavan Nikhilesh, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c735ad16ff581429884b15d6b32d2dc402d2e55c
Thanks.
Kevin
---
From c735ad16ff581429884b15d6b32d2dc402d2e55c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 21 Feb 2024 10:32:21 +0000
Subject: [PATCH] eventdev: fix Doxygen processing of vector struct
[ upstream commit f5746d3fa2f9f08179878c22a0ec1f598a7f15a1 ]
The event vector struct was missing comments on two members, and also
was inadvertently creating a local variable called "__rte_aligned" in
the doxygen output.
Correct the comment markers to fix the former issue, and fix the latter
by putting "#ifdef __DOXYGEN" around the alignment constraint.
Fixes: 1cc44d409271 ("eventdev: introduce event vector capability")
Fixes: 3c838062b91f ("eventdev: introduce event vector Rx capability")
Fixes: 699155f2d4e2 ("eventdev: fix clang C++ include")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
lib/eventdev/rte_eventdev.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index dfaa3e9cb1..f09ea4a9d1 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -992,8 +992,6 @@ struct rte_event_vector {
*/
struct {
- uint16_t port;
- /* Ethernet device port id. */
- uint16_t queue;
- /* Ethernet device queue id. */
+ uint16_t port; /**< Ethernet device port id. */
+ uint16_t queue; /**< Ethernet device queue id. */
};
};
@@ -1024,5 +1022,9 @@ struct rte_event_vector {
* values.
*/
+#ifndef __DOXYGEN__
} __rte_aligned(16);
+#else
+};
+#endif
/* Scheduler type definitions */
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.220530717 +0000
+++ 0005-eventdev-fix-Doxygen-processing-of-vector-struct.patch 2024-03-08 13:47:48.987686570 +0000
@@ -1 +1 @@
-From f5746d3fa2f9f08179878c22a0ec1f598a7f15a1 Mon Sep 17 00:00:00 2001
+From c735ad16ff581429884b15d6b32d2dc402d2e55c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5746d3fa2f9f08179878c22a0ec1f598a7f15a1 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 913fe38974..3af46864df 100644
+index dfaa3e9cb1..f09ea4a9d1 100644
@@ -29 +30 @@
-@@ -1359,8 +1359,6 @@ struct rte_event_vector {
+@@ -992,8 +992,6 @@ struct rte_event_vector {
@@ -40 +41 @@
-@@ -1391,5 +1389,9 @@ struct rte_event_vector {
+@@ -1024,5 +1022,9 @@ struct rte_event_vector {
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'app/crypto-perf: fix out-of-place mbuf size' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (3 preceding siblings ...)
2024-03-08 14:27 ` patch 'eventdev: fix Doxygen processing of vector " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'app/crypto-perf: add missing op resubmission' " Kevin Traynor
` (27 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Suanming Mou; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/51cdf41427cd92d9e4277ccee0e9cd4ff1025534
Thanks.
Kevin
---
From 51cdf41427cd92d9e4277ccee0e9cd4ff1025534 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Wed, 3 Jan 2024 12:00:24 +0800
Subject: [PATCH] app/crypto-perf: fix out-of-place mbuf size
[ upstream commit 24515c93197091437e32f35bba3f467c01633c1d ]
If crypto device requires headroom and tailroom, the mbuf
of dst in out-of-place should reserve the headroom and
tailroom as well, otherwise there will be no enough room
for dst mbuf.
Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_test_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 228798dca8..a64043fd15 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -228,5 +228,6 @@ cperf_alloc_common_memory(const struct cperf_options *options,
params.dst_buf_offset = *dst_buf_offset;
/* Destination buffer will be one segment only */
- obj_size += max_size + sizeof(struct rte_mbuf);
+ obj_size += max_size + sizeof(struct rte_mbuf) +
+ options->headroom_sz + options->tailroom_sz;
}
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.248383470 +0000
+++ 0006-app-crypto-perf-fix-out-of-place-mbuf-size.patch 2024-03-08 13:47:48.988686574 +0000
@@ -1 +1 @@
-From 24515c93197091437e32f35bba3f467c01633c1d Mon Sep 17 00:00:00 2001
+From 51cdf41427cd92d9e4277ccee0e9cd4ff1025534 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24515c93197091437e32f35bba3f467c01633c1d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index dbb08588ee..94d39fb177 100644
+index 228798dca8..a64043fd15 100644
@@ -24 +25 @@
-@@ -227,5 +227,6 @@ cperf_alloc_common_memory(const struct cperf_options *options,
+@@ -228,5 +228,6 @@ cperf_alloc_common_memory(const struct cperf_options *options,
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'app/crypto-perf: add missing op resubmission' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (4 preceding siblings ...)
2024-03-08 14:27 ` patch 'app/crypto-perf: fix out-of-place mbuf size' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'doc: fix typos in cryptodev overview' " Kevin Traynor
` (26 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Suanming Mou; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c5d16ff345f9fd418026d25db0495643e3671e83
Thanks.
Kevin
---
From c5d16ff345f9fd418026d25db0495643e3671e83 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Mon, 15 Jan 2024 16:08:30 +0800
Subject: [PATCH] app/crypto-perf: add missing op resubmission
[ upstream commit 74d7c028ecf478f18cf9623210bab459d5992d7a ]
Currently, after enqueue_burst, there may be ops_unused ops
left for next round enqueue. And in next round preparation,
only ops_needed ops will be added. But if in the final round
the left ops is less than ops_needed, there will be invalid
ops between the new needed ops and previous unused ops. The
previous unused ops should be moved front after the needed
ops.
In the commit[1], an resubmission fix was added to throughput
test, and the fix was missed for verify.
This commit adds the missed resubmission fix for verify.
[1]
commit 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission")
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
app/test-crypto-perf/cperf_test_verify.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 5574429196..30f66618ed 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -301,5 +301,4 @@ cperf_verify_test_runner(void *test_ctx)
ctx->test_vector, iv_offset, &imix_idx, NULL);
-
/* Populate the mbuf with the test vector, for verification */
for (i = 0; i < ops_needed; i++)
@@ -319,4 +318,15 @@ cperf_verify_test_runner(void *test_ctx)
#endif /* CPERF_LINEARIZATION_ENABLE */
+ /**
+ * When ops_needed is smaller than ops_enqd, the
+ * unused ops need to be moved to the front for
+ * next round use.
+ */
+ if (unlikely(ops_enqd > ops_needed)) {
+ size_t nb_b_to_mov = ops_unused * sizeof(struct rte_crypto_op *);
+
+ memmove(&ops[ops_needed], &ops[ops_enqd], nb_b_to_mov);
+ }
+
/* Enqueue burst of ops on crypto device */
ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.274747158 +0000
+++ 0007-app-crypto-perf-add-missing-op-resubmission.patch 2024-03-08 13:47:48.989686576 +0000
@@ -1 +1 @@
-From 74d7c028ecf478f18cf9623210bab459d5992d7a Mon Sep 17 00:00:00 2001
+From c5d16ff345f9fd418026d25db0495643e3671e83 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 74d7c028ecf478f18cf9623210bab459d5992d7a ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 2b0d3f142b..10172a53a0 100644
+index 5574429196..30f66618ed 100644
@@ -35 +36 @@
-@@ -276,5 +276,4 @@ cperf_verify_test_runner(void *test_ctx)
+@@ -301,5 +301,4 @@ cperf_verify_test_runner(void *test_ctx)
@@ -41 +42 @@
-@@ -294,4 +293,15 @@ cperf_verify_test_runner(void *test_ctx)
+@@ -319,4 +318,15 @@ cperf_verify_test_runner(void *test_ctx)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'doc: fix typos in cryptodev overview' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (5 preceding siblings ...)
2024-03-08 14:27 ` patch 'app/crypto-perf: add missing op resubmission' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'net/tap: do not overwrite flow API errors' " Kevin Traynor
` (25 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Andrew Boyer; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4e761a47abd241566e7acc7cbb37005706aeebd5
Thanks.
Kevin
---
From 4e761a47abd241566e7acc7cbb37005706aeebd5 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Thu, 22 Feb 2024 09:41:11 -0800
Subject: [PATCH] doc: fix typos in cryptodev overview
[ upstream commit 85256fea3859b57451657919486e4559b0f2677c ]
Very minor improvements.
Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
doc/guides/cryptodevs/overview.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index d754b0cfc6..b068d0d19c 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -21,9 +21,9 @@ Supported Feature Flags
"Out-of-place Scatter-gather list Input, Scatter-gather list Output",
which means PMD supports different scatter-gather styled input and output buffers
- (i.e. both can consists of multiple segments).
+ (i.e. both can consist of multiple segments).
- "OOP SGL In LB Out" feature flag stands for
"Out-of-place Scatter-gather list Input, Linear Buffers Output",
- which means PMD supports input from scatter-gathered styled buffers,
+ which means PMD supports input from scatter-gather styled buffers,
outputting linear buffers (i.e. single segment).
@@ -31,5 +31,5 @@ Supported Feature Flags
"Out-of-place Linear Buffers Input, Scatter-gather list Output",
which means PMD supports input from linear buffer, outputting
- scatter-gathered styled buffers.
+ scatter-gather styled buffers.
- "OOP LB In LB Out" feature flag stands for
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.301150504 +0000
+++ 0008-doc-fix-typos-in-cryptodev-overview.patch 2024-03-08 13:47:48.990686579 +0000
@@ -1 +1 @@
-From 85256fea3859b57451657919486e4559b0f2677c Mon Sep 17 00:00:00 2001
+From 4e761a47abd241566e7acc7cbb37005706aeebd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 85256fea3859b57451657919486e4559b0f2677c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/tap: do not overwrite flow API errors' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (6 preceding siblings ...)
2024-03-08 14:27 ` patch 'doc: fix typos in cryptodev overview' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'net/tap: fix traffic control handle calculation' " Kevin Traynor
` (24 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f87697c6ad9d176d57a5252dc7bcbca361cabc04
Thanks.
Kevin
---
From f87697c6ad9d176d57a5252dc7bcbca361cabc04 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 29 Feb 2024 09:31:07 -0800
Subject: [PATCH] net/tap: do not overwrite flow API errors
[ upstream commit 11b90b53c6716ca9bc713bab6cfba039fe8e38cb ]
All flow errors were ending up being reported as not supported,
even when the error path was previously setting a valid and
better error message.
Example, asking for a non-existent queue in flow.
Before:
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \
/ end actions queue index 12 / end
port_flow_complain(): Caught PMD error type 16 (specific action):
cause: 0x7fffc46c1e18, action not supported: Operation not supported
After:
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \
/ end actions queue index 12 / end
port_flow_complain(): Caught PMD error type 16 (specific action):
cause: 0x7fffa54e1d88, queue index out of range: Numerical result
out of range
Fixes: f46900d03823 ("net/tap: fix flow and port commands")
Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/tap/tap_flow.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index f53bc297f8..e086cabf74 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1083,6 +1083,9 @@ priv_flow_process(struct pmd_internals *pmd,
/* use flower filter type */
tap_nlattr_add(&flow->msg.nh, TCA_KIND, sizeof("flower"), "flower");
- if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0)
- goto exit_item_not_supported;
+ if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0) {
+ rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_ACTION,
+ actions, "could not allocated netlink msg");
+ goto exit_return_error;
+ }
}
for (; items->type != RTE_FLOW_ITEM_TYPE_END; ++items) {
@@ -1200,7 +1203,10 @@ actions:
goto exit_action_not_supported;
action = 1;
- if (!queue ||
- (queue->index > pmd->dev->data->nb_rx_queues - 1))
- goto exit_action_not_supported;
+ if (queue->index >= pmd->dev->data->nb_rx_queues) {
+ rte_flow_error_set(error, ERANGE,
+ RTE_FLOW_ERROR_TYPE_ACTION, actions,
+ "queue index out of range");
+ goto exit_return_error;
+ }
if (flow) {
struct action_data adata = {
@@ -1228,5 +1234,5 @@ actions:
err = rss_enable(pmd, attr, error);
if (err)
- goto exit_action_not_supported;
+ goto exit_return_error;
}
if (flow)
@@ -1236,5 +1242,5 @@ actions:
}
if (err)
- goto exit_action_not_supported;
+ goto exit_return_error;
}
/* When fate is unknown, drop traffic. */
@@ -1259,4 +1265,5 @@ exit_action_not_supported:
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,
actions, "action not supported");
+exit_return_error:
return -rte_errno;
}
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.326257442 +0000
+++ 0009-net-tap-do-not-overwrite-flow-API-errors.patch 2024-03-08 13:47:48.993686588 +0000
@@ -1 +1 @@
-From 11b90b53c6716ca9bc713bab6cfba039fe8e38cb Mon Sep 17 00:00:00 2001
+From f87697c6ad9d176d57a5252dc7bcbca361cabc04 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 11b90b53c6716ca9bc713bab6cfba039fe8e38cb ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index ed4d42f92f..5b0fee9064 100644
+index f53bc297f8..e086cabf74 100644
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/tap: fix traffic control handle calculation' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (7 preceding siblings ...)
2024-03-08 14:27 ` patch 'net/tap: do not overwrite flow API errors' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:27 ` patch 'net/bnxt: fix null pointer dereference' " Kevin Traynor
` (23 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6131c863c88a03df31f543c9356dd004466a9039
Thanks.
Kevin
---
From 6131c863c88a03df31f543c9356dd004466a9039 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 29 Feb 2024 09:31:08 -0800
Subject: [PATCH] net/tap: fix traffic control handle calculation
[ upstream commit 4e924ff6f789c6a67424263bf384f3e4b4fba373 ]
The code to take a flow pointer and make a TC handle was incorrect
and would always generate the same handle. This is because it was
hashing the address of the union on the stack (which is invariant)
rather than the contents of the union.
The following testpmd case would cause an error:
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \
/ end actions queue index 2 / end
Flow rule #0 created
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:02 \
/ end actions queue index 3 / end
tap_nl_dump_ext_ack(): Filter already exists
tap_flow_create(): Kernel refused TC filter rule creation (17): File exists
port_flow_complain(): Caught PMD error type 2 (flow rule (handle)):
overlapping rules or Kernel too old for flower support: File exists
This fix does it in a more robust manner using size independent
code. It also initializes the hash seed so the same hash won't
show up every time and risk potential leakage of address to
other places.
Bugzilla ID: 1382
Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Fixes: a625ab89df11 ("net/tap: fix build with GCC 11")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/tap/tap_flow.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index e086cabf74..b4879d3f93 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -12,4 +12,5 @@
#include <rte_byteorder.h>
#include <rte_jhash.h>
+#include <rte_random.h>
#include <rte_malloc.h>
#include <rte_eth_tap.h>
@@ -1298,7 +1299,5 @@ tap_flow_validate(struct rte_eth_dev *dev,
* specifically each rule.
*
- * On 32-bit architectures, the handle can simply be the flow's pointer address.
- * On 64-bit architectures, we rely on jhash(flow) to find a (sufficiently)
- * unique handle.
+ * Use jhash of the flow pointer to make a unique handle.
*
* @param[in, out] flow
@@ -1310,14 +1309,16 @@ tap_flow_set_handle(struct rte_flow *flow)
union {
struct rte_flow *flow;
- const void *key;
- } tmp;
- uint32_t handle = 0;
+ uint32_t words[sizeof(flow) / sizeof(uint32_t)];
+ } tmp = {
+ .flow = flow,
+ };
+ uint32_t handle;
+ static uint64_t hash_seed;
- tmp.flow = flow;
+ if (hash_seed == 0)
+ hash_seed = rte_rand();
+
+ handle = rte_jhash_32b(tmp.words, sizeof(flow) / sizeof(uint32_t), hash_seed);
- if (sizeof(flow) > 4)
- handle = rte_jhash(tmp.key, sizeof(flow), 1);
- else
- handle = (uintptr_t)flow;
/* must be at least 1 to avoid letting the kernel choose one for us */
if (!handle)
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.353497000 +0000
+++ 0010-net-tap-fix-traffic-control-handle-calculation.patch 2024-03-08 13:47:48.996686597 +0000
@@ -1 +1 @@
-From 4e924ff6f789c6a67424263bf384f3e4b4fba373 Mon Sep 17 00:00:00 2001
+From 6131c863c88a03df31f543c9356dd004466a9039 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e924ff6f789c6a67424263bf384f3e4b4fba373 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 5b0fee9064..fa50fe45d7 100644
+index e086cabf74..b4879d3f93 100644
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/bnxt: fix null pointer dereference' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (8 preceding siblings ...)
2024-03-08 14:27 ` patch 'net/tap: fix traffic control handle calculation' " Kevin Traynor
@ 2024-03-08 14:27 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/ixgbevf: fix RSS init for x550 NICs' " Kevin Traynor
` (22 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:27 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1de0e75b7b71de87232e49939dc2da8e2aeb728c
Thanks.
Kevin
---
From 1de0e75b7b71de87232e49939dc2da8e2aeb728c Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 7 Feb 2024 01:19:02 -0800
Subject: [PATCH] net/bnxt: fix null pointer dereference
[ upstream commit 68eeafdef4db7362ff5307995b670a98f65f2493 ]
In the recent changes to rte_eth_dev_release_port() the library sets
eth_dev->data to NULL at the end of the routine. This causes a NULL
pointer dereference in the bnxt_rep_dev_info_get_op() and
bnxt_representor_uninit() routines when it tries to validate parent dev.
Add code to handle this.
Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_reps.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 5b2d9aee3a..ea3a1fab8e 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -33,4 +33,12 @@ static const struct eth_dev_ops bnxt_rep_dev_ops = {
};
+static bool bnxt_rep_check_parent(struct bnxt_representor *rep)
+{
+ if (!rep->parent_dev->data->dev_private)
+ return false;
+
+ return true;
+}
+
uint16_t
bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
@@ -267,10 +275,10 @@ int bnxt_representor_uninit(struct rte_eth_dev *eth_dev)
eth_dev->data->mac_addrs = NULL;
- parent_bp = rep->parent_dev->data->dev_private;
- if (!parent_bp) {
+ if (!bnxt_rep_check_parent(rep)) {
PMD_DRV_LOG(DEBUG, "BNXT Port:%d already freed\n",
eth_dev->data->port_id);
return 0;
}
+ parent_bp = rep->parent_dev->data->dev_private;
parent_bp->num_reps--;
@@ -541,9 +549,10 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* MAC Specifics */
- parent_bp = rep_bp->parent_dev->data->dev_private;
- if (!parent_bp) {
- PMD_DRV_LOG(ERR, "Rep parent NULL!\n");
+ if (!bnxt_rep_check_parent(rep_bp)) {
+ /* Need not be an error scenario, if parent is closed first */
+ PMD_DRV_LOG(INFO, "Rep parent port does not exist.\n");
return rc;
}
+ parent_bp = rep_bp->parent_dev->data->dev_private;
PMD_DRV_LOG(DEBUG, "Representor dev_info_get_op\n");
dev_info->max_mac_addrs = parent_bp->max_l2_ctx;
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.381208137 +0000
+++ 0011-net-bnxt-fix-null-pointer-dereference.patch 2024-03-08 13:47:48.997686601 +0000
@@ -1 +1 @@
-From 68eeafdef4db7362ff5307995b670a98f65f2493 Mon Sep 17 00:00:00 2001
+From 1de0e75b7b71de87232e49939dc2da8e2aeb728c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68eeafdef4db7362ff5307995b670a98f65f2493 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3a4720bc3c..edcc27f556 100644
+index 5b2d9aee3a..ea3a1fab8e 100644
@@ -53 +54 @@
-@@ -540,9 +548,10 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -541,9 +549,10 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/ixgbevf: fix RSS init for x550 NICs' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (9 preceding siblings ...)
2024-03-08 14:27 ` patch 'net/bnxt: fix null pointer dereference' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/iavf: remove error logs for VLAN offloading' " Kevin Traynor
` (21 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Edwin Brossette; +Cc: Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/153ce28fcff59b6cf80b94c45811244cdb847f7e
Thanks.
Kevin
---
From 153ce28fcff59b6cf80b94c45811244cdb847f7e Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Thu, 15 Feb 2024 14:31:45 +0100
Subject: [PATCH] net/ixgbevf: fix RSS init for x550 NICs
[ upstream commit 3a53577d5f390e8635a672b79616e54c59b330ab ]
Different Intel NICs with the igxbe PMD do not handle RSS in the same
way when working with virtualization. While some NICs like Intel 82599ES
only have a single RSS table in the device and leave all RSS features to
be handled by the PF, some other NICs like x550 let the VF handle RSS
features. This can lead to different behavior when RSS is enabled
depending on the model of nic used.
In particular, ixgbevf_dev_rx_init() does not configure RSS parameters
at device init, even if the multi-queue mode option is set in the device
configuration (ie. RTE_ETH_MQ_RX_RSS is set). Note that this issue went
unnoticed until now, probably because some NICs do not really have
support for RSS in virtualization mode.
Thus, depending on the NIC used, we can we find ourselves in a situation
where RSS is not configured despite being enabled. This will cause
serious performance issues because the RSS RETA table will be fully
zeroed, causing all packets to go only to the first queue, leaving all
other queues empty.
By looking at ixgbe_reta_size_get(), we can see that only X550 NIC
models have a non zero RETA size set in VF mode. Therefore, add a call
to ixgbe_rss_configure() for these cards in ixgbevf_dev_rx_init() if the
option to enable RSS is set.
Fixes: f4d1598ee14f ("ixgbevf: support RSS config on x550")
Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index c137707869..e3c611a40f 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5742,4 +5742,23 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype);
+ /* Initialize the rss for x550_vf cards if enabled */
+ switch (hw->mac.type) {
+ case ixgbe_mac_X550_vf:
+ case ixgbe_mac_X550EM_x_vf:
+ case ixgbe_mac_X550EM_a_vf:
+ switch (dev->data->dev_conf.rxmode.mq_mode) {
+ case RTE_ETH_MQ_RX_RSS:
+ case RTE_ETH_MQ_RX_DCB_RSS:
+ case RTE_ETH_MQ_RX_VMDQ_RSS:
+ ixgbe_rss_configure(dev);
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
ixgbe_set_rx_function(dev);
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.407409035 +0000
+++ 0012-net-ixgbevf-fix-RSS-init-for-x550-NICs.patch 2024-03-08 13:47:49.003686619 +0000
@@ -1 +1 @@
-From 3a53577d5f390e8635a672b79616e54c59b330ab Mon Sep 17 00:00:00 2001
+From 153ce28fcff59b6cf80b94c45811244cdb847f7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a53577d5f390e8635a672b79616e54c59b330ab ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 90b0a7004f..f6c17d4efb 100644
+index c137707869..e3c611a40f 100644
@@ -43 +44 @@
-@@ -5845,4 +5845,23 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
+@@ -5742,4 +5742,23 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/iavf: remove error logs for VLAN offloading' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (10 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/ixgbevf: fix RSS init for x550 NICs' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/ixgbe: increase VF reset timeout' " Kevin Traynor
` (20 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/22e7e531ce15b67a31fb150882d9689b6b029afc
Thanks.
Kevin
---
From 22e7e531ce15b67a31fb150882d9689b6b029afc Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 6 Feb 2024 11:34:20 +0100
Subject: [PATCH] net/iavf: remove error logs for VLAN offloading
[ upstream commit 325764b3a20a16a7a997a324cc0b93367eb7f3e1 ]
This was reported by RH QE.
When a vlan is enforced on a VF via an administrative configuration on
the PF side, the net/iavf driver logs two error messages.
Those error messages have no consequence on the rest of the port
initialisation and packet processing works fine.
[root@toto ~] # ip l set enp94s0 vf 0 vlan 2
[root@toto ~] # dpdk-testpmd -a 0000:5e:02.0 -- -i
...
Configuring Port 0 (socket 0)
iavf_dev_init_vlan(): Failed to update vlan offload
iavf_dev_configure(): configure VLAN failed: -95
iavf_set_rx_function(): request RXDID[1] in Queue[0] is legacy, set
rx_pkt_burst as legacy for all queues
The first change is to remove the error log in iavf_dev_init_vlan().
This log is unneeded since all error path are covered by dedicated log
messages already.
Then, in iavf_dev_init_vlan(), requesting all possible VLAN offloading
must not trigger an ERROR level log message. This is simply confusing,
as the application may not have requested such vlan offloading.
The reason why the driver requests all offloading is unclear so keep it
as is. Instead, rephrase the log message and lower its level to INFO.
Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8f4c6de0ac..4885a86ad3 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -604,5 +604,6 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
RTE_ETH_VLAN_EXTEND_MASK);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to update vlan offload");
+ PMD_DRV_LOG(INFO,
+ "VLAN offloading is not supported, or offloading was refused by the PF");
return err;
}
@@ -680,7 +681,5 @@ iavf_dev_configure(struct rte_eth_dev *dev)
}
- ret = iavf_dev_init_vlan(dev);
- if (ret)
- PMD_DRV_LOG(ERR, "configure VLAN failed: %d", ret);
+ iavf_dev_init_vlan(dev);
if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.437812888 +0000
+++ 0013-net-iavf-remove-error-logs-for-VLAN-offloading.patch 2024-03-08 13:47:49.006686628 +0000
@@ -1 +1 @@
-From 325764b3a20a16a7a997a324cc0b93367eb7f3e1 Mon Sep 17 00:00:00 2001
+From 22e7e531ce15b67a31fb150882d9689b6b029afc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 325764b3a20a16a7a997a324cc0b93367eb7f3e1 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index b5f6049a91..2cb602a358 100644
+index 8f4c6de0ac..4885a86ad3 100644
@@ -45 +46 @@
-@@ -634,5 +634,6 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
+@@ -604,5 +604,6 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
@@ -53 +54 @@
-@@ -710,7 +711,5 @@ iavf_dev_configure(struct rte_eth_dev *dev)
+@@ -680,7 +681,5 @@ iavf_dev_configure(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/ixgbe: increase VF reset timeout' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (11 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/iavf: remove error logs for VLAN offloading' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/i40e: remove incorrect 16B descriptor read block' " Kevin Traynor
` (19 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Kevin Traynor; +Cc: Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4a95397cc026929baa39efc6443302b7f84b5d60
Thanks.
Kevin
---
From 4a95397cc026929baa39efc6443302b7f84b5d60 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Tue, 30 Jan 2024 10:00:27 +0000
Subject: [PATCH] net/ixgbe: increase VF reset timeout
[ upstream commit 64e714f838aeb1afbd4e7544686a0d7cd8921589 ]
When VF issues a reset to PF there is a 50 msec wait plus an additional
max of 1 msec (200 * 5us) for the PF to indicate the reset is complete
before timeout.
In some cases, it is seen that the reset is timing out, in which case
the reset does not complete and an error is returned.
In order to account for this, continue to wait an initial 50 msecs, but
then allow a max of an additional 50 msecs (10,000 * 5us) for the
command to complete.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
drivers/net/ixgbe/base/ixgbe_type.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index b7eec45635..dc765f13c9 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1800,5 +1800,5 @@ enum {
#define IXGBE_VFRE_ENABLE_ALL 0xFFFFFFFF
-#define IXGBE_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
+#define IXGBE_VF_INIT_TIMEOUT 10000 /* Number of retries to clear RSTI */
/* RDHMPN and TDHMPN bitmasks */
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.466065934 +0000
+++ 0014-net-ixgbe-increase-VF-reset-timeout.patch 2024-03-08 13:47:49.011686642 +0000
@@ -1 +1 @@
-From 64e714f838aeb1afbd4e7544686a0d7cd8921589 Mon Sep 17 00:00:00 2001
+From 4a95397cc026929baa39efc6443302b7f84b5d60 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 64e714f838aeb1afbd4e7544686a0d7cd8921589 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 1094df5891..35212a561b 100644
+index b7eec45635..dc765f13c9 100644
@@ -30 +31 @@
-@@ -1801,5 +1801,5 @@ enum {
+@@ -1800,5 +1800,5 @@ enum {
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/i40e: remove incorrect 16B descriptor read block' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (12 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/ixgbe: increase VF reset timeout' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/iavf: " Kevin Traynor
` (18 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/007b1f1ad70f839e4f6fc75d6d366856b9fc5e01
Thanks.
Kevin
---
From 007b1f1ad70f839e4f6fc75d6d366856b9fc5e01 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 23 Jan 2024 11:40:48 +0000
Subject: [PATCH] net/i40e: remove incorrect 16B descriptor read block
[ upstream commit b527d9585d9cd0446d6bfa39d3a8e896c87883e5 ]
By default, the driver works with 32B descriptors, but has a separate
descriptor read block for reading two descriptors at a time when using
16B descriptors. However, the 32B reads used are not guaranteed to be
atomic, which will cause issues if that is not the case on a system,
since the descriptors may be read in an undefined order. Remove the
block, to avoid issues, and just use the regular descriptor reading path
for 16B descriptors, if that support is enabled at build time.
Fixes: dafadd73762e ("net/i40e: add AVX2 Rx function")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 62 ++++++++++-----------------
1 file changed, 23 insertions(+), 39 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index c73b2a321b..4e94ccbdd6 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -277,44 +277,28 @@ _recv_raw_pkts_vec_avx2(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
#endif
- __m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC
- /* for AVX we need alignment otherwise loads are not atomic */
- if (avx_aligned) {
- /* load in descriptors, 2 at a time, in reverse order */
- raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6));
- rte_compiler_barrier();
- raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4));
- rte_compiler_barrier();
- raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2));
- rte_compiler_barrier();
- raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0));
- } else
-#endif
- do {
- const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
- rte_compiler_barrier();
- const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
- rte_compiler_barrier();
- const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
- rte_compiler_barrier();
- const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
- rte_compiler_barrier();
- const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
- rte_compiler_barrier();
- const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
- rte_compiler_barrier();
- const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
- rte_compiler_barrier();
- const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
+ const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+ rte_compiler_barrier();
+ const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+ rte_compiler_barrier();
+ const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+ rte_compiler_barrier();
+ const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+ rte_compiler_barrier();
+ const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+ rte_compiler_barrier();
+ const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+ rte_compiler_barrier();
+ const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+ rte_compiler_barrier();
+ const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
- raw_desc6_7 = _mm256_inserti128_si256(
- _mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
- raw_desc4_5 = _mm256_inserti128_si256(
- _mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
- raw_desc2_3 = _mm256_inserti128_si256(
- _mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
- raw_desc0_1 = _mm256_inserti128_si256(
- _mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
- } while (0);
+ const __m256i raw_desc6_7 = _mm256_inserti128_si256(
+ _mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+ const __m256i raw_desc4_5 = _mm256_inserti128_si256(
+ _mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+ const __m256i raw_desc2_3 = _mm256_inserti128_si256(
+ _mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+ const __m256i raw_desc0_1 = _mm256_inserti128_si256(
+ _mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
if (split_packet) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.496407070 +0000
+++ 0015-net-i40e-remove-incorrect-16B-descriptor-read-block.patch 2024-03-08 13:47:49.012686645 +0000
@@ -1 +1 @@
-From b527d9585d9cd0446d6bfa39d3a8e896c87883e5 Mon Sep 17 00:00:00 2001
+From 007b1f1ad70f839e4f6fc75d6d366856b9fc5e01 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b527d9585d9cd0446d6bfa39d3a8e896c87883e5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f468c1fd90..19cf0ac718 100644
+index c73b2a321b..4e94ccbdd6 100644
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/iavf: remove incorrect 16B descriptor read block' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (13 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/i40e: remove incorrect 16B descriptor read block' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/ice: " Kevin Traynor
` (17 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/dcf42c72bc84642b1637691b85aa9944252c5bde
Thanks.
Kevin
---
From dcf42c72bc84642b1637691b85aa9944252c5bde Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 23 Jan 2024 11:40:50 +0000
Subject: [PATCH] net/iavf: remove incorrect 16B descriptor read block
[ upstream commit d4ade5d02d188fcbe51871c5a5d66ef075ca0f86 ]
By default, the driver works with 32B descriptors, but has a separate
descriptor read block for reading two descriptors at a time when using
16B descriptors. However, the 32B reads used are not guaranteed to be
atomic, which will cause issues if that is not the case on a system,
since the descriptors may be read in an undefined order. Remove the
block, to avoid issues, and just use the regular descriptor reading path
for 16B descriptors, if that support is enabled at build time.
Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/iavf/iavf_rxtx_vec_avx2.c | 78 ++++++++-------------------
1 file changed, 23 insertions(+), 55 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index 2479c18210..a93e1d7e2a 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -193,60 +193,28 @@ _iavf_recv_raw_pkts_vec_avx2(struct iavf_rx_queue *rxq,
#endif
- __m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-#ifdef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
- /* for AVX we need alignment otherwise loads are not atomic */
- if (avx_aligned) {
- /* load in descriptors, 2 at a time, in reverse order */
- raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6));
- rte_compiler_barrier();
- raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4));
- rte_compiler_barrier();
- raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2));
- rte_compiler_barrier();
- raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0));
- } else
-#endif
- {
- const __m128i raw_desc7 =
- _mm_load_si128((void *)(rxdp + 7));
- rte_compiler_barrier();
- const __m128i raw_desc6 =
- _mm_load_si128((void *)(rxdp + 6));
- rte_compiler_barrier();
- const __m128i raw_desc5 =
- _mm_load_si128((void *)(rxdp + 5));
- rte_compiler_barrier();
- const __m128i raw_desc4 =
- _mm_load_si128((void *)(rxdp + 4));
- rte_compiler_barrier();
- const __m128i raw_desc3 =
- _mm_load_si128((void *)(rxdp + 3));
- rte_compiler_barrier();
- const __m128i raw_desc2 =
- _mm_load_si128((void *)(rxdp + 2));
- rte_compiler_barrier();
- const __m128i raw_desc1 =
- _mm_load_si128((void *)(rxdp + 1));
- rte_compiler_barrier();
- const __m128i raw_desc0 =
- _mm_load_si128((void *)(rxdp + 0));
+ const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+ rte_compiler_barrier();
+ const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+ rte_compiler_barrier();
+ const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+ rte_compiler_barrier();
+ const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+ rte_compiler_barrier();
+ const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+ rte_compiler_barrier();
+ const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+ rte_compiler_barrier();
+ const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+ rte_compiler_barrier();
+ const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
- raw_desc6_7 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc6),
- raw_desc7, 1);
- raw_desc4_5 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc4),
- raw_desc5, 1);
- raw_desc2_3 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc2),
- raw_desc3, 1);
- raw_desc0_1 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc0),
- raw_desc1, 1);
- }
+ const __m256i raw_desc6_7 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+ const __m256i raw_desc4_5 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+ const __m256i raw_desc2_3 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+ const __m256i raw_desc0_1 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
if (split_packet) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.523302831 +0000
+++ 0016-net-iavf-remove-incorrect-16B-descriptor-read-block.patch 2024-03-08 13:47:49.013686648 +0000
@@ -1 +1 @@
-From d4ade5d02d188fcbe51871c5a5d66ef075ca0f86 Mon Sep 17 00:00:00 2001
+From dcf42c72bc84642b1637691b85aa9944252c5bde Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4ade5d02d188fcbe51871c5a5d66ef075ca0f86 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 510b4d8f1c..49d41af953 100644
+index 2479c18210..a93e1d7e2a 100644
@@ -27 +28 @@
-@@ -194,60 +194,28 @@ _iavf_recv_raw_pkts_vec_avx2(struct iavf_rx_queue *rxq,
+@@ -193,60 +193,28 @@ _iavf_recv_raw_pkts_vec_avx2(struct iavf_rx_queue *rxq,
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/ice: remove incorrect 16B descriptor read block' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (14 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/iavf: " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/bnx2x: fix warnings about memcpy lengths' " Kevin Traynor
` (16 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d8f8df9c46885aa4ad365280fee51d6ff33dcc76
Thanks.
Kevin
---
From d8f8df9c46885aa4ad365280fee51d6ff33dcc76 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 23 Jan 2024 11:40:52 +0000
Subject: [PATCH] net/ice: remove incorrect 16B descriptor read block
[ upstream commit 9aee908eddeb6e8f3de402ac5661bca5161809a6 ]
By default, the driver works with 32B descriptors, but has a separate
descriptor read block for reading two descriptors at a time when using
16B descriptors. However, the 32B reads used are not guaranteed to be
atomic, which will cause issues if that is not the case on a system,
since the descriptors may be read in an undefined order. Remove the
block, to avoid issues, and just use the regular descriptor reading path
for 16B descriptors, if that support is enabled at build time.
Fixes: ae60d3c9b227 ("net/ice: support Rx AVX2 vector")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/ice/ice_rxtx_vec_avx2.c | 78 +++++++++--------------------
1 file changed, 23 insertions(+), 55 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index 31d6af42fd..5d591f9834 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -255,60 +255,28 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
#endif
- __m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-#ifdef RTE_LIBRTE_ICE_16BYTE_RX_DESC
- /* for AVX we need alignment otherwise loads are not atomic */
- if (avx_aligned) {
- /* load in descriptors, 2 at a time, in reverse order */
- raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6));
- rte_compiler_barrier();
- raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4));
- rte_compiler_barrier();
- raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2));
- rte_compiler_barrier();
- raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0));
- } else
-#endif
- {
- const __m128i raw_desc7 =
- _mm_load_si128((void *)(rxdp + 7));
- rte_compiler_barrier();
- const __m128i raw_desc6 =
- _mm_load_si128((void *)(rxdp + 6));
- rte_compiler_barrier();
- const __m128i raw_desc5 =
- _mm_load_si128((void *)(rxdp + 5));
- rte_compiler_barrier();
- const __m128i raw_desc4 =
- _mm_load_si128((void *)(rxdp + 4));
- rte_compiler_barrier();
- const __m128i raw_desc3 =
- _mm_load_si128((void *)(rxdp + 3));
- rte_compiler_barrier();
- const __m128i raw_desc2 =
- _mm_load_si128((void *)(rxdp + 2));
- rte_compiler_barrier();
- const __m128i raw_desc1 =
- _mm_load_si128((void *)(rxdp + 1));
- rte_compiler_barrier();
- const __m128i raw_desc0 =
- _mm_load_si128((void *)(rxdp + 0));
+ const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+ rte_compiler_barrier();
+ const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+ rte_compiler_barrier();
+ const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+ rte_compiler_barrier();
+ const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+ rte_compiler_barrier();
+ const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+ rte_compiler_barrier();
+ const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+ rte_compiler_barrier();
+ const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+ rte_compiler_barrier();
+ const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
- raw_desc6_7 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc6),
- raw_desc7, 1);
- raw_desc4_5 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc4),
- raw_desc5, 1);
- raw_desc2_3 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc2),
- raw_desc3, 1);
- raw_desc0_1 =
- _mm256_inserti128_si256
- (_mm256_castsi128_si256(raw_desc0),
- raw_desc1, 1);
- }
+ const __m256i raw_desc6_7 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+ const __m256i raw_desc4_5 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+ const __m256i raw_desc2_3 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+ const __m256i raw_desc0_1 =
+ _mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
if (split_packet) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.550916916 +0000
+++ 0017-net-ice-remove-incorrect-16B-descriptor-read-block.patch 2024-03-08 13:47:49.014686651 +0000
@@ -1 +1 @@
-From 9aee908eddeb6e8f3de402ac5661bca5161809a6 Mon Sep 17 00:00:00 2001
+From d8f8df9c46885aa4ad365280fee51d6ff33dcc76 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9aee908eddeb6e8f3de402ac5661bca5161809a6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 6f6d790967..d6e88dbb29 100644
+index 31d6af42fd..5d591f9834 100644
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/bnx2x: fix warnings about memcpy lengths' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (15 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/ice: " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'common/cnxk: fix Tx MTU configuration' " Kevin Traynor
` (15 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Morten Brørup; +Cc: Devendra Singh Rawat, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/61ced40b0df4de1ad74b0ebb33387a781c87b44b
Thanks.
Kevin
---
From 61ced40b0df4de1ad74b0ebb33387a781c87b44b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>
Date: Fri, 23 Feb 2024 15:00:56 +0100
Subject: [PATCH] net/bnx2x: fix warnings about memcpy lengths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit c50b86f7d60f757ea62fe14076be69bf114f1740 ]
The vlan in the bulletin does not contain a VLAN header, only the
VLAN ID, so only copy 2 byte, not 4. The target structure has padding
after the field, so copying 2 byte too many is effectively harmless.
Fix it by using generic memcpy version instead of specialized
rte version as it not used in fast path.
Also, Use RTE_PTR_ADD where copying arrays to the offset of a first field
in a structure holding multiple fields, to avoid compiler warnings with
decorated memcpy.
Bugzilla ID: 1146
Fixes: 540a211084a7 ("bnx2x: driver core")
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
---
drivers/net/bnx2x/bnx2x_stats.c | 14 ++++++++------
drivers/net/bnx2x/bnx2x_vfpf.c | 14 +++++++-------
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c
index c07b01510a..69132c7c80 100644
--- a/drivers/net/bnx2x/bnx2x_stats.c
+++ b/drivers/net/bnx2x/bnx2x_stats.c
@@ -115,5 +115,5 @@ bnx2x_hw_stats_post(struct bnx2x_softc *sc)
/* Update MCP's statistics if possible */
if (sc->func_stx) {
- rte_memcpy(BNX2X_SP(sc, func_stats), &sc->func_stats,
+ memcpy(BNX2X_SP(sc, func_stats), &sc->func_stats,
sizeof(sc->func_stats));
}
@@ -818,8 +818,8 @@ bnx2x_hw_stats_update(struct bnx2x_softc *sc)
}
- rte_memcpy(old, new, sizeof(struct nig_stats));
+ memcpy(old, new, sizeof(struct nig_stats));
- rte_memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats->mac_stx[1]),
- sizeof(struct mac_stx));
+ memcpy(RTE_PTR_ADD(estats, offsetof(struct bnx2x_eth_stats, rx_stat_ifhcinbadoctets_hi)),
+ &pstats->mac_stx[1], sizeof(struct mac_stx));
estats->brb_drop_hi = pstats->brb_drop_hi;
estats->brb_drop_lo = pstats->brb_drop_lo;
@@ -1493,7 +1493,9 @@ bnx2x_stats_init(struct bnx2x_softc *sc)
if (!CHIP_IS_E3(sc)) {
REG_RD_DMAE(sc, NIG_REG_STAT0_EGRESS_MAC_PKT0 + port*0x50,
- &(sc->port.old_nig_stats.egress_mac_pkt0_lo), 2);
+ RTE_PTR_ADD(&sc->port.old_nig_stats,
+ offsetof(struct nig_stats, egress_mac_pkt0_lo)), 2);
REG_RD_DMAE(sc, NIG_REG_STAT0_EGRESS_MAC_PKT1 + port*0x50,
- &(sc->port.old_nig_stats.egress_mac_pkt1_lo), 2);
+ RTE_PTR_ADD(&sc->port.old_nig_stats,
+ offsetof(struct nig_stats, egress_mac_pkt1_lo)), 2);
}
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index 63953c2979..5411df3a38 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -53,7 +53,7 @@ bnx2x_check_bull(struct bnx2x_softc *sc)
/* check the mac address and VLAN and allocate memory if valid */
if (valid_bitmap & (1 << MAC_ADDR_VALID) && memcmp(bull->mac, sc->old_bulletin.mac, ETH_ALEN))
- rte_memcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);
+ memcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);
if (valid_bitmap & (1 << VLAN_VALID))
- rte_memcpy(&bull->vlan, &sc->old_bulletin.vlan, RTE_VLAN_HLEN);
+ memcpy(&bull->vlan, &sc->old_bulletin.vlan, sizeof(bull->vlan));
sc->old_bulletin = *bull;
@@ -570,5 +570,5 @@ bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)
bnx2x_check_bull(sc);
- rte_memcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);
+ memcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);
bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
@@ -584,7 +584,7 @@ bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)
bnx2x_check_bull(sc)) {
/* A new mac was configured by PF for us */
- rte_memcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,
+ memcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,
ETH_ALEN);
- rte_memcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,
+ memcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,
ETH_ALEN);
@@ -623,8 +623,8 @@ bnx2x_vf_config_rss(struct bnx2x_softc *sc,
sizeof(struct channel_list_end_tlv));
- rte_memcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));
+ memcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));
query->rss_key_size = T_ETH_RSS_KEY;
- rte_memcpy(query->ind_table, params->ind_table, T_ETH_INDIRECTION_TABLE_SIZE);
+ memcpy(query->ind_table, params->ind_table, T_ETH_INDIRECTION_TABLE_SIZE);
query->ind_table_size = T_ETH_INDIRECTION_TABLE_SIZE;
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.577654766 +0000
+++ 0018-net-bnx2x-fix-warnings-about-memcpy-lengths.patch 2024-03-08 13:47:49.015686654 +0000
@@ -1 +1 @@
-From c50b86f7d60f757ea62fe14076be69bf114f1740 Mon Sep 17 00:00:00 2001
+From 61ced40b0df4de1ad74b0ebb33387a781c87b44b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c50b86f7d60f757ea62fe14076be69bf114f1740 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'common/cnxk: fix Tx MTU configuration' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (16 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/bnx2x: fix warnings about memcpy lengths' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/cnxk: fix MTU limit' " Kevin Traynor
` (14 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/603e63f7a695ca8141a7d30830a6a6f7b98a7413
Thanks.
Kevin
---
From 603e63f7a695ca8141a7d30830a6a6f7b98a7413 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 26 Feb 2024 19:05:29 +0530
Subject: [PATCH] common/cnxk: fix Tx MTU configuration
[ upstream commit cc9f534f60815d858b946062cb1d9701c91b9b58 ]
Skip setting Tx MTU separately as now the Tx credit configuration
is based on max MTU possible for that link.
Also, initialize MTU with max value for that port.
Fixes: 8589ec212e80 ("net/cnxk: support MTU set")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/common/cnxk/roc_nix.c | 2 +-
drivers/common/cnxk/roc_nix.h | 2 --
drivers/net/cnxk/cnxk_ethdev_ops.c | 12 +-----------
3 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c
index 151d8c3426..74ecb67901 100644
--- a/drivers/common/cnxk/roc_nix.c
+++ b/drivers/common/cnxk/roc_nix.c
@@ -414,5 +414,5 @@ skip_dev_init:
nix->pci_dev = pci_dev;
nix->reta_sz = reta_sz;
- nix->mtu = ROC_NIX_DEFAULT_HW_FRS;
+ nix->mtu = roc_nix_max_pkt_len(roc_nix);
/* Always start with full FC for LBK */
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 986aac9e57..89b12c1f94 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -208,6 +208,4 @@ struct roc_nix_eeprom_info {
#define ROC_NIX_RSS_MCAM_IDX_DEFAULT (-1)
-#define ROC_NIX_DEFAULT_HW_FRS 1514
-
#define ROC_NIX_VWQE_MAX_SIZE_LOG2 11
#define ROC_NIX_VWQE_MIN_SIZE_LOG2 2
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 9662bb0a2c..82943e52d4 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -483,17 +483,7 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
frame_size -= RTE_ETHER_CRC_LEN;
- /* Update mtu on Tx */
- rc = roc_nix_mac_mtu_set(nix, frame_size);
- if (rc) {
- plt_err("Failed to set MTU, rc=%d", rc);
- goto exit;
- }
-
- /* Sync same frame size on Rx */
+ /* Set frame size on Rx */
rc = roc_nix_mac_max_rx_len_set(nix, frame_size);
if (rc) {
- /* Rollback to older mtu */
- roc_nix_mac_mtu_set(nix,
- old_frame_size - RTE_ETHER_CRC_LEN);
plt_err("Failed to max Rx frame length, rc=%d", rc);
goto exit;
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.604919349 +0000
+++ 0019-common-cnxk-fix-Tx-MTU-configuration.patch 2024-03-08 13:47:49.017686660 +0000
@@ -1 +1 @@
-From cc9f534f60815d858b946062cb1d9701c91b9b58 Mon Sep 17 00:00:00 2001
+From 603e63f7a695ca8141a7d30830a6a6f7b98a7413 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc9f534f60815d858b946062cb1d9701c91b9b58 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 97c0ae3e25..90ccb260fb 100644
+index 151d8c3426..74ecb67901 100644
@@ -25 +26 @@
-@@ -485,5 +485,5 @@ skip_dev_init:
+@@ -414,5 +414,5 @@ skip_dev_init:
@@ -30 +30,0 @@
- nix->dmac_flt_idx = -1;
@@ -31,0 +32 @@
+ /* Always start with full FC for LBK */
@@ -33 +34 @@
-index 2a198de458..4db71544f0 100644
+index 986aac9e57..89b12c1f94 100644
@@ -36 +37 @@
-@@ -268,6 +268,4 @@ struct roc_nix_eeprom_info {
+@@ -208,6 +208,4 @@ struct roc_nix_eeprom_info {
@@ -44 +45 @@
-index e816884d47..4962f3bced 100644
+index 9662bb0a2c..82943e52d4 100644
@@ -47 +48 @@
-@@ -611,17 +611,7 @@ skip_buffsz_check:
+@@ -483,17 +483,7 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/cnxk: fix MTU limit' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (17 preceding siblings ...)
2024-03-08 14:28 ` patch 'common/cnxk: fix Tx MTU configuration' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'common/cnxk: fix RSS RETA configuration' " Kevin Traynor
` (13 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Sunil Kumar Kori; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/92f6f10e9daf7a07899e7567c6430602c0ba3cd9
Thanks.
Kevin
---
From 92f6f10e9daf7a07899e7567c6430602c0ba3cd9 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Mon, 26 Feb 2024 19:05:30 +0530
Subject: [PATCH] net/cnxk: fix MTU limit
[ upstream commit 402de2fd8729b61a3ace67c597e99893acb426d4 ]
Device can support maximum frame size up to 9212 bytes. While configuring
MTU, overhead is considered as ethernet header size, CRC and
2 * (VLAN tags) which translates to 26 bytes.
Exposed overhead to the user via rte_eth_dev_info() is 18 bytes which were
leading to set wrong Rx frame size.
Fixes: 8589ec212e80 ("net/cnxk: support MTU set")
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
drivers/net/cnxk/cnxk_ethdev_ops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 82943e52d4..67c0dd8865 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -21,6 +21,5 @@ cnxk_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
devinfo->max_mac_addrs = dev->max_mac_entries;
devinfo->max_vfs = pci_dev->max_vfs;
- devinfo->max_mtu = devinfo->max_rx_pktlen -
- (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN);
+ devinfo->max_mtu = devinfo->max_rx_pktlen - CNXK_NIX_L2_OVERHEAD;
devinfo->min_mtu = devinfo->min_rx_bufsize - CNXK_NIX_L2_OVERHEAD;
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.633207246 +0000
+++ 0020-net-cnxk-fix-MTU-limit.patch 2024-03-08 13:47:49.018686663 +0000
@@ -1 +1 @@
-From 402de2fd8729b61a3ace67c597e99893acb426d4 Mon Sep 17 00:00:00 2001
+From 92f6f10e9daf7a07899e7567c6430602c0ba3cd9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 402de2fd8729b61a3ace67c597e99893acb426d4 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 4962f3bced..56049c5dd2 100644
+index 82943e52d4..67c0dd8865 100644
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'common/cnxk: fix RSS RETA configuration' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (18 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/cnxk: fix MTU limit' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'common/cnxk: fix mbox struct attributes' " Kevin Traynor
` (12 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Kommula Shiva Shankar; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ed1fd02bd4099c86fee53b98aef7014484b8c797
Thanks.
Kevin
---
From ed1fd02bd4099c86fee53b98aef7014484b8c797 Mon Sep 17 00:00:00 2001
From: Kommula Shiva Shankar <kshankar@marvell.com>
Date: Mon, 26 Feb 2024 19:05:31 +0530
Subject: [PATCH] common/cnxk: fix RSS RETA configuration
[ upstream commit dce7f0c2400246da41049c64c0c461a24a4c0498 ]
Update queue entries copy in RETA table based on data type.
Fixes: 1bf6746e653b ("common/cnxk: support NIX RSS")
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
---
| 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--git a/drivers/common/cnxk/roc_nix_rss.c b/drivers/common/cnxk/roc_nix_rss.c
index 7de69aabeb..5182c5a9cb 100644
--- a/drivers/common/cnxk/roc_nix_rss.c
+++ b/drivers/common/cnxk/roc_nix_rss.c
@@ -183,5 +183,5 @@ roc_nix_rss_reta_set(struct roc_nix *roc_nix, uint8_t group,
return rc;
- memcpy(&nix->reta[group], reta, ROC_NIX_RSS_RETA_MAX);
+ memcpy(&nix->reta[group], reta, sizeof(uint16_t) * ROC_NIX_RSS_RETA_MAX);
return 0;
}
@@ -196,5 +196,5 @@ roc_nix_rss_reta_get(struct roc_nix *roc_nix, uint8_t group,
return NIX_ERR_PARAM;
- memcpy(reta, &nix->reta[group], ROC_NIX_RSS_RETA_MAX);
+ memcpy(reta, &nix->reta[group], sizeof(uint16_t) * ROC_NIX_RSS_RETA_MAX);
return 0;
}
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.659399020 +0000
+++ 0021-common-cnxk-fix-RSS-RETA-configuration.patch 2024-03-08 13:47:49.018686663 +0000
@@ -1 +1 @@
-From dce7f0c2400246da41049c64c0c461a24a4c0498 Mon Sep 17 00:00:00 2001
+From ed1fd02bd4099c86fee53b98aef7014484b8c797 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dce7f0c2400246da41049c64c0c461a24a4c0498 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 3599eb9bae..2b88e1360d 100644
+index 7de69aabeb..5182c5a9cb 100644
@@ -20 +21 @@
-@@ -197,5 +197,5 @@ roc_nix_rss_reta_set(struct roc_nix *roc_nix, uint8_t group,
+@@ -183,5 +183,5 @@ roc_nix_rss_reta_set(struct roc_nix *roc_nix, uint8_t group,
@@ -27 +28 @@
-@@ -210,5 +210,5 @@ roc_nix_rss_reta_get(struct roc_nix *roc_nix, uint8_t group,
+@@ -196,5 +196,5 @@ roc_nix_rss_reta_get(struct roc_nix *roc_nix, uint8_t group,
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'common/cnxk: fix mbox struct attributes' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (19 preceding siblings ...)
2024-03-08 14:28 ` patch 'common/cnxk: fix RSS RETA configuration' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'common/cnxk: fix possible out-of-bounds access' " Kevin Traynor
` (11 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/22c015d09d61a6d70101fc3cbf68a3a99adefa46
Thanks.
Kevin
---
From 22c015d09d61a6d70101fc3cbf68a3a99adefa46 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 26 Feb 2024 19:05:34 +0530
Subject: [PATCH] common/cnxk: fix mbox struct attributes
[ upstream commit c9dca1c5e352008bda8d0edeab8fbcf328437282 ]
IO attribute is needed to mbox structs to avoid unaligned or pair
access causing by compiler optimization. Add them to structs
where it is missing.
Fixes: 503b82de2cbf ("common/cnxk: add mbox request and response definitions")
Fixes: ddf955d3917e ("common/cnxk: support CPT second pass")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/common/cnxk/roc_mbox.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
index 564bf29bc2..16e39ac6cf 100644
--- a/drivers/common/cnxk/roc_mbox.h
+++ b/drivers/common/cnxk/roc_mbox.h
@@ -825,10 +825,10 @@ struct nix_cn10k_aq_enq_rsp {
struct mbox_msghdr hdr;
union {
- struct nix_cn10k_rq_ctx_s rq;
- struct nix_cn10k_sq_ctx_s sq;
- struct nix_cq_ctx_s cq;
- struct nix_rsse_s rss;
- struct nix_rx_mce_s mce;
- struct nix_band_prof_s prof;
+ __io struct nix_cn10k_rq_ctx_s rq;
+ __io struct nix_cn10k_sq_ctx_s sq;
+ __io struct nix_cq_ctx_s cq;
+ __io struct nix_rsse_s rss;
+ __io struct nix_rx_mce_s mce;
+ __io struct nix_band_prof_s prof;
};
};
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.685458474 +0000
+++ 0022-common-cnxk-fix-mbox-struct-attributes.patch 2024-03-08 13:47:49.020686669 +0000
@@ -1 +1 @@
-From c9dca1c5e352008bda8d0edeab8fbcf328437282 Mon Sep 17 00:00:00 2001
+From 22c015d09d61a6d70101fc3cbf68a3a99adefa46 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c9dca1c5e352008bda8d0edeab8fbcf328437282 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- drivers/common/cnxk/roc_mbox.h | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
+ drivers/common/cnxk/roc_mbox.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
@@ -20 +21 @@
-index 4b4f48e372..d8a8494ac4 100644
+index 564bf29bc2..16e39ac6cf 100644
@@ -23 +24 @@
-@@ -1428,10 +1428,10 @@ struct nix_cn10k_aq_enq_rsp {
+@@ -825,10 +825,10 @@ struct nix_cn10k_aq_enq_rsp {
@@ -40,12 +40,0 @@
-@@ -1669,9 +1669,9 @@ struct nix_rq_cpt_field_mask_cfg_req {
- union {
- uint64_t __io rq_ctx_word_set[RQ_CTX_MASK_MAX];
-- struct nix_cn10k_rq_ctx_s rq_set;
-+ __io struct nix_cn10k_rq_ctx_s rq_set;
- };
- union {
- uint64_t __io rq_ctx_word_mask[RQ_CTX_MASK_MAX];
-- struct nix_cn10k_rq_ctx_s rq_mask;
-+ __io struct nix_cn10k_rq_ctx_s rq_mask;
- };
- struct nix_lf_rx_ipec_cfg1_req {
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'common/cnxk: fix possible out-of-bounds access' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (20 preceding siblings ...)
2024-03-08 14:28 ` patch 'common/cnxk: fix mbox struct attributes' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/mlx5: fix use after free when releasing Tx queues' " Kevin Traynor
` (10 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Satheesh Paul; +Cc: Harman Kalra, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2556c2392211794f334b4ea6529c11be64d6f17b
Thanks.
Kevin
---
From 2556c2392211794f334b4ea6529c11be64d6f17b Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Fri, 1 Mar 2024 09:05:34 +0530
Subject: [PATCH] common/cnxk: fix possible out-of-bounds access
[ upstream commit 9a92937cf0c836b7f2b5e303523279ddf9473a35 ]
The subtraction expression in mbox_memcpy() can wrap around
causing an out-of-bounds access. Added a check on 'size' to
fix this.
Coverity issue: 384431, 384439
Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class")
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
---
drivers/common/cnxk/roc_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index f45078568f..0fbfa8db7c 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -449,4 +449,6 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg)
size = PLT_ALIGN(mbox_id2size(msg->hdr.id), MBOX_MSG_ALIGN);
+ if (size < sizeof(struct mbox_msghdr))
+ return;
/* Send UP message to all VF's */
for (vf = 0; vf < vf_mbox->ndevs; vf++) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.713316282 +0000
+++ 0023-common-cnxk-fix-possible-out-of-bounds-access.patch 2024-03-08 13:47:49.021686672 +0000
@@ -1 +1 @@
-From 9a92937cf0c836b7f2b5e303523279ddf9473a35 Mon Sep 17 00:00:00 2001
+From 2556c2392211794f334b4ea6529c11be64d6f17b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a92937cf0c836b7f2b5e303523279ddf9473a35 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 084343c3b4..14aff233d5 100644
+index f45078568f..0fbfa8db7c 100644
@@ -24 +25 @@
-@@ -503,4 +503,6 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg)
+@@ -449,4 +449,6 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/mlx5: fix use after free when releasing Tx queues' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (21 preceding siblings ...)
2024-03-08 14:28 ` patch 'common/cnxk: fix possible out-of-bounds access' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/mlx5: fix error packets drop in regular Rx' " Kevin Traynor
` (9 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Pengfei Sun; +Cc: Yunjian Wang, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/411422bb04e1bb1c9d718c51f95cb833864cb45e
Thanks.
Kevin
---
From 411422bb04e1bb1c9d718c51f95cb833864cb45e Mon Sep 17 00:00:00 2001
From: Pengfei Sun <sunpengfei16@huawei.com>
Date: Tue, 20 Feb 2024 17:31:39 +0800
Subject: [PATCH] net/mlx5: fix use after free when releasing Tx queues
[ upstream commit b805b7c451f1ee5bafa5628ee67f3a495f6a8682 ]
In function mlx5_dev_configure, dev->data->tx_queues is assigned
to priv->txqs. When a member is removed from a bond, the function
eth_dev_tx_queue_config is called to release dev->data->tx_queues.
However, function mlx5_dev_close will access priv->txqs again and
cause the use after free problem.
In function mlx5_dev_close, before free priv->txqs, we add a check
that dev->data->tx_queues is not NULL.
build/app/dpdk-testpmd -c7 -a 0000:08:00.2 -- -i --nb-cores=2
--total-num-mbufs=2048
testpmd> port stop 0
testpmd> create bonding device 4 0
testpmd> add bonding member 0 1
testpmd> remove bonding member 0 1
testpmd> quit
ASan reports:
==2571911==ERROR: AddressSanitizer: heap-use-after-free on address
0x000174529880 at pc 0x0000113c8440 bp 0xffffefae0ea0 sp 0xffffefae0eb0
READ of size 8 at 0x000174529880 thread T0
#0 0x113c843c in mlx5_txq_release ../drivers/net/mlx5/mlx5_txq.c:
1203
#1 0xffdb53c in mlx5_dev_close ../drivers/net/mlx5/mlx5.c:2286
#2 0xe12dc0 in rte_eth_dev_close ../lib/ethdev/rte_ethdev.c:1877
#3 0x6bac1c in close_port ../app/test-pmd/testpmd.c:3540
#4 0x6bc320 in pmd_test_exit ../app/test-pmd/testpmd.c:3808
#5 0x6c1a94 in main ../app/test-pmd/testpmd.c:4759
#6 0xffff9328f038 (/usr/lib64/libc.so.6+0x2b038)
#7 0xffff9328f110 in __libc_start_main (/usr/lib64/libc.so.6+
0x2b110)
Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")
Reported-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Pengfei Sun <sunpengfei16@huawei.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 5645e8656c..9fc34f05e2 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1597,5 +1597,5 @@ mlx5_dev_close(struct rte_eth_dev *dev)
priv->rxq_privs = NULL;
}
- if (priv->txqs != NULL) {
+ if (priv->txqs != NULL && dev->data->tx_queues != NULL) {
/* XXX race condition if mlx5_tx_burst() is still running. */
rte_delay_us_sleep(1000);
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.739767597 +0000
+++ 0024-net-mlx5-fix-use-after-free-when-releasing-Tx-queues.patch 2024-03-08 13:47:49.023686678 +0000
@@ -1 +1 @@
-From b805b7c451f1ee5bafa5628ee67f3a495f6a8682 Mon Sep 17 00:00:00 2001
+From 411422bb04e1bb1c9d718c51f95cb833864cb45e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b805b7c451f1ee5bafa5628ee67f3a495f6a8682 ]
+
@@ -40 +41,0 @@
-Cc: stable@dpdk.org
@@ -50 +51 @@
-index 881c42a97a..f2ca0ae4c2 100644
+index 5645e8656c..9fc34f05e2 100644
@@ -53 +54 @@
-@@ -2363,5 +2363,5 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -1597,5 +1597,5 @@ mlx5_dev_close(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/mlx5: fix error packets drop in regular Rx' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (22 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/mlx5: fix use after free when releasing Tx queues' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/mlx5: fix VLAN handling in meter split' " Kevin Traynor
` (8 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c52e6e0ecda72ad163fc7757abe825105d7a16c8
Thanks.
Kevin
---
From c52e6e0ecda72ad163fc7757abe825105d7a16c8 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 20 Feb 2024 13:45:20 +0200
Subject: [PATCH] net/mlx5: fix error packets drop in regular Rx
[ upstream commit ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 ]
When packet gets received with error it is reported in CQE
structure and PMD analyzes the error syndrome and provides
two options - either reset the entire queue for the critical
errors, or just ignore the packet.
The non-vectorized rx_burst did not ignore the non-critical
error packets, and in case of packet length exceeding the
mbuf data buffer length it took the next element in the queue
WQE ring, resulting in CQE/WQE consume indices synchronization
lost.
Fixes: aa67ed308458 ("net/mlx5: ignore non-critical syndromes for Rx queue")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_rx.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index ab88f2526f..eea6a5c6c7 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -584,5 +584,6 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
* Indication if it is called from MPRQ.
* @return
- * 0 in case of empty CQE, MLX5_REGULAR_ERROR_CQE_RET in case of error CQE,
+ * 0 in case of empty CQE,
+ * MLX5_REGULAR_ERROR_CQE_RET in case of error CQE,
* MLX5_CRITICAL_ERROR_CQE_RET in case of error CQE lead to Rx queue reset,
* otherwise the packet size in regular RxQ,
@@ -658,4 +659,9 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
ret == MLX5_RECOVERY_COMPLETED_RET)
return MLX5_CRITICAL_ERROR_CQE_RET;
+ if (!mprq && ret == MLX5_RECOVERY_IGNORE_RET) {
+ *skip_cnt = 1;
+ ++rxq->cq_ci;
+ return MLX5_ERROR_CQE_MASK;
+ }
} else {
return 0;
@@ -911,17 +917,16 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
len = mlx5_rx_poll_len(rxq, cqe, cqe_cnt, &mcqe, &skip_cnt, false);
if (unlikely(len & MLX5_ERROR_CQE_MASK)) {
+ /* We drop packets with non-critical errors */
+ rte_mbuf_raw_free(rep);
if (len == MLX5_CRITICAL_ERROR_CQE_RET) {
- rte_mbuf_raw_free(rep);
rq_ci = rxq->rq_ci << sges_n;
break;
}
+ /* Skip specified amount of error CQEs packets */
rq_ci >>= sges_n;
rq_ci += skip_cnt;
rq_ci <<= sges_n;
- idx = rq_ci & wqe_cnt;
- wqe = &((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[idx];
- seg = (*rxq->elts)[idx];
- cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
- len = len & ~MLX5_ERROR_CQE_MASK;
+ MLX5_ASSERT(!pkt);
+ continue;
}
if (len == 0) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.768500536 +0000
+++ 0025-net-mlx5-fix-error-packets-drop-in-regular-Rx.patch 2024-03-08 13:47:49.024686681 +0000
@@ -1 +1 @@
-From ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 Mon Sep 17 00:00:00 2001
+From c52e6e0ecda72ad163fc7757abe825105d7a16c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 5bf1a679b2..cc087348a4 100644
+index ab88f2526f..eea6a5c6c7 100644
@@ -30 +31 @@
-@@ -614,5 +614,6 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
+@@ -584,5 +584,6 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
@@ -38 +39 @@
-@@ -698,4 +699,9 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -658,4 +659,9 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -48,2 +49,2 @@
-@@ -972,17 +978,16 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
- len = mlx5_rx_poll_len(rxq, cqe, cqe_n, cqe_mask, &mcqe, &skip_cnt, false);
+@@ -911,17 +917,16 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+ len = mlx5_rx_poll_len(rxq, cqe, cqe_cnt, &mcqe, &skip_cnt, false);
@@ -62 +63 @@
-- idx = rq_ci & wqe_mask;
+- idx = rq_ci & wqe_cnt;
@@ -65 +66 @@
-- cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_mask];
+- cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/mlx5: fix VLAN handling in meter split' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (23 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/mlx5: fix error packets drop in regular Rx' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'net/mlx5: fix counters map in bonding mode' " Kevin Traynor
` (7 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Suanming Mou, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/03c7f0a177554bf65966aa0bcd88295f3ad915e2
Thanks.
Kevin
---
From 03c7f0a177554bf65966aa0bcd88295f3ad915e2 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Tue, 27 Feb 2024 14:58:15 +0100
Subject: [PATCH] net/mlx5: fix VLAN handling in meter split
[ upstream commit 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe ]
On the attempt to create a flow rule with:
- matching on REPRESENTED_PORT,
- matching on outer VLAN tag,
- matching on inner VLAN tag,
- METER action,
flow splitting mechanism for handling metering flows was causing
memory corruption. It was assumed that suffix flow will have a single
VLAN item (used for translation of OF_PUSH_VLAN/OF_SET_VLAN_VID
actions), however during flow_meter_split_prep() 2 VLAN items were
parsed. This caused the buffer overflow on allocated
suffix flow item buffer.
This patch fixes this overflow, by account for number of VLAN items
in flow rule pattern when allocating items for suffix flow.
Fixes: 50f576d657d7 ("net/mlx5: fix VLAN actions in meter")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 60 +++++++++++++++++++++++-------------
1 file changed, 39 insertions(+), 21 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5d489c7f92..6399d93b93 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5083,6 +5083,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
struct mlx5_rte_flow_item_tag *tag_item_mask;
uint32_t tag_id = 0;
- struct rte_flow_item *vlan_item_dst = NULL;
- const struct rte_flow_item *vlan_item_src = NULL;
+ bool vlan_actions;
+ struct rte_flow_item *orig_sfx_items = sfx_items;
const struct rte_flow_item *orig_items = items;
struct rte_flow_action *hw_mtr_action;
@@ -5101,4 +5101,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
/* Prepare the suffix subflow items. */
tag_item = sfx_items++;
+ tag_item->type = (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_TAG;
for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
int item_type = items->type;
@@ -5121,8 +5122,11 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ITEM_TYPE_VLAN:
- /* Determine if copy vlan item below. */
- vlan_item_src = items;
- vlan_item_dst = sfx_items++;
- vlan_item_dst->type = RTE_FLOW_ITEM_TYPE_VOID;
+ /*
+ * Copy VLAN items in case VLAN actions are performed.
+ * If there are no VLAN actions, these items will be VOID.
+ */
+ memcpy(sfx_items, items, sizeof(*sfx_items));
+ sfx_items->type = (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
+ sfx_items++;
break;
default:
@@ -5141,4 +5145,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
}
/* Prepare the actions for prefix and suffix flow. */
+ vlan_actions = false;
for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
struct rte_flow_action *action_cur = NULL;
@@ -5171,14 +5176,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:
- if (vlan_item_dst && vlan_item_src) {
- memcpy(vlan_item_dst, vlan_item_src,
- sizeof(*vlan_item_dst));
- /*
- * Convert to internal match item, it is used
- * for vlan push and set vid.
- */
- vlan_item_dst->type = (enum rte_flow_item_type)
- MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
- }
+ vlan_actions = true;
break;
case RTE_FLOW_ACTION_TYPE_COUNT:
@@ -5195,4 +5191,12 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
memcpy(action_cur, actions, sizeof(struct rte_flow_action));
}
+ /* If there are no VLAN actions, convert VLAN items to VOID in suffix flow items. */
+ if (!vlan_actions) {
+ struct rte_flow_item *it = orig_sfx_items;
+
+ for (; it->type != RTE_FLOW_ITEM_TYPE_END; it++)
+ if (it->type == (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_VLAN)
+ it->type = RTE_FLOW_ITEM_TYPE_VOID;
+ }
/* Add end action to the actions. */
actions_sfx->type = RTE_FLOW_ACTION_TYPE_END;
@@ -5284,6 +5288,4 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
MLX5_RTE_FLOW_ACTION_TYPE_TAG;
tag_action->conf = set_tag;
- tag_item->type = (enum rte_flow_item_type)
- MLX5_RTE_FLOW_ITEM_TYPE_TAG;
tag_item->spec = tag_item_spec;
tag_item->last = NULL;
@@ -6112,4 +6114,17 @@ flow_meter_create_drop_flow_with_org_pattern(struct rte_eth_dev *dev,
}
+static int
+flow_count_vlan_items(const struct rte_flow_item items[])
+{
+ int items_n = 0;
+
+ for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
+ if (items->type == RTE_FLOW_ITEM_TYPE_VLAN ||
+ items->type == (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_VLAN)
+ items_n++;
+ }
+ return items_n;
+}
+
/**
* The splitting for meter feature.
@@ -6167,4 +6182,5 @@ flow_create_split_meter(struct rte_eth_dev *dev,
size_t item_size;
int actions_n = 0;
+ int vlan_items_n = 0;
int ret = 0;
@@ -6228,7 +6244,9 @@ flow_create_split_meter(struct rte_eth_dev *dev,
(actions_n + METER_PREFIX_ACTION)) +
sizeof(struct mlx5_rte_flow_action_set_tag);
- /* Suffix items: tag, vlan, port id, end. */
-#define METER_SUFFIX_ITEM 4
- item_size = sizeof(struct rte_flow_item) * METER_SUFFIX_ITEM +
+ /* Flow can have multiple VLAN items. Account for them in suffix items. */
+ vlan_items_n = flow_count_vlan_items(items);
+ /* Suffix items: tag, [vlans], port id, end. */
+#define METER_SUFFIX_ITEM 3
+ item_size = sizeof(struct rte_flow_item) * (METER_SUFFIX_ITEM + vlan_items_n) +
sizeof(struct mlx5_rte_flow_item_tag) * 2;
sfx_actions = mlx5_malloc(MLX5_MEM_ZERO, (act_size + item_size),
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.795374787 +0000
+++ 0026-net-mlx5-fix-VLAN-handling-in-meter-split.patch 2024-03-08 13:47:49.032686705 +0000
@@ -1 +1 @@
-From 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe Mon Sep 17 00:00:00 2001
+From 03c7f0a177554bf65966aa0bcd88295f3ad915e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index c7d70b8c7b..f8943a60be 100644
+index 5d489c7f92..6399d93b93 100644
@@ -36 +37 @@
-@@ -5708,6 +5708,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5083,6 +5083,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -45 +46 @@
-@@ -5726,4 +5726,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5101,4 +5101,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -51 +52 @@
-@@ -5748,8 +5749,11 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5121,8 +5122,11 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -67 +68 @@
-@@ -5768,4 +5772,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5141,4 +5145,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -73 +74 @@
-@@ -5798,14 +5803,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5171,14 +5176,5 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -89 +90 @@
-@@ -5822,4 +5818,12 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5195,4 +5191,12 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -102 +103 @@
-@@ -5911,6 +5915,4 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5284,6 +5288,4 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -109 +110 @@
-@@ -6740,4 +6742,17 @@ flow_meter_create_drop_flow_with_org_pattern(struct rte_eth_dev *dev,
+@@ -6112,4 +6114,17 @@ flow_meter_create_drop_flow_with_org_pattern(struct rte_eth_dev *dev,
@@ -127 +128 @@
-@@ -6795,4 +6810,5 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -6167,4 +6182,5 @@ flow_create_split_meter(struct rte_eth_dev *dev,
@@ -133 +134 @@
-@@ -6854,7 +6870,9 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -6228,7 +6244,9 @@ flow_create_split_meter(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'net/mlx5: fix counters map in bonding mode' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (24 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/mlx5: fix VLAN handling in meter split' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'test: fix probing in secondary process' " Kevin Traynor
` (6 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2481136319023e18b333a20ff8ed797f64b4ca19
Thanks.
Kevin
---
From 2481136319023e18b333a20ff8ed797f64b4ca19 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Thu, 29 Feb 2024 11:34:56 +0200
Subject: [PATCH] net/mlx5: fix counters map in bonding mode
[ upstream commit a687c3e658c2d889052089af8340bc0b9299c856 ]
In the HW-LAG mode, there is only one mlx5 IB device with 2 ETH
interfaces. In theory, the settings on both ports should be the same.
But in the real life, some inconsistent settings may be done by the
user and the PMD is not aware of this.
In the previous implementation, the xstats map was generated from the
information fetched on the 1st port of a bonding interface. If the
2nd port had a different settings, the number and the order of the
counters may differ from that of the 1st one. The ioctl() call may
corrupt the user buffers (copy_to_user) and cause a crash.
The commit will change the map between the driver counters to the
PMD user counters.
1. Switch the inner and outer loop to speed up the initialization
time AMAP - since there will be >300 counters returned from the
driver.
2. Generate an unique map for both ports in LAG mode.
a. Scan the 1st port and find the supported counters' strings,
then add to the map.
b. In bonding, scan the 2nd port and find the strings. If one is
already in the map, use the index. Or append to the next free
slot.
c. Append the device counters that needs to be fetched via sysfs
or Devx command. This kind of counter(s) is unique per IB
device.
After querying the statistics from the driver, the value will be read
from the proper offset in the "struct ethtool_stats" and then added
into the output array based on the map information. In bonding mode,
the statistics from both ports will be accumulated if the counters
are valid on both ports.
Compared to the system call or Devx command, the overhead introduced
by the extra index comparison is light and should not cause a
significant degradation.
The application should ensure that the port settings should not be
changed out of the DPDK application dynamically in most cases. Or
else the change cannot be notified and the counters map might not
be valid when the number doesn't change but the counters set had
changed. A device restart will help to re-initialize the map from
scrath.
Fixes: 7ed15acdcd69 ("net/mlx5: improve xstats of bonding port")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 249 +++++++++++++++-------
drivers/net/mlx5/mlx5.h | 15 +-
drivers/net/mlx5/mlx5_stats.c | 58 +++--
drivers/net/mlx5/windows/mlx5_ethdev_os.c | 22 +-
4 files changed, 242 insertions(+), 102 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index dbfe00ea6d..5d73076cb3 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1357,11 +1357,14 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
unsigned int i;
struct ifreq ifr;
- unsigned int stats_sz = xstats_ctrl->stats_n * sizeof(uint64_t);
+ unsigned int max_stats_n = RTE_MAX(xstats_ctrl->stats_n, xstats_ctrl->stats_n_2nd);
+ unsigned int stats_sz = max_stats_n * sizeof(uint64_t);
unsigned char et_stat_buf[sizeof(struct ethtool_stats) + stats_sz];
struct ethtool_stats *et_stats = (struct ethtool_stats *)et_stat_buf;
int ret;
+ uint16_t i_idx, o_idx;
et_stats->cmd = ETHTOOL_GSTATS;
- et_stats->n_stats = xstats_ctrl->stats_n;
+ /* Pass the maximum value, the driver may ignore this. */
+ et_stats->n_stats = max_stats_n;
ifr.ifr_data = (caddr_t)et_stats;
if (pf >= 0)
@@ -1376,19 +1379,32 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
return ret;
}
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
- if (xstats_ctrl->info[i].dev)
- continue;
- stats[i] += (uint64_t)
- et_stats->data[xstats_ctrl->dev_table_idx[i]];
+ if (pf <= 0) {
+ for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ i_idx = xstats_ctrl->dev_table_idx[i];
+ if (i_idx == UINT16_MAX || xstats_ctrl->info[i].dev)
+ continue;
+ o_idx = xstats_ctrl->xstats_o_idx[i];
+ stats[o_idx] += (uint64_t)et_stats->data[i_idx];
+ }
+ } else {
+ for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ i_idx = xstats_ctrl->dev_table_idx_2nd[i];
+ if (i_idx == UINT16_MAX)
+ continue;
+ o_idx = xstats_ctrl->xstats_o_idx_2nd[i];
+ stats[o_idx] += (uint64_t)et_stats->data[i_idx];
+ }
}
return 0;
}
-/**
+/*
* Read device counters.
*
* @param dev
* Pointer to Ethernet device.
- * @param[out] stats
+ * @param bond_master
+ * Indicate if the device is a bond master.
+ * @param stats
* Counters table output buffer.
*
@@ -1398,5 +1414,5 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
*/
int
-mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *stats)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -1406,5 +1422,5 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
memset(stats, 0, sizeof(*stats) * xstats_ctrl->mlx5_stats_n);
/* Read ifreq counters. */
- if (priv->master && priv->pf_bond >= 0) {
+ if (bond_master) {
/* Sum xstats from bonding device member ports. */
for (i = 0; i < priv->sh->bond.n_port; i++) {
@@ -1418,11 +1434,15 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
return ret;
}
- /* Read IB counters. */
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
+ /*
+ * Read IB counters.
+ * The counters are unique per IB device but not per net IF.
+ * In bonding mode, getting the stats name only from 1 port is enough.
+ */
+ for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
if (!xstats_ctrl->info[i].dev)
continue;
/* return last xstats counter if fail to read. */
if (mlx5_os_read_dev_stat(priv, xstats_ctrl->info[i].ctr_name,
- &stats[i]) == 0)
+ &stats[i]) == 0)
xstats_ctrl->xstats[i] = stats[i];
else
@@ -1432,16 +1452,22 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
}
-/**
+/*
* Query the number of statistics provided by ETHTOOL.
*
* @param dev
* Pointer to Ethernet device.
+ * @param bond_master
+ * Indicate if the device is a bond master.
+ * @param n_stats
+ * Pointer to number of stats to store.
+ * @param n_stats_sec
+ * Pointer to number of stats to store for the 2nd port of the bond.
*
* @return
- * Number of statistics on success, negative errno value otherwise and
- * rte_errno is set.
+ * 0 on success, negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_os_get_stats_n(struct rte_eth_dev *dev)
+mlx5_os_get_stats_n(struct rte_eth_dev *dev, bool bond_master,
+ uint16_t *n_stats, uint16_t *n_stats_sec)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -1452,16 +1478,32 @@ mlx5_os_get_stats_n(struct rte_eth_dev *dev)
drvinfo.cmd = ETHTOOL_GDRVINFO;
ifr.ifr_data = (caddr_t)&drvinfo;
- if (priv->master && priv->pf_bond >= 0)
- /* Bonding PF. */
+ /* Bonding PFs. */
+ if (bond_master) {
ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[0].ifname,
SIOCETHTOOL, &ifr);
- else
+ if (ret) {
+ DRV_LOG(WARNING, "bonding port %u unable to query number of"
+ " statistics for the 1st slave, %d", PORT_ID(priv), ret);
+ return ret;
+ }
+ *n_stats = drvinfo.n_stats;
+ ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[1].ifname,
+ SIOCETHTOOL, &ifr);
+ if (ret) {
+ DRV_LOG(WARNING, "bonding port %u unable to query number of"
+ " statistics for the 2nd slave, %d", PORT_ID(priv), ret);
+ return ret;
+ }
+ *n_stats_sec = drvinfo.n_stats;
+ } else {
ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
- if (ret) {
- DRV_LOG(WARNING, "port %u unable to query number of statistics",
- dev->data->port_id);
- return ret;
+ if (ret) {
+ DRV_LOG(WARNING, "port %u unable to query number of statistics",
+ PORT_ID(priv));
+ return ret;
+ }
+ *n_stats = drvinfo.n_stats;
}
- return drvinfo.n_stats;
+ return 0;
}
@@ -1585,4 +1627,99 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
+static int
+mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+ struct ethtool_gstrings *strings,
+ uint32_t stats_n, uint32_t stats_n_2nd)
+{
+ struct mlx5_priv *priv = dev->data->dev_private;
+ struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
+ struct ifreq ifr;
+ int ret;
+ uint32_t i, j, idx;
+
+ /* Ensure no out of bounds access before. */
+ MLX5_ASSERT(xstats_n <= MLX5_MAX_XSTATS);
+ strings->cmd = ETHTOOL_GSTRINGS;
+ strings->string_set = ETH_SS_STATS;
+ strings->len = stats_n;
+ ifr.ifr_data = (caddr_t)strings;
+ if (bond_master)
+ ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[0].ifname,
+ SIOCETHTOOL, &ifr);
+ else
+ ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
+ if (ret) {
+ DRV_LOG(WARNING, "port %u unable to get statistic names with %d",
+ PORT_ID(priv), ret);
+ return ret;
+ }
+ /* Reorganize the orders to reduce the iterations. */
+ for (j = 0; j < xstats_n; j++) {
+ xstats_ctrl->dev_table_idx[j] = UINT16_MAX;
+ for (i = 0; i < stats_n; i++) {
+ const char *curr_string =
+ (const char *)&strings->data[i * ETH_GSTRING_LEN];
+
+ if (!strcmp(mlx5_counters_init[j].ctr_name, curr_string)) {
+ idx = xstats_ctrl->mlx5_stats_n++;
+ xstats_ctrl->dev_table_idx[j] = i;
+ xstats_ctrl->xstats_o_idx[j] = idx;
+ xstats_ctrl->info[idx] = mlx5_counters_init[j];
+ }
+ }
+ }
+ if (!bond_master) {
+ /* Add dev counters, unique per IB device. */
+ for (j = 0; j != xstats_n; j++) {
+ if (mlx5_counters_init[j].dev) {
+ idx = xstats_ctrl->mlx5_stats_n++;
+ xstats_ctrl->info[idx] = mlx5_counters_init[j];
+ xstats_ctrl->hw_stats[idx] = 0;
+ }
+ }
+ return 0;
+ }
+
+ strings->len = stats_n_2nd;
+ ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[1].ifname,
+ SIOCETHTOOL, &ifr);
+ if (ret) {
+ DRV_LOG(WARNING, "port %u unable to get statistic names for 2nd slave with %d",
+ PORT_ID(priv), ret);
+ return ret;
+ }
+ /* The 2nd slave port may have a different strings set, based on the configuration. */
+ for (j = 0; j != xstats_n; j++) {
+ xstats_ctrl->dev_table_idx_2nd[j] = UINT16_MAX;
+ for (i = 0; i != stats_n_2nd; i++) {
+ const char *curr_string =
+ (const char *)&strings->data[i * ETH_GSTRING_LEN];
+
+ if (!strcmp(mlx5_counters_init[j].ctr_name, curr_string)) {
+ xstats_ctrl->dev_table_idx_2nd[j] = i;
+ if (xstats_ctrl->dev_table_idx[j] != UINT16_MAX) {
+ /* Already mapped in the 1st slave port. */
+ idx = xstats_ctrl->xstats_o_idx[j];
+ xstats_ctrl->xstats_o_idx_2nd[j] = idx;
+ } else {
+ /* Append the new items to the end of the map. */
+ idx = xstats_ctrl->mlx5_stats_n++;
+ xstats_ctrl->xstats_o_idx_2nd[j] = idx;
+ xstats_ctrl->info[idx] = mlx5_counters_init[j];
+ }
+ }
+ }
+ }
+ /* Dev counters are always at the last now. */
+ for (j = 0; j != xstats_n; j++) {
+ if (mlx5_counters_init[j].dev) {
+ idx = xstats_ctrl->mlx5_stats_n++;
+ xstats_ctrl->info[idx] = mlx5_counters_init[j];
+ xstats_ctrl->hw_stats[idx] = 0;
+ }
+ }
+ return 0;
+}
+
/**
* Init the structures to read device counters.
@@ -1597,15 +1734,15 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
struct mlx5_stats_ctrl *stats_ctrl = &priv->stats_ctrl;
- unsigned int i;
- unsigned int j;
- struct ifreq ifr;
struct ethtool_gstrings *strings = NULL;
- unsigned int dev_stats_n;
+ uint16_t dev_stats_n = 0;
+ uint16_t dev_stats_n_2nd = 0;
+ unsigned int max_stats_n;
unsigned int str_sz;
int ret;
+ bool bond_master = (priv->master && priv->pf_bond >= 0);
/* So that it won't aggregate for each init. */
xstats_ctrl->mlx5_stats_n = 0;
- ret = mlx5_os_get_stats_n(dev);
+ ret = mlx5_os_get_stats_n(dev, bond_master, &dev_stats_n, &dev_stats_n_2nd);
if (ret < 0) {
DRV_LOG(WARNING, "port %u no extended statistics available",
@@ -1613,7 +1750,7 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
return;
}
- dev_stats_n = ret;
+ max_stats_n = RTE_MAX(dev_stats_n, dev_stats_n_2nd);
/* Allocate memory to grab stat names and values. */
- str_sz = dev_stats_n * ETH_GSTRING_LEN;
+ str_sz = max_stats_n * ETH_GSTRING_LEN;
strings = (struct ethtool_gstrings *)
mlx5_malloc(0, str_sz + sizeof(struct ethtool_gstrings), 0,
@@ -1621,50 +1758,18 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
if (!strings) {
DRV_LOG(WARNING, "port %u unable to allocate memory for xstats",
- dev->data->port_id);
+ dev->data->port_id);
return;
}
- strings->cmd = ETHTOOL_GSTRINGS;
- strings->string_set = ETH_SS_STATS;
- strings->len = dev_stats_n;
- ifr.ifr_data = (caddr_t)strings;
- if (priv->master && priv->pf_bond >= 0)
- /* Bonding master. */
- ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[0].ifname,
- SIOCETHTOOL, &ifr);
- else
- ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
- if (ret) {
- DRV_LOG(WARNING, "port %u unable to get statistic names",
+ ret = mlx5_os_get_stats_strings(dev, bond_master, strings,
+ dev_stats_n, dev_stats_n_2nd);
+ if (ret < 0) {
+ DRV_LOG(WARNING, "port %u failed to get the stats strings",
dev->data->port_id);
goto free;
}
- for (i = 0; i != dev_stats_n; ++i) {
- const char *curr_string = (const char *)
- &strings->data[i * ETH_GSTRING_LEN];
-
- for (j = 0; j != xstats_n; ++j) {
- if (!strcmp(mlx5_counters_init[j].ctr_name,
- curr_string)) {
- unsigned int idx = xstats_ctrl->mlx5_stats_n++;
-
- xstats_ctrl->dev_table_idx[idx] = i;
- xstats_ctrl->info[idx] = mlx5_counters_init[j];
- break;
- }
- }
- }
- /* Add dev counters. */
- for (i = 0; i != xstats_n; ++i) {
- if (mlx5_counters_init[i].dev) {
- unsigned int idx = xstats_ctrl->mlx5_stats_n++;
-
- xstats_ctrl->info[idx] = mlx5_counters_init[i];
- xstats_ctrl->hw_stats[idx] = 0;
- }
- }
- MLX5_ASSERT(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
xstats_ctrl->stats_n = dev_stats_n;
+ xstats_ctrl->stats_n_2nd = dev_stats_n_2nd;
/* Copy to base at first time. */
- ret = mlx5_os_read_dev_counters(dev, xstats_ctrl->base);
+ ret = mlx5_os_read_dev_counters(dev, bond_master, xstats_ctrl->base);
if (ret)
DRV_LOG(ERR, "port %u cannot read device counters: %s",
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 6a3c48eaeb..cddb9435df 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -200,12 +200,20 @@ struct mlx5_xstats_ctrl {
/* Number of device stats. */
uint16_t stats_n;
+ /* Number of device stats, for the 2nd port in bond. */
+ uint16_t stats_n_2nd;
/* Number of device stats identified by PMD. */
- uint16_t mlx5_stats_n;
+ uint16_t mlx5_stats_n;
/* Index in the device counters table. */
uint16_t dev_table_idx[MLX5_MAX_XSTATS];
+ /* Index in the output table. */
+ uint16_t xstats_o_idx[MLX5_MAX_XSTATS];
uint64_t base[MLX5_MAX_XSTATS];
uint64_t xstats[MLX5_MAX_XSTATS];
uint64_t hw_stats[MLX5_MAX_XSTATS];
struct mlx5_counter_ctrl info[MLX5_MAX_XSTATS];
+ /* Index in the device counters table, for the 2nd port in bond. */
+ uint16_t dev_table_idx_2nd[MLX5_MAX_XSTATS];
+ /* Index in the output table, for the 2nd port in bond. */
+ uint16_t xstats_o_idx_2nd[MLX5_MAX_XSTATS];
};
@@ -1609,6 +1617,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
int mlx5_os_read_dev_stat(struct mlx5_priv *priv,
const char *ctr_name, uint64_t *stat);
-int mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats);
-int mlx5_os_get_stats_n(struct rte_eth_dev *dev);
+int mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *stats);
+int mlx5_os_get_stats_n(struct rte_eth_dev *dev, bool bond_master,
+ uint16_t *n_stats, uint16_t *n_stats_sec);
void mlx5_os_stats_init(struct rte_eth_dev *dev);
int mlx5_get_flag_dropless_rq(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 615e1d073d..f4ac58e2f9 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -40,22 +40,34 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
{
struct mlx5_priv *priv = dev->data->dev_private;
- unsigned int i;
- uint64_t counters[n];
+ uint64_t counters[MLX5_MAX_XSTATS];
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
+ unsigned int i;
+ uint16_t stats_n = 0;
+ uint16_t stats_n_2nd = 0;
uint16_t mlx5_stats_n = xstats_ctrl->mlx5_stats_n;
+ bool bond_master = (priv->master && priv->pf_bond >= 0);
if (n >= mlx5_stats_n && stats) {
- int stats_n;
int ret;
- stats_n = mlx5_os_get_stats_n(dev);
- if (stats_n < 0)
- return stats_n;
- if (xstats_ctrl->stats_n != stats_n)
+ ret = mlx5_os_get_stats_n(dev, bond_master, &stats_n, &stats_n_2nd);
+ if (ret < 0)
+ return ret;
+ /*
+ * The number of statistics fetched via "ETH_SS_STATS" may vary because
+ * of the port configuration each time. This is also true between 2
+ * ports. There might be a case that the numbers are the same even if
+ * configurations are different.
+ * It is not recommended to change the configuration without using
+ * RTE API. The port(traffic) restart may trigger another initialization
+ * to make sure the map are correct.
+ */
+ if (xstats_ctrl->stats_n != stats_n ||
+ (bond_master && xstats_ctrl->stats_n_2nd != stats_n_2nd))
mlx5_os_stats_init(dev);
- ret = mlx5_os_read_dev_counters(dev, counters);
- if (ret)
+ ret = mlx5_os_read_dev_counters(dev, bond_master, counters);
+ if (ret < 0)
return ret;
- for (i = 0; i != mlx5_stats_n; ++i) {
+ for (i = 0; i != mlx5_stats_n; i++) {
stats[i].id = i;
if (xstats_ctrl->info[i].dev) {
@@ -226,28 +238,30 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
- int stats_n;
unsigned int i;
uint64_t *counters;
int ret;
+ uint16_t stats_n = 0;
+ uint16_t stats_n_2nd = 0;
+ bool bond_master = (priv->master && priv->pf_bond >= 0);
- stats_n = mlx5_os_get_stats_n(dev);
- if (stats_n < 0) {
+ ret = mlx5_os_get_stats_n(dev, bond_master, &stats_n, &stats_n_2nd);
+ if (ret < 0) {
DRV_LOG(ERR, "port %u cannot get stats: %s", dev->data->port_id,
- strerror(-stats_n));
- return stats_n;
+ strerror(-ret));
+ return ret;
}
- if (xstats_ctrl->stats_n != stats_n)
+ if (xstats_ctrl->stats_n != stats_n ||
+ (bond_master && xstats_ctrl->stats_n_2nd != stats_n_2nd))
mlx5_os_stats_init(dev);
- counters = mlx5_malloc(MLX5_MEM_SYS, sizeof(*counters) *
- xstats_ctrl->mlx5_stats_n, 0,
- SOCKET_ID_ANY);
+ /* Considering to use stack directly. */
+ counters = mlx5_malloc(MLX5_MEM_SYS, sizeof(*counters) * xstats_ctrl->mlx5_stats_n,
+ 0, SOCKET_ID_ANY);
if (!counters) {
- DRV_LOG(WARNING, "port %u unable to allocate memory for xstats "
- "counters",
+ DRV_LOG(WARNING, "port %u unable to allocate memory for xstats counters",
dev->data->port_id);
rte_errno = ENOMEM;
return -rte_errno;
}
- ret = mlx5_os_read_dev_counters(dev, counters);
+ ret = mlx5_os_read_dev_counters(dev, bond_master, counters);
if (ret) {
DRV_LOG(ERR, "port %u cannot read device counters: %s",
diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
index 359f73df7c..847e052ba0 100644
--- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
@@ -178,18 +178,27 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
}
-/**
+/*
* Query the number of statistics provided by ETHTOOL.
*
* @param dev
* Pointer to Ethernet device.
+ * @param bond_master
+ * Indicate if the device is a bond master.
+ * @param n_stats
+ * Pointer to number of stats to store.
+ * @param n_stats_sec
+ * Pointer to number of stats to store for the 2nd port of the bond.
*
* @return
- * Number of statistics on success, negative errno value otherwise and
- * rte_errno is set.
+ * 0 on success, negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_os_get_stats_n(struct rte_eth_dev *dev)
+mlx5_os_get_stats_n(struct rte_eth_dev *dev, bool bond_master,
+ uint16_t *n_stats, uint16_t *n_stats_sec)
{
RTE_SET_USED(dev);
+ RTE_SET_USED(bond_master);
+ RTE_SET_USED(n_stats);
+ RTE_SET_USED(n_stats_sec);
return -ENOTSUP;
}
@@ -212,4 +221,6 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
* @param dev
* Pointer to Ethernet device.
+ * @param bond_master
+ * Indicate if the device is a bond master.
* @param[out] stats
* Counters table output buffer.
@@ -220,7 +231,8 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
*/
int
-mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *stats)
{
RTE_SET_USED(dev);
+ RTE_SET_USED(bond_master);
RTE_SET_USED(stats);
return -ENOTSUP;
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.829375193 +0000
+++ 0027-net-mlx5-fix-counters-map-in-bonding-mode.patch 2024-03-08 13:47:49.035686714 +0000
@@ -1 +1 @@
-From a687c3e658c2d889052089af8340bc0b9299c856 Mon Sep 17 00:00:00 2001
+From 2481136319023e18b333a20ff8ed797f64b4ca19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a687c3e658c2d889052089af8340bc0b9299c856 ]
+
@@ -50 +51,0 @@
-Cc: stable@dpdk.org
@@ -62 +63 @@
-index 92c47a3b3d..eb47c284ec 100644
+index dbfe00ea6d..5d73076cb3 100644
@@ -65 +66 @@
-@@ -1287,11 +1287,14 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1357,11 +1357,14 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -82 +83 @@
-@@ -1306,19 +1309,32 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1376,19 +1379,32 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -122 +123 @@
-@@ -1328,5 +1344,5 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1398,5 +1414,5 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -129 +130 @@
-@@ -1336,5 +1352,5 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+@@ -1406,5 +1422,5 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
@@ -136 +137 @@
-@@ -1348,11 +1364,15 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+@@ -1418,11 +1434,15 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
@@ -155 +156 @@
-@@ -1362,16 +1382,22 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+@@ -1432,16 +1452,22 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
@@ -182 +183 @@
-@@ -1382,16 +1408,32 @@ mlx5_os_get_stats_n(struct rte_eth_dev *dev)
+@@ -1452,16 +1478,32 @@ mlx5_os_get_stats_n(struct rte_eth_dev *dev)
@@ -223 +224 @@
-@@ -1616,4 +1658,99 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -1585,4 +1627,99 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -323 +324 @@
-@@ -1628,15 +1765,15 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
+@@ -1597,15 +1734,15 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
@@ -344 +345 @@
-@@ -1644,7 +1781,7 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
+@@ -1613,7 +1750,7 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
@@ -354 +355 @@
-@@ -1652,50 +1789,18 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
+@@ -1621,50 +1758,18 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
@@ -396 +396,0 @@
-- MLX5_ASSERT(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
@@ -404,0 +405 @@
+- MLX5_ASSERT(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
@@ -413 +414 @@
-index f11a0181b8..fb3df76cac 100644
+index 6a3c48eaeb..cddb9435df 100644
@@ -416 +417 @@
-@@ -264,12 +264,20 @@ struct mlx5_xstats_ctrl {
+@@ -200,12 +200,20 @@ struct mlx5_xstats_ctrl {
@@ -438 +439 @@
-@@ -2183,6 +2191,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -1609,6 +1617,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
@@ -541 +542 @@
-index a31e1b5494..49f750be68 100644
+index 359f73df7c..847e052ba0 100644
@@ -544 +545 @@
-@@ -179,18 +179,27 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -178,18 +178,27 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -576 +577 @@
-@@ -222,4 +231,6 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
+@@ -212,4 +221,6 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
@@ -583 +584 @@
-@@ -230,7 +241,8 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
+@@ -220,7 +231,8 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'test: fix probing in secondary process' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (25 preceding siblings ...)
2024-03-08 14:28 ` patch 'net/mlx5: fix counters map in bonding mode' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'bus/vdev: fix devargs " Kevin Traynor
` (5 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Mingjin Ye; +Cc: Zhimin Huang, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bf8fb07ca7dbfc397e1dbc18f51b9e4966119028
Thanks.
Kevin
---
From bf8fb07ca7dbfc397e1dbc18f51b9e4966119028 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 14 Nov 2023 10:28:15 +0000
Subject: [PATCH] test: fix probing in secondary process
[ upstream commit b3ce7891ad386310abab56352053a46ba06ca72f ]
In EAL related test cases, the allow parameters are not passed to
the secondary process, resulting in unexpected NICs being loaded.
This patch fixes this issue by appending the allow parameters to
the secondary process.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/process.h | 46 ++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 42 insertions(+), 4 deletions(-)
diff --git a/app/test/process.h b/app/test/process.h
index 622cb0b218..8bb9eeec12 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -16,4 +16,5 @@
#include <rte_string_fns.h> /* strlcpy */
+#include <rte_devargs.h>
#ifdef RTE_EXEC_ENV_FREEBSD
@@ -33,4 +34,32 @@ extern uint16_t flag_for_send_pkts;
#endif
+#define PREFIX_ALLOW "--allow="
+
+static int
+add_parameter_allow(char **argv, int max_capacity)
+{
+ struct rte_devargs *devargs;
+ int count = 0;
+
+ RTE_EAL_DEVARGS_FOREACH(NULL, devargs) {
+ if (strlen(devargs->name) == 0)
+ continue;
+
+ if (devargs->data == NULL || strlen(devargs->data) == 0) {
+ if (asprintf(&argv[count], PREFIX_ALLOW"%s", devargs->name) < 0)
+ break;
+ } else {
+ if (asprintf(&argv[count], PREFIX_ALLOW"%s,%s",
+ devargs->name, devargs->data) < 0)
+ break;
+ }
+
+ if (++count == max_capacity)
+ break;
+ }
+
+ return count;
+}
+
/*
* launches a second copy of the test process using the given argv parameters,
@@ -42,6 +71,8 @@ static inline int
process_dup(const char *const argv[], int numargs, const char *env_value)
{
- int num;
- char *argv_cpy[numargs + 1];
+ int num = 0;
+ char **argv_cpy;
+ int allow_num;
+ int argv_num;
int i, status;
char path[32];
@@ -57,4 +88,10 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
return -1;
else if (pid == 0) {
+ allow_num = rte_devargs_type_count(RTE_DEVTYPE_ALLOWED);
+ argv_num = numargs + allow_num + 1;
+ argv_cpy = calloc(argv_num, sizeof(char *));
+ if (!argv_cpy)
+ rte_panic("Memory allocation failed\n");
+
/* make a copy of the arguments to be passed to exec */
for (i = 0; i < numargs; i++) {
@@ -63,6 +100,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
rte_panic("Error dup args\n");
}
- argv_cpy[i] = NULL;
- num = numargs;
+ if (allow_num > 0)
+ num = add_parameter_allow(&argv_cpy[i], allow_num);
+ num += numargs;
#ifdef RTE_EXEC_ENV_LINUX
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.857884490 +0000
+++ 0028-test-fix-probing-in-secondary-process.patch 2024-03-08 13:47:49.036686717 +0000
@@ -1 +1 @@
-From b3ce7891ad386310abab56352053a46ba06ca72f Mon Sep 17 00:00:00 2001
+From bf8fb07ca7dbfc397e1dbc18f51b9e4966119028 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3ce7891ad386310abab56352053a46ba06ca72f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c576c42349..9fb2bf481c 100644
+index 622cb0b218..8bb9eeec12 100644
@@ -26 +27 @@
-@@ -18,4 +18,5 @@
+@@ -16,4 +16,5 @@
@@ -32 +33 @@
-@@ -35,4 +36,32 @@ extern uint16_t flag_for_send_pkts;
+@@ -33,4 +34,32 @@ extern uint16_t flag_for_send_pkts;
@@ -65 +66 @@
-@@ -44,6 +73,8 @@ static inline int
+@@ -42,6 +71,8 @@ static inline int
@@ -76 +77 @@
-@@ -59,4 +90,10 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
+@@ -57,4 +88,10 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
@@ -87 +88 @@
-@@ -65,6 +102,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
+@@ -63,6 +100,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'bus/vdev: fix devargs in secondary process' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (26 preceding siblings ...)
2024-03-08 14:28 ` patch 'test: fix probing in secondary process' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'config: fix CPU instruction set for cross-build' " Kevin Traynor
` (4 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Mingjin Ye; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f49c39dd0114d18f0b69169726cf1883598ea9f1
Thanks.
Kevin
---
From f49c39dd0114d18f0b69169726cf1883598ea9f1 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Fri, 1 Sep 2023 07:24:09 +0000
Subject: [PATCH] bus/vdev: fix devargs in secondary process
[ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ]
When a device is created by a secondary process, an empty devargs is
temporarily generated and bound to it. This causes the device to not
be associated with the correct devargs, and the empty devargs are not
released when the resource is freed.
This patch fixes the issue by matching the devargs when inserting a
device in secondary process.
Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")
Fixes: a16040453968 ("eal: extract vdev infra")
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/bus/vdev/vdev.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 272ea704e5..c9f07af493 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -266,4 +266,20 @@ alloc_devargs(const char *name, const char *args)
}
+static struct rte_devargs *
+vdev_devargs_lookup(const char *name)
+{
+ struct rte_devargs *devargs;
+ char dev_name[32];
+
+ RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
+ devargs->bus->parse(devargs->name, &dev_name);
+ if (strcmp(dev_name, name) == 0) {
+ VDEV_LOG(INFO, "devargs matched %s", dev_name);
+ return devargs;
+ }
+ }
+ return NULL;
+}
+
static int
insert_vdev(const char *name, const char *args,
@@ -278,5 +294,9 @@ insert_vdev(const char *name, const char *args,
return -EINVAL;
- devargs = alloc_devargs(name, args);
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ devargs = alloc_devargs(name, args);
+ else
+ devargs = vdev_devargs_lookup(name);
+
if (!devargs)
return -ENOMEM;
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.882258672 +0000
+++ 0029-bus-vdev-fix-devargs-in-secondary-process.patch 2024-03-08 13:47:49.037686720 +0000
@@ -1 +1 @@
-From 6666628362c94a0b567a39a0177539c12c97d999 Mon Sep 17 00:00:00 2001
+From f49c39dd0114d18f0b69169726cf1883598ea9f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 05582f1727..14cf856237 100644
+index 272ea704e5..c9f07af493 100644
@@ -28 +29 @@
-@@ -264,4 +264,20 @@ alloc_devargs(const char *name, const char *args)
+@@ -266,4 +266,20 @@ alloc_devargs(const char *name, const char *args)
@@ -49 +50 @@
-@@ -276,5 +292,9 @@ insert_vdev(const char *name, const char *args,
+@@ -278,5 +294,9 @@ insert_vdev(const char *name, const char *args,
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'config: fix CPU instruction set for cross-build' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (27 preceding siblings ...)
2024-03-08 14:28 ` patch 'bus/vdev: fix devargs " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'test/mbuf: fix external mbuf case with assert enabled' " Kevin Traynor
` (3 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Joyce Kong; +Cc: Ruifeng Wang, Stephen Hemminger, Pavan Nikhilesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6640c76706902be41edb6e85ac169adab459a4bf
Thanks.
Kevin
---
From 6640c76706902be41edb6e85ac169adab459a4bf Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Tue, 5 Dec 2023 03:52:58 +0000
Subject: [PATCH] config: fix CPU instruction set for cross-build
[ upstream commit d74543f8ad30db164c08ec69910b05d6811b1b89 ]
The platform value would be 'native' only when not cross build.
Move the operation about modifying cpu_instruction_set while
platform equals 'native' to the not cross build branch.
Fixes: bf66003b51ec ("build: use platform for generic and native builds")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
config/meson.build | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index 63a4eb9f7e..e4b19db323 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -92,11 +92,12 @@ else
endif
endif
+ if platform == 'native'
+ if cpu_instruction_set == 'auto'
+ cpu_instruction_set = 'native'
+ endif
+ endif
endif
-if platform == 'native'
- if cpu_instruction_set == 'auto'
- cpu_instruction_set = 'native'
- endif
-elif platform == 'generic'
+if platform == 'generic'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'generic'
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.906352433 +0000
+++ 0030-config-fix-CPU-instruction-set-for-cross-build.patch 2024-03-08 13:47:49.037686720 +0000
@@ -1 +1 @@
-From d74543f8ad30db164c08ec69910b05d6811b1b89 Mon Sep 17 00:00:00 2001
+From 6640c76706902be41edb6e85ac169adab459a4bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d74543f8ad30db164c08ec69910b05d6811b1b89 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8cb6429313..bbb931a457 100644
+index 63a4eb9f7e..e4b19db323 100644
@@ -25 +26 @@
-@@ -129,11 +129,12 @@ else
+@@ -92,11 +92,12 @@ else
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'test/mbuf: fix external mbuf case with assert enabled' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (28 preceding siblings ...)
2024-03-08 14:28 ` patch 'config: fix CPU instruction set for cross-build' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'test: do not count skipped tests as executed' " Kevin Traynor
` (2 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Rakesh Kudurumalla; +Cc: Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3096a562357afd37be3cb1ef87018be41f5ed68b
Thanks.
Kevin
---
From 3096a562357afd37be3cb1ef87018be41f5ed68b Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Thu, 23 Nov 2023 12:12:21 +0530
Subject: [PATCH] test/mbuf: fix external mbuf case with assert enabled
[ upstream commit 6dbaa4ee67135ac6ff8ef35fa98a93e0f08af494 ]
when RTE_ENABLE_ASSERT is defined test_mbuf application is
failing because we are trying to attach extbuf to a cloned
buffer to which external mbuf is already attached.
To make test_mbuf pass CI we have updated ol_flags.
This patch fixes the same.
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
app/test/test_mbuf.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 9c0ac63f92..35c0989add 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2348,5 +2348,5 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
__func__);
- /* allocate one more mbuf */
+ /* allocate one more mbuf, it is attached to the same external buffer */
clone = rte_pktmbuf_clone(m, pktmbuf_pool);
if (clone == NULL)
@@ -2355,7 +2355,4 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
GOTO_FAIL("%s: Bad packet length\n", __func__);
- /* attach the same external buffer to the cloned mbuf */
- rte_pktmbuf_attach_extbuf(clone, ext_buf_addr, buf_iova, buf_len,
- ret_shinfo);
if (clone->ol_flags != RTE_MBUF_F_EXTERNAL)
GOTO_FAIL("%s: External buffer is not attached to mbuf\n",
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.930978315 +0000
+++ 0031-test-mbuf-fix-external-mbuf-case-with-assert-enabled.patch 2024-03-08 13:47:49.039686726 +0000
@@ -1 +1 @@
-From 6dbaa4ee67135ac6ff8ef35fa98a93e0f08af494 Mon Sep 17 00:00:00 2001
+From 3096a562357afd37be3cb1ef87018be41f5ed68b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6dbaa4ee67135ac6ff8ef35fa98a93e0f08af494 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 51ea6ef1c4..17be977f31 100644
+index 9c0ac63f92..35c0989add 100644
@@ -25 +26 @@
-@@ -2347,5 +2347,5 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
+@@ -2348,5 +2348,5 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
@@ -32 +33 @@
-@@ -2354,7 +2354,4 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
+@@ -2355,7 +2355,4 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'test: do not count skipped tests as executed' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (29 preceding siblings ...)
2024-03-08 14:28 ` patch 'test/mbuf: fix external mbuf case with assert enabled' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'examples/packet_ordering: fix Rx with reorder mode disabled' " Kevin Traynor
2024-03-08 14:28 ` patch 'examples/l3fwd: fix Rx over not ready port' " Kevin Traynor
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Akhil Goyal, Ciara Power, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3304b1f97b9a9d7b80b52692653aeda7e6e8a1f6
Thanks.
Kevin
---
From 3304b1f97b9a9d7b80b52692653aeda7e6e8a1f6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Nov 2023 15:05:33 +0000
Subject: [PATCH] test: do not count skipped tests as executed
[ upstream commit a620df6df6d61660661afade09760b2dfba4eb42 ]
The logic around skipped tests is a little confusing in the unit test
runner.
* Any explicitly disabled tests are counted as skipped but not
executed.
* Any tests that return TEST_SKIPPED are counted as both skipped and
executed, using the same statistics counters.
This makes the stats very strange and hard to correlate, since the
totals don't add up. One would expect that SKIPPED + EXECUTED +
UNSUPPORTED == TOTAL, and that PASSED + FAILED == EXECUTED.
To achieve this, mark any tests returning TEST_SKIPPED, or ENOTSUP as
not having executed.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
app/test/test.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/test/test.c b/app/test/test.c
index 5194131026..f7375cfe88 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -351,9 +351,11 @@ unit_test_suite_runner(struct unit_test_suite *suite)
if (test_success == TEST_SUCCESS)
suite->succeeded++;
- else if (test_success == TEST_SKIPPED)
+ else if (test_success == TEST_SKIPPED) {
suite->skipped++;
- else if (test_success == -ENOTSUP)
+ suite->executed--;
+ } else if (test_success == -ENOTSUP) {
suite->unsupported++;
- else
+ suite->executed--;
+ } else
suite->failed++;
} else if (test_success == -ENOTSUP) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.955897864 +0000
+++ 0032-test-do-not-count-skipped-tests-as-executed.patch 2024-03-08 13:47:49.040686729 +0000
@@ -1 +1 @@
-From a620df6df6d61660661afade09760b2dfba4eb42 Mon Sep 17 00:00:00 2001
+From 3304b1f97b9a9d7b80b52692653aeda7e6e8a1f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a620df6df6d61660661afade09760b2dfba4eb42 ]
+
@@ -20,2 +21,0 @@
-Cc: stable@dpdk.org
-
@@ -31 +31 @@
-index 8b25615913..680351f6a3 100644
+index 5194131026..f7375cfe88 100644
@@ -34 +34 @@
-@@ -370,9 +370,11 @@ unit_test_suite_runner(struct unit_test_suite *suite)
+@@ -351,9 +351,11 @@ unit_test_suite_runner(struct unit_test_suite *suite)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'examples/packet_ordering: fix Rx with reorder mode disabled' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (30 preceding siblings ...)
2024-03-08 14:28 ` patch 'test: do not count skipped tests as executed' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
2024-03-08 14:28 ` patch 'examples/l3fwd: fix Rx over not ready port' " Kevin Traynor
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Qian Hao; +Cc: Volodymyr Fialko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/dabf41766557e4879080529d179758df2433938a
Thanks.
Kevin
---
From dabf41766557e4879080529d179758df2433938a Mon Sep 17 00:00:00 2001
From: Qian Hao <qi_an_hao@126.com>
Date: Wed, 13 Dec 2023 19:07:18 +0800
Subject: [PATCH] examples/packet_ordering: fix Rx with reorder mode disabled
[ upstream commit 7ba49dc729937ea97642a615e9b08f33919b94f4 ]
The packet_ordering example works in two modes (opt via --disable-reorder):
- When reorder is enabled: rx_thread - N*worker_thread - send_thread
- When reorder is disabled: rx_thread - N*worker_thread - tx_thread
N parallel worker_thread(s) generate out-of-order packets.
When reorder is enabled, send_thread uses sequence number generated in
rx_thread (L459) to enforce packet ordering. Otherwise rx_thread just
sends any packet it receives.
rx_thread writes sequence number into a dynamic field, which is only
registered by calling rte_reorder_create() (Line 741) when reorder is
enabled. However, rx_thread marks sequence number onto each packet no
matter whether reorder is enabled, overwriting the leading bytes in packet
mbufs when reorder is disabled, resulting in segfaults when PMD tries to
DMA packets.
`if (!disable_reorder_flag) {...}` is added in rx_thread to fix the bug.
The test is inlined by the compiler to prevent any performance loss.
Signed-off-by: Qian Hao <qi_an_hao@126.com>
Acked-by: Volodymyr Fialko <vfialko@marvell.com>
---
.mailmap | 1 +
examples/packet_ordering/main.c | 32 +++++++++++++++++++++++++-------
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/.mailmap b/.mailmap
index 7776e85d57..2e60e2b813 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1089,4 +1089,5 @@ Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Pu Xu <583493798@qq.com>
+Qian Hao <qi_an_hao@126.com>
Qian Xu <qian.q.xu@intel.com>
Qiao Liu <qiao.liu@intel.com>
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 99e67ef67b..f16afe8986 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -5,4 +5,5 @@
#include <signal.h>
#include <getopt.h>
+#include <stdbool.h>
#include <rte_eal.h>
@@ -427,6 +428,6 @@ int_handler(int sig_num)
* ring.
*/
-static int
-rx_thread(struct rte_ring *ring_out)
+static __rte_always_inline int
+rx_thread(struct rte_ring *ring_out, bool disable_reorder_flag)
{
uint32_t seqn = 0;
@@ -454,7 +455,9 @@ rx_thread(struct rte_ring *ring_out)
app_stats.rx.rx_pkts += nb_rx_pkts;
- /* mark sequence number */
- for (i = 0; i < nb_rx_pkts; )
- *rte_reorder_seqn(pkts[i++]) = seqn++;
+ /* mark sequence number if reorder is enabled */
+ if (!disable_reorder_flag) {
+ for (i = 0; i < nb_rx_pkts;)
+ *rte_reorder_seqn(pkts[i++]) = seqn++;
+ }
/* enqueue to rx_to_workers ring */
@@ -473,4 +476,16 @@ rx_thread(struct rte_ring *ring_out)
}
+static __rte_noinline int
+rx_thread_reorder(struct rte_ring *ring_out)
+{
+ return rx_thread(ring_out, false);
+}
+
+static __rte_noinline int
+rx_thread_reorder_disabled(struct rte_ring *ring_out)
+{
+ return rx_thread(ring_out, true);
+}
+
/**
* This thread takes bursts of packets from the rx_to_workers ring and
@@ -772,6 +787,9 @@ main(int argc, char **argv)
}
- /* Start rx_thread() on the main core */
- rx_thread(rx_to_workers);
+ /* Start rx_thread_xxx() on the main core */
+ if (disable_reorder)
+ rx_thread_reorder_disabled(rx_to_workers);
+ else
+ rx_thread_reorder(rx_to_workers);
RTE_LCORE_FOREACH_WORKER(lcore_id) {
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:49.978872229 +0000
+++ 0033-examples-packet_ordering-fix-Rx-with-reorder-mode-di.patch 2024-03-08 13:47:49.042686735 +0000
@@ -1 +1 @@
-From 7ba49dc729937ea97642a615e9b08f33919b94f4 Mon Sep 17 00:00:00 2001
+From dabf41766557e4879080529d179758df2433938a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ba49dc729937ea97642a615e9b08f33919b94f4 ]
+
@@ -25,2 +26,0 @@
-Cc: stable@dpdk.org
-
@@ -35 +35 @@
-index 1b346f630f..55913d0450 100644
+index 7776e85d57..2e60e2b813 100644
@@ -38 +38 @@
-@@ -1143,4 +1143,5 @@ Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
+@@ -1089,4 +1089,5 @@ Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
@@ -45 +45 @@
-index d2fd6f77e4..f839db9102 100644
+index 99e67ef67b..f16afe8986 100644
@@ -48 +48 @@
-@@ -6,4 +6,5 @@
+@@ -5,4 +5,5 @@
@@ -54 +54 @@
-@@ -428,6 +429,6 @@ int_handler(int sig_num)
+@@ -427,6 +428,6 @@ int_handler(int sig_num)
@@ -63 +63 @@
-@@ -455,7 +456,9 @@ rx_thread(struct rte_ring *ring_out)
+@@ -454,7 +455,9 @@ rx_thread(struct rte_ring *ring_out)
@@ -76 +76 @@
-@@ -474,4 +477,16 @@ rx_thread(struct rte_ring *ring_out)
+@@ -473,4 +476,16 @@ rx_thread(struct rte_ring *ring_out)
@@ -93 +93 @@
-@@ -773,6 +788,9 @@ main(int argc, char **argv)
+@@ -772,6 +787,9 @@ main(int argc, char **argv)
^ permalink raw reply [flat|nested] 34+ messages in thread
* patch 'examples/l3fwd: fix Rx over not ready port' has been queued to stable release 21.11.7
2024-03-08 14:27 patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 21.11.7 Kevin Traynor
` (31 preceding siblings ...)
2024-03-08 14:28 ` patch 'examples/packet_ordering: fix Rx with reorder mode disabled' " Kevin Traynor
@ 2024-03-08 14:28 ` Kevin Traynor
32 siblings, 0 replies; 34+ messages in thread
From: Kevin Traynor @ 2024-03-08 14:28 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: Konstantin Ananyev, Pavan Nikhilesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/13/24. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1e1f6d551be99b66b7d2e0a937a6e8a7aa8f1f1d
Thanks.
Kevin
---
From 1e1f6d551be99b66b7d2e0a937a6e8a7aa8f1f1d Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Fri, 1 Mar 2024 16:39:31 +0000
Subject: [PATCH] examples/l3fwd: fix Rx over not ready port
[ upstream commit 495709d32be87cb962c55917b19ad7d4489cde3e ]
Running l3fwd in event mode with SW eventdev, service cores
can start RX before main thread is finished with PMD installation.
to reproduce:
./dpdk-l3fwd --lcores=49,51 -n 6 -a ca:00.0 -s 0x8000000000000 \
--vdev event_sw0 -- \
-L -P -p 1 --mode eventdev --eventq-sched=ordered \
--rule_ipv4=test/l3fwd_lpm_v4_u1.cfg --rule_ipv6=test/l3fwd_lpm_v6_u1.cfg \
--no-numa
At init stage user will most likely see the error message like that:
ETHDEV: lcore 51 called rx_pkt_burst for not ready port 0
0: ./dpdk-l3fwd (rte_dump_stack+0x1f) [15de723]
...
9: ./dpdk-l3fwd (eal_thread_loop+0x5a2) [15c1324]
...
And then all depends how luck/unlucky you are.
If there are some actual packet in HW RX queue, then the app will most
likely crash, otherwise it might survive.
As error message suggests, the problem is that services are started
before main thread finished with NIC setup and initialization.
The suggested fix moves services startup after NIC setup phase.
Bugzilla ID: 1390
Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on caps")
Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
examples/l3fwd/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 59436bb589..32cc45647e 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1460,5 +1460,4 @@ main(int argc, char **argv)
else
l3fwd_lkp.main_loop = evt_rsrc->ops.lpm_event_loop;
- l3fwd_event_service_setup();
} else
l3fwd_poll_resource_setup();
@@ -1491,4 +1490,9 @@ main(int argc, char **argv)
}
+#ifdef RTE_LIB_EVENTDEV
+ if (evt_rsrc->enabled)
+ l3fwd_event_service_setup();
+#endif
+
printf("\n");
--
2.43.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-08 13:47:50.001070998 +0000
+++ 0034-examples-l3fwd-fix-Rx-over-not-ready-port.patch 2024-03-08 13:47:49.043686738 +0000
@@ -1 +1 @@
-From 495709d32be87cb962c55917b19ad7d4489cde3e Mon Sep 17 00:00:00 2001
+From 1e1f6d551be99b66b7d2e0a937a6e8a7aa8f1f1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 495709d32be87cb962c55917b19ad7d4489cde3e ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -41 +42 @@
-index 3bf28aec0c..d4fb5d1971 100644
+index 59436bb589..32cc45647e 100644
@@ -44 +45 @@
-@@ -1578,5 +1578,4 @@ main(int argc, char **argv)
+@@ -1460,5 +1460,4 @@ main(int argc, char **argv)
@@ -49,2 +50,2 @@
- #endif
-@@ -1610,4 +1609,9 @@ main(int argc, char **argv)
+ l3fwd_poll_resource_setup();
+@@ -1491,4 +1490,9 @@ main(int argc, char **argv)
^ permalink raw reply [flat|nested] 34+ messages in thread