From patchwork Thu Nov 23 06:42:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Kudurumalla X-Patchwork-Id: 134552 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2729F433A3; Thu, 23 Nov 2023 07:42:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB557427E8; Thu, 23 Nov 2023 07:42:29 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id EA1E8402C2 for ; Thu, 23 Nov 2023 07:42:28 +0100 (CET) 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 3AN5Ymqi022832; Wed, 22 Nov 2023 22:42:28 -0800 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=NT7YVUzJQ78rNULniwhDzqhmt8T/BLkPD3HTWlznGbc=; b=EpbZbpBnWrPCs6BSjG84HsD2ErxdG3kUfp/YQN0+pv+HJL6OVQ4B+pvL4TdMl2WMX5Ko onsuIGR4aG8sqksewSpgDpwa+f2Iul6J0VFGJShrT4Gh1m/988heY+A/FBR/Ik9tO9TB M20efYIxO7WTK3cPOGCI2heaM4pkqDr6WWl0jm+NKBAoJ5HptnXNYYtjDaurK4p4StPH dFpohaO5TGJEgMAKRa1codx0yX/Ljz9wMpd8GG5scxS72bGM/lVbwzRmOklDALzcHOgp YoRkevalKNqQPjYsiPm4usKhJVeDFgcONCXthq6Xocf7Vkme/zeeXOBJWaHd9mJykPlo xA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn22f4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 22:42:27 -0800 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; Wed, 22 Nov 2023 22:42:25 -0800 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; Wed, 22 Nov 2023 22:42:25 -0800 Received: from localhost.localdomain (unknown [10.28.36.154]) by maili.marvell.com (Postfix) with ESMTP id E609F3F7067; Wed, 22 Nov 2023 22:42:23 -0800 (PST) From: Rakesh Kudurumalla To: CC: , , , "Rakesh Kudurumalla" , Olivier Matz Subject: [PATCH v3 1/1] app/test: fix external mbuf test when assertions enabled Date: Thu, 23 Nov 2023 12:12:21 +0530 Message-ID: <20231123064221.509668-1-rkudurumalla@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230726055507.1183617-1-rkudurumalla@marvell.com> References: <20230726055507.1183617-1-rkudurumalla@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: FqsyABtPonoxe3WSQ3_hEWKp4GJId0WB X-Proofpoint-GUID: FqsyABtPonoxe3WSQ3_hEWKp4GJId0WB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_04,2023-11-22_01,2023-05-22_02 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 when RTE_ENABLE_ASSERT is defined test_mbuf application is failing because we are trying to attach extbuf to a cloned buffer to which external mbuf is already attached.To make test_mbuf pass CI we have updated ol_flags. This patch fixes the same. Fixes: 7b295dceea07 ("test/mbuf: add unit test cases") Signed-off-by: Rakesh Kudurumalla Acked-by: Olivier Matz --- v3: Updated commit message and added Fixes app/test/test_mbuf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index d7393df7eb..a39288a5f8 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2345,16 +2345,13 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool) GOTO_FAIL("%s: External buffer is not attached to mbuf\n", __func__); - /* allocate one more mbuf */ + /* allocate one more mbuf, it is attached to the same external buffer */ clone = rte_pktmbuf_clone(m, pktmbuf_pool); if (clone == NULL) GOTO_FAIL("%s: mbuf clone allocation failed!\n", __func__); if (rte_pktmbuf_pkt_len(clone) != 0) GOTO_FAIL("%s: Bad packet length\n", __func__); - /* attach the same external buffer to the cloned mbuf */ - rte_pktmbuf_attach_extbuf(clone, ext_buf_addr, buf_iova, buf_len, - ret_shinfo); if (clone->ol_flags != RTE_MBUF_F_EXTERNAL) GOTO_FAIL("%s: External buffer is not attached to mbuf\n", __func__);