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 2B57E42AF1; Thu, 18 May 2023 17:49:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7824F42D4A; Thu, 18 May 2023 17:49:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8136042BC9 for ; Thu, 18 May 2023 17:49:48 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34IDIw41005821 for ; Thu, 18 May 2023 08:49:48 -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=V7/mc41QFlOEK0A9baMYKArRYcemz5QqAnruyVd8GIU=; b=c9EmAQlbJamVU4bjNZxmXebzbExZV0GtgS4VQKQbiRsnj3KgdB3QFpWgCOO2Le46Fubx OkohvfFHuxaoMu20nypsAbWN5O+PNoRadcbRR8UYH8GU7B0afUbd49nVGYCztoD4OcPF 9cySEJHe59cmZzpCfryfS6Eh/Zzx6UNingnx87AfLyoLUawxfD99mJFDzs1eLop353wk HHwxA7Txz0DIEyksQJePd0waJrZcJwob2nZaPAsoNiq2ZRj4ulsdlswsuIHGhOc5JD7O oaP5k1MgZzva1W+RH4Qf/g1zGSpV6Caf242IoTF+jJ1cvS/w6kAH3IW3AGhdQYQIcQEf dw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3qmyexcpw2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 18 May 2023 08:49:47 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) 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:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 18 May 2023 08:49:45 -0700 Received: from localhost.localdomain (unknown [10.28.36.158]) by maili.marvell.com (Postfix) with ESMTP id 9BDBB3F7066; Thu, 18 May 2023 08:49:43 -0700 (PDT) From: Rahul Bhansali To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Rahul Bhansali Subject: [PATCH v2 5/5] net/cnxk: add mempool check for frag attach Date: Thu, 18 May 2023 21:19:02 +0530 Message-ID: <20230518154902.2254743-5-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: eK6br_IZikSZJ9ubwbZvuVin8jneY-Lk X-Proofpoint-ORIG-GUID: eK6br_IZikSZJ9ubwbZvuVin8jneY-Lk 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add mempool cookies get mark to all frags in case of reassembly failure. Signed-off-by: Rahul Bhansali --- Changes in v2: No change drivers/net/cnxk/cn10k_rx.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h index 9fdb5565e9..cbaf994aa2 100644 --- a/drivers/net/cnxk/cn10k_rx.h +++ b/drivers/net/cnxk/cn10k_rx.h @@ -211,6 +211,9 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr, /* Update dynamic field with userdata */ *rte_security_dynfield(mbuf) = (uint64_t)inb_priv->userdata; + /* Mark frag as get */ + RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); + cnxk_ip_reassembly_dynfield(mbuf, off)->nb_frags = hdr->w0.num_frags - 2; cnxk_ip_reassembly_dynfield(mbuf, off)->next_frag = NULL; @@ -239,6 +242,9 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr, /* Update dynamic field with userdata */ *rte_security_dynfield(mbuf) = (uint64_t)inb_priv->userdata; + /* Mark frag as get */ + RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); + cnxk_ip_reassembly_dynfield(mbuf, off)->nb_frags = hdr->w0.num_frags - 3; cnxk_ip_reassembly_dynfield(mbuf, off)->next_frag = NULL; @@ -263,6 +269,9 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr, mbuf->ol_flags = ol_flags; mbuf->next = NULL; + /* Mark frag as get */ + RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); + /* Update dynamic field with userdata */ *rte_security_dynfield(mbuf) = (uint64_t)inb_priv->userdata; -- 2.25.1