* patch 'eal/x86: fix 32-bit write combining store' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'examples/eventdev: fix queue crash with generic pipeline' " luca.boccassi
` (76 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Radu Nicolau, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fdda4a8d41b8c0636498a37d82dd41c4d822cded
Thanks.
Luca Boccassi
---
From fdda4a8d41b8c0636498a37d82dd41c4d822cded Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 14:27:57 +0100
Subject: [PATCH] eal/x86: fix 32-bit write combining store
[ upstream commit 41b09d64e35b877e8f29c4e5a8cf944e303695dd ]
The "movdiri" instruction is given as a series of bytes in rte_io.h so
that it works on compilers/assemblers which are unaware of the
instruction.
The REX prefix (0x40) on this instruction is invalid for 32-bit code,
causing issues.
Thankfully, the prefix is unnecessary in 64-bit code, since the data size
used is 32-bits.
Fixes: 8a00dfc738fe ("eal: add write combining store")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/eal/x86/include/rte_io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/x86/include/rte_io.h b/lib/eal/x86/include/rte_io.h
index 0e1fefdee1..5366e09c47 100644
--- a/lib/eal/x86/include/rte_io.h
+++ b/lib/eal/x86/include/rte_io.h
@@ -24,7 +24,7 @@ __rte_x86_movdiri(uint32_t value, volatile void *addr)
{
asm volatile(
/* MOVDIRI */
- ".byte 0x40, 0x0f, 0x38, 0xf9, 0x02"
+ ".byte 0x0f, 0x38, 0xf9, 0x02"
:
: "a" (value), "d" (addr));
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.640485572 +0100
+++ 0002-eal-x86-fix-32-bit-write-combining-store.patch 2024-10-23 22:16:40.427939940 +0100
@@ -1 +1 @@
-From 41b09d64e35b877e8f29c4e5a8cf944e303695dd Mon Sep 17 00:00:00 2001
+From fdda4a8d41b8c0636498a37d82dd41c4d822cded Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 41b09d64e35b877e8f29c4e5a8cf944e303695dd ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'examples/eventdev: fix queue crash with generic pipeline' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'crypto/dpaa2_sec: fix memory leak' " luca.boccassi
` (75 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Chenxingyu Wang, Pavan Nikhilesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/44c20cfd7a3bd8e2a93ef7c772cd7afdda5433bd
Thanks.
Luca Boccassi
---
From 44c20cfd7a3bd8e2a93ef7c772cd7afdda5433bd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 18 Sep 2024 06:41:42 +0000
Subject: [PATCH] examples/eventdev: fix queue crash with generic pipeline
[ upstream commit f6f2307931c90d924405ea44b0b4be9d3d01bd17 ]
There was a segmentation fault when executing eventdev_pipeline with
command [1] with ConnectX-5 NIC card:
0x000000000079208c in rte_eth_tx_buffer (tx_pkt=0x16f8ed300, buffer=0x100,
queue_id=11, port_id=0) at
../lib/ethdev/rte_ethdev.h:6636
txa_service_tx (txa=0x17b19d080, ev=0xffffffffe500, n=4) at
../lib/eventdev/rte_event_eth_tx_adapter.c:631
0x0000000000792234 in txa_service_func (args=0x17b19d080) at
../lib/eventdev/rte_event_eth_tx_adapter.c:666
0x00000000008b0784 in service_runner_do_callback (s=0x17fffe100,
cs=0x17ffb5f80, service_idx=2) at
../lib/eal/common/rte_service.c:405
0x00000000008b0ad8 in service_run (i=2, cs=0x17ffb5f80,
service_mask=18446744073709551615, s=0x17fffe100,
serialize_mt_unsafe=0) at
../lib/eal/common/rte_service.c:441
0x00000000008b0c68 in rte_service_run_iter_on_app_lcore (id=2,
serialize_mt_unsafe=0) at
../lib/eal/common/rte_service.c:477
0x000000000057bcc4 in schedule_devices (lcore_id=0) at
../examples/eventdev_pipeline/pipeline_common.h:138
0x000000000057ca94 in worker_generic_burst (arg=0x17b131e80) at
../examples/eventdev_pipeline/
pipeline_worker_generic.c:83
0x00000000005794a8 in main (argc=11, argv=0xfffffffff470) at
../examples/eventdev_pipeline/main.c:449
The root cause is that the queue_id (11) is invalid, the queue_id comes
from mbuf.hash.txadapter.txq which may pre-write by NIC driver when
receiving packets (e.g. pre-write mbuf.hash.fdir.hi field).
Because this example only enabled one ethdev queue, so fixes it by reset
txq to zero in the first worker stage.
[1] dpdk-eventdev_pipeline -l 0-48 --vdev event_sw0 -- -r1 -t1 -e1 -w ff0
-s5 -n0 -c32 -W1000 -D
When launch eventdev_pipeline with command [1], event_sw
Fixes: 81fb40f95c82 ("examples/eventdev: add generic worker pipeline")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Chenxingyu Wang <wangchenxingyu@huawei.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
.mailmap | 1 +
examples/eventdev_pipeline/pipeline_worker_generic.c | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/.mailmap b/.mailmap
index b0d505e36d..0a91d70e4c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -217,6 +217,7 @@ Cheng Peng <cheng.peng5@zte.com.cn>
Chengwen Feng <fengchengwen@huawei.com>
Chenmin Sun <chenmin.sun@intel.com>
Chenming Chang <ccm@ccm.ink>
+Chenxingyu Wang <wangchenxingyu@huawei.com>
Chenxu Di <chenxux.di@intel.com>
Cheryl Houser <chouser@vmware.com>
Chinh T Cao <chinh.t.cao@intel.com>
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 783f68c91e..831d7fd53d 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -38,10 +38,12 @@ worker_generic(void *arg)
}
received++;
- /* The first worker stage does classification */
- if (ev.queue_id == cdata.qid[0])
+ /* The first worker stage does classification and sets txq. */
+ if (ev.queue_id == cdata.qid[0]) {
ev.flow_id = ev.mbuf->hash.rss
% cdata.num_fids;
+ rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);
+ }
ev.queue_id = cdata.next_qid[ev.queue_id];
ev.op = RTE_EVENT_OP_FORWARD;
@@ -96,10 +98,12 @@ worker_generic_burst(void *arg)
for (i = 0; i < nb_rx; i++) {
- /* The first worker stage does classification */
- if (events[i].queue_id == cdata.qid[0])
+ /* The first worker stage does classification and sets txq. */
+ if (events[i].queue_id == cdata.qid[0]) {
events[i].flow_id = events[i].mbuf->hash.rss
% cdata.num_fids;
+ rte_event_eth_tx_adapter_txq_set(events[i].mbuf, 0);
+ }
events[i].queue_id = cdata.next_qid[events[i].queue_id];
events[i].op = RTE_EVENT_OP_FORWARD;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.676359588 +0100
+++ 0003-examples-eventdev-fix-queue-crash-with-generic-pipel.patch 2024-10-23 22:16:40.431940095 +0100
@@ -1 +1 @@
-From f6f2307931c90d924405ea44b0b4be9d3d01bd17 Mon Sep 17 00:00:00 2001
+From 44c20cfd7a3bd8e2a93ef7c772cd7afdda5433bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6f2307931c90d924405ea44b0b4be9d3d01bd17 ]
+
@@ -46 +47,0 @@
-Cc: stable@dpdk.org
@@ -57 +58 @@
-index 94fa73aa36..8a832ba4be 100644
+index b0d505e36d..0a91d70e4c 100644
@@ -60 +61 @@
-@@ -236,6 +236,7 @@ Cheng Peng <cheng.peng5@zte.com.cn>
+@@ -217,6 +217,7 @@ Cheng Peng <cheng.peng5@zte.com.cn>
@@ -66 +66,0 @@
- Chenyu Huang <chenyux.huang@intel.com>
@@ -67,0 +68 @@
+ Chinh T Cao <chinh.t.cao@intel.com>
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'crypto/dpaa2_sec: fix memory leak' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/eventdev: fix queue crash with generic pipeline' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' " luca.boccassi
` (74 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3ae58cc9a3bec71daf039a8e0db505edc5d327cd
Thanks.
Luca Boccassi
---
From 3ae58cc9a3bec71daf039a8e0db505edc5d327cd Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Tue, 6 Aug 2024 15:57:26 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix memory leak
[ upstream commit 9c0abd27c3fe7a8b842d6fc254ac1241f4ba8b65 ]
fixing memory leak while creating the PDCP session
with invalid data.
Fixes: bef594ec5cc8 ("crypto/dpaa2_sec: support PDCP offload")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index eab7091251..a8c99bc4af 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3444,6 +3444,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
}
} else {
DPAA2_SEC_ERR("Invalid crypto type");
+ rte_free(priv);
return -EINVAL;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.710814823 +0100
+++ 0004-crypto-dpaa2_sec-fix-memory-leak.patch 2024-10-23 22:16:40.431940095 +0100
@@ -1 +1 @@
-From 9c0abd27c3fe7a8b842d6fc254ac1241f4ba8b65 Mon Sep 17 00:00:00 2001
+From 3ae58cc9a3bec71daf039a8e0db505edc5d327cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c0abd27c3fe7a8b842d6fc254ac1241f4ba8b65 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2cdf9308f8..e4109e8f0a 100644
+index eab7091251..a8c99bc4af 100644
@@ -21 +22 @@
-@@ -3422,6 +3422,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -3444,6 +3444,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (2 preceding siblings ...)
2024-10-23 21:15 ` patch 'crypto/dpaa2_sec: fix memory leak' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'dev: fix callback lookup when unregistering device' " luca.boccassi
` (73 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Varun Sethi; +Cc: Gagandeep Singh, Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09002419181d5dd1eea71e04de674c7c76fff910
Thanks.
Luca Boccassi
---
From 09002419181d5dd1eea71e04de674c7c76fff910 Mon Sep 17 00:00:00 2001
From: Varun Sethi <v.sethi@nxp.com>
Date: Tue, 6 Aug 2024 15:57:27 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog
[ upstream commit 2369bc1343fa5aac2890b2a3e12d65a2f1a2fd31 ]
Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.
Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Varun Sethi <v.sethi@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 070cad0147..328b307ae9 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1220,6 +1220,11 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,
SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
CLRW_CLR_C1CTX |
@@ -1921,6 +1926,11 @@ pdcp_insert_cplane_zuc_aes_op(struct program *p,
MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
CLRW_CLR_C1CTX |
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.748840317 +0100
+++ 0005-common-dpaax-caamflib-fix-PDCP-SNOW-ZUC-watchdog.patch 2024-10-23 22:16:40.435940252 +0100
@@ -1 +1 @@
-From 2369bc1343fa5aac2890b2a3e12d65a2f1a2fd31 Mon Sep 17 00:00:00 2001
+From 09002419181d5dd1eea71e04de674c7c76fff910 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2369bc1343fa5aac2890b2a3e12d65a2f1a2fd31 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bc35114cf4..9ada3905c5 100644
+index 070cad0147..328b307ae9 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'dev: fix callback lookup when unregistering device' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (3 preceding siblings ...)
2024-10-23 21:15 ` patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' " luca.boccassi
` (72 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Malcolm Bumgardner; +Cc: Long Li, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/66228c9ae76ca68940b1e9b4bb46bd587447c365
Thanks.
Luca Boccassi
---
From 66228c9ae76ca68940b1e9b4bb46bd587447c365 Mon Sep 17 00:00:00 2001
From: Malcolm Bumgardner <mbumgard@cisco.com>
Date: Thu, 18 Jul 2024 12:37:28 -0700
Subject: [PATCH] dev: fix callback lookup when unregistering device
[ upstream commit 66fd2cc2e47c69ee57f0fe32558e55b085c2e32d ]
In the device event unregister code, it unconditionally removes all
callbacks which are registered with device_name set to NULL.
This results in many callbacks incorrectly removed.
Fix this by only removing callbacks with matching cb_fn and cb_arg.
Fixes: a753e53d517b ("eal: add device event monitor framework")
Signed-off-by: Malcolm Bumgardner <mbumgard@cisco.com>
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
.mailmap | 1 +
lib/eal/common/eal_common_dev.c | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/.mailmap b/.mailmap
index 0a91d70e4c..80d6d50ba9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -823,6 +823,7 @@ Mahesh Adulla <mahesh.adulla@amd.com>
Mahipal Challa <mchalla@marvell.com>
Mah Yock Gen <yock.gen.mah@intel.com>
Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
+Malcolm Bumgardner <mbumgard@cisco.com>
Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
Mallesh Koujalagi <malleshx.koujalagi@intel.com>
Malvika Gupta <malvika.gupta@arm.com>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 614ef6c9fc..bc53b2e28d 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -550,16 +550,17 @@ rte_dev_event_callback_unregister(const char *device_name,
next = TAILQ_NEXT(event_cb, next);
if (device_name != NULL && event_cb->dev_name != NULL) {
- if (!strcmp(event_cb->dev_name, device_name)) {
- if (event_cb->cb_fn != cb_fn ||
- (cb_arg != (void *)-1 &&
- event_cb->cb_arg != cb_arg))
- continue;
- }
+ if (strcmp(event_cb->dev_name, device_name))
+ continue;
} else if (device_name != NULL) {
continue;
}
+ /* Remove only matching callback with arg */
+ if (event_cb->cb_fn != cb_fn ||
+ (cb_arg != (void *)-1 && event_cb->cb_arg != cb_arg))
+ continue;
+
/*
* if this callback is not executing right now,
* then remove it.
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.785278188 +0100
+++ 0006-dev-fix-callback-lookup-when-unregistering-device.patch 2024-10-23 22:16:40.435940252 +0100
@@ -1 +1 @@
-From 66fd2cc2e47c69ee57f0fe32558e55b085c2e32d Mon Sep 17 00:00:00 2001
+From 66228c9ae76ca68940b1e9b4bb46bd587447c365 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66fd2cc2e47c69ee57f0fe32558e55b085c2e32d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index a66da3c8cb..8004772125 100644
+index 0a91d70e4c..80d6d50ba9 100644
@@ -27,2 +28,2 @@
-@@ -886,6 +886,7 @@ Mahipal Challa <mchalla@marvell.com>
- Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
+@@ -823,6 +823,7 @@ Mahesh Adulla <mahesh.adulla@amd.com>
+ Mahipal Challa <mchalla@marvell.com>
@@ -36 +37 @@
-index a99252b02f..70aa04dcd9 100644
+index 614ef6c9fc..bc53b2e28d 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (4 preceding siblings ...)
2024-10-23 21:15 ` patch 'dev: fix callback lookup when unregistering device' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'bpf: fix free function mismatch if convert fails' " luca.boccassi
` (71 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Tejasree Kondoj; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4152dbbb8e267f67a90e5f49524ada3e4af34d6b
Thanks.
Luca Boccassi
---
From 4152dbbb8e267f67a90e5f49524ada3e4af34d6b Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Fri, 13 Sep 2024 12:37:26 +0530
Subject: [PATCH] examples/ipsec-secgw: fix dequeue count from cryptodev
[ upstream commit 88948ff31f57618a74c8985c59e332676995b438 ]
Setting dequeue packet count to max of MAX_PKT_BURST
size instead of MAX_PKTS.
Dequeue from cryptodev is called with MAX_PKTS but
routing functions allocate hop/dst_ip arrays of
size MAX_PKT_BURST. This can corrupt stack causing
stack smashing error when more than MAX_PKT_BURST
packets are returned from cryptodev.
Fixes: a2b445b810ac ("examples/ipsec-secgw: allow larger burst size for vectors")
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 6 ++++--
examples/ipsec-secgw/ipsec_process.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 9620d73fc8..849efbe755 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -626,12 +626,13 @@ drain_inbound_crypto_queues(const struct lcore_conf *qconf,
uint32_t n;
struct ipsec_traffic trf;
unsigned int lcoreid = rte_lcore_id();
+ const int nb_pkts = RTE_DIM(trf.ipsec.pkts);
if (app_sa_prm.enable == 0) {
/* dequeue packets from crypto-queue */
n = ipsec_inbound_cqp_dequeue(ctx, trf.ipsec.pkts,
- RTE_DIM(trf.ipsec.pkts));
+ RTE_MIN(MAX_PKT_BURST, nb_pkts));
trf.ip4.num = 0;
trf.ip6.num = 0;
@@ -663,12 +664,13 @@ drain_outbound_crypto_queues(const struct lcore_conf *qconf,
{
uint32_t n;
struct ipsec_traffic trf;
+ const int nb_pkts = RTE_DIM(trf.ipsec.pkts);
if (app_sa_prm.enable == 0) {
/* dequeue packets from crypto-queue */
n = ipsec_outbound_cqp_dequeue(ctx, trf.ipsec.pkts,
- RTE_DIM(trf.ipsec.pkts));
+ RTE_MIN(MAX_PKT_BURST, nb_pkts));
trf.ip4.num = 0;
trf.ip6.num = 0;
diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
index b0cece3ad1..1a64a4b49f 100644
--- a/examples/ipsec-secgw/ipsec_process.c
+++ b/examples/ipsec-secgw/ipsec_process.c
@@ -336,6 +336,7 @@ ipsec_cqp_process(struct ipsec_ctx *ctx, struct ipsec_traffic *trf)
struct rte_ipsec_session *ss;
struct traffic_type *out;
struct rte_ipsec_group *pg;
+ const int nb_cops = RTE_DIM(trf->ipsec.pkts);
struct rte_crypto_op *cop[RTE_DIM(trf->ipsec.pkts)];
struct rte_ipsec_group grp[RTE_DIM(trf->ipsec.pkts)];
@@ -345,7 +346,7 @@ ipsec_cqp_process(struct ipsec_ctx *ctx, struct ipsec_traffic *trf)
out = &trf->ipsec;
/* dequeue completed crypto-ops */
- n = ctx_dequeue(ctx, cop, RTE_DIM(cop));
+ n = ctx_dequeue(ctx, cop, RTE_MIN(MAX_PKT_BURST, nb_cops));
if (n == 0)
return;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.822219046 +0100
+++ 0007-examples-ipsec-secgw-fix-dequeue-count-from-cryptode.patch 2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From 88948ff31f57618a74c8985c59e332676995b438 Mon Sep 17 00:00:00 2001
+From 4152dbbb8e267f67a90e5f49524ada3e4af34d6b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 88948ff31f57618a74c8985c59e332676995b438 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index e98ad2572e..063cc8768e 100644
+index 9620d73fc8..849efbe755 100644
@@ -60 +61 @@
-index ddbe30745b..5080e810e0 100644
+index b0cece3ad1..1a64a4b49f 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'bpf: fix free function mismatch if convert fails' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (5 preceding siblings ...)
2024-10-23 21:15 ` patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'baseband/la12xx: fix use after free in modem config' " luca.boccassi
` (70 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b6364f54063f11b70060268e8fc96ea24e9606e9
Thanks.
Luca Boccassi
---
From b6364f54063f11b70060268e8fc96ea24e9606e9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:11 -0700
Subject: [PATCH] bpf: fix free function mismatch if convert fails
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit a3923d6bd5c0b9838d8f4678233093ffad036193 ]
If conversion of cBF to eBPF fails then an object allocated with
rte_malloc() would be passed to free().
[908/3201] Compiling C object lib/librte_bpf.a.p/bpf_bpf_convert.c.o
../lib/bpf/bpf_convert.c: In function ‘rte_bpf_convert’:
../lib/bpf/bpf_convert.c:559:17:
warning: ‘free’ called on pointer returned from a mismatched
allocation function [-Wmismatched-dealloc]
559 | free(prm);
| ^~~~~~~~~
../lib/bpf/bpf_convert.c:545:15: note: returned from ‘rte_zmalloc’
545 | prm = rte_zmalloc("bpf_filter",
| ^~~~~~~~~~~~~~~~~~~~~~~~~
546 | sizeof(*prm) + ebpf_len * sizeof(*ebpf), 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
lib/bpf/bpf_convert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bpf/bpf_convert.c b/lib/bpf/bpf_convert.c
index 9563274c9c..024c9edc9e 100644
--- a/lib/bpf/bpf_convert.c
+++ b/lib/bpf/bpf_convert.c
@@ -559,7 +559,7 @@ rte_bpf_convert(const struct bpf_program *prog)
ret = bpf_convert_filter(prog->bf_insns, prog->bf_len, ebpf, &ebpf_len);
if (ret < 0) {
RTE_BPF_LOG(ERR, "%s: cannot convert cBPF to eBPF\n", __func__);
- free(prm);
+ rte_free(prm);
rte_errno = -ret;
return NULL;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.858904428 +0100
+++ 0008-bpf-fix-free-function-mismatch-if-convert-fails.patch 2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From a3923d6bd5c0b9838d8f4678233093ffad036193 Mon Sep 17 00:00:00 2001
+From b6364f54063f11b70060268e8fc96ea24e9606e9 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a3923d6bd5c0b9838d8f4678233093ffad036193 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index d7ff2b4325..e7e298c9cb 100644
+index 9563274c9c..024c9edc9e 100644
@@ -40 +41 @@
-@@ -556,7 +556,7 @@ rte_bpf_convert(const struct bpf_program *prog)
+@@ -559,7 +559,7 @@ rte_bpf_convert(const struct bpf_program *prog)
@@ -43 +44 @@
- RTE_BPF_LOG_LINE(ERR, "%s: cannot convert cBPF to eBPF", __func__);
+ RTE_BPF_LOG(ERR, "%s: cannot convert cBPF to eBPF\n", __func__);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'baseband/la12xx: fix use after free in modem config' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (6 preceding siblings ...)
2024-10-23 21:15 ` patch 'bpf: fix free function mismatch if convert fails' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'crypto/bcmfs: fix free function mismatch' " luca.boccassi
` (69 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Hemant Agrawal, Morten Brørup, Konstantin Ananyev,
Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/38eba244a3d5407f508a1dbd8a1b17f47337c82c
Thanks.
Luca Boccassi
---
From 38eba244a3d5407f508a1dbd8a1b17f47337c82c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:19 -0700
Subject: [PATCH] baseband/la12xx: fix use after free in modem config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 6ffb34498913f84713e98d6a2a21d2a86028a604 ]
The info pointer (hp) could get freed twice.
Fix by nulling after free.
In function 'setup_la12xx_dev',
inlined from 'la12xx_bbdev_create' at
../drivers/baseband/la12xx/bbdev_la12xx.c:1029:8,
inlined from 'la12xx_bbdev_probe' at
../drivers/baseband/la12xx/bbdev_la12xx.c:1075:9:
../drivers/baseband/la12xx/bbdev_la12xx.c:901:9:
error: pointer 'hp_info' may be used after 'rte_free'
[-Werror=use-after-free]
901 | rte_free(hp);
| ^~~~~~~~~~~~
../drivers/baseband/la12xx/bbdev_la12xx.c:791:17:
note: call to 'rte_free' here
791 | rte_free(hp);
| ^~~~~~~~~~~~
Fixes: 24d0ba22546e ("baseband/la12xx: add queue and modem config")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index 1a56e73abd..cad6f9490e 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -789,6 +789,7 @@ setup_la12xx_dev(struct rte_bbdev *dev)
ipc_priv->hugepg_start.size = hp->len;
rte_free(hp);
+ hp = NULL;
}
dev_ipc = open_ipc_dev(priv->modem_id);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.895052857 +0100
+++ 0009-baseband-la12xx-fix-use-after-free-in-modem-config.patch 2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From 6ffb34498913f84713e98d6a2a21d2a86028a604 Mon Sep 17 00:00:00 2001
+From 38eba244a3d5407f508a1dbd8a1b17f47337c82c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6ffb34498913f84713e98d6a2a21d2a86028a604 ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index af4b4f1e9a..2432cdf884 100644
+index 1a56e73abd..cad6f9490e 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'crypto/bcmfs: fix free function mismatch' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (7 preceding siblings ...)
2024-10-23 21:15 ` patch 'baseband/la12xx: fix use after free in modem config' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'dma/idxd: fix free function mismatch in device probe' " luca.boccassi
` (68 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Ajit Khaparde, Morten Brørup, Konstantin Ananyev,
Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/08043b1ad9e349ae0520e0a49a4a7a21fae674d6
Thanks.
Luca Boccassi
---
From 08043b1ad9e349ae0520e0a49a4a7a21fae674d6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:06 -0700
Subject: [PATCH] crypto/bcmfs: fix free function mismatch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit b1703af8e77d9e872e2ead92ab2dbcf290686f78 ]
The device structure is allocated with rte_malloc() and
then incorrectly freed with free().
This will lead to corrupt malloc pool.
Bugzilla ID: 1552
Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/bcmfs/bcmfs_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c
index ada7ba342c..46522970d5 100644
--- a/drivers/crypto/bcmfs/bcmfs_device.c
+++ b/drivers/crypto/bcmfs/bcmfs_device.c
@@ -139,7 +139,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev,
return fsdev;
cleanup:
- free(fsdev);
+ rte_free(fsdev);
return NULL;
}
@@ -163,7 +163,7 @@ fsdev_release(struct bcmfs_device *fsdev)
return;
TAILQ_REMOVE(&fsdev_list, fsdev, next);
- free(fsdev);
+ rte_free(fsdev);
}
static int
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.932535337 +0100
+++ 0010-crypto-bcmfs-fix-free-function-mismatch.patch 2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From b1703af8e77d9e872e2ead92ab2dbcf290686f78 Mon Sep 17 00:00:00 2001
+From 08043b1ad9e349ae0520e0a49a4a7a21fae674d6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b1703af8e77d9e872e2ead92ab2dbcf290686f78 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'dma/idxd: fix free function mismatch in device probe' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (8 preceding siblings ...)
2024-10-23 21:15 ` patch 'crypto/bcmfs: fix free function mismatch' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'event/cnxk: fix free function mismatch in port config' " luca.boccassi
` (67 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Bruce Richardson, Morten Brørup, Konstantin Ananyev,
Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/495fd2e8ca2bc55b021b0c8ed3a2922f40913440
Thanks.
Luca Boccassi
---
From 495fd2e8ca2bc55b021b0c8ed3a2922f40913440 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:07 -0700
Subject: [PATCH] dma/idxd: fix free function mismatch in device probe
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 91b026fb46d987e68c1152b0bb5f0bc8f1f274db ]
The data structure is allocated with rte_malloc and incorrectly
freed in cleanup logic using free.
Bugzilla ID: 1549
Fixes: 9449330a8458 ("dma/idxd: create dmadev instances on PCI probe")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/dma/idxd/idxd_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 781fa02db3..7222de3b7e 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -292,7 +292,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
return nb_wqs;
err:
- free(pci);
+ rte_free(pci);
return err_code;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:40.967887951 +0100
+++ 0011-dma-idxd-fix-free-function-mismatch-in-device-probe.patch 2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From 91b026fb46d987e68c1152b0bb5f0bc8f1f274db Mon Sep 17 00:00:00 2001
+From 495fd2e8ca2bc55b021b0c8ed3a2922f40913440 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 91b026fb46d987e68c1152b0bb5f0bc8f1f274db ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 60ac219559..6ed03e96da 100644
+index 781fa02db3..7222de3b7e 100644
@@ -29 +30 @@
-@@ -301,7 +301,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
+@@ -292,7 +292,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'event/cnxk: fix free function mismatch in port config' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (9 preceding siblings ...)
2024-10-23 21:15 ` patch 'dma/idxd: fix free function mismatch in device probe' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'net/e1000: fix use after free in filter flush' " luca.boccassi
` (66 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Pavan Nikhilesh, Morten Brørup, Konstantin Ananyev,
Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4cf7c66de71156b980f5adb4582fa21bb5616ec8
Thanks.
Luca Boccassi
---
From 4cf7c66de71156b980f5adb4582fa21bb5616ec8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:08 -0700
Subject: [PATCH] event/cnxk: fix free function mismatch in port config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit db92f4e2ce491bb96605621cdd6f6251ea3bde85 ]
The code to cleanup in case of error would dereference null pointer
then pass that result to rte_free.
Fixes: 97a05c1fe634 ("event/cnxk: add port config")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/event/cnxk/cnxk_eventdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 205cc76572..eff3c42f74 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -109,8 +109,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,
return 0;
hws_fini:
for (i = i - 1; i >= 0; i--) {
- event_dev->data->ports[i] = NULL;
rte_free(cnxk_sso_hws_get_cookie(event_dev->data->ports[i]));
+ event_dev->data->ports[i] = NULL;
}
return -ENOMEM;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.003601502 +0100
+++ 0012-event-cnxk-fix-free-function-mismatch-in-port-config.patch 2024-10-23 22:16:40.443940563 +0100
@@ -1 +1 @@
-From db92f4e2ce491bb96605621cdd6f6251ea3bde85 Mon Sep 17 00:00:00 2001
+From 4cf7c66de71156b980f5adb4582fa21bb5616ec8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit db92f4e2ce491bb96605621cdd6f6251ea3bde85 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index c1df481827..84a55511a3 100644
+index 205cc76572..eff3c42f74 100644
@@ -28 +29 @@
-@@ -121,8 +121,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,
+@@ -109,8 +109,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/e1000: fix use after free in filter flush' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (10 preceding siblings ...)
2024-10-23 21:15 ` patch 'event/cnxk: fix free function mismatch in port config' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'net/nfp: fix double free in flow destroy' " luca.boccassi
` (65 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7a1ad4c97e279f1eaa8c45870514bc41735eb22d
Thanks.
Luca Boccassi
---
From 7a1ad4c97e279f1eaa8c45870514bc41735eb22d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:12 -0700
Subject: [PATCH] net/e1000: fix use after free in filter flush
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 58196dc411576925a1d66b0da1d11b06072a7ac2 ]
The driver cleanup code was freeing the filter object then
dereferencing it.
Bugzilla ID: 1550
Fixes: 6a4d050e2855 ("net/igb: flush all the filter")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/net/e1000/igb_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 8858f975f8..e9ad558c82 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3857,11 +3857,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev,
filter_info->twotuple_mask &= ~(1 << filter->index);
TAILQ_REMOVE(&filter_info->twotuple_list, filter, entries);
- rte_free(filter);
E1000_WRITE_REG(hw, E1000_TTQF(filter->index), E1000_TTQF_DISABLE_MASK);
E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0);
E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0);
+ rte_free(filter);
return 0;
}
@@ -4298,7 +4298,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
filter_info->fivetuple_mask &= ~(1 << filter->index);
TAILQ_REMOVE(&filter_info->fivetuple_list, filter, entries);
- rte_free(filter);
E1000_WRITE_REG(hw, E1000_FTQF(filter->index),
E1000_FTQF_VF_BP | E1000_FTQF_MASK);
@@ -4307,6 +4306,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
E1000_WRITE_REG(hw, E1000_SPQF(filter->index), 0);
E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0);
E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0);
+ rte_free(filter);
return 0;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.047943731 +0100
+++ 0013-net-e1000-fix-use-after-free-in-filter-flush.patch 2024-10-23 22:16:40.443940563 +0100
@@ -1 +1 @@
-From 58196dc411576925a1d66b0da1d11b06072a7ac2 Mon Sep 17 00:00:00 2001
+From 7a1ad4c97e279f1eaa8c45870514bc41735eb22d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 58196dc411576925a1d66b0da1d11b06072a7ac2 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 1e0a483d4a..d3a9181874 100644
+index 8858f975f8..e9ad558c82 100644
@@ -28 +29 @@
-@@ -3907,11 +3907,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev,
+@@ -3857,11 +3857,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev,
@@ -41 +42 @@
-@@ -4348,7 +4348,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
+@@ -4298,7 +4298,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
@@ -49 +50 @@
-@@ -4357,6 +4356,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
+@@ -4307,6 +4306,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/nfp: fix double free in flow destroy' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (11 preceding siblings ...)
2024-10-23 21:15 ` patch 'net/e1000: fix use after free in filter flush' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'net/sfc: fix use after free in debug logs' " luca.boccassi
` (64 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c
Thanks.
Luca Boccassi
---
From 8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:15 -0700
Subject: [PATCH] net/nfp: fix double free in flow destroy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ]
Calling rte_free twice on same object will corrupt the heap.
Warning is:
In function 'nfp_pre_tun_table_check_del',
inlined from 'nfp_flow_destroy' at
../drivers/net/nfp/flower/nfp_flower_flow.c:5143:9:
../drivers/net/nfp/flower/nfp_flower_flow.c:3830:9:
error: pointer 'entry' used after 'rte_free'
[-Werror=use-after-free]
3830 | rte_free(entry);
| ^~~~~~~~~~~~~~~
../drivers/net/nfp/flower/nfp_flower_flow.c:3825:9:
note: call to 'rte_free' here
3825 | rte_free(entry);
| ^~~~~~~~~~~~~~~
Bugzilla ID: 1555
Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow action")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/net/nfp/nfp_flow.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 17c091ffa0..3746aa2d0f 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3019,7 +3019,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,
goto free_entry;
}
- rte_free(entry);
rte_free(find_entry);
priv->pre_tun_cnt--;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.085777453 +0100
+++ 0014-net-nfp-fix-double-free-in-flow-destroy.patch 2024-10-23 22:16:40.447940718 +0100
@@ -1 +1 @@
-From fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 Mon Sep 17 00:00:00 2001
+From 8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 1 -
+ drivers/net/nfp/nfp_flow.c | 1 -
@@ -36,5 +37,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index 0078455658..64a0062c8b 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -3822,7 +3822,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index 17c091ffa0..3746aa2d0f 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3019,7 +3019,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/sfc: fix use after free in debug logs' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (12 preceding siblings ...)
2024-10-23 21:15 ` patch 'net/nfp: fix double free in flow destroy' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'raw/ifpga/base: fix use after free' " luca.boccassi
` (63 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Ivan Malov, Andrew Rybchenko, Morten Brørup,
Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d8c04bbc9bbf10267c00dbf1fff30fc0e08fbfa4
Thanks.
Luca Boccassi
---
From d8c04bbc9bbf10267c00dbf1fff30fc0e08fbfa4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:13 -0700
Subject: [PATCH] net/sfc: fix use after free in debug logs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 757b0b6f207c072a550f43836856235aa41553ad ]
If compiler detection of use-after-free is enabled then this drivers
debug messages will cause warnings. Change to move debug message
before the object is freed.
Bugzilla ID: 1551
Fixes: 55c1238246d5 ("net/sfc: add more debug messages to transfer flows")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
| 4 ++--
drivers/net/sfc/sfc_mae.c | 13 +++++--------
2 files changed, 7 insertions(+), 10 deletions(-)
--git a/drivers/net/sfc/sfc_flow_rss.c b/drivers/net/sfc/sfc_flow_rss.c
index e28c943335..8e2749833b 100644
--- a/drivers/net/sfc/sfc_flow_rss.c
+++ b/drivers/net/sfc/sfc_flow_rss.c
@@ -303,9 +303,9 @@ sfc_flow_rss_ctx_del(struct sfc_adapter *sa, struct sfc_flow_rss_ctx *ctx)
TAILQ_REMOVE(&flow_rss->ctx_list, ctx, entries);
rte_free(ctx->qid_offsets);
- rte_free(ctx);
-
sfc_dbg(sa, "flow-rss: deleted ctx=%p", ctx);
+
+ rte_free(ctx);
}
static int
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index b61b9658e3..4775953b8d 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -421,9 +421,8 @@ sfc_mae_outer_rule_del(struct sfc_adapter *sa,
efx_mae_match_spec_fini(sa->nic, rule->match_spec);
TAILQ_REMOVE(&mae->outer_rules, rule, entries);
- rte_free(rule);
-
sfc_dbg(sa, "deleted outer_rule=%p", rule);
+ rte_free(rule);
}
static int
@@ -582,9 +581,8 @@ sfc_mae_mac_addr_del(struct sfc_adapter *sa, struct sfc_mae_mac_addr *mac_addr)
}
TAILQ_REMOVE(&mae->mac_addrs, mac_addr, entries);
- rte_free(mac_addr);
-
sfc_dbg(sa, "deleted mac_addr=%p", mac_addr);
+ rte_free(mac_addr);
}
enum sfc_mae_mac_addr_type {
@@ -779,10 +777,10 @@ sfc_mae_encap_header_del(struct sfc_adapter *sa,
}
TAILQ_REMOVE(&mae->encap_headers, encap_header, entries);
+ sfc_dbg(sa, "deleted encap_header=%p", encap_header);
+
rte_free(encap_header->buf);
rte_free(encap_header);
-
- sfc_dbg(sa, "deleted encap_header=%p", encap_header);
}
static int
@@ -1085,9 +1083,8 @@ sfc_mae_action_set_del(struct sfc_adapter *sa,
rte_free(action_set->counters);
}
TAILQ_REMOVE(&mae->action_sets, action_set, entries);
- rte_free(action_set);
-
sfc_dbg(sa, "deleted action_set=%p", action_set);
+ rte_free(action_set);
}
static int
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.124423091 +0100
+++ 0015-net-sfc-fix-use-after-free-in-debug-logs.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 757b0b6f207c072a550f43836856235aa41553ad Mon Sep 17 00:00:00 2001
+From d8c04bbc9bbf10267c00dbf1fff30fc0e08fbfa4 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 757b0b6f207c072a550f43836856235aa41553ad ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +26,2 @@
- drivers/net/sfc/sfc_mae.c | 25 ++++++++++---------------
- 2 files changed, 12 insertions(+), 17 deletions(-)
+ drivers/net/sfc/sfc_mae.c | 13 +++++--------
+ 2 files changed, 7 insertions(+), 10 deletions(-)
@@ -45 +46 @@
-index 60ff6d2181..8f74f10390 100644
+index b61b9658e3..4775953b8d 100644
@@ -48 +49 @@
-@@ -400,9 +400,8 @@ sfc_mae_outer_rule_del(struct sfc_adapter *sa,
+@@ -421,9 +421,8 @@ sfc_mae_outer_rule_del(struct sfc_adapter *sa,
@@ -59 +60 @@
-@@ -585,9 +584,8 @@ sfc_mae_mac_addr_del(struct sfc_adapter *sa, struct sfc_mae_mac_addr *mac_addr)
+@@ -582,9 +581,8 @@ sfc_mae_mac_addr_del(struct sfc_adapter *sa, struct sfc_mae_mac_addr *mac_addr)
@@ -70 +71 @@
-@@ -785,10 +783,10 @@ sfc_mae_encap_header_del(struct sfc_adapter *sa,
+@@ -779,10 +777,10 @@ sfc_mae_encap_header_del(struct sfc_adapter *sa,
@@ -74,4 +75 @@
-- rte_free(encap_header->buf);
-- rte_free(encap_header);
--
- sfc_dbg(sa, "deleted encap_header=%p", encap_header);
++ sfc_dbg(sa, "deleted encap_header=%p", encap_header);
@@ -79,10 +77,2 @@
-+ rte_free(encap_header->buf);
-+ rte_free(encap_header);
- }
-
- static int
-@@ -983,9 +981,8 @@ sfc_mae_counter_del(struct sfc_adapter *sa, struct sfc_mae_counter *counter)
- }
-
- TAILQ_REMOVE(&mae->counters, counter, entries);
-- rte_free(counter);
+ rte_free(encap_header->buf);
+ rte_free(encap_header);
@@ -90,2 +80 @@
- sfc_dbg(sa, "deleted counter=%p", counter);
-+ rte_free(counter);
+- sfc_dbg(sa, "deleted encap_header=%p", encap_header);
@@ -95,3 +84,3 @@
-@@ -1165,9 +1162,8 @@ sfc_mae_action_set_del(struct sfc_adapter *sa,
- sfc_mae_mac_addr_del(sa, action_set->src_mac_addr);
- sfc_mae_counter_del(sa, action_set->counter);
+@@ -1085,9 +1083,8 @@ sfc_mae_action_set_del(struct sfc_adapter *sa,
+ rte_free(action_set->counters);
+ }
@@ -103,24 +91,0 @@
- }
-
- static int
-@@ -1401,10 +1397,10 @@ sfc_mae_action_set_list_del(struct sfc_adapter *sa,
- sfc_mae_action_set_del(sa, action_set_list->action_sets[i]);
-
- TAILQ_REMOVE(&mae->action_set_lists, action_set_list, entries);
-+ sfc_dbg(sa, "deleted action_set_list=%p", action_set_list);
-+
- rte_free(action_set_list->action_sets);
- rte_free(action_set_list);
--
-- sfc_dbg(sa, "deleted action_set_list=%p", action_set_list);
- }
-
- static int
-@@ -1667,9 +1663,8 @@ sfc_mae_action_rule_del(struct sfc_adapter *sa,
- sfc_mae_outer_rule_del(sa, rule->outer_rule);
-
- TAILQ_REMOVE(&mae->action_rules, rule, entries);
-- rte_free(rule);
--
- sfc_dbg(sa, "deleted action_rule=%p", rule);
-+ rte_free(rule);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'raw/ifpga/base: fix use after free' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (13 preceding siblings ...)
2024-10-23 21:15 ` patch 'net/sfc: fix use after free in debug logs' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'raw/ifpga: fix free function mismatch in interrupt config' " luca.boccassi
` (62 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f838b3c8b98dc3286e86564cda6427e916238fb0
Thanks.
Luca Boccassi
---
From f838b3c8b98dc3286e86564cda6427e916238fb0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:16 -0700
Subject: [PATCH] raw/ifpga/base: fix use after free
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 11986223b54d981300e9de2d365c494eb274645c ]
The TAILQ_FOREACH() macro would refer to info after it
had been freed. Fix by introducing TAILQ_FOREACH_SAFE here.
Fixes: 4a19f89104f8 ("raw/ifpga/base: support multiple cards")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/raw/ifpga/base/opae_intel_max10.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c b/drivers/raw/ifpga/base/opae_intel_max10.c
index dd97a5f9fd..d5a9ceb6e3 100644
--- a/drivers/raw/ifpga/base/opae_intel_max10.c
+++ b/drivers/raw/ifpga/base/opae_intel_max10.c
@@ -6,6 +6,13 @@
#include <libfdt.h>
#include "opae_osdep.h"
+#ifndef TAILQ_FOREACH_SAFE
+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = TAILQ_FIRST((head)); \
+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
+ (var) = (tvar))
+#endif
+
int max10_sys_read(struct intel_max10_device *dev,
unsigned int offset, unsigned int *val)
{
@@ -746,9 +753,9 @@ static int fdt_get_named_reg(const void *fdt, int node, const char *name,
static void max10_sensor_uinit(struct intel_max10_device *dev)
{
- struct opae_sensor_info *info;
+ struct opae_sensor_info *info, *next;
- TAILQ_FOREACH(info, &dev->opae_sensor_list, node) {
+ TAILQ_FOREACH_SAFE(info, &dev->opae_sensor_list, node, next) {
TAILQ_REMOVE(&dev->opae_sensor_list, info, node);
opae_free(info);
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.161106863 +0100
+++ 0016-raw-ifpga-base-fix-use-after-free.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 11986223b54d981300e9de2d365c494eb274645c Mon Sep 17 00:00:00 2001
+From f838b3c8b98dc3286e86564cda6427e916238fb0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 11986223b54d981300e9de2d365c494eb274645c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'raw/ifpga: fix free function mismatch in interrupt config' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (14 preceding siblings ...)
2024-10-23 21:15 ` patch 'raw/ifpga/base: fix use after free' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'examples/vhost: fix free function mismatch' " luca.boccassi
` (61 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8a8601623860ef67574e8bce04429c48a9978abf
Thanks.
Luca Boccassi
---
From 8a8601623860ef67574e8bce04429c48a9978abf Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:18 -0700
Subject: [PATCH] raw/ifpga: fix free function mismatch in interrupt config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit d891a597895bb65db42404440660f82092780750 ]
The raw ifpga driver redefines malloc to be opae_malloc
and free to be opae_free; which is a bad idea.
This leads to case where interrupt efd array is allocated with calloc()
and then passed to rte_free.
The workaround is to allocate the array with rte_calloc() instead.
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/raw/ifpga/ifpga_rawdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 1020adcf6e..aa5d8b1a43 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
nb_intr = rte_intr_nb_intr_get(*intr_handle);
- intr_efds = calloc(nb_intr, sizeof(int));
+ intr_efds = rte_calloc("ifpga_efds", nb_intr, sizeof(int), 0);
if (!intr_efds)
return -ENOMEM;
@@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
ret = opae_acc_set_irq(acc, vec_start, count, intr_efds);
if (ret) {
- free(intr_efds);
+ rte_free(intr_efds);
return -EINVAL;
}
}
@@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
ret = rte_intr_callback_register(*intr_handle,
handler, (void *)arg);
if (ret) {
- free(intr_efds);
+ rte_free(intr_efds);
return -EINVAL;
}
IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);
- free(intr_efds);
+ rte_free(intr_efds);
return 0;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.198059968 +0100
+++ 0017-raw-ifpga-fix-free-function-mismatch-in-interrupt-co.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From d891a597895bb65db42404440660f82092780750 Mon Sep 17 00:00:00 2001
+From 8a8601623860ef67574e8bce04429c48a9978abf Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d891a597895bb65db42404440660f82092780750 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 113a22b0a7..5b9b596435 100644
+index 1020adcf6e..aa5d8b1a43 100644
@@ -31 +32 @@
-@@ -1499,7 +1499,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
+@@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
@@ -40 +41 @@
-@@ -1508,7 +1508,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
+@@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
@@ -49 +50 @@
-@@ -1517,13 +1517,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
+@@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
@@ -58 +59 @@
- IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name);
+ IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'examples/vhost: fix free function mismatch' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (15 preceding siblings ...)
2024-10-23 21:15 ` patch 'raw/ifpga: fix free function mismatch in interrupt config' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:15 ` patch 'net/nfb: fix use after free' " luca.boccassi
` (60 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Chengwen Feng, Chenbo Xia, Morten Brørup,
Konstantin Ananyev, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/afdb0a605db01cbc2b2f9e32b47e28680e71927a
Thanks.
Luca Boccassi
---
From afdb0a605db01cbc2b2f9e32b47e28680e71927a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:09 -0700
Subject: [PATCH] examples/vhost: fix free function mismatch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit ae67f7d0256687fdfb24d27ee94b20d88c65108e ]
The pointer bdev is allocated with rte_zmalloc() and then
incorrectly freed with free() which will lead to pool corruption.
Bugzilla ID: 1553
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
examples/vhost_blk/vhost_blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 3709d7ed06..197ad6250b 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -785,7 +785,7 @@ vhost_blk_bdev_construct(const char *bdev_name,
bdev->data = rte_zmalloc(NULL, blk_cnt * blk_size, 0);
if (!bdev->data) {
fprintf(stderr, "No enough reserved huge memory for disk\n");
- free(bdev);
+ rte_free(bdev);
return NULL;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.238103069 +0100
+++ 0018-examples-vhost-fix-free-function-mismatch.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From ae67f7d0256687fdfb24d27ee94b20d88c65108e Mon Sep 17 00:00:00 2001
+From afdb0a605db01cbc2b2f9e32b47e28680e71927a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit ae67f7d0256687fdfb24d27ee94b20d88c65108e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 03f1ac9c3f..9c9e326949 100644
+index 3709d7ed06..197ad6250b 100644
@@ -30 +31 @@
-@@ -776,7 +776,7 @@ vhost_blk_bdev_construct(const char *bdev_name,
+@@ -785,7 +785,7 @@ vhost_blk_bdev_construct(const char *bdev_name,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/nfb: fix use after free' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (16 preceding siblings ...)
2024-10-23 21:15 ` patch 'examples/vhost: fix free function mismatch' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
2024-10-23 21:16 ` patch 'power: enable CPPC' " luca.boccassi
` (59 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d56b8cfa79131b17c1f40a2f2708a42a3bc94159
Thanks.
Luca Boccassi
---
From d56b8cfa79131b17c1f40a2f2708a42a3bc94159 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 10 Oct 2024 19:11:07 +0200
Subject: [PATCH] net/nfb: fix use after free
[ upstream commit 76da9834ebb6e43e005bd5895ff4568d0e7be78f ]
With the annotations added to the allocation functions
in commit 80da7efbb4c4 ("eal: annotate allocation functions"),
more issues are detected at compilation time:
nfb_rx.c:133:28: error: pointer 'rxq' used after 'rte_free'
It is fixed by moving the assignment before freeing the parent pointer.
Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/nfb/nfb_rx.c | 2 +-
drivers/net/nfb/nfb_tx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfb/nfb_rx.c b/drivers/net/nfb/nfb_rx.c
index 8a9b232305..7941197b77 100644
--- a/drivers/net/nfb/nfb_rx.c
+++ b/drivers/net/nfb/nfb_rx.c
@@ -129,7 +129,7 @@ nfb_eth_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
if (rxq->queue != NULL) {
ndp_close_rx_queue(rxq->queue);
- rte_free(rxq);
rxq->queue = NULL;
+ rte_free(rxq);
}
}
diff --git a/drivers/net/nfb/nfb_tx.c b/drivers/net/nfb/nfb_tx.c
index d49fc324e7..5c38d69934 100644
--- a/drivers/net/nfb/nfb_tx.c
+++ b/drivers/net/nfb/nfb_tx.c
@@ -108,7 +108,7 @@ nfb_eth_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
if (txq->queue != NULL) {
ndp_close_tx_queue(txq->queue);
- rte_free(txq);
txq->queue = NULL;
+ rte_free(txq);
}
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.271460365 +0100
+++ 0019-net-nfb-fix-use-after-free.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 76da9834ebb6e43e005bd5895ff4568d0e7be78f Mon Sep 17 00:00:00 2001
+From d56b8cfa79131b17c1f40a2f2708a42a3bc94159 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76da9834ebb6e43e005bd5895ff4568d0e7be78f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index f72afafe8f..462bc3b50d 100644
+index 8a9b232305..7941197b77 100644
@@ -38 +39 @@
-index a1318a4205..cf99268c43 100644
+index d49fc324e7..5c38d69934 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'power: enable CPPC' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (17 preceding siblings ...)
2024-10-23 21:15 ` patch 'net/nfb: fix use after free' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'fib6: add runtime checks in AVX512 lookup' " luca.boccassi
` (58 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Wathsala Vithanage; +Cc: Dhruv Tripathi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2bb52b6763e360c1811cb0e80967d9eccfd77a1d
Thanks.
Luca Boccassi
---
From 2bb52b6763e360c1811cb0e80967d9eccfd77a1d Mon Sep 17 00:00:00 2001
From: Wathsala Vithanage <wathsala.vithanage@arm.com>
Date: Thu, 10 Oct 2024 14:17:36 +0000
Subject: [PATCH] power: enable CPPC
[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]
Power library already supports Linux CPPC driver,
but initialization was failing.
Enable its use in the drivers check,
and fix the name of the CPPC driver name.
Fixes: ef1cc88f1837 ("power: support cppc_cpufreq driver")
Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Reviewed-by: Dhruv Tripathi <dhruv.tripathi@arm.com>
---
lib/power/power_cppc_cpufreq.c | 2 +-
lib/power/rte_power_pmd_mgmt.c | 12 +++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index fc9cffef91..d6cc58cb3b 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -35,7 +35,7 @@
#define POWER_SYSFILE_SYS_MAX \
"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_max_freq"
-#define POWER_CPPC_DRIVER "cppc-cpufreq"
+#define POWER_CPPC_DRIVER "cppc_cpufreq"
#define BUS_FREQ 100000
enum power_state {
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index f9a2606e6c..18a9819289 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -419,10 +419,11 @@ check_scale(unsigned int lcore)
{
enum power_management_env env;
- /* only PSTATE and ACPI modes are supported */
+ /* only PSTATE, ACPI and CPPC modes are supported */
if (!rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ) &&
- !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) {
- RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
+ !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
+ !rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) {
+ RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, or CPPC modes are supported\n");
return -ENOTSUP;
}
/* ensure we could initialize the power library */
@@ -431,8 +432,9 @@ check_scale(unsigned int lcore)
/* ensure we initialized the correct env */
env = rte_power_get_env();
- if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) {
- RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
+ if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
+ env != PM_ENV_CPPC_CPUFREQ) {
+ RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, or CPPC modes\n");
return -ENOTSUP;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.306702521 +0100
+++ 0020-power-enable-CPPC.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 35220c7cb3aff022b3a41919139496326ef6eecc Mon Sep 17 00:00:00 2001
+From 2bb52b6763e360c1811cb0e80967d9eccfd77a1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- lib/power/rte_power_pmd_mgmt.c | 11 ++++++-----
- 2 files changed, 7 insertions(+), 6 deletions(-)
+ lib/power/rte_power_pmd_mgmt.c | 12 +++++++-----
+ 2 files changed, 8 insertions(+), 6 deletions(-)
@@ -22 +23 @@
-index 32aaacb948..e68b39b424 100644
+index fc9cffef91..d6cc58cb3b 100644
@@ -25 +26 @@
-@@ -36,7 +36,7 @@
+@@ -35,7 +35,7 @@
@@ -35 +36 @@
-index b1c18a5f56..830a6c7a97 100644
+index f9a2606e6c..18a9819289 100644
@@ -38 +39 @@
-@@ -419,11 +419,12 @@ check_scale(unsigned int lcore)
+@@ -419,10 +419,11 @@ check_scale(unsigned int lcore)
@@ -43 +44 @@
-+ /* only PSTATE, AMD-PSTATE, ACPI and CPPC modes are supported */
++ /* only PSTATE, ACPI and CPPC modes are supported */
@@ -45,4 +46,3 @@
- !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
-- !rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ)) {
-- POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes are supported");
-+ !rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ) &&
+- !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) {
+- RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
++ !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
@@ -50 +50 @@
-+ POWER_LOG(DEBUG, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported");
++ RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, or CPPC modes are supported\n");
@@ -54 +54,2 @@
-@@ -433,8 +434,8 @@ check_scale(unsigned int lcore)
+@@ -431,8 +432,9 @@ check_scale(unsigned int lcore)
+
@@ -57,5 +58,5 @@
- if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
-- env != PM_ENV_AMD_PSTATE_CPUFREQ) {
-- POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes were initialized");
-+ env != PM_ENV_AMD_PSTATE_CPUFREQ && env != PM_ENV_CPPC_CPUFREQ) {
-+ POWER_LOG(DEBUG, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes");
+- if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) {
+- RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
++ if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
++ env != PM_ENV_CPPC_CPUFREQ) {
++ RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, or CPPC modes\n");
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'fib6: add runtime checks in AVX512 lookup' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (18 preceding siblings ...)
2024-10-23 21:16 ` patch 'power: enable CPPC' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'app/dumpcap: fix handling of jumbo frames' " luca.boccassi
` (57 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e696cfc2f8eb796296d07c932a29f78216d04006
Thanks.
Luca Boccassi
---
From e696cfc2f8eb796296d07c932a29f78216d04006 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 8 Oct 2024 17:31:36 +0000
Subject: [PATCH] fib6: add runtime checks in AVX512 lookup
[ upstream commit 45ddc5660f9830f3b7b39ddaf57af02e80d589a4 ]
AVX512 lookup function requires CPU to support RTE_CPUFLAG_AVX512DQ and
RTE_CPUFLAG_AVX512BW. Add runtime checks of these two flags when deciding
if vector function can be used.
Fixes: 1e5630e40d95 ("fib6: add AVX512 lookup")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/fib/trie.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 09470e7287..7b33cdaa7b 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -46,8 +46,10 @@ static inline rte_fib6_lookup_fn_t
get_vector_fn(enum rte_fib_trie_nh_sz nh_sz)
{
#ifdef CC_TRIE_AVX512_SUPPORT
- if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) <= 0) ||
- (rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_512))
+ if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) <= 0 ||
+ rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512DQ) <= 0 ||
+ rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) <= 0 ||
+ rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_512)
return NULL;
switch (nh_sz) {
case RTE_FIB6_TRIE_2B:
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.340620284 +0100
+++ 0021-fib6-add-runtime-checks-in-AVX512-lookup.patch 2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 45ddc5660f9830f3b7b39ddaf57af02e80d589a4 Mon Sep 17 00:00:00 2001
+From e696cfc2f8eb796296d07c932a29f78216d04006 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45ddc5660f9830f3b7b39ddaf57af02e80d589a4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'app/dumpcap: fix handling of jumbo frames' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (19 preceding siblings ...)
2024-10-23 21:16 ` patch 'fib6: add runtime checks in AVX512 lookup' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx timestamp handling for VF' " luca.boccassi
` (56 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Tianli Lai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/65c229defe6b3bc0843bf34cf998718e317528d9
Thanks.
Luca Boccassi
---
From 65c229defe6b3bc0843bf34cf998718e317528d9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 3 Oct 2024 15:09:03 -0700
Subject: [PATCH] app/dumpcap: fix handling of jumbo frames
[ upstream commit 5c0f970c0d0e2a963a7a970a71cad4f4244414a5 ]
If dumpcap (in legacy pcap mode) tried to handle a large segmented
frame it would core dump because rte_pktmbuf_read() would return NULL.
Fix by using same logic as in pcap PMD.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Reported-by: Tianli Lai <laitianli@tom.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 81c9d7d2f1..7e8aa5d76e 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -740,7 +740,7 @@ static ssize_t
pcap_write_packets(pcap_dumper_t *dumper,
struct rte_mbuf *pkts[], uint16_t n)
{
- uint8_t temp_data[snaplen];
+ uint8_t temp_data[RTE_ETHER_MAX_JUMBO_FRAME_LEN];
struct pcap_pkthdr header;
uint16_t i;
size_t total = 0;
@@ -749,14 +749,19 @@ pcap_write_packets(pcap_dumper_t *dumper,
for (i = 0; i < n; i++) {
struct rte_mbuf *m = pkts[i];
+ size_t len, caplen;
- header.len = rte_pktmbuf_pkt_len(m);
- header.caplen = RTE_MIN(header.len, snaplen);
+ len = caplen = rte_pktmbuf_pkt_len(m);
+ if (unlikely(!rte_pktmbuf_is_contiguous(m) && len > snaplen))
+ caplen = snaplen;
+
+ header.len = len;
+ header.caplen = caplen;
pcap_dump((u_char *)dumper, &header,
- rte_pktmbuf_read(m, 0, header.caplen, temp_data));
+ rte_pktmbuf_read(m, 0, caplen, temp_data));
- total += sizeof(header) + header.len;
+ total += sizeof(header) + caplen;
}
return total;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.375045224 +0100
+++ 0022-app-dumpcap-fix-handling-of-jumbo-frames.patch 2024-10-23 22:16:40.455941029 +0100
@@ -1 +1 @@
-From 5c0f970c0d0e2a963a7a970a71cad4f4244414a5 Mon Sep 17 00:00:00 2001
+From 65c229defe6b3bc0843bf34cf998718e317528d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c0f970c0d0e2a963a7a970a71cad4f4244414a5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6feb8f5672..fcfaa19951 100644
+index 81c9d7d2f1..7e8aa5d76e 100644
@@ -23 +24 @@
-@@ -902,7 +902,7 @@ static ssize_t
+@@ -740,7 +740,7 @@ static ssize_t
@@ -27 +28 @@
-- uint8_t temp_data[RTE_MBUF_DEFAULT_BUF_SIZE];
+- uint8_t temp_data[snaplen];
@@ -32 +33 @@
-@@ -911,14 +911,19 @@ pcap_write_packets(pcap_dumper_t *dumper,
+@@ -749,14 +749,19 @@ pcap_write_packets(pcap_dumper_t *dumper,
@@ -39 +40 @@
-- header.caplen = RTE_MIN(header.len, sizeof(temp_data));
+- header.caplen = RTE_MIN(header.len, snaplen);
@@ -41,2 +42,2 @@
-+ if (unlikely(!rte_pktmbuf_is_contiguous(m) && len > sizeof(temp_data)))
-+ caplen = sizeof(temp_data);
++ if (unlikely(!rte_pktmbuf_is_contiguous(m) && len > snaplen))
++ caplen = snaplen;
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/cnxk: fix Rx timestamp handling for VF' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (20 preceding siblings ...)
2024-10-23 21:16 ` patch 'app/dumpcap: fix handling of jumbo frames' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx offloads to handle timestamp' " luca.boccassi
` (55 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Rakesh Kudurumalla; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8d056353d1a1c9000f7375825c3d4bad457ef8b1
Thanks.
Luca Boccassi
---
From 8d056353d1a1c9000f7375825c3d4bad457ef8b1 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 11:30:40 +0530
Subject: [PATCH] net/cnxk: fix Rx timestamp handling for VF
[ upstream commit 0efd93a2740d1ab13fc55656ce9e55f79e09c4f3 ]
When timestamp is enabled on PF in kernel and respective
VF is attached to application in DPDK then mbuf_addr is getting
corrupted in cnxk_nix_timestamp_dynfield() as
"tstamp_dynfield_offset" is zero for PTP enabled PF
This patch fixes the same.
Fixes: 76dff63874e3 ("net/cnxk: support base PTP timesync")
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
drivers/net/cnxk/cn10k_ethdev.c | 12 +++++++++++-
drivers/net/cnxk/cn9k_ethdev.c | 12 +++++++++++-
drivers/net/cnxk/cnxk_ethdev.c | 2 +-
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 4658713591..ed979d42af 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -381,7 +381,7 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
struct cnxk_eth_dev *dev = (struct cnxk_eth_dev *)nix;
struct rte_eth_dev *eth_dev;
struct cn10k_eth_rxq *rxq;
- int i;
+ int i, rc;
if (!dev)
return -EINVAL;
@@ -404,7 +404,17 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
* and MTU setting also requires MBOX message to be
* sent(VF->PF)
*/
+ if (dev->ptp_en) {
+ rc = rte_mbuf_dyn_rx_timestamp_register
+ (&dev->tstamp.tstamp_dynfield_offset,
+ &dev->tstamp.rx_tstamp_dynflag);
+ if (rc != 0) {
+ plt_err("Failed to register Rx timestamp field/flag");
+ return -EINVAL;
+ }
+ }
eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
+ rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
rte_mb();
}
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index 3b702d9696..3243c9f82c 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -362,7 +362,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
struct cnxk_eth_dev *dev = (struct cnxk_eth_dev *)nix;
struct rte_eth_dev *eth_dev;
struct cn9k_eth_rxq *rxq;
- int i;
+ int i, rc;
if (!dev)
return -EINVAL;
@@ -385,7 +385,17 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
* and MTU setting also requires MBOX message to be
* sent(VF->PF)
*/
+ if (dev->ptp_en) {
+ rc = rte_mbuf_dyn_rx_timestamp_register
+ (&dev->tstamp.tstamp_dynfield_offset,
+ &dev->tstamp.rx_tstamp_dynflag);
+ if (rc != 0) {
+ plt_err("Failed to register Rx timestamp field/flag");
+ return -EINVAL;
+ }
+ }
eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
+ rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
rte_mb();
}
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 56b26a9650..73f59dede1 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1684,7 +1684,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)
else
cnxk_eth_dev_ops.timesync_disable(eth_dev);
- if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+ if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP || dev->ptp_en) {
rc = rte_mbuf_dyn_rx_timestamp_register
(&dev->tstamp.tstamp_dynfield_offset,
&dev->tstamp.rx_tstamp_dynflag);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.411028371 +0100
+++ 0023-net-cnxk-fix-Rx-timestamp-handling-for-VF.patch 2024-10-23 22:16:40.455941029 +0100
@@ -1 +1 @@
-From 0efd93a2740d1ab13fc55656ce9e55f79e09c4f3 Mon Sep 17 00:00:00 2001
+From 8d056353d1a1c9000f7375825c3d4bad457ef8b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0efd93a2740d1ab13fc55656ce9e55f79e09c4f3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index ad6bc1ec21..46476e386a 100644
+index 4658713591..ed979d42af 100644
@@ -26 +27 @@
-@@ -473,7 +473,7 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -381,7 +381,7 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -35 +36 @@
-@@ -496,7 +496,17 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -404,7 +404,17 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -54 +55 @@
-index 84c88655f8..5417628368 100644
+index 3b702d9696..3243c9f82c 100644
@@ -57 +58 @@
-@@ -432,7 +432,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -362,7 +362,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -66 +67 @@
-@@ -455,7 +455,17 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -385,7 +385,17 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -85 +86 @@
-index 33bac55704..74b266ad58 100644
+index 56b26a9650..73f59dede1 100644
@@ -88 +89 @@
-@@ -1751,7 +1751,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)
+@@ -1684,7 +1684,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/cnxk: fix Rx offloads to handle timestamp' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (21 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx timestamp handling for VF' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'event/cnxk: fix Rx timestamp handling' " luca.boccassi
` (54 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Rakesh Kudurumalla; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1601becebabb67227a7aff036100fd4cd1cb81a5
Thanks.
Luca Boccassi
---
From 1601becebabb67227a7aff036100fd4cd1cb81a5 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 11:30:41 +0530
Subject: [PATCH] net/cnxk: fix Rx offloads to handle timestamp
[ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ]
RX offloads flags are updated to handle timestamp
in VF when PTP is enabled in respective PF in kernel.
Fixes: c7c7c8ed7d47 ("net/cnxk: get PTP status")
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
drivers/net/cnxk/cn10k_ethdev.c | 6 +++++-
drivers/net/cnxk/cn9k_ethdev.c | 5 ++++-
drivers/net/cnxk/cnxk_ethdev.h | 7 +++++++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index ed979d42af..3dd71fc70d 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -30,7 +30,7 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
flags |= NIX_RX_MULTI_SEG_F;
- if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
+ if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) || dev->ptp_en)
flags |= NIX_RX_OFFLOAD_TSTAMP_F;
if (!dev->ptype_disable)
@@ -416,6 +416,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
rte_mb();
+ if (dev->cnxk_sso_ptp_tstamp_cb)
+ dev->cnxk_sso_ptp_tstamp_cb(eth_dev->data->port_id,
+ NIX_RX_OFFLOAD_TSTAMP_F, dev->ptp_en);
+
}
return 0;
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index 3243c9f82c..e5ab0f3697 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -30,7 +30,7 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
flags |= NIX_RX_MULTI_SEG_F;
- if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
+ if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) || dev->ptp_en)
flags |= NIX_RX_OFFLOAD_TSTAMP_F;
if (!dev->ptype_disable)
@@ -397,6 +397,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
rte_mb();
+ if (dev->cnxk_sso_ptp_tstamp_cb)
+ dev->cnxk_sso_ptp_tstamp_cb(eth_dev->data->port_id,
+ NIX_RX_OFFLOAD_TSTAMP_F, dev->ptp_en);
}
return 0;
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 83d6e9398f..4202b647f4 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -443,6 +443,13 @@ struct cnxk_eth_dev {
/* Reassembly dynfield/flag offsets */
int reass_dynfield_off;
int reass_dynflag_bit;
+
+ /* SSO event dev */
+ void *evdev_priv;
+
+ /* SSO event dev ptp */
+ void (*cnxk_sso_ptp_tstamp_cb)
+ (uint16_t port_id, uint16_t flags, bool ptp_en);
};
struct cnxk_eth_rxq_sp {
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.447204165 +0100
+++ 0024-net-cnxk-fix-Rx-offloads-to-handle-timestamp.patch 2024-10-23 22:16:40.455941029 +0100
@@ -1 +1 @@
-From f12dab814f0898c661d32f6cdaaae6a11bbacb6e Mon Sep 17 00:00:00 2001
+From 1601becebabb67227a7aff036100fd4cd1cb81a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 46476e386a..f5b485650e 100644
+index ed979d42af..3dd71fc70d 100644
@@ -32 +33 @@
-@@ -508,6 +508,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -416,6 +416,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -44 +45 @@
-index 5417628368..c419593a23 100644
+index 3243c9f82c..e5ab0f3697 100644
@@ -56 +57 @@
-@@ -467,6 +467,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -397,6 +397,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -67 +68 @@
-index 687c60c27d..5920488e1a 100644
+index 83d6e9398f..4202b647f4 100644
@@ -70,4 +71,4 @@
-@@ -433,6 +433,13 @@ struct cnxk_eth_dev {
-
- /* Eswitch domain ID */
- uint16_t switch_domain_id;
+@@ -443,6 +443,13 @@ struct cnxk_eth_dev {
+ /* Reassembly dynfield/flag offsets */
+ int reass_dynfield_off;
+ int reass_dynflag_bit;
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'event/cnxk: fix Rx timestamp handling' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (22 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx offloads to handle timestamp' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'common/cnxk: fix CPT HW word size for outbound SA' " luca.boccassi
` (53 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Rakesh Kudurumalla; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/082cd77172416b39740151f61c0559ec1a482335
Thanks.
Luca Boccassi
---
From 082cd77172416b39740151f61c0559ec1a482335 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 11:30:42 +0530
Subject: [PATCH] event/cnxk: fix Rx timestamp handling
[ upstream commit 697883bcb0a84f06b52064ecbf60c619edbf9083 ]
Handle timestamp correctly for VF when PTP is enabled
before running application in event mode by updating
RX offload flags in link up notification.
Fixes: f1cdb3c5b616 ("net/cnxk: enable PTP for event Rx adapter")
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
drivers/event/cnxk/cn10k_eventdev.c | 32 ++++++++++++++++++++++++
drivers/event/cnxk/cn9k_eventdev.c | 31 +++++++++++++++++++++++
drivers/event/cnxk/cnxk_eventdev_adptr.c | 2 +-
3 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index d8e7c83462..a1ddf402f1 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -864,12 +864,40 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem, u
}
}
+static void
+eventdev_fops_tstamp_update(struct rte_eventdev *event_dev)
+{
+ struct rte_event_fp_ops *fp_op =
+ rte_event_fp_ops + event_dev->data->dev_id;
+
+ fp_op->dequeue = event_dev->dequeue;
+ fp_op->dequeue_burst = event_dev->dequeue_burst;
+}
+
+static void
+cn10k_sso_tstamp_hdl_update(uint16_t port_id, uint16_t flags, bool ptp_en)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ struct cnxk_eth_dev *cnxk_eth_dev = dev->data->dev_private;
+ struct rte_eventdev *event_dev = cnxk_eth_dev->evdev_priv;
+ struct cnxk_sso_evdev *evdev = cnxk_sso_pmd_priv(event_dev);
+
+ evdev->rx_offloads |= flags;
+ if (ptp_en)
+ evdev->tstamp[port_id] = &cnxk_eth_dev->tstamp;
+ else
+ evdev->tstamp[port_id] = NULL;
+ cn10k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev);
+ eventdev_fops_tstamp_update(event_dev);
+}
+
static int
cn10k_sso_rx_adapter_queue_add(
const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev,
int32_t rx_queue_id,
const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
{
+ struct cnxk_eth_dev *cnxk_eth_dev = eth_dev->data->dev_private;
struct cn10k_eth_rxq *rxq;
uint64_t meta_aura;
void *lookup_mem;
@@ -883,6 +911,10 @@ cn10k_sso_rx_adapter_queue_add(
queue_conf);
if (rc)
return -EINVAL;
+
+ cnxk_eth_dev->cnxk_sso_ptp_tstamp_cb = cn10k_sso_tstamp_hdl_update;
+ cnxk_eth_dev->evdev_priv = (struct rte_eventdev *)(uintptr_t)event_dev;
+
rxq = eth_dev->data->rx_queues[0];
lookup_mem = rxq->lookup_mem;
meta_aura = rxq->meta_aura;
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 803e7ddd07..88bce7e675 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -981,12 +981,40 @@ cn9k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem,
}
}
+static void
+eventdev_fops_tstamp_update(struct rte_eventdev *event_dev)
+{
+ struct rte_event_fp_ops *fp_op =
+ rte_event_fp_ops + event_dev->data->dev_id;
+
+ fp_op->dequeue = event_dev->dequeue;
+ fp_op->dequeue_burst = event_dev->dequeue_burst;
+}
+
+static void
+cn9k_sso_tstamp_hdl_update(uint16_t port_id, uint16_t flags, bool ptp_en)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ struct cnxk_eth_dev *cnxk_eth_dev = dev->data->dev_private;
+ struct rte_eventdev *event_dev = cnxk_eth_dev->evdev_priv;
+ struct cnxk_sso_evdev *evdev = cnxk_sso_pmd_priv(event_dev);
+
+ evdev->rx_offloads |= flags;
+ if (ptp_en)
+ evdev->tstamp[port_id] = &cnxk_eth_dev->tstamp;
+ else
+ evdev->tstamp[port_id] = NULL;
+ cn9k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev);
+ eventdev_fops_tstamp_update(event_dev);
+}
+
static int
cn9k_sso_rx_adapter_queue_add(
const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev,
int32_t rx_queue_id,
const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
{
+ struct cnxk_eth_dev *cnxk_eth_dev = eth_dev->data->dev_private;
struct cn9k_eth_rxq *rxq;
void *lookup_mem;
int rc;
@@ -1000,6 +1028,9 @@ cn9k_sso_rx_adapter_queue_add(
if (rc)
return -EINVAL;
+ cnxk_eth_dev->cnxk_sso_ptp_tstamp_cb = cn9k_sso_tstamp_hdl_update;
+ cnxk_eth_dev->evdev_priv = (struct rte_eventdev *)(uintptr_t)event_dev;
+
rxq = eth_dev->data->rx_queues[0];
lookup_mem = rxq->lookup_mem;
cn9k_sso_set_priv_mem(event_dev, lookup_mem, 0);
diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c
index e78d215630..8fcbd085a9 100644
--- a/drivers/event/cnxk/cnxk_eventdev_adptr.c
+++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c
@@ -212,7 +212,7 @@ static void
cnxk_sso_tstamp_cfg(uint16_t port_id, struct cnxk_eth_dev *cnxk_eth_dev,
struct cnxk_sso_evdev *dev)
{
- if (cnxk_eth_dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
+ if (cnxk_eth_dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP || cnxk_eth_dev->ptp_en)
dev->tstamp[port_id] = &cnxk_eth_dev->tstamp;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.482503400 +0100
+++ 0025-event-cnxk-fix-Rx-timestamp-handling.patch 2024-10-23 22:16:40.459941185 +0100
@@ -1 +1 @@
-From 697883bcb0a84f06b52064ecbf60c619edbf9083 Mon Sep 17 00:00:00 2001
+From 082cd77172416b39740151f61c0559ec1a482335 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 697883bcb0a84f06b52064ecbf60c619edbf9083 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5bd779990e..c8767a1b2b 100644
+index d8e7c83462..a1ddf402f1 100644
@@ -24 +25 @@
-@@ -842,12 +842,40 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem)
+@@ -864,12 +864,40 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem, u
@@ -62,2 +62,0 @@
- struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
- struct roc_sso_hwgrp_stash stash;
@@ -65 +64,3 @@
-@@ -862,6 +890,10 @@ cn10k_sso_rx_adapter_queue_add(
+ uint64_t meta_aura;
+ void *lookup_mem;
+@@ -883,6 +911,10 @@ cn10k_sso_rx_adapter_queue_add(
@@ -75 +76 @@
- cn10k_sso_set_priv_mem(event_dev, lookup_mem);
+ meta_aura = rxq->meta_aura;
@@ -77 +78 @@
-index 28350d1275..377e910837 100644
+index 803e7ddd07..88bce7e675 100644
@@ -80 +81 @@
-@@ -911,12 +911,40 @@ cn9k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem)
+@@ -981,12 +981,40 @@ cn9k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem,
@@ -121 +122 @@
-@@ -930,6 +958,9 @@ cn9k_sso_rx_adapter_queue_add(
+@@ -1000,6 +1028,9 @@ cn9k_sso_rx_adapter_queue_add(
@@ -130 +131 @@
- cn9k_sso_set_priv_mem(event_dev, lookup_mem);
+ cn9k_sso_set_priv_mem(event_dev, lookup_mem, 0);
@@ -132 +133 @@
-index 2c049e7041..3cac42111a 100644
+index e78d215630..8fcbd085a9 100644
@@ -135 +136 @@
-@@ -213,7 +213,7 @@ static void
+@@ -212,7 +212,7 @@ static void
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'common/cnxk: fix CPT HW word size for outbound SA' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (23 preceding siblings ...)
2024-10-23 21:16 ` patch 'event/cnxk: fix Rx timestamp handling' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'common/cnxk: fix base log level' " luca.boccassi
` (52 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0b67f7f7599768a6324ef3d76314bc220f89947f
Thanks.
Luca Boccassi
---
From 0b67f7f7599768a6324ef3d76314bc220f89947f Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Tue, 1 Oct 2024 11:30:48 +0530
Subject: [PATCH] common/cnxk: fix CPT HW word size for outbound SA
[ upstream commit 9587a324f28e84937c9efef534da542c30ff122b ]
Fix the CPT HW word size inited for outbound SA to be
two words.
Fixes: 5ece02e736c3 ("common/cnxk: use common SA init API for default options")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/common/cnxk/roc_ie_ot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/common/cnxk/roc_ie_ot.c b/drivers/common/cnxk/roc_ie_ot.c
index d0b7ad38f1..356bb8c5a5 100644
--- a/drivers/common/cnxk/roc_ie_ot.c
+++ b/drivers/common/cnxk/roc_ie_ot.c
@@ -38,5 +38,6 @@ roc_ot_ipsec_outb_sa_init(struct roc_ot_ipsec_outb_sa *sa)
offset = offsetof(struct roc_ot_ipsec_outb_sa, ctx);
sa->w0.s.ctx_push_size = (offset / ROC_CTX_UNIT_8B) + 1;
sa->w0.s.ctx_size = ROC_IE_OT_CTX_ILEN;
+ sa->w0.s.ctx_hdr_size = ROC_IE_OT_SA_CTX_HDR_SIZE;
sa->w0.s.aop_valid = 1;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.518242022 +0100
+++ 0026-common-cnxk-fix-CPT-HW-word-size-for-outbound-SA.patch 2024-10-23 22:16:40.459941185 +0100
@@ -1 +1 @@
-From 9587a324f28e84937c9efef534da542c30ff122b Mon Sep 17 00:00:00 2001
+From 0b67f7f7599768a6324ef3d76314bc220f89947f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9587a324f28e84937c9efef534da542c30ff122b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 465b2bc1fb..1b436dba72 100644
+index d0b7ad38f1..356bb8c5a5 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'common/cnxk: fix base log level' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (24 preceding siblings ...)
2024-10-23 21:16 ` patch 'common/cnxk: fix CPT HW word size for outbound SA' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'baseband/acc: fix access to deallocated mem' " luca.boccassi
` (51 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Rakesh Kudurumalla; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5c7ce1ed01c4faab7e78e3435f33f3bebfd5fcbc
Thanks.
Luca Boccassi
---
From 5c7ce1ed01c4faab7e78e3435f33f3bebfd5fcbc Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 14:17:10 +0530
Subject: [PATCH] common/cnxk: fix base log level
[ upstream commit adc561fc5352bd1f1c8e736a33bb9b03bbb95b3f ]
In a247fcd94598 changeset, the PMD log type is removed and
driver specific log type is added for CNXK.
This patch changes loglevel of CNXK from NOTICE to INFO
to display logs while running applications
Fixes: a247fcd94598 ("drivers: use dedicated log macros instead of PMD logtype")
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
drivers/common/cnxk/roc_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index ce0f9b870c..963b74ee7c 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -60,7 +60,7 @@ roc_plt_init(void)
return 0;
}
-RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, NOTICE);
+RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, INFO);
RTE_LOG_REGISTER(cnxk_logtype_mbox, pmd.cnxk.mbox, NOTICE);
RTE_LOG_REGISTER(cnxk_logtype_cpt, pmd.crypto.cnxk, NOTICE);
RTE_LOG_REGISTER(cnxk_logtype_npa, pmd.mempool.cnxk, NOTICE);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.553975373 +0100
+++ 0027-common-cnxk-fix-base-log-level.patch 2024-10-23 22:16:40.459941185 +0100
@@ -1 +1 @@
-From adc561fc5352bd1f1c8e736a33bb9b03bbb95b3f Mon Sep 17 00:00:00 2001
+From 5c7ce1ed01c4faab7e78e3435f33f3bebfd5fcbc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit adc561fc5352bd1f1c8e736a33bb9b03bbb95b3f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 30379c7e5e..f1e0a93d97 100644
+index ce0f9b870c..963b74ee7c 100644
@@ -23 +24 @@
-@@ -85,7 +85,7 @@ roc_plt_init(void)
+@@ -60,7 +60,7 @@ roc_plt_init(void)
@@ -27,5 +28,5 @@
--RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_base, base, NOTICE);
-+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_base, base, INFO);
- RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_mbox, mbox, NOTICE);
- RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_cpt, crypto, NOTICE);
- RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_ml, ml, NOTICE);
+-RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, NOTICE);
++RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, INFO);
+ RTE_LOG_REGISTER(cnxk_logtype_mbox, pmd.cnxk.mbox, NOTICE);
+ RTE_LOG_REGISTER(cnxk_logtype_cpt, pmd.crypto.cnxk, NOTICE);
+ RTE_LOG_REGISTER(cnxk_logtype_npa, pmd.mempool.cnxk, NOTICE);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'baseband/acc: fix access to deallocated mem' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (25 preceding siblings ...)
2024-10-23 21:16 ` patch 'common/cnxk: fix base log level' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'vhost: fix offset while mapping log base address' " luca.boccassi
` (50 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8d41d4db2561550810000b00b6c6775907833c3
Thanks.
Luca Boccassi
---
From e8d41d4db2561550810000b00b6c6775907833c3 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Wed, 9 Oct 2024 14:12:51 -0700
Subject: [PATCH] baseband/acc: fix access to deallocated mem
[ upstream commit a090b8ffe73ed21d54e17e5d5711d2e817d7229e ]
Prevent op_addr access during queue_stop operation, as this memory may
have been deallocated.
Fixes: e640f6cdfa84 ("baseband/acc200: add LDPC processing")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/acc/rte_acc100_pmd.c | 36 --------------------------
drivers/baseband/acc/rte_acc200_pmd.c | 37 +--------------------------
2 files changed, 1 insertion(+), 72 deletions(-)
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 955c0236e4..a5b1bb66eb 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -837,51 +837,15 @@ free_q:
return ret;
}
-static inline void
-acc100_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
- uint16_t index)
-{
- if (op == NULL)
- return;
- if (op_type == RTE_BBDEV_OP_LDPC_DEC)
- rte_bbdev_log(DEBUG,
- " Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
- index,
- op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
- op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
- op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
- op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
- op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
- op->ldpc_dec.harq_combined_input.length
- );
- else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
- struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
- rte_bbdev_log(DEBUG,
- " Op 5GDL %d %d %d %d %d %d %d %d %d",
- index,
- op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
- op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
- op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
- op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
- );
- }
-}
-
static int
acc100_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
{
struct acc_queue *q;
- struct rte_bbdev_dec_op *op;
- uint16_t i;
q = dev->data->queues[queue_id].queue_private;
rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
queue_id, q->sw_ring_head, q->sw_ring_tail,
q->sw_ring_depth, q->op_type);
- for (i = 0; i < q->sw_ring_depth; ++i) {
- op = (q->ring_addr + i)->req.op_addr;
- acc100_print_op(op, q->op_type, i);
- }
/* ignore all operations in flight and clear counters */
q->sw_ring_tail = q->sw_ring_head;
q->aq_enqueued = 0;
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 8bda3a8e07..f2b7172e71 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -924,51 +924,16 @@ free_q:
return ret;
}
-static inline void
-acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
- uint16_t index)
-{
- if (op == NULL)
- return;
- if (op_type == RTE_BBDEV_OP_LDPC_DEC)
- rte_bbdev_log(INFO,
- " Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
- index,
- op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
- op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
- op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
- op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
- op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
- op->ldpc_dec.harq_combined_input.length
- );
- else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
- struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
- rte_bbdev_log(INFO,
- " Op 5GDL %d %d %d %d %d %d %d %d %d",
- index,
- op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
- op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
- op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
- op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
- );
- }
-}
-
/* Stop ACC200 queue and clear counters. */
static int
acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
{
struct acc_queue *q;
- struct rte_bbdev_dec_op *op;
- uint16_t i;
+
q = dev->data->queues[queue_id].queue_private;
rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
queue_id, q->sw_ring_head, q->sw_ring_tail,
q->sw_ring_depth, q->op_type);
- for (i = 0; i < q->sw_ring_depth; ++i) {
- op = (q->ring_addr + i)->req.op_addr;
- acc200_print_op(op, q->op_type, i);
- }
/* ignore all operations in flight and clear counters */
q->sw_ring_tail = q->sw_ring_head;
q->aq_enqueued = 0;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.588552062 +0100
+++ 0028-baseband-acc-fix-access-to-deallocated-mem.patch 2024-10-23 22:16:40.463941341 +0100
@@ -1 +1 @@
-From a090b8ffe73ed21d54e17e5d5711d2e817d7229e Mon Sep 17 00:00:00 2001
+From e8d41d4db2561550810000b00b6c6775907833c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a090b8ffe73ed21d54e17e5d5711d2e817d7229e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +16,3 @@
- drivers/baseband/acc/rte_acc100_pmd.c | 36 ----------------------
- drivers/baseband/acc/rte_vrb_pmd.c | 44 +--------------------------
- 2 files changed, 1 insertion(+), 79 deletions(-)
+ drivers/baseband/acc/rte_acc100_pmd.c | 36 --------------------------
+ drivers/baseband/acc/rte_acc200_pmd.c | 37 +--------------------------
+ 2 files changed, 1 insertion(+), 72 deletions(-)
@@ -20 +21 @@
-index 5e6ee85e13..c690d1492b 100644
+index 955c0236e4..a5b1bb66eb 100644
@@ -23 +24 @@
-@@ -838,51 +838,15 @@ free_q:
+@@ -837,51 +837,15 @@ free_q:
@@ -75,5 +76,5 @@
-diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
-index 646c12ad5c..e3f98d6e42 100644
---- a/drivers/baseband/acc/rte_vrb_pmd.c
-+++ b/drivers/baseband/acc/rte_vrb_pmd.c
-@@ -1048,58 +1048,16 @@ free_q:
+diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
+index 8bda3a8e07..f2b7172e71 100644
+--- a/drivers/baseband/acc/rte_acc200_pmd.c
++++ b/drivers/baseband/acc/rte_acc200_pmd.c
+@@ -924,51 +924,16 @@ free_q:
@@ -84 +85 @@
--vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
+-acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
@@ -110,7 +110,0 @@
-- } else if (op_type == RTE_BBDEV_OP_MLDTS) {
-- struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op;
-- rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x",
-- index,
-- op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers,
-- op_mldts->mldts.r_rep,
-- op_mldts->mldts.c_rep, op_mldts->mldts.op_flags);
@@ -120 +114 @@
- /* Stop queue and clear counters. */
+ /* Stop ACC200 queue and clear counters. */
@@ -122 +116 @@
- vrb_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
+ acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
@@ -134 +128 @@
-- vrb_print_op(op, q->op_type, i);
+- acc200_print_op(op, q->op_type, i);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'vhost: fix offset while mapping log base address' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (26 preceding siblings ...)
2024-10-23 21:16 ` patch 'baseband/acc: fix access to deallocated mem' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'vdpa: update used flags in used ring relay' " luca.boccassi
` (49 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bill Xiang; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/659d8ff0cfebd42336ca147c840f453d9d37482d
Thanks.
Luca Boccassi
---
From 659d8ff0cfebd42336ca147c840f453d9d37482d Mon Sep 17 00:00:00 2001
From: Bill Xiang <xiangwencheng@dayudpu.com>
Date: Mon, 8 Jul 2024 14:57:49 +0800
Subject: [PATCH] vhost: fix offset while mapping log base address
[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ]
For sanity the offset should be the last parameter of mmap.
Fixes: fbc4d248b198 ("vhost: fix offset while mmaping log base address")
Signed-off-by: Bill Xiang <xiangwencheng@dayudpu.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
.mailmap | 1 +
lib/vhost/vhost_user.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 80d6d50ba9..8c7b38fb35 100644
--- a/.mailmap
+++ b/.mailmap
@@ -166,6 +166,7 @@ Bert van Leeuwen <bert.vanleeuwen@netronome.com>
Bhagyada Modali <bhagyada.modali@amd.com>
Bharat Mota <bmota@vmware.com>
Bill Hong <bhong@brocade.com>
+Bill Xiang <xiangwencheng@dayudpu.com>
Billy McFall <bmcfall@redhat.com>
Billy O'Mahony <billy.o.mahony@intel.com>
Bing Zhao <bingz@nvidia.com> <bingz@mellanox.com> <bing.zhao@hxt-semitech.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 8d7d04059c..d665d6c7d9 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
* mmap from 0 to workaround a hugepage mmap bug: mmap will
* fail when offset is not page size aligned.
*/
- addr = mmap(0, size + off, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off);
close(fd);
if (addr == MAP_FAILED) {
VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.626590214 +0100
+++ 0029-vhost-fix-offset-while-mapping-log-base-address.patch 2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From bdd96d8ac76ca412165b2d1bbd3701e978246d8e Mon Sep 17 00:00:00 2001
+From 659d8ff0cfebd42336ca147c840f453d9d37482d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ed4ea17c4c..544e62df7d 100644
+index 80d6d50ba9..8c7b38fb35 100644
@@ -22,3 +23,3 @@
-@@ -183,6 +183,7 @@ Bhagyada Modali <bhagyada.modali@amd.com>
- Bharat Mota <bharat.mota@broadcom.com> <bmota@vmware.com>
- Bhuvan Mital <bhuvan.mital@amd.com>
+@@ -166,6 +166,7 @@ Bert van Leeuwen <bert.vanleeuwen@netronome.com>
+ Bhagyada Modali <bhagyada.modali@amd.com>
+ Bharat Mota <bmota@vmware.com>
@@ -31 +32 @@
-index 5f470da38a..0893ae80bb 100644
+index 8d7d04059c..d665d6c7d9 100644
@@ -34 +35 @@
-@@ -2399,7 +2399,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
+@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
@@ -40 +40,0 @@
- alignment = get_blk_size(fd);
@@ -42,0 +43 @@
+ VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'vdpa: update used flags in used ring relay' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (27 preceding siblings ...)
2024-10-23 21:16 ` patch 'vhost: fix offset while mapping log base address' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/virtio-user: reset used index counter' " luca.boccassi
` (48 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bill Xiang; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8473106d0ca03f5b826fb54cb09f148b41ba8c72
Thanks.
Luca Boccassi
---
From 8473106d0ca03f5b826fb54cb09f148b41ba8c72 Mon Sep 17 00:00:00 2001
From: Bill Xiang <xiangwencheng@dayudpu.com>
Date: Wed, 17 Jul 2024 11:24:47 +0800
Subject: [PATCH] vdpa: update used flags in used ring relay
[ upstream commit b3f923fe1710e448c073f03aad2c087ffb6c7a5c ]
The vDPA device will work incorrectly if flags such as
VRING_USED_F_NO_NOTIFY are not updated correctly.
Fixes: b13ad2decc83 ("vhost: provide helpers for virtio ring relay")
Signed-off-by: Bill Xiang <xiangwencheng@dayudpu.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/vhost/vdpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index cf51ca957a..89d88b6876 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -173,6 +173,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
idx = vq->used->idx;
idx_m = s_vring->used->idx;
ret = (uint16_t)(idx_m - idx);
+ vq->used->flags = s_vring->used->flags;
while (idx != idx_m) {
/* copy used entry, used ring logging is not covered here */
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.665647276 +0100
+++ 0030-vdpa-update-used-flags-in-used-ring-relay.patch 2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From b3f923fe1710e448c073f03aad2c087ffb6c7a5c Mon Sep 17 00:00:00 2001
+From 8473106d0ca03f5b826fb54cb09f148b41ba8c72 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3f923fe1710e448c073f03aad2c087ffb6c7a5c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a1dd5a753b..8abb073675 100644
+index cf51ca957a..89d88b6876 100644
@@ -22 +23 @@
-@@ -174,6 +174,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
+@@ -173,6 +173,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/virtio-user: reset used index counter' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (28 preceding siblings ...)
2024-10-23 21:16 ` patch 'vdpa: update used flags in used ring relay' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'fib: fix AVX512 lookup' " luca.boccassi
` (47 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Kommula Shiva Shankar; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/768ca32567522f0a75e458add4069dd4b171d6c3
Thanks.
Luca Boccassi
---
From 768ca32567522f0a75e458add4069dd4b171d6c3 Mon Sep 17 00:00:00 2001
From: Kommula Shiva Shankar <kshankar@marvell.com>
Date: Mon, 5 Aug 2024 10:08:41 +0000
Subject: [PATCH] net/virtio-user: reset used index counter
[ upstream commit ff11fc60c5d8d9ae5a0f0114db4c3bc834090548 ]
When the virtio device is reinitialized during ethdev reconfiguration,
all the virtio rings are recreated and repopulated on the device.
Accordingly, reset the used index counter value back to zero.
Fixes: 48a4464029a7 ("net/virtio-user: support control VQ for packed")
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 78b1ed9ace..ae087b0c92 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -199,6 +199,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,
vring->device = (void *)(uintptr_t)used_addr;
dev->packed_queues[queue_idx].avail_wrap_counter = true;
dev->packed_queues[queue_idx].used_wrap_counter = true;
+ dev->packed_queues[queue_idx].used_idx = 0;
for (i = 0; i < vring->num; i++)
vring->desc[i].flags = 0;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.700365835 +0100
+++ 0031-net-virtio-user-reset-used-index-counter.patch 2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From ff11fc60c5d8d9ae5a0f0114db4c3bc834090548 Mon Sep 17 00:00:00 2001
+From 768ca32567522f0a75e458add4069dd4b171d6c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff11fc60c5d8d9ae5a0f0114db4c3bc834090548 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bf29f0dacd..747dddeb2e 100644
+index 78b1ed9ace..ae087b0c92 100644
@@ -23 +24 @@
-@@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,
+@@ -199,6 +199,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'fib: fix AVX512 lookup' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (29 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/virtio-user: reset used index counter' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/e1000: fix link status crash in secondary process' " luca.boccassi
` (46 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c0c610f426552e50c6628fcc100aa0391c91ab1e
Thanks.
Luca Boccassi
---
From c0c610f426552e50c6628fcc100aa0391c91ab1e Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 6 Sep 2024 17:04:36 +0000
Subject: [PATCH] fib: fix AVX512 lookup
[ upstream commit 66ed1786ad067198814e9b2ab54f0cad68a58f1e ]
Vector lookup uses gather instructions which loads data in 4byte chunks.
This could lead to out of bounds access at the end of the tbl24 in case
of 1 or 2 byte entries if e.g. lookup is attempted for 255.255.255.255
in IPv4 case.
This patch fixes potential out of bound access by gather instruction
allocating an extra 4 byte in the end of the tbl24.
Fixes: b3509fa3653e ("fib: add AVX512 lookup")
Fixes: 1e5630e40d95 ("fib6: add AVX512 lookup")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
lib/fib/dir24_8.c | 4 ++--
lib/fib/trie.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index 5f73b8a7f0..ec7b9c4b5c 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -526,8 +526,8 @@ dir24_8_create(const char *name, int socket_id, struct rte_fib_conf *fib_conf)
snprintf(mem_name, sizeof(mem_name), "DP_%s", name);
dp = rte_zmalloc_socket(name, sizeof(struct dir24_8_tbl) +
- DIR24_8_TBL24_NUM_ENT * (1 << nh_sz), RTE_CACHE_LINE_SIZE,
- socket_id);
+ DIR24_8_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t),
+ RTE_CACHE_LINE_SIZE, socket_id);
if (dp == NULL) {
rte_errno = ENOMEM;
return NULL;
diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 7b33cdaa7b..ca1c2fe3bc 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -647,8 +647,8 @@ trie_create(const char *name, int socket_id,
snprintf(mem_name, sizeof(mem_name), "DP_%s", name);
dp = rte_zmalloc_socket(name, sizeof(struct rte_trie_tbl) +
- TRIE_TBL24_NUM_ENT * (1 << nh_sz), RTE_CACHE_LINE_SIZE,
- socket_id);
+ TRIE_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t),
+ RTE_CACHE_LINE_SIZE, socket_id);
if (dp == NULL) {
rte_errno = ENOMEM;
return dp;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.736507844 +0100
+++ 0032-fib-fix-AVX512-lookup.patch 2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From 66ed1786ad067198814e9b2ab54f0cad68a58f1e Mon Sep 17 00:00:00 2001
+From c0c610f426552e50c6628fcc100aa0391c91ab1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66ed1786ad067198814e9b2ab54f0cad68a58f1e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c739e92304..07c324743b 100644
+index 5f73b8a7f0..ec7b9c4b5c 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/e1000: fix link status crash in secondary process' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (30 preceding siblings ...)
2024-10-23 21:16 ` patch 'fib: fix AVX512 lookup' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: fix crash when link is unstable' " luca.boccassi
` (45 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Jun Wang; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5780ca90f0f820157ee62013515d022646cece2c
Thanks.
Luca Boccassi
---
From 5780ca90f0f820157ee62013515d022646cece2c Mon Sep 17 00:00:00 2001
From: Jun Wang <junwang01@cestc.cn>
Date: Fri, 12 Jul 2024 19:30:47 +0800
Subject: [PATCH] net/e1000: fix link status crash in secondary process
[ upstream commit 84506cfe07326fd6ddb158f3fa57bd678751561a ]
The code to update link status is not safe in secondary process.
If called from secondary it will crash, example from dumpcap:
/dpdk/app/dpdk-dumpcap -i 0000:00:04.0
File: /tmp/dpdk-dumpcap_0_0000:00:04.0_20240723020203.pcapng
Segmentation fault (core dumped)
Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Signed-off-by: Jun Wang <junwang01@cestc.cn>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/e1000/em_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 18efa78ac3..efe3665cec 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1121,6 +1121,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
struct rte_eth_link link;
int link_up, count;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -1;
+
link_up = 0;
hw->mac.get_link_status = 1;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.771895718 +0100
+++ 0033-net-e1000-fix-link-status-crash-in-secondary-process.patch 2024-10-23 22:16:40.471941652 +0100
@@ -1 +1 @@
-From 84506cfe07326fd6ddb158f3fa57bd678751561a Mon Sep 17 00:00:00 2001
+From 5780ca90f0f820157ee62013515d022646cece2c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84506cfe07326fd6ddb158f3fa57bd678751561a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c5a4dec693..f6875b0762 100644
+index 18efa78ac3..efe3665cec 100644
@@ -26 +27 @@
-@@ -1136,6 +1136,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1121,6 +1121,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/iavf: fix crash when link is unstable' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (31 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/e1000: fix link status crash in secondary process' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix link speed for 200G' " luca.boccassi
` (44 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/90adb751e4a7a555f0ec996d7f80e951d6384b95
Thanks.
Luca Boccassi
---
From 90adb751e4a7a555f0ec996d7f80e951d6384b95 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Tue, 6 Aug 2024 08:35:27 +0800
Subject: [PATCH] net/iavf: fix crash when link is unstable
[ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ]
Physical link instability may cause a core dump because unstable
physical links can result in a large number of link change events. Some
of these events may be captured by vf before vf resources are allocated,
and that will result in a core dump.
This commit will check if vf_res is invalid before dereferencing it.
Fixes: 5e03e316c753 ("net/iavf: handle virtchnl event message without interrupt")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/iavf/iavf_vchnl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index aeffb07cca..0164dddcb0 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -246,8 +246,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
case VIRTCHNL_EVENT_LINK_CHANGE:
vf->link_up =
vpe->event_data.link_event.link_status;
- if (vf->vf_res->vf_cap_flags &
- VIRTCHNL_VF_CAP_ADV_LINK_SPEED) {
+ if (vf->vf_res != NULL &&
+ vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) {
vf->link_speed =
vpe->event_data.link_event_adv.link_speed;
} else {
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.808356976 +0100
+++ 0034-net-iavf-fix-crash-when-link-is-unstable.patch 2024-10-23 22:16:40.471941652 +0100
@@ -1 +1 @@
-From 57ed9ca61f44ffc3801f55c749347bd717834008 Mon Sep 17 00:00:00 2001
+From 90adb751e4a7a555f0ec996d7f80e951d6384b95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6d5969f084..69420bc9b6 100644
+index aeffb07cca..0164dddcb0 100644
@@ -26 +27 @@
-@@ -255,8 +255,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
+@@ -246,8 +246,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ice/base: fix link speed for 200G' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (32 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/iavf: fix crash when link is unstable' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' " luca.boccassi
` (43 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Paul Greenwalt; +Cc: Soumyadeep Hore, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6970864b0c56f89338627ff29122a89fb96a74b2
Thanks.
Luca Boccassi
---
From 6970864b0c56f89338627ff29122a89fb96a74b2 Mon Sep 17 00:00:00 2001
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Fri, 23 Aug 2024 09:56:45 +0000
Subject: [PATCH] net/ice/base: fix link speed for 200G
[ upstream commit e3992ab377d2879d6c5bfb220865638404b85dba ]
When setting PHY configuration during driver initialization, 200G link
speed is not being advertised even when the PHY is capable. This is
because the get PHY capabilities link speed response is being masked by
ICE_AQ_LINK_SPEED_M, which does not include 200G link speed bit.
Fixes: d13ad9cf1721 ("net/ice/base: add helper functions for PHY caching")
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_adminq_cmd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 534649802f..1f40ae2e66 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1621,7 +1621,7 @@ struct ice_aqc_get_link_status_data {
#define ICE_AQ_LINK_PWR_QSFP_CLASS_3 2
#define ICE_AQ_LINK_PWR_QSFP_CLASS_4 3
__le16 link_speed;
-#define ICE_AQ_LINK_SPEED_M 0x7FF
+#define ICE_AQ_LINK_SPEED_M 0xFFF
#define ICE_AQ_LINK_SPEED_10MB BIT(0)
#define ICE_AQ_LINK_SPEED_100MB BIT(1)
#define ICE_AQ_LINK_SPEED_1000MB BIT(2)
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.844158267 +0100
+++ 0035-net-ice-base-fix-link-speed-for-200G.patch 2024-10-23 22:16:40.475941807 +0100
@@ -1 +1 @@
-From e3992ab377d2879d6c5bfb220865638404b85dba Mon Sep 17 00:00:00 2001
+From 6970864b0c56f89338627ff29122a89fb96a74b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3992ab377d2879d6c5bfb220865638404b85dba ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6a89e1614a..3ec207927b 100644
+index 534649802f..1f40ae2e66 100644
@@ -25 +26 @@
-@@ -1624,7 +1624,7 @@ struct ice_aqc_get_link_status_data {
+@@ -1621,7 +1621,7 @@ struct ice_aqc_get_link_status_data {
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (33 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ice/base: fix link speed for 200G' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ixgbe/base: fix unchecked return value' " luca.boccassi
` (42 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Fabio Pricoco
Cc: Jacob Keller, Soumyadeep Hore, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/822d0a9391325d4d7ea7ce9c7e776807c3928d2e
Thanks.
Luca Boccassi
---
From 822d0a9391325d4d7ea7ce9c7e776807c3928d2e Mon Sep 17 00:00:00 2001
From: Fabio Pricoco <fabio.pricoco@intel.com>
Date: Fri, 23 Aug 2024 09:56:42 +0000
Subject: [PATCH] net/ice/base: fix iteration of TLVs in Preserved Fields Area
[ upstream commit dcb760bf0f951b404bce33a1dd14906154b58c75 ]
The ice_get_pfa_module_tlv() function iterates over the Preserved Fields
Area to read data from the Shadow RAM, including the Part Board Assembly
data, among others.
If the specific TLV being requested is not found in the current NVM, the
code will read past the end of the PFA, misinterpreting the last word of
the PFA and the word just after the PFA as another TLV. This typically
results in one extra iteration before the length check of the while loop
is triggered.
Correct the logic for determining the maximum PFA offset to include the
extra last word. Additionally, make the driver robust against overflows
by using check_add_overflow. This ensures that even if the NVM provides
bogus data, the driver will not overflow, and will instead log a useful
warning message. The check for whether the TLV length exceeds the PFA
length is also removed, in favor of relying on the overflow warning
instead.
Fixes: 5d0b7b5fc491 ("net/ice/base: add read PBA module function")
Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_nvm.c | 36 ++++++++++++++++++++++------------
1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 6da52f4d58..47ead01255 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -471,6 +471,8 @@ enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
return status;
}
+#define check_add_overflow __builtin_add_overflow
+
/**
* ice_get_pfa_module_tlv - Reads sub module TLV from NVM PFA
* @hw: pointer to hardware structure
@@ -487,8 +489,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
u16 module_type)
{
enum ice_status status;
- u16 pfa_len, pfa_ptr;
- u32 next_tlv;
+ u16 pfa_len, pfa_ptr, next_tlv, max_tlv;
status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
if (status != ICE_SUCCESS) {
@@ -500,11 +501,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
ice_debug(hw, ICE_DBG_INIT, "Failed to read PFA length.\n");
return status;
}
- /* Starting with first TLV after PFA length, iterate through the list
+
+ if (check_add_overflow(pfa_ptr, (u16)(pfa_len - 1), &max_tlv)) {
+ ice_debug(hw, ICE_DBG_INIT, "PFA starts at offset %u. PFA length of %u caused 16-bit arithmetic overflow.\n",
+ pfa_ptr, pfa_len);
+ return ICE_ERR_INVAL_SIZE;
+ }
+
+ /* The Preserved Fields Area contains a sequence of TLVs which define
+ * its contents. The PFA length includes all of the TLVs, plus its
+ * initial length word itself, *and* one final word at the end of all
+ * of the TLVs.
+ *
+ * Starting with first TLV after PFA length, iterate through the list
* of TLVs to find the requested one.
*/
next_tlv = pfa_ptr + 1;
- while (next_tlv < ((u32)pfa_ptr + pfa_len)) {
+ while (next_tlv < max_tlv) {
u16 tlv_sub_module_type;
u16 tlv_len;
@@ -521,10 +534,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n");
break;
}
- if (tlv_len > pfa_len) {
- ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n");
- return ICE_ERR_INVAL_SIZE;
- }
if (tlv_sub_module_type == module_type) {
if (tlv_len) {
*module_tlv = (u16)next_tlv;
@@ -533,10 +542,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
}
return ICE_ERR_INVAL_SIZE;
}
- /* Check next TLV, i.e. current TLV pointer + length + 2 words
- * (for current TLV's type and length)
- */
- next_tlv = next_tlv + tlv_len + 2;
+
+ if (check_add_overflow(next_tlv, (u16)2, &next_tlv) ||
+ check_add_overflow(next_tlv, tlv_len, &next_tlv)) {
+ ice_debug(hw, ICE_DBG_INIT, "TLV of type %u and length 0x%04x caused 16-bit arithmetic overflow. The PFA starts at 0x%04x and has length of 0x%04x\n",
+ tlv_sub_module_type, tlv_len, pfa_ptr, pfa_len);
+ return ICE_ERR_INVAL_SIZE;
+ }
}
/* Module does not exist */
return ICE_ERR_DOES_NOT_EXIST;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.891229585 +0100
+++ 0036-net-ice-base-fix-iteration-of-TLVs-in-Preserved-Fiel.patch 2024-10-23 22:16:40.475941807 +0100
@@ -1 +1 @@
-From dcb760bf0f951b404bce33a1dd14906154b58c75 Mon Sep 17 00:00:00 2001
+From 822d0a9391325d4d7ea7ce9c7e776807c3928d2e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcb760bf0f951b404bce33a1dd14906154b58c75 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 5e982de4b5..56c6c96a95 100644
+index 6da52f4d58..47ead01255 100644
@@ -39 +40 @@
-@@ -469,6 +469,8 @@ int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
+@@ -471,6 +471,8 @@ enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
@@ -48,2 +49 @@
-@@ -484,8 +486,7 @@ int
- ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -487,8 +489,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -51,0 +52 @@
+ enum ice_status status;
@@ -55 +55,0 @@
- int status;
@@ -58 +58,2 @@
-@@ -498,11 +499,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ if (status != ICE_SUCCESS) {
+@@ -500,11 +501,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -84 +85 @@
-@@ -519,10 +532,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -521,10 +534,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -95 +96 @@
-@@ -531,10 +540,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -533,10 +542,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ixgbe/base: fix unchecked return value' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (34 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix setting flags in init function' " luca.boccassi
` (41 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Barbara Skobiej; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c2cd652d0f0aeb5fe958d9550cb3d34f91cf070a
Thanks.
Luca Boccassi
---
From c2cd652d0f0aeb5fe958d9550cb3d34f91cf070a Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej@intel.com>
Date: Thu, 29 Aug 2024 10:00:11 +0100
Subject: [PATCH] net/ixgbe/base: fix unchecked return value
[ upstream commit eb3684b191928ebb5d263e3f8ab1e309bfec099e ]
There was unchecked return value in the ixgbe_stop_mac_link_on_d3_82599
function. Added checking of return value from the called function
ixgbe_read_eeprom.
Fixes: b7ad3713b958 ("ixgbe/base: allow to disable link on D3")
Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ixgbe/base/ixgbe_82599.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c
index 69fd4cd3fb..b39dd70da0 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_82599.c
@@ -551,13 +551,15 @@ out:
**/
void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw)
{
- u32 autoc2_reg;
u16 ee_ctrl_2 = 0;
+ u32 autoc2_reg;
+ u32 status;
DEBUGFUNC("ixgbe_stop_mac_link_on_d3_82599");
- ixgbe_read_eeprom(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
+ status = ixgbe_read_eeprom(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
- if (!ixgbe_mng_present(hw) && !hw->wol_enabled &&
+ if (status == IXGBE_SUCCESS &&
+ !ixgbe_mng_present(hw) && !hw->wol_enabled &&
ee_ctrl_2 & IXGBE_EEPROM_CCD_BIT) {
autoc2_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
autoc2_reg |= IXGBE_AUTOC2_LINK_DISABLE_ON_D3_MASK;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.927199737 +0100
+++ 0037-net-ixgbe-base-fix-unchecked-return-value.patch 2024-10-23 22:16:40.475941807 +0100
@@ -1 +1 @@
-From eb3684b191928ebb5d263e3f8ab1e309bfec099e Mon Sep 17 00:00:00 2001
+From c2cd652d0f0aeb5fe958d9550cb3d34f91cf070a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb3684b191928ebb5d263e3f8ab1e309bfec099e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c4ad906f0f..3110477700 100644
+index 69fd4cd3fb..b39dd70da0 100644
@@ -24 +25 @@
-@@ -556,13 +556,15 @@ out:
+@@ -551,13 +551,15 @@ out:
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix setting flags in init function' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (35 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ixgbe/base: fix unchecked return value' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix misleading debug logs and comments' " luca.boccassi
` (40 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b2571f3563f5bf8b8c84d9da47b443f625e5a42e
Thanks.
Luca Boccassi
---
From b2571f3563f5bf8b8c84d9da47b443f625e5a42e Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 2 Sep 2024 10:54:17 +0100
Subject: [PATCH] net/i40e/base: fix setting flags in init function
[ upstream commit deb7c447d088903d06a76e2c719a8207c94a576e ]
The functionality to set i40e_hw's flags was moved to its own function
in AQ a while ago. However, the setting of hw->flags for X722 was not
removed, even though it has become unnecessary.
Fixes: 37b091c75b13 ("net/i40e/base: extend PHY access AQ command")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9eee104063..4d8167692d 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1017,9 +1017,6 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
else
hw->pf_id = (u8)(func_rid & 0x7);
- if (hw->mac.type == I40E_MAC_X722)
- hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE |
- I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK;
/* NVMUpdate features structure initialization */
hw->nvmupd_features.major = I40E_NVMUPD_FEATURES_API_VER_MAJOR;
hw->nvmupd_features.minor = I40E_NVMUPD_FEATURES_API_VER_MINOR;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:41.963169539 +0100
+++ 0038-net-i40e-base-fix-setting-flags-in-init-function.patch 2024-10-23 22:16:40.479941963 +0100
@@ -1 +1 @@
-From deb7c447d088903d06a76e2c719a8207c94a576e Mon Sep 17 00:00:00 2001
+From b2571f3563f5bf8b8c84d9da47b443f625e5a42e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit deb7c447d088903d06a76e2c719a8207c94a576e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e4de508aea..451cc2c1c7 100644
+index 9eee104063..4d8167692d 100644
@@ -23 +24 @@
-@@ -980,9 +980,6 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
+@@ -1017,9 +1017,6 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix misleading debug logs and comments' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (36 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix setting flags in init function' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix blinking X722 with X557 PHY' " luca.boccassi
` (39 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Aleksandr Loktionov; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aea7ea7acb1e32d2c546ab93e9450fe35f7469b1
Thanks.
Luca Boccassi
---
From aea7ea7acb1e32d2c546ab93e9450fe35f7469b1 Mon Sep 17 00:00:00 2001
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Date: Mon, 2 Sep 2024 10:54:18 +0100
Subject: [PATCH] net/i40e/base: fix misleading debug logs and comments
[ upstream commit 719ec1bfebde956b661d403ef73ecb1e7483d50f ]
Both comments and debug logs for i40e_read_nvm_aq refer to writing, when
in actuality it's a read function. Fix both comments and debug logs.
Fixes: a8ac0bae54ae ("i40e/base: update shadow RAM read/write")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index f385042601..05816a4b79 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -223,11 +223,11 @@ read_nvm_exit:
* @hw: pointer to the HW structure.
* @module_pointer: module pointer location in words from the NVM beginning
* @offset: offset in words from module start
- * @words: number of words to write
- * @data: buffer with words to write to the Shadow RAM
+ * @words: number of words to read
+ * @data: buffer with words to read from the Shadow RAM
* @last_command: tells the AdminQ that this is the last command
*
- * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
+ * Reads a 16 bit words buffer to the Shadow RAM using the admin command.
**/
STATIC enum i40e_status_code i40e_read_nvm_aq(struct i40e_hw *hw,
u8 module_pointer, u32 offset,
@@ -249,18 +249,18 @@ STATIC enum i40e_status_code i40e_read_nvm_aq(struct i40e_hw *hw,
*/
if ((offset + words) > hw->nvm.sr_size)
i40e_debug(hw, I40E_DEBUG_NVM,
- "NVM write error: offset %d beyond Shadow RAM limit %d\n",
+ "NVM read error: offset %d beyond Shadow RAM limit %d\n",
(offset + words), hw->nvm.sr_size);
else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS)
- /* We can write only up to 4KB (one sector), in one AQ write */
+ /* We can read only up to 4KB (one sector), in one AQ read */
i40e_debug(hw, I40E_DEBUG_NVM,
- "NVM write fail error: tried to write %d words, limit is %d.\n",
+ "NVM read fail error: tried to read %d words, limit is %d.\n",
words, I40E_SR_SECTOR_SIZE_IN_WORDS);
else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS)
!= (offset / I40E_SR_SECTOR_SIZE_IN_WORDS))
- /* A single write cannot spread over two sectors */
+ /* A single read cannot spread over two sectors */
i40e_debug(hw, I40E_DEBUG_NVM,
- "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n",
+ "NVM read error: cannot spread over two sectors in a single read offset=%d words=%d\n",
offset, words);
else
ret_code = i40e_aq_read_nvm(hw, module_pointer,
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.005174318 +0100
+++ 0039-net-i40e-base-fix-misleading-debug-logs-and-comments.patch 2024-10-23 22:16:40.479941963 +0100
@@ -1 +1 @@
-From 719ec1bfebde956b661d403ef73ecb1e7483d50f Mon Sep 17 00:00:00 2001
+From aea7ea7acb1e32d2c546ab93e9450fe35f7469b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 719ec1bfebde956b661d403ef73ecb1e7483d50f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix blinking X722 with X557 PHY' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (37 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix misleading debug logs and comments' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix DDP loading with reserved track ID' " luca.boccassi
` (38 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Eryk Rybak; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a6d819d27a79d79e6d4dd5c129ec477a613e670a
Thanks.
Luca Boccassi
---
From a6d819d27a79d79e6d4dd5c129ec477a613e670a Mon Sep 17 00:00:00 2001
From: Eryk Rybak <eryk.roch.rybak@intel.com>
Date: Mon, 2 Sep 2024 10:54:23 +0100
Subject: [PATCH] net/i40e/base: fix blinking X722 with X557 PHY
[ upstream commit bf0183e9ab98c946e0c7e178149e4b685465b9b1 ]
On x722 with x557 PHY LEDs do not blink under certain circumstances,
because the function was attempting to avoid triggering LED activity when
it detected that LED was already active. Fix it to just always trigger
LED blinking regardless of the LED state.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Eryk Rybak <eryk.roch.rybak@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 32 -----------------------------
1 file changed, 32 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 4d8167692d..d444c4a78e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1585,7 +1585,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
**/
u32 i40e_led_get(struct i40e_hw *hw)
{
- u32 current_mode = 0;
u32 mode = 0;
int i;
@@ -1598,21 +1597,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
if (!gpio_val)
continue;
- /* ignore gpio LED src mode entries related to the activity
- * LEDs
- */
- current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
- >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
- switch (current_mode) {
- case I40E_COMBINED_ACTIVITY:
- case I40E_FILTER_ACTIVITY:
- case I40E_MAC_ACTIVITY:
- case I40E_LINK_ACTIVITY:
- continue;
- default:
- break;
- }
-
mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >>
I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT;
break;
@@ -1632,7 +1616,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
**/
void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
{
- u32 current_mode = 0;
int i;
if (mode & ~I40E_LED_MODE_VALID) {
@@ -1649,21 +1632,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
if (!gpio_val)
continue;
- /* ignore gpio LED src mode entries related to the activity
- * LEDs
- */
- current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
- >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
- switch (current_mode) {
- case I40E_COMBINED_ACTIVITY:
- case I40E_FILTER_ACTIVITY:
- case I40E_MAC_ACTIVITY:
- case I40E_LINK_ACTIVITY:
- continue;
- default:
- break;
- }
-
if (I40E_IS_X710TL_DEVICE(hw->device_id)) {
u32 pin_func = 0;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.040111495 +0100
+++ 0040-net-i40e-base-fix-blinking-X722-with-X557-PHY.patch 2024-10-23 22:16:40.483942118 +0100
@@ -1 +1 @@
-From bf0183e9ab98c946e0c7e178149e4b685465b9b1 Mon Sep 17 00:00:00 2001
+From a6d819d27a79d79e6d4dd5c129ec477a613e670a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf0183e9ab98c946e0c7e178149e4b685465b9b1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index be27cc9d0b..80500697ed 100644
+index 4d8167692d..d444c4a78e 100644
@@ -25 +26 @@
-@@ -1548,7 +1548,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
+@@ -1585,7 +1585,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
@@ -33 +34 @@
-@@ -1561,21 +1560,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
+@@ -1598,21 +1597,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
@@ -55 +56 @@
-@@ -1595,7 +1579,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
+@@ -1632,7 +1616,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
@@ -63 +64 @@
-@@ -1612,21 +1595,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
+@@ -1649,21 +1632,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix DDP loading with reserved track ID' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (38 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix blinking X722 with X557 PHY' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix repeated register dumps' " luca.boccassi
` (37 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Artur Tyminski; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e06d6a124ef97af53624d9090eb08659385107bd
Thanks.
Luca Boccassi
---
From e06d6a124ef97af53624d9090eb08659385107bd Mon Sep 17 00:00:00 2001
From: Artur Tyminski <arturx.tyminski@intel.com>
Date: Mon, 2 Sep 2024 10:54:26 +0100
Subject: [PATCH] net/i40e/base: fix DDP loading with reserved track ID
[ upstream commit f646061cd9328f1265d8b9996c9b734ab2ce3707 ]
Packages with reserved track IDs should not be loaded, yet currently,
the driver will only check one of the reserved ID's, but not the other.
Fix the DDP package loading to also check for the other reserved track
ID.
Fixes: 496a357f1118 ("net/i40e/base: extend processing of DDP")
Signed-off-by: Artur Tyminski <arturx.tyminski@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index d444c4a78e..3acb48e20b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -8163,7 +8163,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
u32 sec_off;
u32 i;
- if (track_id == I40E_DDP_TRACKID_INVALID) {
+ if (track_id == I40E_DDP_TRACKID_INVALID ||
+ track_id == I40E_DDP_TRACKID_RDONLY) {
i40e_debug(hw, I40E_DEBUG_PACKAGE, "Invalid track_id\n");
return I40E_NOT_SUPPORTED;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.078892365 +0100
+++ 0041-net-i40e-base-fix-DDP-loading-with-reserved-track-ID.patch 2024-10-23 22:16:40.491942429 +0100
@@ -1 +1 @@
-From f646061cd9328f1265d8b9996c9b734ab2ce3707 Mon Sep 17 00:00:00 2001
+From e06d6a124ef97af53624d9090eb08659385107bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f646061cd9328f1265d8b9996c9b734ab2ce3707 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a43b89aaeb..693608ac99 100644
+index d444c4a78e..3acb48e20b 100644
@@ -25 +26 @@
-@@ -8048,7 +8048,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
+@@ -8163,7 +8163,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix repeated register dumps' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (39 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix DDP loading with reserved track ID' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix unchecked return value' " luca.boccassi
` (36 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Radoslaw Tyl; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92dd2403039e0eb50d8304f525a407aa9f3018c4
Thanks.
Luca Boccassi
---
From 92dd2403039e0eb50d8304f525a407aa9f3018c4 Mon Sep 17 00:00:00 2001
From: Radoslaw Tyl <radoslawx.tyl@intel.com>
Date: Mon, 2 Sep 2024 10:54:33 +0100
Subject: [PATCH] net/i40e/base: fix repeated register dumps
[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ]
Currently, when registers are dumped, the data inside them is changed,
so repeated dumps lead to unexpected results. Fix this by making
register list read-only.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_diag.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
index b3c4cfd3aa..4ca102cdd5 100644
--- a/drivers/net/i40e/base/i40e_diag.c
+++ b/drivers/net/i40e/base/i40e_diag.c
@@ -55,7 +55,7 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw,
return I40E_SUCCESS;
}
-static struct i40e_diag_reg_test_info i40e_reg_list[] = {
+static const struct i40e_diag_reg_test_info i40e_reg_list[] = {
/* offset mask elements stride */
{I40E_QTX_CTL(0), 0x0000FFBF, 1, I40E_QTX_CTL(1) - I40E_QTX_CTL(0)},
{I40E_PFINT_ITR0(0), 0x00000FFF, 3, I40E_PFINT_ITR0(1) - I40E_PFINT_ITR0(0)},
@@ -81,28 +81,28 @@ enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw)
{
enum i40e_status_code ret_code = I40E_SUCCESS;
u32 reg, mask;
+ u32 elements;
u32 i, j;
for (i = 0; i40e_reg_list[i].offset != 0 &&
ret_code == I40E_SUCCESS; i++) {
+ elements = i40e_reg_list[i].elements;
/* set actual reg range for dynamically allocated resources */
if (i40e_reg_list[i].offset == I40E_QTX_CTL(0) &&
hw->func_caps.num_tx_qp != 0)
- i40e_reg_list[i].elements = hw->func_caps.num_tx_qp;
+ elements = hw->func_caps.num_tx_qp;
if ((i40e_reg_list[i].offset == I40E_PFINT_ITRN(0, 0) ||
i40e_reg_list[i].offset == I40E_PFINT_ITRN(1, 0) ||
i40e_reg_list[i].offset == I40E_PFINT_ITRN(2, 0) ||
i40e_reg_list[i].offset == I40E_QINT_TQCTL(0) ||
i40e_reg_list[i].offset == I40E_QINT_RQCTL(0)) &&
hw->func_caps.num_msix_vectors != 0)
- i40e_reg_list[i].elements =
- hw->func_caps.num_msix_vectors - 1;
+ elements = hw->func_caps.num_msix_vectors - 1;
/* test register access */
mask = i40e_reg_list[i].mask;
- for (j = 0; j < i40e_reg_list[i].elements &&
- ret_code == I40E_SUCCESS; j++) {
+ for (j = 0; j < elements && ret_code == I40E_SUCCESS; j++) {
reg = i40e_reg_list[i].offset
+ (j * i40e_reg_list[i].stride);
ret_code = i40e_diag_reg_pattern_test(hw, reg, mask);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.118462619 +0100
+++ 0042-net-i40e-base-fix-repeated-register-dumps.patch 2024-10-23 22:16:40.491942429 +0100
@@ -1 +1 @@
-From efc6a6b1facfa160e5e72f55893a301a6b27c628 Mon Sep 17 00:00:00 2001
+From 92dd2403039e0eb50d8304f525a407aa9f3018c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix unchecked return value' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (40 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix repeated register dumps' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix loop bounds' " luca.boccassi
` (35 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Barbara Skobiej; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75db5f003240dfb0ec221fb51cd9dc86c36ff89b
Thanks.
Luca Boccassi
---
From 75db5f003240dfb0ec221fb51cd9dc86c36ff89b Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej@intel.com>
Date: Mon, 2 Sep 2024 10:54:34 +0100
Subject: [PATCH] net/i40e/base: fix unchecked return value
[ upstream commit 7fb34b9141aab299c2b84656ec5b12bf41f1c21d ]
Static analysis tools have reported an unchecked return value warning.
Address the warning by checking return value.
Fixes: 2450cc2dc871 ("i40e/base: find partition id in NPAR mode and disable FCoE")
Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 3acb48e20b..e5651ad80b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4226,8 +4226,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
/* use AQ read to get the physical register offset instead
* of the port relative offset
*/
- i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL);
- if (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK))
+ status = i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL);
+ if ((status == I40E_SUCCESS) && (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK)))
hw->num_ports++;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.151728352 +0100
+++ 0043-net-i40e-base-fix-unchecked-return-value.patch 2024-10-23 22:16:40.495942585 +0100
@@ -1 +1 @@
-From 7fb34b9141aab299c2b84656ec5b12bf41f1c21d Mon Sep 17 00:00:00 2001
+From 75db5f003240dfb0ec221fb51cd9dc86c36ff89b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fb34b9141aab299c2b84656ec5b12bf41f1c21d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 416f31dcc3..07e18deaea 100644
+index 3acb48e20b..e5651ad80b 100644
@@ -23 +24 @@
-@@ -4215,8 +4215,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
+@@ -4226,8 +4226,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e/base: fix loop bounds' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (41 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix unchecked return value' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' " luca.boccassi
` (34 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Barbara Skobiej; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6c69f14358ba4ae6412cbf2c5eb73dfe9ccfa09b
Thanks.
Luca Boccassi
---
From 6c69f14358ba4ae6412cbf2c5eb73dfe9ccfa09b Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej@intel.com>
Date: Mon, 2 Sep 2024 10:54:35 +0100
Subject: [PATCH] net/i40e/base: fix loop bounds
[ upstream commit 3e61fe48412f46daa66f7ccc8f03b1e7620d0b64 ]
An unchecked value used as a loop bound. Add verification if value of
'next_to_clean' variable is greater than 2^10 (next_to_clean is 10 bits).
Also, refactored loop so that it reads the head value only once, and also
checks if head is invalid.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 27c82d9b44..cd3b0f2e45 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -791,12 +791,26 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
u16 ntc = asq->next_to_clean;
struct i40e_aq_desc desc_cb;
struct i40e_aq_desc *desc;
+ u32 head = 0;
+
+ if (ntc >= (1 << 10))
+ goto clean_asq_exit;
desc = I40E_ADMINQ_DESC(*asq, ntc);
details = I40E_ADMINQ_DETAILS(*asq, ntc);
- while (rd32(hw, hw->aq.asq.head) != ntc) {
+ while (true) {
+ head = rd32(hw, hw->aq.asq.head);
+
+ if (head >= asq->count) {
+ i40e_debug(hw, I40E_DEBUG_AQ_COMMAND, "Read head value is improper\n");
+ return 0;
+ }
+
+ if (head == ntc)
+ break;
+
i40e_debug(hw, I40E_DEBUG_AQ_COMMAND,
- "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head));
+ "ntc %d head %d.\n", ntc, head);
if (details->callback) {
I40E_ADMINQ_CALLBACK cb_func =
@@ -816,6 +830,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
asq->next_to_clean = ntc;
+clean_asq_exit:
return I40E_DESC_UNUSED(asq);
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.189323744 +0100
+++ 0044-net-i40e-base-fix-loop-bounds.patch 2024-10-23 22:16:40.495942585 +0100
@@ -1 +1 @@
-From 3e61fe48412f46daa66f7ccc8f03b1e7620d0b64 Mon Sep 17 00:00:00 2001
+From 6c69f14358ba4ae6412cbf2c5eb73dfe9ccfa09b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e61fe48412f46daa66f7ccc8f03b1e7620d0b64 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b670250180..350288269b 100644
+index 27c82d9b44..cd3b0f2e45 100644
@@ -26 +27 @@
-@@ -745,12 +745,26 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
+@@ -791,12 +791,26 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
@@ -55 +56 @@
-@@ -770,6 +784,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
+@@ -816,6 +830,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (42 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e/base: fix loop bounds' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ice: " luca.boccassi
` (33 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Ian Stokes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0d727f9dd2a3372157608968b0c6e8bd42e634fb
Thanks.
Luca Boccassi
---
From 0d727f9dd2a3372157608968b0c6e8bd42e634fb Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 15:11:24 +0100
Subject: [PATCH] net/i40e: fix AVX-512 pointer copy on 32-bit
[ upstream commit 2d040df2437a025ef6d2ecf72de96d5c9fe97439 ]
The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
copying 32 pointers only requires half the number of AVX-512 load store
operations.
Fixes: 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
index 74ff54c653..3490299a6f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
@@ -922,6 +922,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
uint32_t copied = 0;
/* n is multiple of 32 */
while (copied < n) {
+#ifdef RTE_ARCH_64
const __m512i a = _mm512_load_si512(&txep[copied]);
const __m512i b = _mm512_load_si512(&txep[copied + 8]);
const __m512i c = _mm512_load_si512(&txep[copied + 16]);
@@ -931,6 +932,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
_mm512_storeu_si512(&cache_objs[copied + 8], b);
_mm512_storeu_si512(&cache_objs[copied + 16], c);
_mm512_storeu_si512(&cache_objs[copied + 24], d);
+#else
+ const __m512i a = _mm512_load_si512(&txep[copied]);
+ const __m512i b = _mm512_load_si512(&txep[copied + 16]);
+ _mm512_storeu_si512(&cache_objs[copied], a);
+ _mm512_storeu_si512(&cache_objs[copied + 16], b);
+#endif
copied += 32;
}
cache->len += n;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.224753269 +0100
+++ 0045-net-i40e-fix-AVX-512-pointer-copy-on-32-bit.patch 2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From 2d040df2437a025ef6d2ecf72de96d5c9fe97439 Mon Sep 17 00:00:00 2001
+From 0d727f9dd2a3372157608968b0c6e8bd42e634fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d040df2437a025ef6d2ecf72de96d5c9fe97439 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0238b03f8a..3b2750221b 100644
+index 74ff54c653..3490299a6f 100644
@@ -23 +24 @@
-@@ -799,6 +799,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
+@@ -922,6 +922,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
@@ -31 +32 @@
-@@ -808,6 +809,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
+@@ -931,6 +932,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ice: fix AVX-512 pointer copy on 32-bit' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (43 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: " luca.boccassi
` (32 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Ian Stokes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8c93fc77264f4b3a7dfbef31f168f9c2fe7e5379
Thanks.
Luca Boccassi
---
From 8c93fc77264f4b3a7dfbef31f168f9c2fe7e5379 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 15:11:25 +0100
Subject: [PATCH] net/ice: fix AVX-512 pointer copy on 32-bit
[ upstream commit da97aeafca4cdd40892ffb7e628bb15dcf9c0f25 ]
The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
copying 32 pointers only requires half the number of AVX-512 load store
operations.
Fixes: a4e480de268e ("net/ice: optimize Tx by using AVX512")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c
index 5bfd5152df..5f91ee4839 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
@@ -1020,6 +1020,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
uint32_t copied = 0;
/* n is multiple of 32 */
while (copied < n) {
+#ifdef RTE_ARCH_64
const __m512i a = _mm512_loadu_si512(&txep[copied]);
const __m512i b = _mm512_loadu_si512(&txep[copied + 8]);
const __m512i c = _mm512_loadu_si512(&txep[copied + 16]);
@@ -1029,6 +1030,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
_mm512_storeu_si512(&cache_objs[copied + 8], b);
_mm512_storeu_si512(&cache_objs[copied + 16], c);
_mm512_storeu_si512(&cache_objs[copied + 24], d);
+#else
+ const __m512i a = _mm512_loadu_si512(&txep[copied]);
+ const __m512i b = _mm512_loadu_si512(&txep[copied + 16]);
+ _mm512_storeu_si512(&cache_objs[copied], a);
+ _mm512_storeu_si512(&cache_objs[copied + 16], b);
+#endif
copied += 32;
}
cache->len += n;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.258238170 +0100
+++ 0046-net-ice-fix-AVX-512-pointer-copy-on-32-bit.patch 2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From da97aeafca4cdd40892ffb7e628bb15dcf9c0f25 Mon Sep 17 00:00:00 2001
+From 8c93fc77264f4b3a7dfbef31f168f9c2fe7e5379 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da97aeafca4cdd40892ffb7e628bb15dcf9c0f25 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 04148e8ea2..add095ef06 100644
+index 5bfd5152df..5f91ee4839 100644
@@ -23 +24 @@
-@@ -907,6 +907,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
+@@ -1020,6 +1020,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
@@ -31 +32 @@
-@@ -916,6 +917,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
+@@ -1029,6 +1030,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/iavf: fix AVX-512 pointer copy on 32-bit' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (44 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ice: " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/tap: avoid memcpy with null argument' " luca.boccassi
` (31 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Ian Stokes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b25fb707fa1a64411395fcf2bed73eb99059863f
Thanks.
Luca Boccassi
---
From b25fb707fa1a64411395fcf2bed73eb99059863f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 15:11:26 +0100
Subject: [PATCH] net/iavf: fix AVX-512 pointer copy on 32-bit
[ upstream commit 77608b24bdd840d323ebd9cb6ffffaf5c760983e ]
The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
copying 32 pointers only requires half the number of AVX-512 load store
operations.
Fixes: 9ab9514c150e ("net/iavf: enable AVX512 for Tx")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index b0546a14c6..eb6eb9847d 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1818,6 +1818,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
uint32_t copied = 0;
/* n is multiple of 32 */
while (copied < n) {
+#ifdef RTE_ARCH_64
const __m512i a = _mm512_loadu_si512(&txep[copied]);
const __m512i b = _mm512_loadu_si512(&txep[copied + 8]);
const __m512i c = _mm512_loadu_si512(&txep[copied + 16]);
@@ -1827,6 +1828,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
_mm512_storeu_si512(&cache_objs[copied + 8], b);
_mm512_storeu_si512(&cache_objs[copied + 16], c);
_mm512_storeu_si512(&cache_objs[copied + 24], d);
+#else
+ const __m512i a = _mm512_loadu_si512(&txep[copied]);
+ const __m512i b = _mm512_loadu_si512(&txep[copied + 16]);
+ _mm512_storeu_si512(&cache_objs[copied], a);
+ _mm512_storeu_si512(&cache_objs[copied + 16], b);
+#endif
copied += 32;
}
cache->len += n;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.294094568 +0100
+++ 0047-net-iavf-fix-AVX-512-pointer-copy-on-32-bit.patch 2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From 77608b24bdd840d323ebd9cb6ffffaf5c760983e Mon Sep 17 00:00:00 2001
+From b25fb707fa1a64411395fcf2bed73eb99059863f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 77608b24bdd840d323ebd9cb6ffffaf5c760983e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3bb6f305df..d6a861bf80 100644
+index b0546a14c6..eb6eb9847d 100644
@@ -23 +24 @@
-@@ -1892,6 +1892,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
+@@ -1818,6 +1818,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
@@ -31 +32 @@
-@@ -1901,6 +1902,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
+@@ -1827,6 +1828,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/tap: avoid memcpy with null argument' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (45 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/iavf: " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'app/testpmd: remove unnecessary cast' " luca.boccassi
` (30 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8b8b03abd8b14c9b3d42d2808a02a6161a36ef8b
Thanks.
Luca Boccassi
---
From 8b8b03abd8b14c9b3d42d2808a02a6161a36ef8b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 13 Aug 2024 19:34:16 -0700
Subject: [PATCH] net/tap: avoid memcpy with null argument
[ upstream commit 3975d85fb8606308ccdb6439b35f70e8733a78e8 ]
Calling memcpy with a null pointer even if zero length is
undefined, so check if data_length is zero.
Problem reported by Gcc analyzer.
Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/tap/tap_netlink.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index d9c260127d..35c491ac37 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -302,7 +302,8 @@ tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
rta = (struct rtattr *)NLMSG_TAIL(nh);
rta->rta_len = RTA_LENGTH(data_len);
rta->rta_type = type;
- memcpy(RTA_DATA(rta), data, data_len);
+ if (data_len > 0)
+ memcpy(RTA_DATA(rta), data, data_len);
nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len);
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.331354752 +0100
+++ 0048-net-tap-avoid-memcpy-with-null-argument.patch 2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From 3975d85fb8606308ccdb6439b35f70e8733a78e8 Mon Sep 17 00:00:00 2001
+From 8b8b03abd8b14c9b3d42d2808a02a6161a36ef8b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3975d85fb8606308ccdb6439b35f70e8733a78e8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'app/testpmd: remove unnecessary cast' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (46 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/tap: avoid memcpy with null argument' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/pcap: set live interface as non-blocking' " luca.boccassi
` (29 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7b317b7db97cd8ddf45bbd509d026496c92f883a
Thanks.
Luca Boccassi
---
From 7b317b7db97cd8ddf45bbd509d026496c92f883a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 23 Aug 2024 09:26:01 -0700
Subject: [PATCH] app/testpmd: remove unnecessary cast
[ upstream commit 0a3901aa624a690faa49ca081c468320d4edcb7a ]
The list of builtin cmdline commands has unnecessary cast which
blocks compiler type checking.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
app/test-pmd/cmdline.c | 440 ++++++++++++++++++++---------------------
1 file changed, 220 insertions(+), 220 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 820332df50..5336df528b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -12615,232 +12615,232 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
/* list of instructions */
static cmdline_parse_ctx_t builtin_ctx[] = {
- (cmdline_parse_inst_t *)&cmd_help_brief,
- (cmdline_parse_inst_t *)&cmd_help_long,
- (cmdline_parse_inst_t *)&cmd_quit,
- (cmdline_parse_inst_t *)&cmd_load_from_file,
- (cmdline_parse_inst_t *)&cmd_showport,
- (cmdline_parse_inst_t *)&cmd_showqueue,
- (cmdline_parse_inst_t *)&cmd_showeeprom,
- (cmdline_parse_inst_t *)&cmd_showportall,
- (cmdline_parse_inst_t *)&cmd_representor_info,
- (cmdline_parse_inst_t *)&cmd_showdevice,
- (cmdline_parse_inst_t *)&cmd_showcfg,
- (cmdline_parse_inst_t *)&cmd_showfwdall,
- (cmdline_parse_inst_t *)&cmd_start,
- (cmdline_parse_inst_t *)&cmd_start_tx_first,
- (cmdline_parse_inst_t *)&cmd_start_tx_first_n,
- (cmdline_parse_inst_t *)&cmd_set_link_up,
- (cmdline_parse_inst_t *)&cmd_set_link_down,
- (cmdline_parse_inst_t *)&cmd_reset,
- (cmdline_parse_inst_t *)&cmd_set_numbers,
- (cmdline_parse_inst_t *)&cmd_set_log,
- (cmdline_parse_inst_t *)&cmd_set_rxoffs,
- (cmdline_parse_inst_t *)&cmd_set_rxpkts,
- (cmdline_parse_inst_t *)&cmd_set_rxhdrs,
- (cmdline_parse_inst_t *)&cmd_set_txpkts,
- (cmdline_parse_inst_t *)&cmd_set_txsplit,
- (cmdline_parse_inst_t *)&cmd_set_txtimes,
- (cmdline_parse_inst_t *)&cmd_set_fwd_list,
- (cmdline_parse_inst_t *)&cmd_set_fwd_mask,
- (cmdline_parse_inst_t *)&cmd_set_fwd_mode,
- (cmdline_parse_inst_t *)&cmd_set_fwd_retry_mode,
- (cmdline_parse_inst_t *)&cmd_set_burst_tx_retry,
- (cmdline_parse_inst_t *)&cmd_set_promisc_mode_one,
- (cmdline_parse_inst_t *)&cmd_set_promisc_mode_all,
- (cmdline_parse_inst_t *)&cmd_set_allmulti_mode_one,
- (cmdline_parse_inst_t *)&cmd_set_allmulti_mode_all,
- (cmdline_parse_inst_t *)&cmd_set_flush_rx,
- (cmdline_parse_inst_t *)&cmd_set_link_check,
- (cmdline_parse_inst_t *)&cmd_vlan_offload,
- (cmdline_parse_inst_t *)&cmd_vlan_tpid,
- (cmdline_parse_inst_t *)&cmd_rx_vlan_filter_all,
- (cmdline_parse_inst_t *)&cmd_rx_vlan_filter,
- (cmdline_parse_inst_t *)&cmd_tx_vlan_set,
- (cmdline_parse_inst_t *)&cmd_tx_vlan_set_qinq,
- (cmdline_parse_inst_t *)&cmd_tx_vlan_reset,
- (cmdline_parse_inst_t *)&cmd_tx_vlan_set_pvid,
- (cmdline_parse_inst_t *)&cmd_csum_set,
- (cmdline_parse_inst_t *)&cmd_csum_show,
- (cmdline_parse_inst_t *)&cmd_csum_tunnel,
- (cmdline_parse_inst_t *)&cmd_csum_mac_swap,
- (cmdline_parse_inst_t *)&cmd_tso_set,
- (cmdline_parse_inst_t *)&cmd_tso_show,
- (cmdline_parse_inst_t *)&cmd_tunnel_tso_set,
- (cmdline_parse_inst_t *)&cmd_tunnel_tso_show,
+ &cmd_help_brief,
+ &cmd_help_long,
+ &cmd_quit,
+ &cmd_load_from_file,
+ &cmd_showport,
+ &cmd_showqueue,
+ &cmd_showeeprom,
+ &cmd_showportall,
+ &cmd_representor_info,
+ &cmd_showdevice,
+ &cmd_showcfg,
+ &cmd_showfwdall,
+ &cmd_start,
+ &cmd_start_tx_first,
+ &cmd_start_tx_first_n,
+ &cmd_set_link_up,
+ &cmd_set_link_down,
+ &cmd_reset,
+ &cmd_set_numbers,
+ &cmd_set_log,
+ &cmd_set_rxoffs,
+ &cmd_set_rxpkts,
+ &cmd_set_rxhdrs,
+ &cmd_set_txpkts,
+ &cmd_set_txsplit,
+ &cmd_set_txtimes,
+ &cmd_set_fwd_list,
+ &cmd_set_fwd_mask,
+ &cmd_set_fwd_mode,
+ &cmd_set_fwd_retry_mode,
+ &cmd_set_burst_tx_retry,
+ &cmd_set_promisc_mode_one,
+ &cmd_set_promisc_mode_all,
+ &cmd_set_allmulti_mode_one,
+ &cmd_set_allmulti_mode_all,
+ &cmd_set_flush_rx,
+ &cmd_set_link_check,
+ &cmd_vlan_offload,
+ &cmd_vlan_tpid,
+ &cmd_rx_vlan_filter_all,
+ &cmd_rx_vlan_filter,
+ &cmd_tx_vlan_set,
+ &cmd_tx_vlan_set_qinq,
+ &cmd_tx_vlan_reset,
+ &cmd_tx_vlan_set_pvid,
+ &cmd_csum_set,
+ &cmd_csum_show,
+ &cmd_csum_tunnel,
+ &cmd_csum_mac_swap,
+ &cmd_tso_set,
+ &cmd_tso_show,
+ &cmd_tunnel_tso_set,
+ &cmd_tunnel_tso_show,
#ifdef RTE_LIB_GRO
- (cmdline_parse_inst_t *)&cmd_gro_enable,
- (cmdline_parse_inst_t *)&cmd_gro_flush,
- (cmdline_parse_inst_t *)&cmd_gro_show,
+ &cmd_gro_enable,
+ &cmd_gro_flush,
+ &cmd_gro_show,
#endif
#ifdef RTE_LIB_GSO
- (cmdline_parse_inst_t *)&cmd_gso_enable,
- (cmdline_parse_inst_t *)&cmd_gso_size,
- (cmdline_parse_inst_t *)&cmd_gso_show,
+ &cmd_gso_enable,
+ &cmd_gso_size,
+ &cmd_gso_show,
#endif
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_rx,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_tx,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_hw,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_lw,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_pt,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_xon,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_macfwd,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_set_autoneg,
- (cmdline_parse_inst_t *)&cmd_link_flow_control_show,
- (cmdline_parse_inst_t *)&cmd_priority_flow_control_set,
- (cmdline_parse_inst_t *)&cmd_queue_priority_flow_control_set,
- (cmdline_parse_inst_t *)&cmd_config_dcb,
- (cmdline_parse_inst_t *)&cmd_read_rxd_txd,
- (cmdline_parse_inst_t *)&cmd_stop,
- (cmdline_parse_inst_t *)&cmd_mac_addr,
- (cmdline_parse_inst_t *)&cmd_set_fwd_eth_peer,
- (cmdline_parse_inst_t *)&cmd_set_qmap,
- (cmdline_parse_inst_t *)&cmd_set_xstats_hide_zero,
- (cmdline_parse_inst_t *)&cmd_set_record_core_cycles,
- (cmdline_parse_inst_t *)&cmd_set_record_burst_stats,
- (cmdline_parse_inst_t *)&cmd_operate_port,
- (cmdline_parse_inst_t *)&cmd_operate_specific_port,
- (cmdline_parse_inst_t *)&cmd_operate_attach_port,
- (cmdline_parse_inst_t *)&cmd_operate_detach_port,
- (cmdline_parse_inst_t *)&cmd_operate_detach_device,
- (cmdline_parse_inst_t *)&cmd_set_port_setup_on,
- (cmdline_parse_inst_t *)&cmd_config_speed_all,
- (cmdline_parse_inst_t *)&cmd_config_speed_specific,
- (cmdline_parse_inst_t *)&cmd_config_loopback_all,
- (cmdline_parse_inst_t *)&cmd_config_loopback_specific,
- (cmdline_parse_inst_t *)&cmd_config_rx_tx,
- (cmdline_parse_inst_t *)&cmd_config_mtu,
- (cmdline_parse_inst_t *)&cmd_config_max_pkt_len,
- (cmdline_parse_inst_t *)&cmd_config_max_lro_pkt_size,
- (cmdline_parse_inst_t *)&cmd_config_rx_mode_flag,
- (cmdline_parse_inst_t *)&cmd_config_rss,
- (cmdline_parse_inst_t *)&cmd_config_rxtx_ring_size,
- (cmdline_parse_inst_t *)&cmd_config_rxtx_queue,
- (cmdline_parse_inst_t *)&cmd_config_deferred_start_rxtx_queue,
- (cmdline_parse_inst_t *)&cmd_setup_rxtx_queue,
- (cmdline_parse_inst_t *)&cmd_config_rss_reta,
- (cmdline_parse_inst_t *)&cmd_showport_reta,
- (cmdline_parse_inst_t *)&cmd_showport_macs,
- (cmdline_parse_inst_t *)&cmd_show_port_flow_transfer_proxy,
- (cmdline_parse_inst_t *)&cmd_config_burst,
- (cmdline_parse_inst_t *)&cmd_config_thresh,
- (cmdline_parse_inst_t *)&cmd_config_threshold,
- (cmdline_parse_inst_t *)&cmd_set_uc_hash_filter,
- (cmdline_parse_inst_t *)&cmd_set_uc_all_hash_filter,
- (cmdline_parse_inst_t *)&cmd_vf_mac_addr_filter,
- (cmdline_parse_inst_t *)&cmd_queue_rate_limit,
- (cmdline_parse_inst_t *)&cmd_tunnel_udp_config,
- (cmdline_parse_inst_t *)&cmd_showport_rss_hash,
- (cmdline_parse_inst_t *)&cmd_showport_rss_hash_key,
- (cmdline_parse_inst_t *)&cmd_config_rss_hash_key,
- (cmdline_parse_inst_t *)&cmd_cleanup_txq_mbufs,
- (cmdline_parse_inst_t *)&cmd_dump,
- (cmdline_parse_inst_t *)&cmd_dump_one,
- (cmdline_parse_inst_t *)&cmd_flow,
- (cmdline_parse_inst_t *)&cmd_show_port_meter_cap,
- (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
- (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
- (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115,
- (cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
- (cmdline_parse_inst_t *)&cmd_create_port_meter,
- (cmdline_parse_inst_t *)&cmd_enable_port_meter,
- (cmdline_parse_inst_t *)&cmd_disable_port_meter,
- (cmdline_parse_inst_t *)&cmd_del_port_meter,
- (cmdline_parse_inst_t *)&cmd_del_port_meter_policy,
- (cmdline_parse_inst_t *)&cmd_set_port_meter_profile,
- (cmdline_parse_inst_t *)&cmd_set_port_meter_dscp_table,
- (cmdline_parse_inst_t *)&cmd_set_port_meter_vlan_table,
- (cmdline_parse_inst_t *)&cmd_set_port_meter_in_proto,
- (cmdline_parse_inst_t *)&cmd_get_port_meter_in_proto,
- (cmdline_parse_inst_t *)&cmd_get_port_meter_in_proto_prio,
- (cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,
- (cmdline_parse_inst_t *)&cmd_show_port_meter_stats,
- (cmdline_parse_inst_t *)&cmd_mcast_addr,
- (cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof,
- (cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof,
- (cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,
- (cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
- (cmdline_parse_inst_t *)&cmd_set_tx_loopback,
- (cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
- (cmdline_parse_inst_t *)&cmd_set_vf_traffic,
- (cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
- (cmdline_parse_inst_t *)&cmd_vf_rate_limit,
- (cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
- (cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,
- (cmdline_parse_inst_t *)&cmd_set_vxlan,
- (cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
- (cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_nvgre,
- (cmdline_parse_inst_t *)&cmd_set_nvgre_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_l2_encap,
- (cmdline_parse_inst_t *)&cmd_set_l2_encap_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_l2_decap,
- (cmdline_parse_inst_t *)&cmd_set_l2_decap_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_mplsogre_encap,
- (cmdline_parse_inst_t *)&cmd_set_mplsogre_encap_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_mplsogre_decap,
- (cmdline_parse_inst_t *)&cmd_set_mplsogre_decap_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_mplsoudp_encap,
- (cmdline_parse_inst_t *)&cmd_set_mplsoudp_encap_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_mplsoudp_decap,
- (cmdline_parse_inst_t *)&cmd_set_mplsoudp_decap_with_vlan,
- (cmdline_parse_inst_t *)&cmd_set_conntrack_common,
- (cmdline_parse_inst_t *)&cmd_set_conntrack_dir,
- (cmdline_parse_inst_t *)&cmd_show_vf_stats,
- (cmdline_parse_inst_t *)&cmd_clear_vf_stats,
- (cmdline_parse_inst_t *)&cmd_show_port_supported_ptypes,
- (cmdline_parse_inst_t *)&cmd_set_port_ptypes,
- (cmdline_parse_inst_t *)&cmd_show_port_tm_cap,
- (cmdline_parse_inst_t *)&cmd_show_port_tm_level_cap,
- (cmdline_parse_inst_t *)&cmd_show_port_tm_node_cap,
- (cmdline_parse_inst_t *)&cmd_show_port_tm_node_type,
- (cmdline_parse_inst_t *)&cmd_show_port_tm_node_stats,
- (cmdline_parse_inst_t *)&cmd_add_port_tm_node_shaper_profile,
- (cmdline_parse_inst_t *)&cmd_del_port_tm_node_shaper_profile,
- (cmdline_parse_inst_t *)&cmd_add_port_tm_node_shared_shaper,
- (cmdline_parse_inst_t *)&cmd_del_port_tm_node_shared_shaper,
- (cmdline_parse_inst_t *)&cmd_add_port_tm_node_wred_profile,
- (cmdline_parse_inst_t *)&cmd_del_port_tm_node_wred_profile,
- (cmdline_parse_inst_t *)&cmd_set_port_tm_node_shaper_profile,
- (cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node,
- (cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node_pmode,
- (cmdline_parse_inst_t *)&cmd_add_port_tm_leaf_node,
- (cmdline_parse_inst_t *)&cmd_del_port_tm_node,
- (cmdline_parse_inst_t *)&cmd_set_port_tm_node_parent,
- (cmdline_parse_inst_t *)&cmd_suspend_port_tm_node,
- (cmdline_parse_inst_t *)&cmd_resume_port_tm_node,
- (cmdline_parse_inst_t *)&cmd_port_tm_hierarchy_commit,
- (cmdline_parse_inst_t *)&cmd_port_tm_mark_ip_ecn,
- (cmdline_parse_inst_t *)&cmd_port_tm_mark_ip_dscp,
- (cmdline_parse_inst_t *)&cmd_port_tm_mark_vlan_dei,
- (cmdline_parse_inst_t *)&cmd_cfg_tunnel_udp_port,
- (cmdline_parse_inst_t *)&cmd_rx_offload_get_capa,
- (cmdline_parse_inst_t *)&cmd_rx_offload_get_configuration,
- (cmdline_parse_inst_t *)&cmd_config_per_port_rx_offload,
- (cmdline_parse_inst_t *)&cmd_config_per_queue_rx_offload,
- (cmdline_parse_inst_t *)&cmd_tx_offload_get_capa,
- (cmdline_parse_inst_t *)&cmd_tx_offload_get_configuration,
- (cmdline_parse_inst_t *)&cmd_config_per_port_tx_offload,
- (cmdline_parse_inst_t *)&cmd_config_per_queue_tx_offload,
+ &cmd_link_flow_control_set,
+ &cmd_link_flow_control_set_rx,
+ &cmd_link_flow_control_set_tx,
+ &cmd_link_flow_control_set_hw,
+ &cmd_link_flow_control_set_lw,
+ &cmd_link_flow_control_set_pt,
+ &cmd_link_flow_control_set_xon,
+ &cmd_link_flow_control_set_macfwd,
+ &cmd_link_flow_control_set_autoneg,
+ &cmd_link_flow_control_show,
+ &cmd_priority_flow_control_set,
+ &cmd_queue_priority_flow_control_set,
+ &cmd_config_dcb,
+ &cmd_read_rxd_txd,
+ &cmd_stop,
+ &cmd_mac_addr,
+ &cmd_set_fwd_eth_peer,
+ &cmd_set_qmap,
+ &cmd_set_xstats_hide_zero,
+ &cmd_set_record_core_cycles,
+ &cmd_set_record_burst_stats,
+ &cmd_operate_port,
+ &cmd_operate_specific_port,
+ &cmd_operate_attach_port,
+ &cmd_operate_detach_port,
+ &cmd_operate_detach_device,
+ &cmd_set_port_setup_on,
+ &cmd_config_speed_all,
+ &cmd_config_speed_specific,
+ &cmd_config_loopback_all,
+ &cmd_config_loopback_specific,
+ &cmd_config_rx_tx,
+ &cmd_config_mtu,
+ &cmd_config_max_pkt_len,
+ &cmd_config_max_lro_pkt_size,
+ &cmd_config_rx_mode_flag,
+ &cmd_config_rss,
+ &cmd_config_rxtx_ring_size,
+ &cmd_config_rxtx_queue,
+ &cmd_config_deferred_start_rxtx_queue,
+ &cmd_setup_rxtx_queue,
+ &cmd_config_rss_reta,
+ &cmd_showport_reta,
+ &cmd_showport_macs,
+ &cmd_show_port_flow_transfer_proxy,
+ &cmd_config_burst,
+ &cmd_config_thresh,
+ &cmd_config_threshold,
+ &cmd_set_uc_hash_filter,
+ &cmd_set_uc_all_hash_filter,
+ &cmd_vf_mac_addr_filter,
+ &cmd_queue_rate_limit,
+ &cmd_tunnel_udp_config,
+ &cmd_showport_rss_hash,
+ &cmd_showport_rss_hash_key,
+ &cmd_config_rss_hash_key,
+ &cmd_cleanup_txq_mbufs,
+ &cmd_dump,
+ &cmd_dump_one,
+ &cmd_flow,
+ &cmd_show_port_meter_cap,
+ &cmd_add_port_meter_profile_srtcm,
+ &cmd_add_port_meter_profile_trtcm,
+ &cmd_add_port_meter_profile_trtcm_rfc4115,
+ &cmd_del_port_meter_profile,
+ &cmd_create_port_meter,
+ &cmd_enable_port_meter,
+ &cmd_disable_port_meter,
+ &cmd_del_port_meter,
+ &cmd_del_port_meter_policy,
+ &cmd_set_port_meter_profile,
+ &cmd_set_port_meter_dscp_table,
+ &cmd_set_port_meter_vlan_table,
+ &cmd_set_port_meter_in_proto,
+ &cmd_get_port_meter_in_proto,
+ &cmd_get_port_meter_in_proto_prio,
+ &cmd_set_port_meter_stats_mask,
+ &cmd_show_port_meter_stats,
+ &cmd_mcast_addr,
+ &cmd_set_vf_vlan_anti_spoof,
+ &cmd_set_vf_mac_anti_spoof,
+ &cmd_set_vf_vlan_stripq,
+ &cmd_set_vf_vlan_insert,
+ &cmd_set_tx_loopback,
+ &cmd_set_all_queues_drop_en,
+ &cmd_set_vf_traffic,
+ &cmd_set_vf_rxmode,
+ &cmd_vf_rate_limit,
+ &cmd_vf_rxvlan_filter,
+ &cmd_set_vf_mac_addr,
+ &cmd_set_vxlan,
+ &cmd_set_vxlan_tos_ttl,
+ &cmd_set_vxlan_with_vlan,
+ &cmd_set_nvgre,
+ &cmd_set_nvgre_with_vlan,
+ &cmd_set_l2_encap,
+ &cmd_set_l2_encap_with_vlan,
+ &cmd_set_l2_decap,
+ &cmd_set_l2_decap_with_vlan,
+ &cmd_set_mplsogre_encap,
+ &cmd_set_mplsogre_encap_with_vlan,
+ &cmd_set_mplsogre_decap,
+ &cmd_set_mplsogre_decap_with_vlan,
+ &cmd_set_mplsoudp_encap,
+ &cmd_set_mplsoudp_encap_with_vlan,
+ &cmd_set_mplsoudp_decap,
+ &cmd_set_mplsoudp_decap_with_vlan,
+ &cmd_set_conntrack_common,
+ &cmd_set_conntrack_dir,
+ &cmd_show_vf_stats,
+ &cmd_clear_vf_stats,
+ &cmd_show_port_supported_ptypes,
+ &cmd_set_port_ptypes,
+ &cmd_show_port_tm_cap,
+ &cmd_show_port_tm_level_cap,
+ &cmd_show_port_tm_node_cap,
+ &cmd_show_port_tm_node_type,
+ &cmd_show_port_tm_node_stats,
+ &cmd_add_port_tm_node_shaper_profile,
+ &cmd_del_port_tm_node_shaper_profile,
+ &cmd_add_port_tm_node_shared_shaper,
+ &cmd_del_port_tm_node_shared_shaper,
+ &cmd_add_port_tm_node_wred_profile,
+ &cmd_del_port_tm_node_wred_profile,
+ &cmd_set_port_tm_node_shaper_profile,
+ &cmd_add_port_tm_nonleaf_node,
+ &cmd_add_port_tm_nonleaf_node_pmode,
+ &cmd_add_port_tm_leaf_node,
+ &cmd_del_port_tm_node,
+ &cmd_set_port_tm_node_parent,
+ &cmd_suspend_port_tm_node,
+ &cmd_resume_port_tm_node,
+ &cmd_port_tm_hierarchy_commit,
+ &cmd_port_tm_mark_ip_ecn,
+ &cmd_port_tm_mark_ip_dscp,
+ &cmd_port_tm_mark_vlan_dei,
+ &cmd_cfg_tunnel_udp_port,
+ &cmd_rx_offload_get_capa,
+ &cmd_rx_offload_get_configuration,
+ &cmd_config_per_port_rx_offload,
+ &cmd_config_per_queue_rx_offload,
+ &cmd_tx_offload_get_capa,
+ &cmd_tx_offload_get_configuration,
+ &cmd_config_per_port_tx_offload,
+ &cmd_config_per_queue_tx_offload,
#ifdef RTE_LIB_BPF
- (cmdline_parse_inst_t *)&cmd_operate_bpf_ld_parse,
- (cmdline_parse_inst_t *)&cmd_operate_bpf_unld_parse,
+ &cmd_operate_bpf_ld_parse,
+ &cmd_operate_bpf_unld_parse,
#endif
- (cmdline_parse_inst_t *)&cmd_config_tx_metadata_specific,
- (cmdline_parse_inst_t *)&cmd_show_tx_metadata,
- (cmdline_parse_inst_t *)&cmd_show_rx_tx_desc_status,
- (cmdline_parse_inst_t *)&cmd_show_rx_queue_desc_used_count,
- (cmdline_parse_inst_t *)&cmd_set_raw,
- (cmdline_parse_inst_t *)&cmd_show_set_raw,
- (cmdline_parse_inst_t *)&cmd_show_set_raw_all,
- (cmdline_parse_inst_t *)&cmd_config_tx_dynf_specific,
- (cmdline_parse_inst_t *)&cmd_show_fec_mode,
- (cmdline_parse_inst_t *)&cmd_set_fec_mode,
- (cmdline_parse_inst_t *)&cmd_set_rxq_avail_thresh,
- (cmdline_parse_inst_t *)&cmd_show_capability,
- (cmdline_parse_inst_t *)&cmd_set_flex_is_pattern,
- (cmdline_parse_inst_t *)&cmd_set_flex_spec_pattern,
+ &cmd_config_tx_metadata_specific,
+ &cmd_show_tx_metadata,
+ &cmd_show_rx_tx_desc_status,
+ &cmd_show_rx_queue_desc_used_count,
+ &cmd_set_raw,
+ &cmd_show_set_raw,
+ &cmd_show_set_raw_all,
+ &cmd_config_tx_dynf_specific,
+ &cmd_show_fec_mode,
+ &cmd_set_fec_mode,
+ &cmd_set_rxq_avail_thresh,
+ &cmd_show_capability,
+ &cmd_set_flex_is_pattern,
+ &cmd_set_flex_spec_pattern,
NULL,
};
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.378288134 +0100
+++ 0049-app-testpmd-remove-unnecessary-cast.patch 2024-10-23 22:16:40.507943052 +0100
@@ -1 +1 @@
-From 0a3901aa624a690faa49ca081c468320d4edcb7a Mon Sep 17 00:00:00 2001
+From 7b317b7db97cd8ddf45bbd509d026496c92f883a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a3901aa624a690faa49ca081c468320d4edcb7a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/test-pmd/cmdline.c | 458 ++++++++++++++++++++---------------------
- 1 file changed, 229 insertions(+), 229 deletions(-)
+ app/test-pmd/cmdline.c | 440 ++++++++++++++++++++---------------------
+ 1 file changed, 220 insertions(+), 220 deletions(-)
@@ -19 +20 @@
-index b7759e38a8..358319c20a 100644
+index 820332df50..5336df528b 100644
@@ -22 +23 @@
-@@ -13146,241 +13146,241 @@ static cmdline_parse_inst_t cmd_config_tx_affinity_map = {
+@@ -12615,232 +12615,232 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
@@ -203 +203,0 @@
-- (cmdline_parse_inst_t *)&cmd_showport_rss_hash_algo,
@@ -205 +204,0 @@
-- (cmdline_parse_inst_t *)&cmd_config_rss_hash_algo,
@@ -229 +227,0 @@
-- (cmdline_parse_inst_t *)&cmd_mcast_addr_flush,
@@ -291 +288,0 @@
-- (cmdline_parse_inst_t *)&cmd_config_all_port_rx_offload,
@@ -296 +292,0 @@
-- (cmdline_parse_inst_t *)&cmd_config_all_port_tx_offload,
@@ -353 +348,0 @@
-+ &cmd_showport_rss_hash_algo,
@@ -355 +349,0 @@
-+ &cmd_config_rss_hash_algo,
@@ -379 +372,0 @@
-+ &cmd_mcast_addr_flush,
@@ -441 +433,0 @@
-+ &cmd_config_all_port_rx_offload,
@@ -446 +437,0 @@
-+ &cmd_config_all_port_tx_offload,
@@ -457 +448 @@
-- (cmdline_parse_inst_t *)&cmd_show_rx_tx_queue_desc_used_count,
+- (cmdline_parse_inst_t *)&cmd_show_rx_queue_desc_used_count,
@@ -468,4 +458,0 @@
-- (cmdline_parse_inst_t *)&cmd_show_port_cman_capa,
-- (cmdline_parse_inst_t *)&cmd_show_port_cman_config,
-- (cmdline_parse_inst_t *)&cmd_set_port_cman_config,
-- (cmdline_parse_inst_t *)&cmd_config_tx_affinity_map,
@@ -475 +462 @@
-+ &cmd_show_rx_tx_queue_desc_used_count,
++ &cmd_show_rx_queue_desc_used_count,
@@ -486,4 +472,0 @@
-+ &cmd_show_port_cman_capa,
-+ &cmd_show_port_cman_config,
-+ &cmd_set_port_cman_config,
-+ &cmd_config_tx_affinity_map,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/pcap: set live interface as non-blocking' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (47 preceding siblings ...)
2024-10-23 21:16 ` patch 'app/testpmd: remove unnecessary cast' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/mana: support rdma-core via pkg-config' " luca.boccassi
` (28 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ofer Dagan, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d3a78f0f8f993a4e86460371e2b0d3c2fd11c1ad
Thanks.
Luca Boccassi
---
From d3a78f0f8f993a4e86460371e2b0d3c2fd11c1ad Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 24 Aug 2024 11:07:10 -0700
Subject: [PATCH] net/pcap: set live interface as non-blocking
[ upstream commit 60dd5a70035f447104d457aa338557fb58d5cb06 ]
The DPDK PMD's are supposed to be non-blocking and poll for packets.
Configure PCAP to do this on live interface.
Bugzilla ID: 1526
Fixes: 4c173302c307 ("pcap: add new driver")
Reported-by: Ofer Dagan <ofer.d@claroty.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/pcap/pcap_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 5780f704b6..03729c0ca7 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -522,6 +522,12 @@ open_iface_live(const char *iface, pcap_t **pcap) {
return -1;
}
+ if (pcap_setnonblock(*pcap, 1, errbuf)) {
+ PMD_LOG(ERR, "Couldn't set non-blocking on %s: %s", iface, errbuf);
+ pcap_close(*pcap);
+ return -1;
+ }
+
return 0;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.419829302 +0100
+++ 0050-net-pcap-set-live-interface-as-non-blocking.patch 2024-10-23 22:16:40.507943052 +0100
@@ -1 +1 @@
-From 60dd5a70035f447104d457aa338557fb58d5cb06 Mon Sep 17 00:00:00 2001
+From d3a78f0f8f993a4e86460371e2b0d3c2fd11c1ad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60dd5a70035f447104d457aa338557fb58d5cb06 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9626c343dc..1fb98e3d2b 100644
+index 5780f704b6..03729c0ca7 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/mana: support rdma-core via pkg-config' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (48 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/pcap: set live interface as non-blocking' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ena: revert redefining memcpy' " luca.boccassi
` (27 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Shreesh Adiga; +Cc: Long Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ead6f2f7f7b2de61948856c6b9ca9785713a4dac
Thanks.
Luca Boccassi
---
From ead6f2f7f7b2de61948856c6b9ca9785713a4dac Mon Sep 17 00:00:00 2001
From: Shreesh Adiga <16567adigashreesh@gmail.com>
Date: Fri, 20 Sep 2024 16:41:16 +0530
Subject: [PATCH] net/mana: support rdma-core via pkg-config
[ upstream commit 8d7596cad7abb413c25f6782fe62fd0d388b8b94 ]
Currently building with custom rdma-core installed in /opt/rdma-core
after setting PKG_CONFIG_PATH=/opt/rdma-core/lib64/pkgconfig/ results
in the below meson logs:
Run-time dependency libmana found: YES 1.0.54.0
Header "infiniband/manadv.h" has symbol "manadv_set_context_attr" : NO
Thus to fix this, the libs is updated in meson.build and is passed to
the cc.has_header_symbol call using dependencies. After this change,
the libmana header files are getting included and net/mana is
successfully enabled.
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
Acked-by: Long Li <longli@microsoft.com>
---
drivers/net/mana/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build
index 2d72eca5a8..3ddc230ab4 100644
--- a/drivers/net/mana/meson.build
+++ b/drivers/net/mana/meson.build
@@ -19,12 +19,14 @@ sources += files(
)
libnames = ['ibverbs', 'mana']
+libs = []
foreach libname:libnames
lib = dependency('lib' + libname, required:false)
if not lib.found()
lib = cc.find_library(libname, required:false)
endif
if lib.found()
+ libs += lib
ext_deps += lib
else
build = false
@@ -43,7 +45,7 @@ required_symbols = [
]
foreach arg:required_symbols
- if not cc.has_header_symbol(arg[0], arg[1])
+ if not cc.has_header_symbol(arg[0], arg[1], dependencies: libs, args: cflags)
build = false
reason = 'missing symbol "' + arg[1] + '" in "' + arg[0] + '"'
subdir_done()
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.456519849 +0100
+++ 0051-net-mana-support-rdma-core-via-pkg-config.patch 2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From 8d7596cad7abb413c25f6782fe62fd0d388b8b94 Mon Sep 17 00:00:00 2001
+From ead6f2f7f7b2de61948856c6b9ca9785713a4dac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d7596cad7abb413c25f6782fe62fd0d388b8b94 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 330d30b2ff..4d163fc0f2 100644
+index 2d72eca5a8..3ddc230ab4 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ena: revert redefining memcpy' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (49 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/mana: support rdma-core via pkg-config' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: remove some basic address dump' " luca.boccassi
` (26 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Wathsala Vithanage, Morten Brørup, Tyler Retzlaff,
Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e7c27b6ffec2df29611b53b00ed21d32c267a136
Thanks.
Luca Boccassi
---
From e7c27b6ffec2df29611b53b00ed21d32c267a136 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 12 Aug 2024 08:34:17 -0700
Subject: [PATCH] net/ena: revert redefining memcpy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 966764d003554b38e892cf18df9e9af44483036d ]
Redefining memcpy as rte_memcpy has no performance gain on
current compilers, and introduced bugs like this one where
rte_memcpy() will be detected as referencing past the destination.
Bugzilla ID: 1510
Fixes: 142778b3702a ("net/ena: switch memcpy to optimized version")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/base/ena_plat_dpdk.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 8f2b3a87c2..218bd4dd4b 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -26,7 +26,6 @@
#include <rte_spinlock.h>
#include <sys/time.h>
-#include <rte_memcpy.h>
typedef uint64_t u64;
typedef uint32_t u32;
@@ -67,14 +66,6 @@ typedef uint64_t dma_addr_t;
#define ENA_UDELAY(x) rte_delay_us_block(x)
#define ENA_TOUCH(x) ((void)(x))
-/* Redefine memcpy with caution: rte_memcpy can be simply aliased to memcpy, so
- * make the redefinition only if it's safe (and beneficial) to do so.
- */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || \
- defined(RTE_ARCH_ARM_NEON_MEMCPY)
-#undef memcpy
-#define memcpy rte_memcpy
-#endif
#define wmb rte_wmb
#define rmb rte_rmb
#define mb rte_mb
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.491025274 +0100
+++ 0052-net-ena-revert-redefining-memcpy.patch 2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From 966764d003554b38e892cf18df9e9af44483036d Mon Sep 17 00:00:00 2001
+From e7c27b6ffec2df29611b53b00ed21d32c267a136 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 966764d003554b38e892cf18df9e9af44483036d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23,2 +24,2 @@
- drivers/net/ena/base/ena_plat_dpdk.h | 9 +--------
- 1 file changed, 1 insertion(+), 8 deletions(-)
+ drivers/net/ena/base/ena_plat_dpdk.h | 9 ---------
+ 1 file changed, 9 deletions(-)
@@ -27 +28 @@
-index a41a4e4506..1121460470 100644
+index 8f2b3a87c2..218bd4dd4b 100644
@@ -38 +39 @@
-@@ -68,13 +67,7 @@ typedef uint64_t dma_addr_t;
+@@ -67,14 +66,6 @@ typedef uint64_t dma_addr_t;
@@ -45 +46,2 @@
--#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || defined(RTE_ARCH_ARM_NEON_MEMCPY)
+-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || \
+- defined(RTE_ARCH_ARM_NEON_MEMCPY)
@@ -49 +50,0 @@
-+
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/hns3: remove some basic address dump' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (50 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ena: revert redefining memcpy' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: fix dump counter of registers' " luca.boccassi
` (25 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/849ffb29c6f4c4bf6895cde965dc0bd51382ed61
Thanks.
Luca Boccassi
---
From 849ffb29c6f4c4bf6895cde965dc0bd51382ed61 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Thu, 26 Sep 2024 20:42:44 +0800
Subject: [PATCH] net/hns3: remove some basic address dump
[ upstream commit c8b7bec0ef23f53303c9cf03cfea44f1eb208738 ]
For security reasons, some address registers are not suitable
to be exposed, remove them.
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/hns3/hns3_regs.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 5d6f92e4bb..4997c10ae3 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -17,13 +17,9 @@
static int hns3_get_dfx_reg_line(struct hns3_hw *hw, uint32_t *lines);
-static const uint32_t cmdq_reg_addrs[] = {HNS3_CMDQ_TX_ADDR_L_REG,
- HNS3_CMDQ_TX_ADDR_H_REG,
- HNS3_CMDQ_TX_DEPTH_REG,
+static const uint32_t cmdq_reg_addrs[] = {HNS3_CMDQ_TX_DEPTH_REG,
HNS3_CMDQ_TX_TAIL_REG,
HNS3_CMDQ_TX_HEAD_REG,
- HNS3_CMDQ_RX_ADDR_L_REG,
- HNS3_CMDQ_RX_ADDR_H_REG,
HNS3_CMDQ_RX_DEPTH_REG,
HNS3_CMDQ_RX_TAIL_REG,
HNS3_CMDQ_RX_HEAD_REG,
@@ -44,9 +40,7 @@ static const uint32_t common_vf_reg_addrs[] = {HNS3_MISC_VECTOR_REG_BASE,
HNS3_FUN_RST_ING,
HNS3_GRO_EN_REG};
-static const uint32_t ring_reg_addrs[] = {HNS3_RING_RX_BASEADDR_L_REG,
- HNS3_RING_RX_BASEADDR_H_REG,
- HNS3_RING_RX_BD_NUM_REG,
+static const uint32_t ring_reg_addrs[] = {HNS3_RING_RX_BD_NUM_REG,
HNS3_RING_RX_BD_LEN_REG,
HNS3_RING_RX_EN_REG,
HNS3_RING_RX_MERGE_EN_REG,
@@ -57,8 +51,6 @@ static const uint32_t ring_reg_addrs[] = {HNS3_RING_RX_BASEADDR_L_REG,
HNS3_RING_RX_FBD_OFFSET_REG,
HNS3_RING_RX_STASH_REG,
HNS3_RING_RX_BD_ERR_REG,
- HNS3_RING_TX_BASEADDR_L_REG,
- HNS3_RING_TX_BASEADDR_H_REG,
HNS3_RING_TX_BD_NUM_REG,
HNS3_RING_TX_EN_REG,
HNS3_RING_TX_PRIORITY_REG,
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.537110089 +0100
+++ 0053-net-hns3-remove-some-basic-address-dump.patch 2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From c8b7bec0ef23f53303c9cf03cfea44f1eb208738 Mon Sep 17 00:00:00 2001
+From 849ffb29c6f4c4bf6895cde965dc0bd51382ed61 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8b7bec0ef23f53303c9cf03cfea44f1eb208738 ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +19 @@
-index 955bc7e3af..8793f61153 100644
+index 5d6f92e4bb..4997c10ae3 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/hns3: fix dump counter of registers' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (51 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/hns3: remove some basic address dump' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'ethdev: fix overflow in descriptor count' " luca.boccassi
` (24 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9c49c19a4dba98e62acbe90f3e2f2ca129f6a1da
Thanks.
Luca Boccassi
---
From 9c49c19a4dba98e62acbe90f3e2f2ca129f6a1da Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Thu, 26 Sep 2024 20:42:45 +0800
Subject: [PATCH] net/hns3: fix dump counter of registers
[ upstream commit e9b82b4d54c019973ffcb5f404ba920494f70513 ]
Since the driver dumps the queue interrupt registers according
to the intr_tqps_num, the counter should be the same.
Fixes: acb3260fac5c ("net/hns3: fix dump register out of range")
Fixes: 936eda25e8da ("net/hns3: support dump register")
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/hns3/hns3_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 4997c10ae3..e92e43959f 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -127,7 +127,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
tqp_intr_lines = sizeof(tqp_intr_reg_addrs) / REG_LEN_PER_LINE + 1;
len = (cmdq_lines + common_lines + ring_lines * hw->tqps_num +
- tqp_intr_lines * hw->num_msi) * REG_NUM_PER_LINE;
+ tqp_intr_lines * hw->intr_tqps_num) * REG_NUM_PER_LINE;
if (!hns->is_vf) {
ret = hns3_get_regs_num(hw, ®s_num_32_bit, ®s_num_64_bit);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.571662223 +0100
+++ 0054-net-hns3-fix-dump-counter-of-registers.patch 2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From e9b82b4d54c019973ffcb5f404ba920494f70513 Mon Sep 17 00:00:00 2001
+From 9c49c19a4dba98e62acbe90f3e2f2ca129f6a1da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9b82b4d54c019973ffcb5f404ba920494f70513 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8793f61153..8c0c0a3027 100644
+index 4997c10ae3..e92e43959f 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'ethdev: fix overflow in descriptor count' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (52 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/hns3: fix dump counter of registers' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' " luca.boccassi
` (23 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Niall Meade; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a905d9d63ec9bb6540978f1906c3d7f591c78586
Thanks.
Luca Boccassi
---
From a905d9d63ec9bb6540978f1906c3d7f591c78586 Mon Sep 17 00:00:00 2001
From: Niall Meade <niall.meade@intel.com>
Date: Mon, 30 Sep 2024 13:40:02 +0000
Subject: [PATCH] ethdev: fix overflow in descriptor count
[ upstream commit 30efe60d3a37896567b660229ef6a04c5526f6db ]
Addressed a specific overflow issue in the eth_dev_adjust_nb_desc()
function where the uint16_t variable nb_desc would overflow when its
value was greater than (2^16 - nb_align). This overflow caused nb_desc
to incorrectly wrap around between 0 and nb_align-1, leading to the
function setting nb_desc to nb_min instead of the expected nb_max.
To give an example, let nb_desc=UINT16_MAX, nb_align=32, nb_max=4096 and
nb_min=64. RTE_ALIGN_CEIL(nb_desc, nb_align) calls
RTE_ALIGN_FLOOR(nb_desc + nb_align - 1, nb_align). This results in an
overflow of nb_desc, leading to nb_desc being set to 30 and then 0 when
the macros return. As a result of this, nb_desc is then set to nb_min
later on.
The resolution involves upcasting nb_desc to a uint32_t before the
RTE_ALIGN_CEIL macro is applied. This change ensures that the subsequent
call to RTE_ALIGN_FLOOR(nb_desc + (nb_align - 1), nb_align) does not
result in an overflow, as it would when nb_desc is a uint16_t. By using
a uint32_t for these operations, the correct behavior is maintained
without the risk of overflow.
Fixes: 0f67fc3baeb9 ("ethdev: add function to adjust number of descriptors")
Signed-off-by: Niall Meade <niall.meade@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
.mailmap | 1 +
lib/ethdev/rte_ethdev.c | 12 +++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index 8c7b38fb35..dd1c6a6a87 100644
--- a/.mailmap
+++ b/.mailmap
@@ -989,6 +989,7 @@ Nelson Escobar <neescoba@cisco.com>
Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Netanel Belgazal <netanel@amazon.com>
Netanel Gonen <netanelg@mellanox.com>
+Niall Meade <niall.meade@intel.com>
Niall Power <niall.power@intel.com>
Nick Connolly <nick.connolly@arm.com> <nick.connolly@mayadata.io>
Nick Nunley <nicholas.d.nunley@intel.com>
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e1f18fd8a4..e85dc3d8b2 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -5739,13 +5739,19 @@ static void
eth_dev_adjust_nb_desc(uint16_t *nb_desc,
const struct rte_eth_desc_lim *desc_lim)
{
+ /* Upcast to uint32 to avoid potential overflow with RTE_ALIGN_CEIL(). */
+ uint32_t nb_desc_32 = (uint32_t)*nb_desc;
+
if (desc_lim->nb_align != 0)
- *nb_desc = RTE_ALIGN_CEIL(*nb_desc, desc_lim->nb_align);
+ nb_desc_32 = RTE_ALIGN_CEIL(nb_desc_32, desc_lim->nb_align);
if (desc_lim->nb_max != 0)
- *nb_desc = RTE_MIN(*nb_desc, desc_lim->nb_max);
+ nb_desc_32 = RTE_MIN(nb_desc_32, desc_lim->nb_max);
- *nb_desc = RTE_MAX(*nb_desc, desc_lim->nb_min);
+ nb_desc_32 = RTE_MAX(nb_desc_32, desc_lim->nb_min);
+
+ /* Assign clipped u32 back to u16. */
+ *nb_desc = (uint16_t)nb_desc_32;
}
int
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.606290111 +0100
+++ 0055-ethdev-fix-overflow-in-descriptor-count.patch 2024-10-23 22:16:40.515943363 +0100
@@ -1 +1 @@
-From 30efe60d3a37896567b660229ef6a04c5526f6db Mon Sep 17 00:00:00 2001
+From a905d9d63ec9bb6540978f1906c3d7f591c78586 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30efe60d3a37896567b660229ef6a04c5526f6db ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index d49838320e..6e72362ebc 100644
+index 8c7b38fb35..dd1c6a6a87 100644
@@ -40 +41 @@
-@@ -1070,6 +1070,7 @@ Nelson Escobar <neescoba@cisco.com>
+@@ -989,6 +989,7 @@ Nelson Escobar <neescoba@cisco.com>
@@ -46 +46,0 @@
- Nicholas Pratte <npratte@iol.unh.edu>
@@ -47,0 +48 @@
+ Nick Nunley <nicholas.d.nunley@intel.com>
@@ -49 +50 @@
-index a1f7efa913..84ee7588fc 100644
+index e1f18fd8a4..e85dc3d8b2 100644
@@ -52 +53 @@
-@@ -6667,13 +6667,19 @@ static void
+@@ -5739,13 +5739,19 @@ static void
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (53 preceding siblings ...)
2024-10-23 21:16 ` patch 'ethdev: fix overflow in descriptor count' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/dpaa: fix typecasting channel ID' " luca.boccassi
` (22 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c1fd86cee21c314cecba532a87d0ca766f0f13a
Thanks.
Luca Boccassi
---
From 0c1fd86cee21c314cecba532a87d0ca766f0f13a Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Tue, 1 Oct 2024 16:33:08 +0530
Subject: [PATCH] bus/dpaa: fix PFDRs leaks due to FQRNIs
[ upstream commit b292acc3c4a8fd5104cfdfa5c6d3d0df95b6543b ]
When a Retire FQ command is executed on a FQ in the
Tentatively Scheduled or Parked states, in that case FQ
is retired immediately and a FQRNI (Frame Queue Retirement
Notification Immediate) message is generated. Software
must read this message from MR and consume it to free
the memory used by it.
Although it is not mentioned about which memory to be used
by FQRNIs in the RM but through experiments it is proven
that it can use PFDRs. So if these messages are allowed to
build up indefinitely then PFDR resources can become exhausted
and cause enqueues to stall. Therefore software must consume
these MR messages on a regular basis to avoid depleting
the available PFDR resources.
This is the PFDRs leak issue which user can experience while
using the DPDK crypto driver and creating and destroying the
sessions multiple times. On a session destroy, DPDK calls the
qman_retire_fq() for each FQ used by the session, but it does
not handle the FQRNIs generated and allowed them to build up
indefinitely in MR.
This patch fixes this issue by consuming the FQRNIs received
from MR immediately after FQ retire by calling drain_mr_fqrni().
Please note that this drain_mr_fqrni() only look for
FQRNI type messages to consume. If there are other type of messages
like FQRN, FQRL, FQPN, ERN etc. also coming on MR then those
messages need to be handled separately.
Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/qbman/qman.c | 46 ++++++++++++++++--------------
1 file changed, 25 insertions(+), 21 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 83db0a534e..f06992ca48 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -294,10 +294,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
qm_dqrr_set_maxfill(&p->p, 0);
}
+static inline void qm_mr_pvb_update(struct qm_portal *portal)
+{
+ register struct qm_mr *mr = &portal->mr;
+ const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
+
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
+ DPAA_ASSERT(mr->pmode == qm_mr_pvb);
+#endif
+ /* when accessing 'verb', use __raw_readb() to ensure that compiler
+ * inlining doesn't try to optimise out "excess reads".
+ */
+ if ((__raw_readb(&res->ern.verb) & QM_MR_VERB_VBIT) == mr->vbit) {
+ mr->pi = (mr->pi + 1) & (QM_MR_SIZE - 1);
+ if (!mr->pi)
+ mr->vbit ^= QM_MR_VERB_VBIT;
+ mr->fill++;
+ res = MR_INC(res);
+ }
+ dcbit_ro(res);
+}
+
static int drain_mr_fqrni(struct qm_portal *p)
{
const struct qm_mr_entry *msg;
loop:
+ qm_mr_pvb_update(p);
msg = qm_mr_current(p);
if (!msg) {
/*
@@ -319,6 +341,7 @@ loop:
do {
now = mfatb();
} while ((then + 10000) > now);
+ qm_mr_pvb_update(p);
msg = qm_mr_current(p);
if (!msg)
return 0;
@@ -481,27 +504,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
return 0;
}
-static inline void qm_mr_pvb_update(struct qm_portal *portal)
-{
- register struct qm_mr *mr = &portal->mr;
- const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
-
-#ifdef RTE_LIBRTE_DPAA_HWDEBUG
- DPAA_ASSERT(mr->pmode == qm_mr_pvb);
-#endif
- /* when accessing 'verb', use __raw_readb() to ensure that compiler
- * inlining doesn't try to optimise out "excess reads".
- */
- if ((__raw_readb(&res->ern.verb) & QM_MR_VERB_VBIT) == mr->vbit) {
- mr->pi = (mr->pi + 1) & (QM_MR_SIZE - 1);
- if (!mr->pi)
- mr->vbit ^= QM_MR_VERB_VBIT;
- mr->fill++;
- res = MR_INC(res);
- }
- dcbit_ro(res);
-}
-
struct qman_portal *
qman_init_portal(struct qman_portal *portal,
const struct qm_portal_config *c,
@@ -1825,6 +1827,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)
}
out:
FQUNLOCK(fq);
+ /* Draining FQRNIs, if any */
+ drain_mr_fqrni(&p->p);
return rval;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.644755490 +0100
+++ 0056-bus-dpaa-fix-PFDRs-leaks-due-to-FQRNIs.patch 2024-10-23 22:16:40.515943363 +0100
@@ -1 +1 @@
-From b292acc3c4a8fd5104cfdfa5c6d3d0df95b6543b Mon Sep 17 00:00:00 2001
+From 0c1fd86cee21c314cecba532a87d0ca766f0f13a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b292acc3c4a8fd5104cfdfa5c6d3d0df95b6543b ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index 301057723e..9c90ee25a6 100644
+index 83db0a534e..f06992ca48 100644
@@ -49 +50 @@
-@@ -292,10 +292,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
+@@ -294,10 +294,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
@@ -82 +83 @@
-@@ -317,6 +339,7 @@ loop:
+@@ -319,6 +341,7 @@ loop:
@@ -90 +91 @@
-@@ -479,27 +502,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
+@@ -481,27 +504,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
@@ -118 +119 @@
-@@ -1794,6 +1796,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)
+@@ -1825,6 +1827,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/dpaa: fix typecasting channel ID' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (54 preceding siblings ...)
2024-10-23 21:16 ` patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' " luca.boccassi
` (21 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Rohit Raj; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b4daf0e0fd6a71a3a72646ac72434e86d9cfad54
Thanks.
Luca Boccassi
---
From b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Tue, 1 Oct 2024 16:33:09 +0530
Subject: [PATCH] net/dpaa: fix typecasting channel ID
[ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ]
Avoid typecasting ch_id to u32 and passing it to another API since it
can corrupt other data. Instead, create new u32 variable and typecast
it back to u16 after it gets updated by the API.
Fixes: 0c504f6950b6 ("net/dpaa: support push mode")
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index bcb28f33ee..6fdbe80334 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
struct fman_if *fif = dev->process_private;
struct qman_fq *rxq = &dpaa_intf->rx_queues[queue_idx];
struct qm_mcc_initfq opts = {0};
- u32 flags = 0;
+ u32 ch_id, flags = 0;
int ret;
u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
uint32_t max_rx_pktlen;
@@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
DPAA_IF_RX_CONTEXT_STASH;
/*Create a channel and associate given queue with the channel*/
- qman_alloc_pool_range((u32 *)&rxq->ch_id, 1, 1, 0);
+ qman_alloc_pool_range(&ch_id, 1, 1, 0);
+ rxq->ch_id = (u16)ch_id;
+
opts.we_mask = opts.we_mask | QM_INITFQ_WE_DESTWQ;
opts.fqd.dest.channel = rxq->ch_id;
opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.682344768 +0100
+++ 0057-net-dpaa-fix-typecasting-channel-ID.patch 2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e Mon Sep 17 00:00:00 2001
+From b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 51f5422e0c..afeca4307e 100644
+index bcb28f33ee..6fdbe80334 100644
@@ -23 +24 @@
-@@ -972,7 +972,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -32 +33 @@
-@@ -1096,7 +1096,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (55 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/dpaa: fix typecasting channel ID' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix the fman details status' " luca.boccassi
` (20 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6770a35bbf822b5b56cb14180fde627c8f07aae1
Thanks.
Luca Boccassi
---
From 6770a35bbf822b5b56cb14180fde627c8f07aae1 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 1 Oct 2024 16:33:10 +0530
Subject: [PATCH] bus/dpaa: fix VSP for 1G fm1-mac9 and 10
[ upstream commit 25434831ca958583fb79e1e8b06e83274c68fc93 ]
No need to classify interface separately for 1G and 10G
Note that VSP or Virtual storage profile are DPAA equivalent for SRIOV
config to logically divide a physical ports in virtual ports.
Fixes: e0718bb2ca95 ("bus/dpaa: add virtual storage profile port init")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/fman/fman.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index 1814372a40..8263d42bed 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -153,7 +153,7 @@ static void fman_if_vsp_init(struct __fman_if *__if)
size_t lenp;
const uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1};
- if (__if->__if.mac_type == fman_mac_1g) {
+ if (__if->__if.mac_idx <= 8) {
for_each_compatible_node(dev, NULL,
"fsl,fman-port-1g-rx-extended-args") {
prop = of_get_property(dev, "cell-index", &lenp);
@@ -176,7 +176,32 @@ static void fman_if_vsp_init(struct __fman_if *__if)
}
}
}
- } else if (__if->__if.mac_type == fman_mac_10g) {
+
+ for_each_compatible_node(dev, NULL,
+ "fsl,fman-port-op-extended-args") {
+ prop = of_get_property(dev, "cell-index", &lenp);
+
+ if (prop) {
+ cell_index = of_read_number(&prop[0],
+ lenp / sizeof(phandle));
+
+ if (cell_index == __if->__if.mac_idx) {
+ prop = of_get_property(dev,
+ "vsp-window",
+ &lenp);
+
+ if (prop) {
+ __if->__if.num_profiles =
+ of_read_number(&prop[0],
+ 1);
+ __if->__if.base_profile_id =
+ of_read_number(&prop[1],
+ 1);
+ }
+ }
+ }
+ }
+ } else {
for_each_compatible_node(dev, NULL,
"fsl,fman-port-10g-rx-extended-args") {
prop = of_get_property(dev, "cell-index", &lenp);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.718119992 +0100
+++ 0058-bus-dpaa-fix-VSP-for-1G-fm1-mac9-and-10.patch 2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From 25434831ca958583fb79e1e8b06e83274c68fc93 Mon Sep 17 00:00:00 2001
+From 6770a35bbf822b5b56cb14180fde627c8f07aae1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25434831ca958583fb79e1e8b06e83274c68fc93 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 41195eb0a7..beeb03dbf2 100644
+index 1814372a40..8263d42bed 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'bus/dpaa: fix the fman details status' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (56 preceding siblings ...)
2024-10-23 21:16 ` patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/dpaa: fix reallocate mbuf handling' " luca.boccassi
` (19 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9bc6a69f0ba53bfe6afdea505ed3e80dcd3cc1c6
Thanks.
Luca Boccassi
---
From 9bc6a69f0ba53bfe6afdea505ed3e80dcd3cc1c6 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 1 Oct 2024 16:33:11 +0530
Subject: [PATCH] bus/dpaa: fix the fman details status
[ upstream commit a87a1d0f4e7667fa3d6b818f30aa5c062e567597 ]
Fix the incorrect placing of brackets to calculate stats.
This corrects the "(a | b) << 32" to "a | (b << 32)"
Fixes: e62a3f4183f1 ("bus/dpaa: fix statistics reading")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/fman/fman_hw.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index 24a99f7235..97e792806f 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -243,10 +243,11 @@ fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)
int i;
uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
- for (i = 0; i < n; i++)
- value[i] = (((u64)in_be32((char *)regs + base_offset + 8 * i) |
- (u64)in_be32((char *)regs + base_offset +
- 8 * i + 4)) << 32);
+ for (i = 0; i < n; i++) {
+ uint64_t a = in_be32((char *)regs + base_offset + 8 * i);
+ uint64_t b = in_be32((char *)regs + base_offset + 8 * i + 4);
+ value[i] = a | b << 32;
+ }
}
void
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.753258713 +0100
+++ 0059-bus-dpaa-fix-the-fman-details-status.patch 2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From a87a1d0f4e7667fa3d6b818f30aa5c062e567597 Mon Sep 17 00:00:00 2001
+From 9bc6a69f0ba53bfe6afdea505ed3e80dcd3cc1c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a87a1d0f4e7667fa3d6b818f30aa5c062e567597 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/dpaa: fix reallocate mbuf handling' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (57 preceding siblings ...)
2024-10-23 21:16 ` patch 'bus/dpaa: fix the fman details status' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/memif: fix buffer overflow in zero copy Rx' " luca.boccassi
` (18 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Vanshika Shukla; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/30d634d95ffab0f0d9dc8b4fc477814ff179fea7
Thanks.
Luca Boccassi
---
From 30d634d95ffab0f0d9dc8b4fc477814ff179fea7 Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Tue, 1 Oct 2024 16:33:25 +0530
Subject: [PATCH] net/dpaa: fix reallocate mbuf handling
[ upstream commit 7594cafa92189fd5bad87a5caa6b7a92bbab0979 ]
This patch fixes the bug in the reallocate_mbuf code
handling. The source location is corrected when copying
the data in the new mbuf.
Fixes: f8c7a17a48c9 ("net/dpaa: support Tx scatter gather for non-DPAA buffer")
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index ce4f3d6c85..018d55bbdc 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -1034,7 +1034,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)
/* Copy the data */
data = rte_pktmbuf_append(new_mbufs[0], bytes_to_copy);
- rte_memcpy((uint8_t *)data, rte_pktmbuf_mtod_offset(mbuf,
+ rte_memcpy((uint8_t *)data, rte_pktmbuf_mtod_offset(temp_mbuf,
void *, offset1), bytes_to_copy);
/* Set new offsets and the temp buffers */
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.787962075 +0100
+++ 0060-net-dpaa-fix-reallocate-mbuf-handling.patch 2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From 7594cafa92189fd5bad87a5caa6b7a92bbab0979 Mon Sep 17 00:00:00 2001
+From 30d634d95ffab0f0d9dc8b4fc477814ff179fea7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7594cafa92189fd5bad87a5caa6b7a92bbab0979 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1d7efdef88..247e7b92ba 100644
+index ce4f3d6c85..018d55bbdc 100644
@@ -23 +24 @@
-@@ -1223,7 +1223,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)
+@@ -1034,7 +1034,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/memif: fix buffer overflow in zero copy Rx' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (58 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/dpaa: fix reallocate mbuf handling' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/tap: restrict maximum number of MP FDs' " luca.boccassi
` (17 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Mihai Brodschi; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/270f15f3fdc970e6c1443be6eac23dc544890c80
Thanks.
Luca Boccassi
---
From 270f15f3fdc970e6c1443be6eac23dc544890c80 Mon Sep 17 00:00:00 2001
From: Mihai Brodschi <mihai.brodschi@broadcom.com>
Date: Sat, 29 Jun 2024 00:01:29 +0300
Subject: [PATCH] net/memif: fix buffer overflow in zero copy Rx
[ upstream commit b92b18b76858ed58ebe9c5dea9dedf9a99e7e0e2 ]
rte_pktmbuf_alloc_bulk is called by the zero-copy receiver to allocate
new mbufs to be provided to the sender. The allocated mbuf pointers
are stored in a ring, but the alloc function doesn't implement index
wrap-around, so it writes past the end of the array. This results in
memory corruption and duplicate mbufs being received.
Allocate 2x the space for the mbuf ring, so that the alloc function
has a contiguous array to write to, then copy the excess entries
to the start of the array.
Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
Signed-off-by: Mihai Brodschi <mihai.brodschi@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
.mailmap | 1 +
drivers/net/memif/rte_eth_memif.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index dd1c6a6a87..629383cb25 100644
--- a/.mailmap
+++ b/.mailmap
@@ -932,6 +932,7 @@ Michal Swiatkowski <michal.swiatkowski@intel.com>
Michal Wilczynski <michal.wilczynski@intel.com>
Michel Machado <michel@digirati.com.br>
Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
+Mihai Brodschi <mihai.brodschi@broadcom.com>
Mihai Pogonaru <pogonarumihai@gmail.com>
Mike Baucom <michael.baucom@broadcom.com>
Mike Pattrick <mkp@redhat.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 86b821ac5c..9379c201e9 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -531,6 +531,10 @@ refill:
ret = rte_pktmbuf_alloc_bulk(mq->mempool, &mq->buffers[head & mask], n_slots);
if (unlikely(ret < 0))
goto no_free_mbufs;
+ if (unlikely(n_slots > ring_size - (head & mask))) {
+ rte_memcpy(mq->buffers, &mq->buffers[ring_size],
+ (n_slots + (head & mask) - ring_size) * sizeof(struct rte_mbuf *));
+ }
while (n_slots--) {
s0 = head++ & mask;
@@ -1127,8 +1131,12 @@ memif_init_queues(struct rte_eth_dev *dev)
}
mq->buffers = NULL;
if (pmd->flags & ETH_MEMIF_FLAG_ZERO_COPY) {
+ /*
+ * Allocate 2x ring_size to reserve a contiguous array for
+ * rte_pktmbuf_alloc_bulk (to store allocated mbufs).
+ */
mq->buffers = rte_zmalloc("bufs", sizeof(struct rte_mbuf *) *
- (1 << mq->log2_ring_size), 0);
+ (1 << (mq->log2_ring_size + 1)), 0);
if (mq->buffers == NULL)
return -ENOMEM;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.824756841 +0100
+++ 0061-net-memif-fix-buffer-overflow-in-zero-copy-Rx.patch 2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From b92b18b76858ed58ebe9c5dea9dedf9a99e7e0e2 Mon Sep 17 00:00:00 2001
+From 270f15f3fdc970e6c1443be6eac23dc544890c80 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b92b18b76858ed58ebe9c5dea9dedf9a99e7e0e2 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 7b3a20af68..2e909c48a8 100644
+index dd1c6a6a87..629383cb25 100644
@@ -30 +31,2 @@
-@@ -1011,6 +1011,7 @@ Michal Wilczynski <michal.wilczynski@intel.com>
+@@ -932,6 +932,7 @@ Michal Swiatkowski <michal.swiatkowski@intel.com>
+ Michal Wilczynski <michal.wilczynski@intel.com>
@@ -32 +33,0 @@
- Midde Ajijur Rehaman <ajijurx.rehaman.midde@intel.com>
@@ -39 +40 @@
-index e220ffaf92..cd722f254f 100644
+index 86b821ac5c..9379c201e9 100644
@@ -42 +43 @@
-@@ -600,6 +600,10 @@ refill:
+@@ -531,6 +531,10 @@ refill:
@@ -53 +54 @@
-@@ -1245,8 +1249,12 @@ memif_init_queues(struct rte_eth_dev *dev)
+@@ -1127,8 +1131,12 @@ memif_init_queues(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/tap: restrict maximum number of MP FDs' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (59 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/memif: fix buffer overflow in zero copy Rx' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'ethdev: verify queue ID in Tx done cleanup' " luca.boccassi
` (16 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1ef2a5f5f618bba8a5327575c2bdc652e27ba175
Thanks.
Luca Boccassi
---
From 1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 11 Oct 2024 10:29:23 -0700
Subject: [PATCH] net/tap: restrict maximum number of MP FDs
[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ]
Now that max MP fds has increased to 253 it is possible that
the number of queues the TAP device can handle is less than that.
Therefore the code to handle MP message should only allow the
number of queues it can handle.
Coverity issue: 445386
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/tap/rte_eth_tap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index a6bf6eec55..68f9a5ce34 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2453,7 +2453,7 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
reply.num_fds = 0;
reply_param->rxq_count = 0;
if (dev->data->nb_rx_queues + dev->data->nb_tx_queues >
- RTE_MP_MAX_FD_NUM){
+ RTE_PMD_TAP_MAX_QUEUES){
TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds");
return -1;
}
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.861915300 +0100
+++ 0062-net-tap-restrict-maximum-number-of-MP-FDs.patch 2024-10-23 22:16:40.523943674 +0100
@@ -1 +1 @@
-From 288649a11a8a332727f2a988c676ff7dfd1bc4c5 Mon Sep 17 00:00:00 2001
+From 1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/tap/rte_eth_tap.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ drivers/net/tap/rte_eth_tap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21 +22 @@
-index 5ad3bbadd1..c486c6f073 100644
+index a6bf6eec55..68f9a5ce34 100644
@@ -24,10 +25,7 @@
-@@ -2391,9 +2391,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
- reply_param->q_count = 0;
-
- RTE_ASSERT(dev->data->nb_rx_queues == dev->data->nb_tx_queues);
-- if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) {
-+
-+ if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) {
- TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u",
-- dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM);
-+ dev->data->nb_rx_queues, RTE_PMD_TAP_MAX_QUEUES);
+@@ -2453,7 +2453,7 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
+ reply.num_fds = 0;
+ reply_param->rxq_count = 0;
+ if (dev->data->nb_rx_queues + dev->data->nb_tx_queues >
+- RTE_MP_MAX_FD_NUM){
++ RTE_PMD_TAP_MAX_QUEUES){
+ TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds");
@@ -36 +33,0 @@
-
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'ethdev: verify queue ID in Tx done cleanup' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (60 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/tap: restrict maximum number of MP FDs' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: verify reset type from firmware' " luca.boccassi
` (15 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/856f4dd1d2fd899a2c77de750d71ad8dd559bfa7
Thanks.
Luca Boccassi
---
From 856f4dd1d2fd899a2c77de750d71ad8dd559bfa7 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 12 Oct 2024 17:14:37 +0800
Subject: [PATCH] ethdev: verify queue ID in Tx done cleanup
[ upstream commit 707f50cef003a89f8fc5170c2ca5aea808cf4297 ]
Verify queue_id for rte_eth_tx_done_cleanup API.
Fixes: 44a718c457b5 ("ethdev: add API to free consumed buffers in Tx ring")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
lib/ethdev/rte_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e85dc3d8b2..99b16e4dcc 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -2491,6 +2491,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
dev = &rte_eth_devices[port_id];
+#ifdef RTE_ETHDEV_DEBUG_TX
+ ret = eth_dev_validate_tx_queue(dev, queue_id);
+ if (ret != 0)
+ return ret;
+#endif
+
if (*dev->dev_ops->tx_done_cleanup == NULL)
return -ENOTSUP;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.897969185 +0100
+++ 0063-ethdev-verify-queue-ID-in-Tx-done-cleanup.patch 2024-10-23 22:16:40.523943674 +0100
@@ -1 +1 @@
-From 707f50cef003a89f8fc5170c2ca5aea808cf4297 Mon Sep 17 00:00:00 2001
+From 856f4dd1d2fd899a2c77de750d71ad8dd559bfa7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 707f50cef003a89f8fc5170c2ca5aea808cf4297 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 12f42f1d68..6413c54e3b 100644
+index e85dc3d8b2..99b16e4dcc 100644
@@ -21 +22 @@
-@@ -2910,6 +2910,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
+@@ -2491,6 +2491,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/hns3: verify reset type from firmware' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (61 preceding siblings ...)
2024-10-23 21:16 ` patch 'ethdev: verify queue ID in Tx done cleanup' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/nfp: fix link change return value' " luca.boccassi
` (14 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1cdad91ab4174d6a3a2552fd01d44d7a33e9c900
Thanks.
Luca Boccassi
---
From 1cdad91ab4174d6a3a2552fd01d44d7a33e9c900 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 12 Oct 2024 17:14:57 +0800
Subject: [PATCH] net/hns3: verify reset type from firmware
[ upstream commit 3db846003734d38d59950ebe024ad6d61afe08f0 ]
Verify reset-type which get from firmware.
Fixes: 1c1eb759e9d7 ("net/hns3: support RAS process in Kunpeng 930")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_intr.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 916bf30dcb..d37c7eba6b 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -2252,6 +2252,12 @@ hns3_handle_module_error_data(struct hns3_hw *hw, uint32_t *buf,
sum_err_info = (struct hns3_sum_err_info *)&buf[offset++];
mod_num = sum_err_info->mod_num;
reset_type = sum_err_info->reset_type;
+
+ if (reset_type >= HNS3_MAX_RESET) {
+ hns3_err(hw, "invalid reset type = %u", reset_type);
+ return;
+ }
+
if (reset_type && reset_type != HNS3_NONE_RESET)
hns3_atomic_set_bit(reset_type, &hw->reset.request);
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.934646718 +0100
+++ 0064-net-hns3-verify-reset-type-from-firmware.patch 2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From 3db846003734d38d59950ebe024ad6d61afe08f0 Mon Sep 17 00:00:00 2001
+From 1cdad91ab4174d6a3a2552fd01d44d7a33e9c900 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3db846003734d38d59950ebe024ad6d61afe08f0 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f7162ee7bc..2de2b86b02 100644
+index 916bf30dcb..d37c7eba6b 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/nfp: fix link change return value' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (62 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/hns3: verify reset type from firmware' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/pcap: fix blocking Rx' " luca.boccassi
` (13 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4e6b6c42ce56ff93451a218e746d82fcdace6c20
Thanks.
Luca Boccassi
---
From 4e6b6c42ce56ff93451a218e746d82fcdace6c20 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Sat, 12 Oct 2024 10:41:02 +0800
Subject: [PATCH] net/nfp: fix link change return value
[ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ]
The return value of 'nfp_eth_set_configured()' is three ways, the
original logic considered it as two ways wrongly.
Fixes: 61d4008fe6bb ("net/nfp: support setting link up/down")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/nfp/nfp_ethdev.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 68fd67a024..d795025004 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -205,6 +205,7 @@ error:
static int
nfp_net_stop(struct rte_eth_dev *dev)
{
+ int ret;
struct nfp_net_hw *hw;
PMD_INIT_LOG(DEBUG, "Stop");
@@ -220,10 +221,12 @@ nfp_net_stop(struct rte_eth_dev *dev)
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
/* Configure the physical port down */
- nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
else
- nfp_eth_set_configured(dev->process_private,
+ ret = nfp_eth_set_configured(dev->process_private,
hw->nfp_idx, 0);
+ if (ret < 0)
+ return ret;
return 0;
}
@@ -232,6 +235,7 @@ nfp_net_stop(struct rte_eth_dev *dev)
static int
nfp_net_set_link_up(struct rte_eth_dev *dev)
{
+ int ret;
struct nfp_net_hw *hw;
PMD_DRV_LOG(DEBUG, "Set link up");
@@ -240,16 +244,21 @@ nfp_net_set_link_up(struct rte_eth_dev *dev)
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
/* Configure the physical port down */
- return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
+ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
else
- return nfp_eth_set_configured(dev->process_private,
+ ret = nfp_eth_set_configured(dev->process_private,
hw->nfp_idx, 1);
+ if (ret < 0)
+ return ret;
+
+ return 0;
}
/* Set the link down. */
static int
nfp_net_set_link_down(struct rte_eth_dev *dev)
{
+ int ret;
struct nfp_net_hw *hw;
PMD_DRV_LOG(DEBUG, "Set link down");
@@ -258,10 +267,14 @@ nfp_net_set_link_down(struct rte_eth_dev *dev)
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
/* Configure the physical port down */
- return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
else
- return nfp_eth_set_configured(dev->process_private,
+ ret = nfp_eth_set_configured(dev->process_private,
hw->nfp_idx, 0);
+ if (ret < 0)
+ return ret;
+
+ return 0;
}
static void
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:42.982841281 +0100
+++ 0065-net-nfp-fix-link-change-return-value.patch 2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From 0ca4f216b89162ce8142d665a98924bdf4a23a6e Mon Sep 17 00:00:00 2001
+From 4e6b6c42ce56ff93451a218e746d82fcdace6c20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/nfp/nfp_ethdev.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
+ drivers/net/nfp/nfp_ethdev.c | 25 +++++++++++++++++++------
+ 1 file changed, 19 insertions(+), 6 deletions(-)
@@ -21 +22 @@
-index 4b31785b9f..ef1c2a94b7 100644
+index 68fd67a024..d795025004 100644
@@ -24 +25,24 @@
-@@ -527,26 +527,36 @@ error:
+@@ -205,6 +205,7 @@ error:
+ static int
+ nfp_net_stop(struct rte_eth_dev *dev)
+ {
++ int ret;
+ struct nfp_net_hw *hw;
+
+ PMD_INIT_LOG(DEBUG, "Stop");
+@@ -220,10 +221,12 @@ nfp_net_stop(struct rte_eth_dev *dev)
+
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ /* Configure the physical port down */
+- nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
++ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+ else
+- nfp_eth_set_configured(dev->process_private,
++ ret = nfp_eth_set_configured(dev->process_private,
+ hw->nfp_idx, 0);
++ if (ret < 0)
++ return ret;
+
+ return 0;
+ }
+@@ -232,6 +235,7 @@ nfp_net_stop(struct rte_eth_dev *dev)
@@ -30 +53,0 @@
- struct nfp_net_hw_priv *hw_priv;
@@ -32,2 +55,2 @@
- hw = dev->data->dev_private;
- hw_priv = dev->process_private;
+ PMD_DRV_LOG(DEBUG, "Set link up");
+@@ -240,16 +244,21 @@ nfp_net_set_link_up(struct rte_eth_dev *dev)
@@ -35,2 +58,8 @@
-- return nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 1);
-+ ret = nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 1);
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ /* Configure the physical port down */
+- return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
++ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
+ else
+- return nfp_eth_set_configured(dev->process_private,
++ ret = nfp_eth_set_configured(dev->process_private,
+ hw->nfp_idx, 1);
@@ -49 +77,0 @@
- struct nfp_net_hw_priv *hw_priv;
@@ -51,2 +79,2 @@
- hw = dev->data->dev_private;
- hw_priv = dev->process_private;
+ PMD_DRV_LOG(DEBUG, "Set link down");
+@@ -258,10 +267,14 @@ nfp_net_set_link_down(struct rte_eth_dev *dev)
@@ -54,2 +82,8 @@
-- return nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 0);
-+ ret = nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 0);
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ /* Configure the physical port down */
+- return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
++ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+ else
+- return nfp_eth_set_configured(dev->process_private,
++ ret = nfp_eth_set_configured(dev->process_private,
+ hw->nfp_idx, 0);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/pcap: fix blocking Rx' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (63 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/nfp: fix link change return value' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: add bounds check' " luca.boccassi
` (12 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ofer Dagan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2012542358d3e38ab05a224418ed088670e3c701
Thanks.
Luca Boccassi
---
From 2012542358d3e38ab05a224418ed088670e3c701 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 5 Sep 2024 09:10:40 -0700
Subject: [PATCH] net/pcap: fix blocking Rx
[ upstream commit f5ead8f84f205babb320a1d805fb436ba31a5532 ]
Use pcap_next_ex rather than just pcap_next because pcap_next
always blocks if there is no packets to receive.
Bugzilla ID: 1526
Fixes: 4c173302c307 ("pcap: add new driver")
Reported-by: Ofer Dagan <ofer.d@claroty.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Ofer Dagan <ofer.d@claroty.com>
---
.mailmap | 1 +
drivers/net/pcap/pcap_ethdev.c | 33 +++++++++++++++++----------------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/.mailmap b/.mailmap
index 629383cb25..025bd2daba 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1017,6 +1017,7 @@ Noa Ezra <noae@mellanox.com>
Nobuhiro Miki <nmiki@yahoo-corp.jp>
Norbert Ciosek <norbertx.ciosek@intel.com>
Odi Assli <odia@nvidia.com>
+Ofer Dagan <ofer.d@claroty.com>
Ognjen Joldzic <ognjen.joldzic@gmail.com>
Ola Liljedahl <ola.liljedahl@arm.com>
Oleg Polyakov <olegp123@walla.co.il>
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 03729c0ca7..29664164b4 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -274,7 +274,7 @@ static uint16_t
eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
{
unsigned int i;
- struct pcap_pkthdr header;
+ struct pcap_pkthdr *header;
struct pmd_process_private *pp;
const u_char *packet;
struct rte_mbuf *mbuf;
@@ -294,9 +294,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
*/
for (i = 0; i < nb_pkts; i++) {
/* Get the next PCAP packet */
- packet = pcap_next(pcap, &header);
- if (unlikely(packet == NULL))
+ int ret = pcap_next_ex(pcap, &header, &packet);
+ if (ret != 1) {
+ if (ret == PCAP_ERROR)
+ pcap_q->rx_stat.err_pkts++;
+
break;
+ }
mbuf = rte_pktmbuf_alloc(pcap_q->mb_pool);
if (unlikely(mbuf == NULL)) {
@@ -304,33 +308,30 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
break;
}
- if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {
+ uint32_t len = header->caplen;
+ if (len <= rte_pktmbuf_tailroom(mbuf)) {
/* pcap packet will fit in the mbuf, can copy it */
- rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,
- header.caplen);
- mbuf->data_len = (uint16_t)header.caplen;
+ rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet, len);
+ mbuf->data_len = len;
} else {
/* Try read jumbo frame into multi mbufs. */
if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool,
- mbuf,
- packet,
- header.caplen) == -1)) {
+ mbuf, packet, len) == -1)) {
pcap_q->rx_stat.err_pkts++;
rte_pktmbuf_free(mbuf);
break;
}
}
- mbuf->pkt_len = (uint16_t)header.caplen;
- *RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset,
- rte_mbuf_timestamp_t *) =
- (uint64_t)header.ts.tv_sec * 1000000 +
- header.ts.tv_usec;
+ mbuf->pkt_len = len;
+ uint64_t us = (uint64_t)header->ts.tv_sec * US_PER_S + header->ts.tv_usec;
+
+ *RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset, rte_mbuf_timestamp_t *) = us;
mbuf->ol_flags |= timestamp_rx_dynflag;
mbuf->port = pcap_q->port_id;
bufs[num_rx] = mbuf;
num_rx++;
- rx_bytes += header.caplen;
+ rx_bytes += len;
}
pcap_q->rx_stat.pkts += num_rx;
pcap_q->rx_stat.bytes += rx_bytes;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.019824863 +0100
+++ 0066-net-pcap-fix-blocking-Rx.patch 2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From f5ead8f84f205babb320a1d805fb436ba31a5532 Mon Sep 17 00:00:00 2001
+From 2012542358d3e38ab05a224418ed088670e3c701 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5ead8f84f205babb320a1d805fb436ba31a5532 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3e9e8b416e..bd7958652a 100644
+index 629383cb25..025bd2daba 100644
@@ -25 +26,2 @@
-@@ -1103,6 +1103,7 @@ Nobuhiro Miki <nmiki@yahoo-corp.jp>
+@@ -1017,6 +1017,7 @@ Noa Ezra <noae@mellanox.com>
+ Nobuhiro Miki <nmiki@yahoo-corp.jp>
@@ -27 +28,0 @@
- Norbert Zulinski <norbertx.zulinski@intel.com>
@@ -32 +33 @@
- Oleg Akhrem <oleg.akhrem@intel.com>
+ Oleg Polyakov <olegp123@walla.co.il>
@@ -34 +35 @@
-index 1fb98e3d2b..728ef85d53 100644
+index 03729c0ca7..29664164b4 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ice/base: add bounds check' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (64 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/pcap: fix blocking Rx' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix VLAN replay after reset' " luca.boccassi
` (11 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Fabio Pricoco; +Cc: Bruce Richardson, Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/19bb1781fec55402dd06a046ec5aa88add31ee13
Thanks.
Luca Boccassi
---
From 19bb1781fec55402dd06a046ec5aa88add31ee13 Mon Sep 17 00:00:00 2001
From: Fabio Pricoco <fabio.pricoco@intel.com>
Date: Mon, 14 Oct 2024 12:02:06 +0100
Subject: [PATCH] net/ice/base: add bounds check
[ upstream commit 9378aa47f45fa5cd5be219c8eb770f096e8a4c27 ]
Refactor while loop to add a check that the values read are in the
correct range.
Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")
Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
drivers/net/ice/base/ice_controlq.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c
index 8971a140ef..576bf8e38d 100644
--- a/drivers/net/ice/base/ice_controlq.c
+++ b/drivers/net/ice/base/ice_controlq.c
@@ -846,12 +846,23 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
u16 ntc = sq->next_to_clean;
struct ice_sq_cd *details;
struct ice_aq_desc *desc;
+ u32 head;
desc = ICE_CTL_Q_DESC(*sq, ntc);
details = ICE_CTL_Q_DETAILS(*sq, ntc);
- while (rd32(hw, cq->sq.head) != ntc) {
- ice_debug(hw, ICE_DBG_AQ_MSG, "ntc %d head %d.\n", ntc, rd32(hw, cq->sq.head));
+ head = rd32(hw, sq->head);
+ if (head >= sq->count) {
+ ice_debug(hw, ICE_DBG_AQ_MSG,
+ "Read head value (%d) exceeds allowed range.\n",
+ head);
+ return 0;
+ }
+
+ while (head != ntc) {
+ ice_debug(hw, ICE_DBG_AQ_MSG,
+ "ntc %d head %d.\n",
+ ntc, head);
ice_memset(desc, 0, sizeof(*desc), ICE_DMA_MEM);
ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);
ntc++;
@@ -859,6 +870,14 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
ntc = 0;
desc = ICE_CTL_Q_DESC(*sq, ntc);
details = ICE_CTL_Q_DETAILS(*sq, ntc);
+
+ head = rd32(hw, sq->head);
+ if (head >= sq->count) {
+ ice_debug(hw, ICE_DBG_AQ_MSG,
+ "Read head value (%d) exceeds allowed range.\n",
+ head);
+ return 0;
+ }
}
sq->next_to_clean = ntc;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.057419025 +0100
+++ 0067-net-ice-base-add-bounds-check.patch 2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From 9378aa47f45fa5cd5be219c8eb770f096e8a4c27 Mon Sep 17 00:00:00 2001
+From 19bb1781fec55402dd06a046ec5aa88add31ee13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9378aa47f45fa5cd5be219c8eb770f096e8a4c27 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index af27dc8542..b210495827 100644
+index 8971a140ef..576bf8e38d 100644
@@ -23,2 +24 @@
-@@ -839,16 +839,35 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
- struct ice_ctl_q_ring *sq = &cq->sq;
+@@ -846,12 +846,23 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
@@ -25,0 +26 @@
+ struct ice_sq_cd *details;
@@ -29,0 +31 @@
+ details = ICE_CTL_Q_DETAILS(*sq, ntc);
@@ -45,0 +48 @@
+ ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);
@@ -47 +50 @@
- if (ntc == sq->count)
+@@ -859,6 +870,14 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
@@ -49,0 +53 @@
+ details = ICE_CTL_Q_DETAILS(*sq, ntc);
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ice/base: fix VLAN replay after reset' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (65 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ice/base: add bounds check' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: preserve MAC address with i40e PF Linux driver' " luca.boccassi
` (10 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Dave Ertman
Cc: Jacob Keller, Bruce Richardson, Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/47a2900e1c0b2726c25d50c0bb0e48f2b955a0c8
Thanks.
Luca Boccassi
---
From 47a2900e1c0b2726c25d50c0bb0e48f2b955a0c8 Mon Sep 17 00:00:00 2001
From: Dave Ertman <david.m.ertman@intel.com>
Date: Mon, 14 Oct 2024 12:02:07 +0100
Subject: [PATCH] net/ice/base: fix VLAN replay after reset
[ upstream commit 8e191a67df2d217c2cbd96325b38bf2f5f028f03 ]
If there is more than one VLAN defined when any reset that affects the
PF is initiated, after the reset rebuild, no traffic will pass on any
VLAN but the last one created.
This is caused by the iteration though the VLANs during replay each
clearing the vsi_map bitmap of the VSI that is being replayed. The
problem is that during the replay, the pointer to the vsi_map bitmap is
used by each successive vlan to determine if it should be replayed on
this VSI.
The logic was that the replay of the VLAN would replace the bit in the
map before the next VLAN would iterate through. But, since the replay
copies the old bitmap pointer to filt_replay_rules and creates a new one
for the recreated VLANS, it does not do this, and leaves the old bitmap
broken to be used to replay the remaining VLANs.
Since the old bitmap will be cleaned up in post replay cleanup, there is
no need to alter it and break following VLAN replay, so don't clear the
bit.
Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
drivers/net/ice/base/ice_switch.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 073c139c43..89270a477d 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -9473,8 +9473,6 @@ ice_replay_vsi_fltr(struct ice_hw *hw, struct ice_port_info *pi,
if (!itr->vsi_list_info ||
!ice_is_bit_set(itr->vsi_list_info->vsi_map, vsi_handle))
continue;
- /* Clearing it so that the logic can add it back */
- ice_clear_bit(vsi_handle, itr->vsi_list_info->vsi_map);
f_entry.fltr_info.vsi_handle = vsi_handle;
f_entry.fltr_info.fltr_act = ICE_FWD_TO_VSI;
/* update the src in case it is VSI num */
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.092378658 +0100
+++ 0068-net-ice-base-fix-VLAN-replay-after-reset.patch 2024-10-23 22:16:40.535944141 +0100
@@ -1 +1 @@
-From 8e191a67df2d217c2cbd96325b38bf2f5f028f03 Mon Sep 17 00:00:00 2001
+From 47a2900e1c0b2726c25d50c0bb0e48f2b955a0c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e191a67df2d217c2cbd96325b38bf2f5f028f03 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 96ef26d535..a3786961e6 100644
+index 073c139c43..89270a477d 100644
@@ -41 +42 @@
-@@ -10110,8 +10110,6 @@ ice_replay_vsi_fltr(struct ice_hw *hw, struct ice_port_info *pi,
+@@ -9473,8 +9473,6 @@ ice_replay_vsi_fltr(struct ice_hw *hw, struct ice_port_info *pi,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/iavf: preserve MAC address with i40e PF Linux driver' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (66 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/ice/base: fix VLAN replay after reset' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: workaround list management of Rx queue control' " luca.boccassi
` (9 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/873da637bbf990a6afac97a98bfec8ebbf225f21
Thanks.
Luca Boccassi
---
From 873da637bbf990a6afac97a98bfec8ebbf225f21 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 1 Oct 2024 11:12:54 +0200
Subject: [PATCH] net/iavf: preserve MAC address with i40e PF Linux driver
[ upstream commit 3d42086def307be853d1e2e5b9d1e76725c3661f ]
Following two upstream Linux kernel changes (see links), the mac address
of a iavf port, serviced by a i40e PF driver, is lost when the DPDK iavf
driver probes the port again (which may be triggered at any point of a
DPDK application life, like when a reset event is triggered by the PF).
A first change results in the mac address of the VF port being reset to 0
during the VIRTCHNL_OP_GET_VF_RESOURCES query.
The i40e PF driver change is pretty obscure but the iavf Linux driver does
set VIRTCHNL_VF_OFFLOAD_USO.
Announcing such a capability in the DPDK driver does not seem to be an
issue, so do the same in DPDK to keep the legacy behavior of a fixed mac.
Then a second change in the kernel results in the VF mac address being
cleared when the VF driver remove its default mac address.
Removing (unicast or multicast) mac addresses is not done by the kernel VF
driver in general.
The reason why the DPDK driver behaves like this is undocumented
(and lost because the authors are not active anymore).
Aligning DPDK behavior to the upstream kernel driver is safer in any
case.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fed0d9f13266
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ceb29474bbbc
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 19 +++++--------------
drivers/net/iavf/iavf_vchnl.c | 1 +
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index b6c3cd425d..c117896547 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1012,7 +1012,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
if (iavf_configure_queues(adapter,
IAVF_CFG_Q_NUM_PER_BUF, index) != 0) {
PMD_DRV_LOG(ERR, "configure queues failed");
- goto err_queue;
+ goto error;
}
num_queue_pairs -= IAVF_CFG_Q_NUM_PER_BUF;
index += IAVF_CFG_Q_NUM_PER_BUF;
@@ -1020,12 +1020,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
if (iavf_configure_queues(adapter, num_queue_pairs, index) != 0) {
PMD_DRV_LOG(ERR, "configure queues failed");
- goto err_queue;
+ goto error;
}
if (iavf_config_rx_queues_irqs(dev, intr_handle) != 0) {
PMD_DRV_LOG(ERR, "configure irq failed");
- goto err_queue;
+ goto error;
}
/* re-enable intr again, because efd assign may change */
if (dev->data->dev_conf.intr_conf.rxq != 0) {
@@ -1045,14 +1045,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
if (iavf_start_queues(dev) != 0) {
PMD_DRV_LOG(ERR, "enable queues failed");
- goto err_mac;
+ goto error;
}
return 0;
-err_mac:
- iavf_add_del_all_mac_addr(adapter, false);
-err_queue:
+error:
return -1;
}
@@ -1084,13 +1082,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
/* Rx interrupt vector mapping free */
rte_intr_vec_list_free(intr_handle);
- /* remove all mac addrs */
- iavf_add_del_all_mac_addr(adapter, false);
-
- /* remove all multicast addresses */
- iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
- false);
-
iavf_stop_queues(dev);
adapter->stopped = 1;
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 0164dddcb0..da1eec273c 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -696,6 +696,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF |
VIRTCHNL_VF_OFFLOAD_FSUB_PF |
VIRTCHNL_VF_OFFLOAD_REQ_QUEUES |
+ VIRTCHNL_VF_OFFLOAD_USO |
VIRTCHNL_VF_OFFLOAD_CRC |
VIRTCHNL_VF_OFFLOAD_VLAN_V2 |
VIRTCHNL_VF_LARGE_NUM_QPAIRS |
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.132781984 +0100
+++ 0069-net-iavf-preserve-MAC-address-with-i40e-PF-Linux-dri.patch 2024-10-23 22:16:40.535944141 +0100
@@ -1 +1 @@
-From 3d42086def307be853d1e2e5b9d1e76725c3661f Mon Sep 17 00:00:00 2001
+From 873da637bbf990a6afac97a98bfec8ebbf225f21 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d42086def307be853d1e2e5b9d1e76725c3661f ]
+
@@ -27,2 +28,0 @@
-Cc: stable@dpdk.org
-
@@ -35 +35 @@
- drivers/net/iavf/iavf_ethdev.c | 22 +++++-----------------
+ drivers/net/iavf/iavf_ethdev.c | 19 +++++--------------
@@ -37 +37 @@
- 2 files changed, 6 insertions(+), 17 deletions(-)
+ 2 files changed, 6 insertions(+), 14 deletions(-)
@@ -40 +40 @@
-index c200f63b4f..7f80cd6258 100644
+index b6c3cd425d..c117896547 100644
@@ -43 +43 @@
-@@ -1044,7 +1044,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1012,7 +1012,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -52 +52 @@
-@@ -1052,12 +1052,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1020,12 +1020,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -67 +67 @@
-@@ -1077,14 +1077,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1045,14 +1045,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -84 +84 @@
-@@ -1113,16 +1111,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1084,13 +1082,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
@@ -88,4 +88,2 @@
-- /* adminq will be disabled when vf is resetting. */
-- if (!vf->in_reset_recovery) {
-- /* remove all mac addrs */
-- iavf_add_del_all_mac_addr(adapter, false);
+- /* remove all mac addrs */
+- iavf_add_del_all_mac_addr(adapter, false);
@@ -93,2 +91,2 @@
-- /* remove all multicast addresses */
-- iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
+- /* remove all multicast addresses */
+- iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
@@ -96 +93,0 @@
-- }
@@ -102 +99 @@
-index 69420bc9b6..065ab3594c 100644
+index 0164dddcb0..da1eec273c 100644
@@ -105 +102 @@
-@@ -710,6 +710,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
+@@ -696,6 +696,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/mlx5: workaround list management of Rx queue control' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (67 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/iavf: preserve MAC address with i40e PF Linux driver' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: fix number of supported flex parsers' " luca.boccassi
` (8 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09fbaf6867aacf98f237de8d501d25c5fc461c42
Thanks.
Luca Boccassi
---
From 09fbaf6867aacf98f237de8d501d25c5fc461c42 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Tue, 23 Jul 2024 14:14:11 +0300
Subject: [PATCH] net/mlx5: workaround list management of Rx queue control
[ upstream commit f957ac99643535fd218753f4f956fc9c5aadd23c ]
The LIST_REMOVE macro only removes the entry from the list and
updates list itself. The pointers of this entry are not reset to
NULL to prevent the accessing for the 2nd time.
In the previous fix for the memory accessing, the "rxq_ctrl" was
removed from the list in a device private data when the "refcnt" was
decreased to 0. Under only shared or non-shared queues scenarios,
this was safe since all the "rxq_ctrl" entries were freed or kept.
There is one case that shared and non-shared Rx queues are configured
simultaneously, for example, a hairpin Rx queue cannot be shared.
When closing the port that allocated the shared Rx queues'
"rxq_ctrl", if the next entry is hairpin "rxq_ctrl", the hairpin
"rxq_ctrl" will be freed directly with other resources. When trying
to close the another port sharing the "rxq_ctrl", the LIST_REMOVE
will be called again and cause some UFA issue. If the memory is no
longer mapped, there will be a SIGSEGV.
Adding a flag in the Rx queue private structure to remove the
"rxq_ctrl" from the list only on the port/queue that allocated it.
Fixes: bcc220cb57d7 ("net/mlx5: fix shared Rx queue list management")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rx.h | 1 +
drivers/net/mlx5/mlx5_rxq.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 6b42e27c89..7d0d76123f 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -170,6 +170,7 @@ struct mlx5_rxq_ctrl {
struct mlx5_rxq_priv {
uint16_t idx; /* Queue index. */
uint32_t refcnt; /* Reference counter. */
+ bool possessor; /* Shared rxq_ctrl allocated for the 1st time. */
struct mlx5_rxq_ctrl *ctrl; /* Shared Rx Queue. */
LIST_ENTRY(mlx5_rxq_priv) owner_entry; /* Entry in shared rxq_ctrl. */
struct mlx5_priv *priv; /* Back pointer to private data. */
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 9179b9d9d7..2f5c705660 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -935,6 +935,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
rte_errno = ENOMEM;
return -rte_errno;
}
+ rxq->possessor = true;
}
rxq->priv = priv;
rxq->idx = idx;
@@ -2013,6 +2014,7 @@ mlx5_rxq_hairpin_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
tmpl->rxq.mr_ctrl.cache_bh = (struct mlx5_mr_btree) { 0 };
tmpl->rxq.idx = idx;
rxq->hairpin_conf = *hairpin_conf;
+ rxq->possessor = true;
mlx5_rxq_ref(dev, idx);
LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
return tmpl;
@@ -2280,7 +2282,8 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
RTE_ETH_QUEUE_STATE_STOPPED;
}
} else { /* Refcnt zero, closing device. */
- LIST_REMOVE(rxq_ctrl, next);
+ if (rxq->possessor)
+ LIST_REMOVE(rxq_ctrl, next);
LIST_REMOVE(rxq, owner_entry);
if (LIST_EMPTY(&rxq_ctrl->owners)) {
if (!rxq_ctrl->is_hairpin)
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.169147806 +0100
+++ 0070-net-mlx5-workaround-list-management-of-Rx-queue-cont.patch 2024-10-23 22:16:40.539944297 +0100
@@ -1 +1 @@
-From f957ac99643535fd218753f4f956fc9c5aadd23c Mon Sep 17 00:00:00 2001
+From 09fbaf6867aacf98f237de8d501d25c5fc461c42 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f957ac99643535fd218753f4f956fc9c5aadd23c ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 7d144921ab..9bcb43b007 100644
+index 6b42e27c89..7d0d76123f 100644
@@ -41,2 +42 @@
-@@ -173,6 +173,7 @@ struct mlx5_rxq_ctrl {
- /* RX queue private data. */
+@@ -170,6 +170,7 @@ struct mlx5_rxq_ctrl {
@@ -44,0 +45 @@
+ uint32_t refcnt; /* Reference counter. */
@@ -46 +46,0 @@
- RTE_ATOMIC(uint32_t) refcnt; /* Reference counter. */
@@ -48,0 +49 @@
+ struct mlx5_priv *priv; /* Back pointer to private data. */
@@ -50 +51 @@
-index f13fc3b353..c6655b7db4 100644
+index 9179b9d9d7..2f5c705660 100644
@@ -53 +54 @@
-@@ -938,6 +938,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -935,6 +935,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -61 +62 @@
-@@ -2015,6 +2016,7 @@ mlx5_rxq_hairpin_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
+@@ -2013,6 +2014,7 @@ mlx5_rxq_hairpin_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
@@ -69 +70 @@
-@@ -2282,7 +2284,8 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
+@@ -2280,7 +2282,8 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/mlx5: fix number of supported flex parsers' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (68 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/mlx5: workaround list management of Rx queue control' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'app/testpmd: remove flex item init command leftover' " luca.boccassi
` (7 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f12c8f789d533d874b674f3d43a945aa1965e37e
Thanks.
Luca Boccassi
---
From f12c8f789d533d874b674f3d43a945aa1965e37e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Sep 2024 16:46:19 +0300
Subject: [PATCH] net/mlx5: fix number of supported flex parsers
[ upstream commit 16d8f37b4ebb59a2b2d48dbd9c0f3b8302d4ab1f ]
The hardware supports up to 8 flex parser configurations.
Some of them can be utilized internally by firmware, depending on
the configured profile ("FLEX_PARSER_PROFILE_ENABLE" in NV-setting).
The firmware does not report in capabilities how many flex parser
configuration is remaining available (this is device-wide resource
and can be allocated runtime by other agents - kernel, DPDK
applications, etc.), and once there is no more available parsers
on the parse object creation moment firmware just returns an error.
Fixes: db25cadc0887 ("net/mlx5: add flex item operations")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 5d826527b2..56b482a16e 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -60,7 +60,7 @@
#define MLX5_ROOT_TBL_MODIFY_NUM 16
/* Maximal number of flex items created on the port.*/
-#define MLX5_PORT_FLEX_ITEM_NUM 4
+#define MLX5_PORT_FLEX_ITEM_NUM 8
/* Maximal number of field/field parts to map into sample registers .*/
#define MLX5_FLEX_ITEM_MAPPING_NUM 32
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.205519528 +0100
+++ 0071-net-mlx5-fix-number-of-supported-flex-parsers.patch 2024-10-23 22:16:40.539944297 +0100
@@ -1 +1 @@
-From 16d8f37b4ebb59a2b2d48dbd9c0f3b8302d4ab1f Mon Sep 17 00:00:00 2001
+From f12c8f789d533d874b674f3d43a945aa1965e37e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16d8f37b4ebb59a2b2d48dbd9c0f3b8302d4ab1f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 5f7bfcd613..399923b443 100644
+index 5d826527b2..56b482a16e 100644
@@ -28 +29 @@
-@@ -69,7 +69,7 @@
+@@ -60,7 +60,7 @@
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'app/testpmd: remove flex item init command leftover' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (69 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/mlx5: fix number of supported flex parsers' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: fix next protocol validation after flex item' " luca.boccassi
` (6 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a56fc269ef4415d5e275bd4d16b6abad8df5474d
Thanks.
Luca Boccassi
---
From a56fc269ef4415d5e275bd4d16b6abad8df5474d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Sep 2024 16:46:20 +0300
Subject: [PATCH] app/testpmd: remove flex item init command leftover
[ upstream commit d5c50397a1cc06419970afbea9cd1c37e3c08a5b ]
There was a leftover of "flow flex init" command used
for debug purposes and had no useful functionality in
the production code.
Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 698b4d9601..a0a7d3da14 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -100,7 +100,6 @@ enum index {
PULL,
/* Flex arguments */
- FLEX_ITEM_INIT,
FLEX_ITEM_CREATE,
FLEX_ITEM_DESTROY,
@@ -1084,7 +1083,6 @@ struct parse_action_priv {
})
static const enum index next_flex_item[] = {
- FLEX_ITEM_INIT,
FLEX_ITEM_CREATE,
FLEX_ITEM_DESTROY,
ZERO,
@@ -3297,15 +3295,6 @@ static const struct token token_list[] = {
.next = NEXT(next_flex_item),
.call = parse_flex,
},
- [FLEX_ITEM_INIT] = {
- .name = "init",
- .help = "flex item init",
- .args = ARGS(ARGS_ENTRY(struct buffer, args.flex.token),
- ARGS_ENTRY(struct buffer, port)),
- .next = NEXT(NEXT_ENTRY(COMMON_FLEX_TOKEN),
- NEXT_ENTRY(COMMON_PORT_ID)),
- .call = parse_flex
- },
[FLEX_ITEM_CREATE] = {
.name = "create",
.help = "flex item create",
@@ -9233,7 +9222,6 @@ parse_flex(struct context *ctx, const struct token *token,
switch (ctx->curr) {
default:
break;
- case FLEX_ITEM_INIT:
case FLEX_ITEM_CREATE:
case FLEX_ITEM_DESTROY:
out->command = ctx->curr;
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.241297931 +0100
+++ 0072-app-testpmd-remove-flex-item-init-command-leftover.patch 2024-10-23 22:16:40.543944452 +0100
@@ -1 +1 @@
-From d5c50397a1cc06419970afbea9cd1c37e3c08a5b Mon Sep 17 00:00:00 2001
+From a56fc269ef4415d5e275bd4d16b6abad8df5474d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5c50397a1cc06419970afbea9cd1c37e3c08a5b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 5451b3a453..5f71e5ba44 100644
+index 698b4d9601..a0a7d3da14 100644
@@ -23,2 +24,2 @@
-@@ -106,7 +106,6 @@ enum index {
- HASH,
+@@ -100,7 +100,6 @@ enum index {
+ PULL,
@@ -31 +32 @@
-@@ -1320,7 +1319,6 @@ struct parse_action_priv {
+@@ -1084,7 +1083,6 @@ struct parse_action_priv {
@@ -39 +40 @@
-@@ -4188,15 +4186,6 @@ static const struct token token_list[] = {
+@@ -3297,15 +3295,6 @@ static const struct token token_list[] = {
@@ -55 +56 @@
-@@ -11472,7 +11461,6 @@ parse_flex(struct context *ctx, const struct token *token,
+@@ -9233,7 +9222,6 @@ parse_flex(struct context *ctx, const struct token *token,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/mlx5: fix next protocol validation after flex item' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (70 preceding siblings ...)
2024-10-23 21:16 ` patch 'app/testpmd: remove flex item init command leftover' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'build: remove version check on compiler links function' " luca.boccassi
` (5 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9015591db9b6292558b5b839616a9e6ddd00b38e
Thanks.
Luca Boccassi
---
From 9015591db9b6292558b5b839616a9e6ddd00b38e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Sep 2024 16:46:21 +0300
Subject: [PATCH] net/mlx5: fix next protocol validation after flex item
[ upstream commit 3847a3b192315491118eab9830e695eb2c9946e2 ]
On the flow validation some items may check the preceding protocols.
In case of flex item the next protocol is opaque (or can be multiple
ones) we should set neutral value and allow successful validation,
for example, for the combination of flex and following ESP items.
Fixes: a23e9b6e3ee9 ("net/mlx5: handle flex item in flows")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 6521b5b230..8267bf9ffa 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7503,6 +7503,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
tunnel != 0, error);
if (ret < 0)
return ret;
+ /* Reset for next proto, it is unknown. */
+ next_protocol = 0xff;
break;
case RTE_FLOW_ITEM_TYPE_METER_COLOR:
ret = flow_dv_validate_item_meter_color(dev, items,
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.280505849 +0100
+++ 0073-net-mlx5-fix-next-protocol-validation-after-flex-ite.patch 2024-10-23 22:16:40.551944763 +0100
@@ -1 +1 @@
-From 3847a3b192315491118eab9830e695eb2c9946e2 Mon Sep 17 00:00:00 2001
+From 9015591db9b6292558b5b839616a9e6ddd00b38e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3847a3b192315491118eab9830e695eb2c9946e2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e8ca2b3ed6..4451b114ae 100644
+index 6521b5b230..8267bf9ffa 100644
@@ -24 +25 @@
-@@ -8194,6 +8194,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7503,6 +7503,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'build: remove version check on compiler links function' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (71 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/mlx5: fix next protocol validation after flex item' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'hash: fix thash LFSR initialization' " luca.boccassi
` (4 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Robin Jarry, Ferruh Yigit, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/70c3227ccd5083b19028295cc8d247c10a21739c
Thanks.
Luca Boccassi
---
From 70c3227ccd5083b19028295cc8d247c10a21739c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 20 Sep 2024 13:57:34 +0100
Subject: [PATCH] build: remove version check on compiler links function
[ upstream commit 2909f9afbfd1b54ace204d40d57b68e6058aca28 ]
The "compiler.links()" function meson documentation [1] is a little
unclear, in a casual reading implies that the function was new in 0.60
meson release. In fact, it is only enhanced as described in that
release, but is present earlier.
As such, we can remove the version checks preceding the calls to links
function in our code.
[1] https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerlinks
Fixes: fd809737cf8c ("common/qat: fix build with incompatible IPsec library")
Fixes: fb94d8243894 ("crypto/ipsec_mb: add dependency check for cross build")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Robin Jarry <rjarry@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/crypto/ipsec_mb/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build
index 4100d921ff..3981325173 100644
--- a/drivers/crypto/ipsec_mb/meson.build
+++ b/drivers/crypto/ipsec_mb/meson.build
@@ -17,7 +17,7 @@ if not lib.found()
build = false
reason = 'missing dependency, "libIPSec_MB"'
# if the lib is found, check it's the right format
-elif meson.version().version_compare('>=0.60') and not cc.links(
+elif not cc.links(
'int main(void) {return 0;}', dependencies: lib)
build = false
reason = 'incompatible dependency, "libIPSec_MB"'
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.325023813 +0100
+++ 0074-build-remove-version-check-on-compiler-links-functio.patch 2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From 2909f9afbfd1b54ace204d40d57b68e6058aca28 Mon Sep 17 00:00:00 2001
+From 70c3227ccd5083b19028295cc8d247c10a21739c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2909f9afbfd1b54ace204d40d57b68e6058aca28 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +24,0 @@
- drivers/common/qat/meson.build | 2 +-
@@ -26 +26 @@
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -28,13 +27,0 @@
-diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
-index 3893b127dd..5a8de16fe0 100644
---- a/drivers/common/qat/meson.build
-+++ b/drivers/common/qat/meson.build
-@@ -43,7 +43,7 @@ else
- IMB_required_ver = '1.4.0'
- IMB_header = '#include<intel-ipsec-mb.h>'
- libipsecmb = cc.find_library('IPSec_MB', required: false)
-- if libipsecmb.found() and meson.version().version_compare('>=0.60') and cc.links(
-+ if libipsecmb.found() and cc.links(
- 'int main(void) {return 0;}', dependencies: libipsecmb)
- # version comes with quotes, so we split based on " and take the middle
- imb_ver = cc.get_define('IMB_VERSION_STR',
@@ -42 +29 @@
-index 87bf965554..81631d3050 100644
+index 4100d921ff..3981325173 100644
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'hash: fix thash LFSR initialization' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (72 preceding siblings ...)
2024-10-23 21:16 ` patch 'build: remove version check on compiler links function' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'dmadev: fix potential null pointer access' " luca.boccassi
` (3 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fec66c08d4227a36d2965f5097d384ae5759d81a
Thanks.
Luca Boccassi
---
From fec66c08d4227a36d2965f5097d384ae5759d81a Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 6 Sep 2024 17:01:41 +0000
Subject: [PATCH] hash: fix thash LFSR initialization
[ upstream commit ebf7f1188ea83d6154746e90d535392113ecb1e8 ]
Reverse polynomial for an LFSR was initialized improperly which
could generate improper bit sequence in some situations.
This patch implements proper polynomial reversing function.
Fixes: 28ebff11c2dc ("hash: add predictable RSS")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
lib/hash/rte_thash.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index 2228af576b..363603c102 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -160,6 +160,30 @@ thash_get_rand_poly(uint32_t poly_degree)
RTE_DIM(irreducible_poly_table[poly_degree])];
}
+static inline uint32_t
+get_rev_poly(uint32_t poly, int degree)
+{
+ int i;
+ /*
+ * The implicit highest coefficient of the polynomial
+ * becomes the lowest after reversal.
+ */
+ uint32_t rev_poly = 1;
+ uint32_t mask = (1 << degree) - 1;
+
+ /*
+ * Here we assume "poly" argument is an irreducible polynomial,
+ * thus the lowest coefficient of the "poly" must always be equal to "1".
+ * After the reversal, this the lowest coefficient becomes the highest and
+ * it is omitted since the highest coefficient is implicitly determined by
+ * degree of the polynomial.
+ */
+ for (i = 1; i < degree; i++)
+ rev_poly |= ((poly >> i) & 0x1) << (degree - i);
+
+ return rev_poly & mask;
+}
+
static struct thash_lfsr *
alloc_lfsr(struct rte_thash_ctx *ctx)
{
@@ -179,7 +203,7 @@ alloc_lfsr(struct rte_thash_ctx *ctx)
lfsr->state = rte_rand() & ((1 << lfsr->deg) - 1);
} while (lfsr->state == 0);
/* init reverse order polynomial */
- lfsr->rev_poly = (lfsr->poly >> 1) | (1 << (lfsr->deg - 1));
+ lfsr->rev_poly = get_rev_poly(lfsr->poly, lfsr->deg);
/* init proper rev_state*/
lfsr->rev_state = lfsr->state;
for (i = 0; i <= lfsr->deg; i++)
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.371890184 +0100
+++ 0075-hash-fix-thash-LFSR-initialization.patch 2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From ebf7f1188ea83d6154746e90d535392113ecb1e8 Mon Sep 17 00:00:00 2001
+From fec66c08d4227a36d2965f5097d384ae5759d81a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ebf7f1188ea83d6154746e90d535392113ecb1e8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 10721effe6..99a685f0c8 100644
+index 2228af576b..363603c102 100644
@@ -22 +23 @@
-@@ -166,6 +166,30 @@ thash_get_rand_poly(uint32_t poly_degree)
+@@ -160,6 +160,30 @@ thash_get_rand_poly(uint32_t poly_degree)
@@ -53 +54 @@
-@@ -185,7 +209,7 @@ alloc_lfsr(struct rte_thash_ctx *ctx)
+@@ -179,7 +203,7 @@ alloc_lfsr(struct rte_thash_ctx *ctx)
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'dmadev: fix potential null pointer access' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (73 preceding siblings ...)
2024-10-23 21:16 ` patch 'hash: fix thash LFSR initialization' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/gve/base: fix build with Fedora Rawhide' " luca.boccassi
` (2 subsequent siblings)
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Chengwen Feng; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/45655bbf5920f832cc6dd7e6af49ecc64bf99afd
Thanks.
Luca Boccassi
---
From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 12 Oct 2024 17:17:34 +0800
Subject: [PATCH] dmadev: fix potential null pointer access
[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]
When rte_dma_vchan_status(dev_id, vchan, NULL) is called, a null pointer
access is triggered.
This patch adds the null pointer checker.
Fixes: 5e0f85912754 ("dmadev: add channel status check for testing use")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/dmadev/rte_dmadev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index d94f85ea9a..2091db98bd 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
{
struct rte_dma_dev *dev = &rte_dma_devices[dev_id];
- if (!rte_dma_is_valid(dev_id))
+ if (!rte_dma_is_valid(dev_id) || status == NULL)
return -EINVAL;
if (vchan >= dev->data->dev_conf.nb_vchans) {
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.409268515 +0100
+++ 0076-dmadev-fix-potential-null-pointer-access.patch 2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001
+From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 845727210f..60c3d8ebf6 100644
+index d94f85ea9a..2091db98bd 100644
@@ -22 +23 @@
-@@ -741,7 +741,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
+@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/gve/base: fix build with Fedora Rawhide' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (74 preceding siblings ...)
2024-10-23 21:16 ` patch 'dmadev: fix potential null pointer access' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'power: fix mapped lcore ID' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Joshua Washington; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1e230f1ca23203c6d14b46a36c7d050fb934859b
Thanks.
Luca Boccassi
---
From 1e230f1ca23203c6d14b46a36c7d050fb934859b Mon Sep 17 00:00:00 2001
From: Joshua Washington <joshwash@google.com>
Date: Thu, 17 Oct 2024 16:42:33 -0700
Subject: [PATCH] net/gve/base: fix build with Fedora Rawhide
[ upstream commit f0d9e787747dda0715654da9f0501f54fe105868 ]
Currently, a number of integer types are typedef'd to their corresponding
userspace or RTE values. This can be problematic if these types are
already defined somewhere else, as it would cause type collisions.
This patch changes the typedefs to #define macros which are only defined
if the types are not defined already.
Note: this was reported by OBS CI on 2024/10/17, when compiling DPDK
in Fedora Rawhide.
Fixes: c9ba2caf6302 ("net/gve/base: add OS-specific implementation")
Fixes: abf1242fbb84 ("net/gve: add struct members and typedefs for DQO")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
---
drivers/net/gve/base/gve_osdep.h | 36 ++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/drivers/net/gve/base/gve_osdep.h b/drivers/net/gve/base/gve_osdep.h
index 7cb73002f4..26374bac5e 100644
--- a/drivers/net/gve/base/gve_osdep.h
+++ b/drivers/net/gve/base/gve_osdep.h
@@ -24,18 +24,36 @@
#include "../gve_logs.h"
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
+#ifndef u8
+#define u8 uint8_t
+#endif
+#ifndef u16
+#define u16 uint16_t
+#endif
+#ifndef u32
+#define u32 uint32_t
+#endif
+#ifndef u64
+#define u64 uint64_t
+#endif
-typedef rte_be16_t __sum16;
+#ifndef __sum16
+#define __sum16 rte_be16_t
+#endif
-typedef rte_be16_t __be16;
-typedef rte_be32_t __be32;
-typedef rte_be64_t __be64;
+#ifndef __be16
+#define __be16 rte_be16_t
+#endif
+#ifndef __be32
+#define __be32 rte_be32_t
+#endif
+#ifndef __be64
+#define __be64 rte_be64_t
+#endif
-typedef rte_iova_t dma_addr_t;
+#ifndef dma_addr_t
+#define dma_addr_t rte_iova_t
+#endif
#define ETH_MIN_MTU RTE_ETHER_MIN_MTU
#define ETH_ALEN RTE_ETHER_ADDR_LEN
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.445294209 +0100
+++ 0077-net-gve-base-fix-build-with-Fedora-Rawhide.patch 2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From f0d9e787747dda0715654da9f0501f54fe105868 Mon Sep 17 00:00:00 2001
+From 1e230f1ca23203c6d14b46a36c7d050fb934859b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0d9e787747dda0715654da9f0501f54fe105868 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- drivers/net/gve/base/gve_osdep.h | 48 ++++++++++++++++++++++++--------
- 1 file changed, 36 insertions(+), 12 deletions(-)
+ drivers/net/gve/base/gve_osdep.h | 36 ++++++++++++++++++++++++--------
+ 1 file changed, 27 insertions(+), 9 deletions(-)
@@ -26 +27 @@
-index c0ee0d567c..64181cebd6 100644
+index 7cb73002f4..26374bac5e 100644
@@ -29,3 +30,3 @@
-@@ -29,22 +29,46 @@
- #include <sys/utsname.h>
- #endif
+@@ -24,18 +24,36 @@
+
+ #include "../gve_logs.h"
@@ -66,13 +66,0 @@
-+#endif
-
--typedef rte_le16_t __le16;
--typedef rte_le32_t __le32;
--typedef rte_le64_t __le64;
-+#ifndef __le16
-+#define __le16 rte_le16_t
-+#endif
-+#ifndef __le32
-+#define __le32 rte_le32_t
-+#endif
-+#ifndef __le64
-+#define __le64 rte_le64_t
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'power: fix mapped lcore ID' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (75 preceding siblings ...)
2024-10-23 21:16 ` patch 'net/gve/base: fix build with Fedora Rawhide' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Sivaprasad Tummala; +Cc: Konstantin Ananyev, Huisong Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a73f3a97ff25752b7f1f64ae65860a2ad3d86e9b
Thanks.
Luca Boccassi
---
From a73f3a97ff25752b7f1f64ae65860a2ad3d86e9b Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Fri, 18 Oct 2024 03:34:34 +0000
Subject: [PATCH] power: fix mapped lcore ID
[ upstream commit 5c9b07eeba55d527025f1f4945e2dbb366f21215 ]
This commit fixes an issue in the power library
related to using lcores mapped to different
physical cores (--lcores option in EAL).
Previously, the power library incorrectly accessed
CPU sysfs attributes for power management, treating
lcore IDs as CPU IDs.
e.g. with --lcores '1@128', lcore_id '1' was interpreted
as CPU_id instead of '128'.
This patch corrects the cpu_id based on lcore and CPU
mappings. It also constraints power management support
for lcores mapped to multiple physical cores/threads.
When multiple lcores are mapped to the same physical core,
invoking frequency scaling APIs on any lcore will apply the
changes effectively.
Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
app/test/test_power_cpufreq.c | 21 ++++++++++++++++++---
lib/power/power_acpi_cpufreq.c | 6 +++++-
lib/power/power_common.c | 23 +++++++++++++++++++++++
lib/power/power_common.h | 1 +
lib/power/power_cppc_cpufreq.c | 6 +++++-
lib/power/power_pstate_cpufreq.c | 6 +++++-
6 files changed, 57 insertions(+), 6 deletions(-)
diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 4d013cd7bb..051b9036dc 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -9,6 +9,7 @@
#include <string.h>
#include <inttypes.h>
#include <rte_cycles.h>
+#include <rte_lcore.h>
#include "test.h"
@@ -46,9 +47,10 @@ test_power_caps(void)
static uint32_t total_freq_num;
static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
+static uint32_t cpu_id;
static int
-check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
+check_cur_freq(__rte_unused unsigned int lcore_id, uint32_t idx, bool turbo)
{
#define TEST_POWER_CONVERT_TO_DECIMAL 10
#define MAX_LOOP 100
@@ -62,13 +64,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
int i;
if (snprintf(fullpath, sizeof(fullpath),
- TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
+ TEST_POWER_SYSFILE_CPUINFO_FREQ, cpu_id) < 0) {
return 0;
}
f = fopen(fullpath, "r");
if (f == NULL) {
if (snprintf(fullpath, sizeof(fullpath),
- TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {
+ TEST_POWER_SYSFILE_SCALING_FREQ, cpu_id) < 0) {
return 0;
}
f = fopen(fullpath, "r");
@@ -486,6 +488,19 @@ test_power_cpufreq(void)
{
int ret = -1;
enum power_management_env env;
+ rte_cpuset_t lcore_cpus;
+
+ lcore_cpus = rte_lcore_cpuset(TEST_POWER_LCORE_ID);
+ if (CPU_COUNT(&lcore_cpus) != 1) {
+ printf("Power management doesn't support lcore %u mapping to %u CPUs\n",
+ TEST_POWER_LCORE_ID,
+ CPU_COUNT(&lcore_cpus));
+ return TEST_SKIPPED;
+ }
+ for (cpu_id = 0; cpu_id < CPU_SETSIZE; cpu_id++) {
+ if (CPU_ISSET(cpu_id, &lcore_cpus))
+ break;
+ }
/* Test initialisation of a valid lcore */
ret = rte_power_init(TEST_POWER_LCORE_ID);
diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c
index 6e57aca535..8068c6d98b 100644
--- a/lib/power/power_acpi_cpufreq.c
+++ b/lib/power/power_acpi_cpufreq.c
@@ -257,7 +257,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
return -1;
}
- pi->lcore_id = lcore_id;
+ if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
+ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+ return -1;
+ }
+
/* Check and set the governor */
if (power_set_governor_userspace(pi) < 0) {
RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
diff --git a/lib/power/power_common.c b/lib/power/power_common.c
index 1e09facb86..e2a8c33604 100644
--- a/lib/power/power_common.c
+++ b/lib/power/power_common.c
@@ -9,6 +9,7 @@
#include <rte_log.h>
#include <rte_string_fns.h>
+#include <rte_lcore.h>
#include "power_common.h"
@@ -202,3 +203,25 @@ out:
return ret;
}
+
+int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id)
+{
+ rte_cpuset_t lcore_cpus;
+ uint32_t cpu;
+
+ lcore_cpus = rte_lcore_cpuset(lcore_id);
+ if (CPU_COUNT(&lcore_cpus) != 1) {
+ RTE_LOG(ERR, POWER,
+ "Power library does not support lcore %u mapping to %u CPUs",
+ lcore_id, CPU_COUNT(&lcore_cpus));
+ return -1;
+ }
+
+ for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
+ if (CPU_ISSET(cpu, &lcore_cpus))
+ break;
+ }
+ *cpu_id = cpu;
+
+ return 0;
+}
diff --git a/lib/power/power_common.h b/lib/power/power_common.h
index c1c7139276..b928df941f 100644
--- a/lib/power/power_common.h
+++ b/lib/power/power_common.h
@@ -27,5 +27,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...)
int read_core_sysfs_u32(FILE *f, uint32_t *val);
int read_core_sysfs_s(FILE *f, char *buf, unsigned int len);
int write_core_sysfs_s(FILE *f, const char *str);
+int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id);
#endif /* _POWER_COMMON_H_ */
diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index d6cc58cb3b..9a77811087 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -361,7 +361,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
return -1;
}
- pi->lcore_id = lcore_id;
+ if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
+ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+ return -1;
+ }
+
/* Check and set the governor */
if (power_set_governor_userspace(pi) < 0) {
RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
diff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c
index 52aa64510e..baa1835fbc 100644
--- a/lib/power/power_pstate_cpufreq.c
+++ b/lib/power/power_pstate_cpufreq.c
@@ -563,7 +563,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
return -1;
}
- pi->lcore_id = lcore_id;
+ if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
+ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+ return -1;
+ }
+
/* Check and set the governor */
if (power_set_governor_performance(pi) < 0) {
RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
--
2.45.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-10-23 22:16:43.479862967 +0100
+++ 0078-power-fix-mapped-lcore-ID.patch 2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From 5c9b07eeba55d527025f1f4945e2dbb366f21215 Mon Sep 17 00:00:00 2001
+From a73f3a97ff25752b7f1f64ae65860a2ad3d86e9b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c9b07eeba55d527025f1f4945e2dbb366f21215 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -31,8 +32,7 @@
- app/test/test_power_cpufreq.c | 21 ++++++++++++++++++---
- lib/power/power_acpi_cpufreq.c | 6 +++++-
- lib/power/power_amd_pstate_cpufreq.c | 6 +++++-
- lib/power/power_common.c | 23 +++++++++++++++++++++++
- lib/power/power_common.h | 1 +
- lib/power/power_cppc_cpufreq.c | 6 +++++-
- lib/power/power_pstate_cpufreq.c | 6 +++++-
- 7 files changed, 62 insertions(+), 7 deletions(-)
+ app/test/test_power_cpufreq.c | 21 ++++++++++++++++++---
+ lib/power/power_acpi_cpufreq.c | 6 +++++-
+ lib/power/power_common.c | 23 +++++++++++++++++++++++
+ lib/power/power_common.h | 1 +
+ lib/power/power_cppc_cpufreq.c | 6 +++++-
+ lib/power/power_pstate_cpufreq.c | 6 +++++-
+ 6 files changed, 57 insertions(+), 6 deletions(-)
@@ -41 +41 @@
-index 619b2811c6..edbd34424e 100644
+index 4d013cd7bb..051b9036dc 100644
@@ -80 +80 @@
-@@ -497,6 +499,19 @@ test_power_cpufreq(void)
+@@ -486,6 +488,19 @@ test_power_cpufreq(void)
@@ -101 +101 @@
-index abad53bef1..ae809fbb60 100644
+index 6e57aca535..8068c6d98b 100644
@@ -104,18 +104 @@
-@@ -264,7 +264,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
- return -1;
- }
-
-- pi->lcore_id = lcore_id;
-+ if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
-+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
-+ return -1;
-+ }
-+
- /* Check and set the governor */
- if (power_set_governor_userspace(pi) < 0) {
- POWER_LOG(ERR, "Cannot set governor of lcore %u to "
-diff --git a/lib/power/power_amd_pstate_cpufreq.c b/lib/power/power_amd_pstate_cpufreq.c
-index 4809d45a22..2b728eca18 100644
---- a/lib/power/power_amd_pstate_cpufreq.c
-+++ b/lib/power/power_amd_pstate_cpufreq.c
-@@ -382,7 +382,11 @@ power_amd_pstate_cpufreq_init(unsigned int lcore_id)
+@@ -257,7 +257,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
@@ -127 +110 @@
-+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
@@ -133 +116 @@
- POWER_LOG(ERR, "Cannot set governor of lcore %u to "
+ RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
@@ -135 +118 @@
-index 590986d5ef..b47c63a5f1 100644
+index 1e09facb86..e2a8c33604 100644
@@ -146 +129 @@
-@@ -204,3 +205,25 @@ out:
+@@ -202,3 +203,25 @@ out:
@@ -158 +141 @@
-+ POWER_LOG(ERR,
++ RTE_LOG(ERR, POWER,
@@ -173 +156 @@
-index 83f742f42a..82fb94d0c0 100644
+index c1c7139276..b928df941f 100644
@@ -176 +159 @@
-@@ -31,5 +31,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...)
+@@ -27,5 +27,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...)
@@ -184 +167 @@
-index e73f4520d0..cc9305bdfe 100644
+index d6cc58cb3b..9a77811087 100644
@@ -187 +170 @@
-@@ -368,7 +368,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
+@@ -361,7 +361,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
@@ -193 +176 @@
-+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
@@ -199 +182 @@
- POWER_LOG(ERR, "Cannot set governor of lcore %u to "
+ RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
@@ -201 +184 @@
-index 1c2a91a178..4755909466 100644
+index 52aa64510e..baa1835fbc 100644
@@ -204 +187 @@
-@@ -570,7 +570,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
+@@ -563,7 +563,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
@@ -210 +193 @@
-+ POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
++ RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
@@ -216 +199 @@
- POWER_LOG(ERR, "Cannot set governor of lcore %u to "
+ RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
^ permalink raw reply [flat|nested] 79+ messages in thread
* patch 'net/ionic: fix build on Fedora Rawhide' has been queued to stable release 22.11.7
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
` (76 preceding siblings ...)
2024-10-23 21:16 ` patch 'power: fix mapped lcore ID' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
77 siblings, 0 replies; 79+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.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 10/25/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8c1ee8e80c24b664280c2370f0a951460c18af88
Thanks.
Luca Boccassi
---
From 8c1ee8e80c24b664280c2370f0a951460c18af88 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@gmail.com>
Date: Wed, 23 Oct 2024 19:19:39 +0100
Subject: [PATCH] net/ionic: fix build on Fedora Rawhide
Do not redefined already defined types. Not applicable to main, as
it was fixed as part of a larger refactoring.
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
---
drivers/net/ionic/ionic_osdep.h | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ionic/ionic_osdep.h b/drivers/net/ionic/ionic_osdep.h
index 68f767b920..db49f76a70 100644
--- a/drivers/net/ionic/ionic_osdep.h
+++ b/drivers/net/ionic/ionic_osdep.h
@@ -30,14 +30,28 @@
#define __iomem
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
+#ifndef u8
+#define u8 uint8_t
+#endif
+#ifndef u16
+#define u16 uint16_t
+#endif
+#ifndef u32
+#define u32 uint32_t
+#endif
+#ifndef uint64_t
+#define u64 uint64_t
+#endif
-typedef uint16_t __le16;
-typedef uint32_t __le32;
-typedef uint64_t __le64;
+#ifndef __le16
+#define __le16 uint16_t
+#endif
+#ifndef __le32
+#define __le32 uint32_t
+#endif
+#ifndef __le64
+#define __le64 uint64_t
+#endif
#define ioread8(reg) rte_read8(reg)
#define ioread32(reg) rte_read32(rte_le_to_cpu_32(reg))
--
2.45.2
^ permalink raw reply [flat|nested] 79+ messages in thread