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 4CA0A42AF1 for ; Thu, 18 May 2023 17:49:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 495FA42D4F; Thu, 18 May 2023 17:49:47 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5285542BC9; Thu, 18 May 2023 17:49:44 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34IA9Svx012878; Thu, 18 May 2023 08:49:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=G4zlkznEw9URsuR266H6AQeQZuu0eua9ICOYDt2pYoM=; b=NZ0DuHwtyh4hsk8zrfHx0e+Jf8AH2JyX07pAAd97/gFnTgONWGxI8JheDba+OyG3Kf7r 3M0OtNbUxCdyKw0KhMsflHVYJMY+eDlOITJf7RhFp4mrQprwYztSmIek7jSb6RP1LB6Z SeVrvKmFHZDvCyPdTuF8a5CJb1Orkw9balYa5MDigkj/v3r13NrdNPZC2EPDNWfadPFr XHwMwIA2WoH3BThvzR+yC8mVk985b0w4naR6VuiBim89jwm2mgmISeaXdS5FV7Q+eGvy UuUnwBOoq0WElomXr83DKWlR9S7hiPzVp4j7OJaKQzbSLJ7afJvFLXRcatucTe7Z6ZQ5 eQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qn7jbbk3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 18 May 2023 08:49:43 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 18 May 2023 08:49:41 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 18 May 2023 08:49:41 -0700 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id 837DF3F7065; Thu, 18 May 2023 08:49:39 -0700 (PDT) From: Rahul Bhansali To: , Pavan Nikhilesh , "Shijith Thotton" , Jerin Jacob , "Nithin Dabilpuram" CC: Rahul Bhansali , Subject: [PATCH v2 4/5] event/cnxk: fix mempool cookies check Date: Thu, 18 May 2023 21:19:01 +0530 Message-ID: <20230518154902.2254743-4-rbhansali@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230518154902.2254743-1-rbhansali@marvell.com> References: <20230425104010.339177-1-rbhansali@marvell.com> <20230518154902.2254743-1-rbhansali@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 8GR1jUONHWEti1NG_iDM_n4mZT8kagzy X-Proofpoint-ORIG-GUID: 8GR1jUONHWEti1NG_iDM_n4mZT8kagzy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-18_12,2023-05-17_02,2023-02-09_01 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 Fix for mempool cookies get mark to be done before meta to mbuf processing. Fixes: 7a709964d9bb ("net/cnxk: use NPA batch burst free for meta buffers") Cc: stable@dpdk.org Signed-off-by: Rahul Bhansali --- Changes in v2: update in commit message for fixes and cc tag drivers/event/cnxk/cn10k_worker.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h index 06c71c6092..1e519d8156 100644 --- a/drivers/event/cnxk/cn10k_worker.h +++ b/drivers/event/cnxk/cn10k_worker.h @@ -22,9 +22,6 @@ cn10k_wqe_to_mbuf(uint64_t wqe, const uint64_t __mbuf, uint8_t port_id, (flags & NIX_RX_OFFLOAD_TSTAMP_F ? 8 : 0); struct rte_mbuf *mbuf = (struct rte_mbuf *)__mbuf; - /* Mark mempool obj as "get" as it is alloc'ed by NIX */ - RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); - cn10k_nix_cqe_to_mbuf((struct nix_cqe_hdr_s *)wqe, tag, (struct rte_mbuf *)mbuf, lookup_mem, mbuf_init | ((uint64_t)port_id) << 48, flags); @@ -166,6 +163,10 @@ cn10k_sso_hws_post_process(struct cn10k_sso_hws *ws, uint64_t *u64, mbuf = u64[1] - sizeof(struct rte_mbuf); rte_prefetch0((void *)mbuf); + + /* Mark mempool obj as "get" as it is alloc'ed by NIX */ + RTE_MEMPOOL_CHECK_COOKIES(((struct rte_mbuf *)mbuf)->pool, (void **)&mbuf, 1, 1); + if (flags & NIX_RX_OFFLOAD_SECURITY_F) { const uint64_t mbuf_init = 0x100010000ULL | RTE_PKTMBUF_HEADROOM | -- 2.25.1