patch 'event/cnxk: fix Rx offload flags' has been queued to stable release 22.11.11

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Dec 1 12:51:34 CET 2025


Hi,

FYI, your patch has been queued to stable release 22.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/03/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b85b3e09d165f81af25351c0fd73fa9716c2b2ec

Thanks.

Luca Boccassi

---
>From b85b3e09d165f81af25351c0fd73fa9716c2b2ec Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula at marvell.com>
Date: Wed, 26 Nov 2025 21:23:57 +0530
Subject: [PATCH] event/cnxk: fix Rx offload flags

[ upstream commit 3e48adc13585eae2c2b03dbb9681577995c7e28a ]

Use device configured Rx offloads instead of hardcoded values while
draining work.

Fixes: e8594de2731d ("event/cnxk: implement event port quiesce function")

Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c | 15 ++++-----------
 drivers/event/cnxk/cn10k_worker.h   |  6 +++---
 drivers/net/cnxk/cn10k_rx.h         |  6 +++---
 3 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index a1ddf402f1..3ec7e79a30 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -113,6 +113,7 @@ static int
 cn10k_sso_hws_flush_events(void *hws, uint8_t queue_id, uintptr_t base,
 			   cnxk_handle_event_t fn, void *arg)
 {
+	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(arg);
 	uint64_t retry = CNXK_SSO_FLUSH_RETRY_MAX;
 	struct cn10k_sso_hws *ws = hws;
 	uint64_t cq_ds_cnt = 1;
@@ -135,10 +136,7 @@ cn10k_sso_hws_flush_events(void *hws, uint8_t queue_id, uintptr_t base,
 
 	while (aq_cnt || cq_ds_cnt || ds_cnt) {
 		plt_write64(req, ws->base + SSOW_LF_GWS_OP_GET_WORK0);
-		cn10k_sso_hws_get_work_empty(
-			ws, &ev,
-			(NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F |
-				NIX_RX_MULTI_SEG_F | CPT_RX_WQE_F);
+		cn10k_sso_hws_get_work_empty(ws, &ev, dev->rx_offloads);
 		if (fn != NULL && ev.u64 != 0)
 			fn(arg, ev);
 		if (ev.sched_type != SSO_TT_EMPTY)
@@ -710,9 +708,7 @@ cn10k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
 	} while (ptag &
 		 (BIT_ULL(62) | BIT_ULL(58) | BIT_ULL(56) | BIT_ULL(54)));
 
-	cn10k_sso_hws_get_work_empty(ws, &ev,
-				     (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F |
-					     NIX_RX_MULTI_SEG_F | CPT_RX_WQE_F);
+	cn10k_sso_hws_get_work_empty(ws, &ev, dev->rx_offloads);
 	if (is_pend && ev.u64)
 		if (flush_cb)
 			flush_cb(event_dev->data->dev_id, ev, args);
@@ -741,10 +737,7 @@ cn10k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
 	    SSO_TT_EMPTY) {
 		plt_write64(BIT_ULL(16) | 1,
 			    ws->base + SSOW_LF_GWS_OP_GET_WORK0);
-		cn10k_sso_hws_get_work_empty(
-			ws, &ev,
-			(NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F |
-				NIX_RX_MULTI_SEG_F | CPT_RX_WQE_F);
+		cn10k_sso_hws_get_work_empty(ws, &ev, dev->rx_offloads);
 		if (ev.u64) {
 			if (flush_cb)
 				flush_cb(event_dev->data->dev_id, ev, args);
diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index 1bce0631e5..2b19ab28e8 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -129,15 +129,15 @@ cn10k_process_vwqe(uintptr_t vwqe, uint16_t port_id, const uint32_t flags, struc
 	uint64_t mbuf_init = 0x100010000ULL | RTE_PKTMBUF_HEADROOM;
 	struct cnxk_timesync_info *tstamp = ws->tstamp[port_id];
 	void *lookup_mem = ws->lookup_mem;
+	uint64_t meta_aura = 0, laddr = 0;
+	uint16_t lmt_id = 0, d_off = 0;
 	uintptr_t lbase = ws->lmt_base;
 	struct rte_event_vector *vec;
-	uint64_t meta_aura, laddr;
 	uint16_t nb_mbufs, non_vec;
-	uint16_t lmt_id, d_off;
 	struct rte_mbuf **wqe;
 	struct rte_mbuf *mbuf;
 	uint8_t loff = 0;
-	uint64_t sa_base;
+	uint64_t sa_base = 0;
 	int i;
 
 	mbuf_init |= ((uint64_t)port_id) << 48;
diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index b60c158d55..4f09232741 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -580,7 +580,7 @@ nix_sec_meta_to_mbuf(uint64_t cq_w1, uint64_t cq_w5, uintptr_t inb_sa,
 	const struct cpt_parse_hdr_s *hdr =
 		(const struct cpt_parse_hdr_s *)cpth;
 	uint64_t mbuf_init = vgetq_lane_u64(*rearm, 0);
-	struct cn10k_inb_priv_data *inb_priv;
+	struct cn10k_inb_priv_data *inb_priv = NULL;
 
 	/* Clear checksum flags */
 	*ol_flags &= ~(RTE_MBUF_F_RX_L4_CKSUM_MASK |
@@ -1022,9 +1022,9 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 	uint64x2_t rearm3 = vdupq_n_u64(mbuf_initializer);
 	struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3;
 	uint8_t loff = 0, lnum = 0, shft = 0;
+	uint16_t lmt_id = 0, d_off = 0;
+	uint64_t lbase = 0, laddr = 0;
 	uint8x16_t f0, f1, f2, f3;
-	uint16_t lmt_id, d_off;
-	uint64_t lbase, laddr;
 	uintptr_t sa_base = 0;
 	uint16_t packets = 0;
 	uint16_t pkts_left;
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-12-01 11:51:15.544855985 +0000
+++ 0009-event-cnxk-fix-Rx-offload-flags.patch	2025-12-01 11:51:15.219263610 +0000
@@ -1 +1 @@
-From 3e48adc13585eae2c2b03dbb9681577995c7e28a Mon Sep 17 00:00:00 2001
+From b85b3e09d165f81af25351c0fd73fa9716c2b2ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e48adc13585eae2c2b03dbb9681577995c7e28a ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -15,7 +16,4 @@
- drivers/event/cnxk/cn10k_eventdev.c | 9 +++------
- drivers/event/cnxk/cn10k_worker.h   | 6 +++---
- drivers/event/cnxk/cn20k_eventdev.c | 8 +++-----
- drivers/event/cnxk/cn20k_worker.h   | 4 ++--
- drivers/net/cnxk/cn10k_rx.h         | 6 +++---
- drivers/net/cnxk/cn20k_rx.h         | 6 +++---
- 6 files changed, 17 insertions(+), 22 deletions(-)
+ drivers/event/cnxk/cn10k_eventdev.c | 15 ++++-----------
+ drivers/event/cnxk/cn10k_worker.h   |  6 +++---
+ drivers/net/cnxk/cn10k_rx.h         |  6 +++---
+ 3 files changed, 10 insertions(+), 17 deletions(-)
@@ -24 +22 @@
-index 3832eb7e00..0c1431b4e7 100644
+index a1ddf402f1..3ec7e79a30 100644
@@ -27 +25,9 @@
-@@ -126,8 +126,7 @@ cn10k_sso_hws_flush_events(void *hws, uint8_t queue_id, uintptr_t base,
+@@ -113,6 +113,7 @@ static int
+ cn10k_sso_hws_flush_events(void *hws, uint8_t queue_id, uintptr_t base,
+ 			   cnxk_handle_event_t fn, void *arg)
+ {
++	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(arg);
+ 	uint64_t retry = CNXK_SSO_FLUSH_RETRY_MAX;
+ 	struct cn10k_sso_hws *ws = hws;
+ 	uint64_t cq_ds_cnt = 1;
+@@ -135,10 +136,7 @@ cn10k_sso_hws_flush_events(void *hws, uint8_t queue_id, uintptr_t base,
@@ -32 +38,3 @@
--			ws, &ev, (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F | NIX_RX_MULTI_SEG_F);
+-			ws, &ev,
+-			(NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F |
+-				NIX_RX_MULTI_SEG_F | CPT_RX_WQE_F);
@@ -37 +45 @@
-@@ -473,8 +472,7 @@ cn10k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
+@@ -710,9 +708,7 @@ cn10k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
@@ -42 +50,2 @@
--				     (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F | NIX_RX_MULTI_SEG_F);
+-				     (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F |
+-					     NIX_RX_MULTI_SEG_F | CPT_RX_WQE_F);
@@ -47 +56 @@
-@@ -503,8 +501,7 @@ cn10k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
+@@ -741,10 +737,7 @@ cn10k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
@@ -52 +61,3 @@
--			ws, &ev, (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F | NIX_RX_MULTI_SEG_F);
+-			ws, &ev,
+-			(NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F |
+-				NIX_RX_MULTI_SEG_F | CPT_RX_WQE_F);
@@ -58 +69 @@
-index 954dee5a2a..9b6abdf18d 100644
+index 1bce0631e5..2b19ab28e8 100644
@@ -61 +72 @@
-@@ -52,12 +52,12 @@ cn10k_process_vwqe(uintptr_t vwqe, uint16_t port_id, const uint32_t flags, struc
+@@ -129,15 +129,15 @@ cn10k_process_vwqe(uintptr_t vwqe, uint16_t port_id, const uint32_t flags, struc
@@ -68,2 +78,0 @@
--	uint64_t meta_aura = 0, laddr;
-+	struct rte_mempool *mp = NULL;
@@ -70,0 +80 @@
+-	uint64_t meta_aura, laddr;
@@ -72 +81,0 @@
--	struct rte_mempool *mp;
@@ -76,17 +85,4 @@
- 	uint64_t sa_base = 0;
-diff --git a/drivers/event/cnxk/cn20k_eventdev.c b/drivers/event/cnxk/cn20k_eventdev.c
-index b25e570211..1c5d927239 100644
---- a/drivers/event/cnxk/cn20k_eventdev.c
-+++ b/drivers/event/cnxk/cn20k_eventdev.c
-@@ -192,7 +192,7 @@ cn20k_sso_hws_flush_events(void *hws, uint8_t queue_id, uintptr_t base, cnxk_han
- 
- 	while (aq_cnt || cq_ds_cnt || ds_cnt) {
- 		plt_write64(req, ws->base + SSOW_LF_GWS_OP_GET_WORK0);
--		cn20k_sso_hws_get_work_empty(ws, &ev, 0);
-+		cn20k_sso_hws_get_work_empty(ws, &ev, dev->rx_offloads);
- 		if (fn != NULL && ev.u64 != 0)
- 			fn(arg, ev);
- 		if (ev.sched_type != SSO_TT_EMPTY)
-@@ -521,8 +521,7 @@ cn20k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
- 		ptag = plt_read64(ws->base + SSOW_LF_GWS_PENDSTATE);
- 	} while (ptag & (BIT_ULL(62) | BIT_ULL(58) | BIT_ULL(56) | BIT_ULL(54)));
+ 	uint8_t loff = 0;
+-	uint64_t sa_base;
++	uint64_t sa_base = 0;
+ 	int i;
@@ -94,35 +90 @@
--	cn20k_sso_hws_get_work_empty(ws, &ev,
--				     (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F | NIX_RX_MULTI_SEG_F);
-+	cn20k_sso_hws_get_work_empty(ws, &ev, dev->rx_offloads);
- 	if (is_pend && ev.u64)
- 		if (flush_cb)
- 			flush_cb(event_dev->data->dev_id, ev, args);
-@@ -548,8 +547,7 @@ cn20k_sso_port_quiesce(struct rte_eventdev *event_dev, void *port,
- 
- 	if (CNXK_TT_FROM_TAG(plt_read64(ws->base + SSOW_LF_GWS_PRF_WQE0)) != SSO_TT_EMPTY) {
- 		plt_write64(BIT_ULL(16) | 1, ws->base + SSOW_LF_GWS_OP_GET_WORK0);
--		cn20k_sso_hws_get_work_empty(
--			ws, &ev, (NIX_RX_OFFLOAD_MAX - 1) | NIX_RX_REAS_F | NIX_RX_MULTI_SEG_F);
-+		cn20k_sso_hws_get_work_empty(ws, &ev, dev->rx_offloads);
- 		if (ev.u64) {
- 			if (flush_cb)
- 				flush_cb(event_dev->data->dev_id, ev, args);
-diff --git a/drivers/event/cnxk/cn20k_worker.h b/drivers/event/cnxk/cn20k_worker.h
-index df0abd9202..608f93dcd4 100644
---- a/drivers/event/cnxk/cn20k_worker.h
-+++ b/drivers/event/cnxk/cn20k_worker.h
-@@ -54,12 +54,12 @@ cn20k_process_vwqe(uintptr_t vwqe, uint16_t port_id, const uint32_t flags, struc
- 	struct cnxk_timesync_info *tstamp = ws->tstamp[port_id];
- 	uint8_t m_sz = sizeof(struct rte_mbuf);
- 	void *lookup_mem = ws->lookup_mem;
-+	uint64_t meta_aura = 0, laddr = 0;
- 	uintptr_t lbase = ws->lmt_base;
--	uint64_t meta_aura = 0, laddr;
-+	uint16_t lmt_id = 0, d_off = 0;
- 	struct rte_event_vector *vec;
- 	uint16_t nb_mbufs, non_vec;
- 	struct rte_mempool *mp;
--	uint16_t lmt_id, d_off;
- 	struct rte_mbuf **wqe;
- 	struct rte_mbuf *mbuf;
- 	uint64_t sa_base = 0;
+ 	mbuf_init |= ((uint64_t)port_id) << 48;
@@ -130 +92 @@
-index e79306e646..e55910b575 100644
+index b60c158d55..4f09232741 100644
@@ -133,3 +95,3 @@
-@@ -572,7 +572,7 @@ nix_sec_meta_to_mbuf(uint64_t cq_w1, uint64_t cq_w5, uintptr_t inb_sa,
- 	const struct cpt_cn10k_parse_hdr_s *hdr =
- 		(const struct cpt_cn10k_parse_hdr_s *)cpth;
+@@ -580,7 +580,7 @@ nix_sec_meta_to_mbuf(uint64_t cq_w1, uint64_t cq_w5, uintptr_t inb_sa,
+ 	const struct cpt_parse_hdr_s *hdr =
+ 		(const struct cpt_parse_hdr_s *)cpth;
@@ -139 +100,0 @@
- 	uintptr_t p;
@@ -142 +103,3 @@
-@@ -1464,9 +1464,9 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+ 	*ol_flags &= ~(RTE_MBUF_F_RX_L4_CKSUM_MASK |
+@@ -1022,9 +1022,9 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+ 	uint64x2_t rearm3 = vdupq_n_u64(mbuf_initializer);
@@ -145 +107,0 @@
- 	struct rte_mempool *meta_pool = NULL;
@@ -151,26 +112,0 @@
- 	uintptr_t sa_base = 0;
- 	uint16_t packets = 0;
- 	uint16_t pkts_left;
-diff --git a/drivers/net/cnxk/cn20k_rx.h b/drivers/net/cnxk/cn20k_rx.h
-index 5682631815..1944e507b0 100644
---- a/drivers/net/cnxk/cn20k_rx.h
-+++ b/drivers/net/cnxk/cn20k_rx.h
-@@ -307,7 +307,7 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, uint6
- 	const struct cpt_parse_hdr_s *hdr = (const struct cpt_parse_hdr_s *)cpth;
- 	struct cn20k_inb_priv_data *inb_priv = NULL;
- 	const struct cpt_frag_info_s *finfo = NULL;
--	uint64_t fsz_w1 = 0, cq_w1, cq_w5, sg;
-+	uint64_t fsz_w1 = 0, cq_w1, cq_w5 = 0, sg;
- 	uint32_t offset = hdr->w2.ptr_offset;
- 	uint8_t num_frags = 0, nxt_frag = 0;
- 	struct rte_mbuf *head, *last_mbuf;
-@@ -845,10 +845,10 @@ cn20k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, c
- 	uint64x2_t rearm2 = vdupq_n_u64(mbuf_initializer);
- 	uint64x2_t rearm3 = vdupq_n_u64(mbuf_initializer);
- 	struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3;
-+	uint64_t lbase = 0, laddr = 0, buf_sz = 0;
- 	uint8_t loff = 0, lnum = 0, shft = 0;
--	uint64_t lbase, laddr, buf_sz;
-+	uint16_t lmt_id = 0, d_off;
- 	uint8x16_t f0, f1, f2, f3;
--	uint16_t lmt_id, d_off;


More information about the stable mailing list