patch 'net/cnxk: fix later skip to include mbuf private data' has been queued to stable release 21.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Nov 11 11:33:22 CET 2022
Hi,
FYI, your patch has been queued to stable release 21.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/14/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0f3f7b9de14880c4a988baddb33ffb0145adcf1b
Thanks.
Kevin
---
>From 0f3f7b9de14880c4a988baddb33ffb0145adcf1b Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram at marvell.com>
Date: Fri, 14 Oct 2022 11:13:07 +0530
Subject: [PATCH] net/cnxk: fix later skip to include mbuf private data
[ upstream commit 480b03be9d052e77d0b81c2ff174bedf20e48aa7 ]
Fix later skip to include mbuf priv data as mbuf->buf_addr
is populated based on calculation including per-mbuf priv area.
Fixes: 706eeae60757 ("net/cnxk: add multi-segment Rx for CN10K")
Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
---
drivers/net/cnxk/cn10k_rx.h | 4 +++-
drivers/net/cnxk/cnxk_ethdev.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 5806392322..034e95186b 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -245,4 +245,5 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf,
{
const rte_iova_t *iova_list;
+ uint16_t later_skip = 0;
struct rte_mbuf *head;
const rte_iova_t *eol;
@@ -271,8 +272,9 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf,
rearm = rearm & ~0xFFFF;
+ later_skip = (uintptr_t)mbuf->buf_addr - (uintptr_t)mbuf;
head = mbuf;
while (nb_segs) {
- mbuf->next = ((struct rte_mbuf *)*iova_list) - 1;
+ mbuf->next = (struct rte_mbuf *)(*iova_list - later_skip);
mbuf = mbuf->next;
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index a1da90be57..8ba35ac36f 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -568,5 +568,5 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
first_skip += rte_pktmbuf_priv_size(mp);
rq->first_skip = first_skip;
- rq->later_skip = sizeof(struct rte_mbuf);
+ rq->later_skip = sizeof(struct rte_mbuf) + rte_pktmbuf_priv_size(mp);
rq->lpb_size = mp->elt_size;
--
2.38.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-11-11 10:32:17.836128856 +0000
+++ 0032-net-cnxk-fix-later-skip-to-include-mbuf-private-data.patch 2022-11-11 10:32:17.093300845 +0000
@@ -1 +1 @@
-From 480b03be9d052e77d0b81c2ff174bedf20e48aa7 Mon Sep 17 00:00:00 2001
+From 0f3f7b9de14880c4a988baddb33ffb0145adcf1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 480b03be9d052e77d0b81c2ff174bedf20e48aa7 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 46488d442e..cf390a0361 100644
+index 5806392322..034e95186b 100644
@@ -22 +23 @@
-@@ -683,4 +683,5 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf,
+@@ -245,4 +245,5 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf,
@@ -28 +29 @@
-@@ -721,8 +722,9 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf,
+@@ -271,8 +272,9 @@ nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf,
@@ -40 +41 @@
-index 71c3f1666b..bf1585fe67 100644
+index a1da90be57..8ba35ac36f 100644
@@ -43,2 +44,2 @@
-@@ -681,5 +681,5 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
- first_skip += rte_pktmbuf_priv_size(lpb_pool);
+@@ -568,5 +568,5 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
+ first_skip += rte_pktmbuf_priv_size(mp);
@@ -48,2 +49,2 @@
- rq->lpb_size = lpb_pool->elt_size;
- if (roc_errata_nix_no_meta_aura())
+ rq->lpb_size = mp->elt_size;
+
More information about the stable
mailing list