From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6001042ECF for ; Thu, 20 Jul 2023 17:27:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BBAB40685; Thu, 20 Jul 2023 17:27:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8E4FA400D6 for ; Thu, 20 Jul 2023 17:27:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689866863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fbr+rJC9mXPtSpv0AOFgPBz8mUWsYp9rVCq5AX5/20U=; b=eHKVt0i6CafjFHwL5XTGepBOsh0s83kCa6t++mFwayCCpoFEbH6lCPk5Sh9fY+xG96AMzV twA6Xm5U/futQnnDYBWsVvdkptr86q3OMdwHw5YIfo3x+MW1cKvqzNvuvThB883orGpz1G Se7guiwfmdgePha/Zh70MpkQrh8u4io= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-iIkM18vaOBi_2f0jNROrYw-1; Thu, 20 Jul 2023 11:23:02 -0400 X-MC-Unique: iIkM18vaOBi_2f0jNROrYw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BEFB81C28CF4; Thu, 20 Jul 2023 15:22:44 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0ADBE4CD0E3; Thu, 20 Jul 2023 15:22:43 +0000 (UTC) From: Kevin Traynor To: Nithin Dabilpuram Cc: dpdk stable Subject: patch 'net/cnxk: fix cookies check with security offload' has been queued to stable release 21.11.5 Date: Thu, 20 Jul 2023 16:19:00 +0100 Message-ID: <20230720151942.262154-109-ktraynor@redhat.com> In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com> References: <20230720151942.262154-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/25/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/988a65acc3fb7a714aef30349bf850beea11b95d Thanks. Kevin --- >From 988a65acc3fb7a714aef30349bf850beea11b95d Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram Date: Thu, 15 Jun 2023 18:39:22 +0530 Subject: [PATCH] net/cnxk: fix cookies check with security offload [ 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 --- 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 058221034a..42812d5bd3 100644 --- a/drivers/net/cnxk/cn10k_rx.h +++ b/drivers/net/cnxk/cn10k_rx.h @@ -650,4 +650,10 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, 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); + /* Mask to get packet len from NIX_RX_SG_S */ const uint8x16_t shuf_msk = { @@ -915,10 +921,4 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, roc_prefetch_store_keep(mbuf3); - /* 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); - packets += NIX_DESCS_PER_LOOP; diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index a28c9a7e22..692d7978fc 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -1466,8 +1466,10 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr, 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.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-20 16:18:08.342152224 +0100 +++ 0109-net-cnxk-fix-cookies-check-with-security-offload.patch 2023-07-20 16:17:55.094752276 +0100 @@ -1 +1 @@ -From 7364015fefd308ac89565fc78a4b910e83546422 Mon Sep 17 00:00:00 2001 +From 988a65acc3fb7a714aef30349bf850beea11b95d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index b7074906a6..8148866e44 100644 +index 058221034a..42812d5bd3 100644 @@ -23 +24 @@ -@@ -1242,4 +1242,10 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, +@@ -650,4 +650,10 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, @@ -32,4 +33,4 @@ - if (!(flags & NIX_RX_VWQE_F)) { - /* Mask to get packet len from NIX_RX_SG_S */ -@@ -1754,10 +1760,4 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, - vst1q_u64((uint64_t *)&mbufs[packets + 2], mbuf23); + /* Mask to get packet len from NIX_RX_SG_S */ + const uint8x16_t shuf_msk = { +@@ -915,10 +921,4 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts, + roc_prefetch_store_keep(mbuf3); @@ -43,2 +44,2 @@ - nix_mbuf_validate_next(mbuf0); - nix_mbuf_validate_next(mbuf1); + packets += NIX_DESCS_PER_LOOP; + @@ -46 +47 @@ -index 9f0af7248f..298d243aac 100644 +index a28c9a7e22..692d7978fc 100644 @@ -49 +50 @@ -@@ -1967,8 +1967,10 @@ cn10k_nix_xmit_store(struct cn10k_eth_txq *txq, +@@ -1466,8 +1466,10 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,