patch 'net/cnxk: fix cookies check with security offload' has been queued to stable release 22.11.3
Xueming Li
xuemingl at nvidia.com
Thu Aug 10 01:48:11 CEST 2023
Hi,
FYI, your patch has been queued to stable release 22.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 08/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=cd88b5ff390862700e60e46185f3dc9fd8d46765
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From cd88b5ff390862700e60e46185f3dc9fd8d46765 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram at marvell.com>
Date: Thu, 15 Jun 2023 18:39:22 +0530
Subject: [PATCH] net/cnxk: fix cookies check with security offload
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ]
Fix missing/incorrect check cookies call's with security offload
enabled on Rx and Tx.
Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")
Fixes: 0ed7107373b4 ("net/cnxk: remove duplicate mempool debug checks")
Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
---
drivers/net/cnxk/cn10k_rx.h | 12 ++++++------
drivers/net/cnxk/cn10k_tx.h | 2 ++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 721127dddd..20384e64c7 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -1216,6 +1216,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
mbuf2 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 0);
mbuf3 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 1);
+ /* Mark mempool obj as "get" as it is alloc'ed by NIX */
+ RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
+ RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
+ RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
+ RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
+
if (!(flags & NIX_RX_VWQE_F)) {
/* Mask to get packet len from NIX_RX_SG_S */
const uint8x16_t shuf_msk = {
@@ -1716,12 +1722,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
vst1q_u64((uint64_t *)&mbufs[packets], mbuf01);
vst1q_u64((uint64_t *)&mbufs[packets + 2], mbuf23);
- /* Mark mempool obj as "get" as it is alloc'ed by NIX */
- RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
- RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
- RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
- RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
-
nix_mbuf_validate_next(mbuf0);
nix_mbuf_validate_next(mbuf1);
nix_mbuf_validate_next(mbuf2);
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 815cd2ff1f..63cf6821d2 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1696,10 +1696,12 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,
vst1q_u64(LMT_OFF(laddr, 0, 16), cmd2);
vst1q_u64(LMT_OFF(laddr, 0, 32), cmd1);
}
+ RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
} else {
/* Store the prepared send desc to LMT lines */
vst1q_u64(LMT_OFF(laddr, 0, 0), cmd0);
vst1q_u64(LMT_OFF(laddr, 0, 16), cmd1);
+ RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
}
}
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-08-09 21:51:19.481457200 +0800
+++ 0049-net-cnxk-fix-cookies-check-with-security-offload.patch 2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 7364015fefd308ac89565fc78a4b910e83546422 Mon Sep 17 00:00:00 2001
+From cd88b5ff390862700e60e46185f3dc9fd8d46765 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index b7074906a6..8148866e44 100644
+index 721127dddd..20384e64c7 100644
@@ -23 +25 @@
-@@ -1241,6 +1241,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+@@ -1216,6 +1216,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
@@ -36 +38 @@
-@@ -1753,12 +1759,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+@@ -1716,12 +1722,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
@@ -50 +52 @@
-index 9f0af7248f..298d243aac 100644
+index 815cd2ff1f..63cf6821d2 100644
@@ -53 +55 @@
-@@ -1966,10 +1966,12 @@ cn10k_nix_xmit_store(struct cn10k_eth_txq *txq,
+@@ -1696,10 +1696,12 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,
More information about the stable
mailing list