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 56F3042DDA; Wed, 5 Jul 2023 18:12:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA622406B5; Wed, 5 Jul 2023 18:12:29 +0200 (CEST) Received: from mail-lj1-f227.google.com (mail-lj1-f227.google.com [209.85.208.227]) by mails.dpdk.org (Postfix) with ESMTP id BB2354021F for ; Wed, 5 Jul 2023 18:12:27 +0200 (CEST) Received: by mail-lj1-f227.google.com with SMTP id 38308e7fff4ca-2b6ff1ad155so10903851fa.0 for ; Wed, 05 Jul 2023 09:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1688573547; x=1691165547; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=L6pTe/F7KYPwwj21k9C/H5XCRfitBBlXuDUkFOZkp+8=; b=M21mCUokjGsKJhqU1DFRqz1dsFVPkqqrTBns5lVqOLTfGxi/g/6o1TMZ4xUoWpl+9H KVrBrI1QF/NDHcgnP/4v3+1uI0TODRngkt1xLHhlZm6ei63jeYPwFrjXcvuouRrnvV6J ZE8MqY4O1ONI9734xwGJ4KGkJZq4iAQyfqgKlCO1cW3z+aBq91o+x+itjJ6YR4LYl6GL /JY3E06iC/iNbw6/5PKz7wbjqoTLbHx3faaNm3QHlPrcKh6WNCzt4rJ/ab0UnF96VMN8 JaD5gBwb/MjNF/lUBFBP3cHd94syXnwASPKb6Agm3oKaGhKJCuoMPoeHRlvtd5o7phM8 /x/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688573547; x=1691165547; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L6pTe/F7KYPwwj21k9C/H5XCRfitBBlXuDUkFOZkp+8=; b=SdY4eB/uhWZCf5iT2QokFvtYAXaXI5pz2IWC9e3vW6CTsw9c07Uf2Whyx2gqr0RJTw ACS9Oxfw2NiOdm7SYxW64Gl+yQeNe8XIegCYP35sBzuDYYFm077GqKYmnc4VfSgjm8fS InopEZVucpRi50+W/mj0GQoSCRxtyI+g9CF918sxlKeC25vq9Cr4SeixN2yq2LLWKKQR 4hsNms8y1E83cueT7maxr5L64Nsfn2BqcMuZy1UxslNG+EMeKaotmJAzJiyerE0DwRmJ PRqPIaQiVvMCTTdUdtYD0YHNWdP0oo1PqpA0Tqap4rOYffdAvs3Q1HViEaiZrkPz2QOA uHuw== X-Gm-Message-State: ABy/qLYPOY9iZZjKGWJEzhIzGEdcFD8Hdn2TstIc2MjNwtN8yuIFwwYs 5ZR5sBjzAY1bjiSwkB/MyO3x7k0WqKknK+7p+U12Eubj3ntn+aIuj2Z8uw== X-Google-Smtp-Source: APBJJlE/aTL7PAmZUIWYaW3oP3hnJelKXjUUkgkSTaz6qigRQt9zZVOQKhUCM7tOPll2GDNakqiDL6AgydAy X-Received: by 2002:a05:6512:208c:b0:4fb:a088:cfca with SMTP id t12-20020a056512208c00b004fba088cfcamr907681lfr.6.1688573546829; Wed, 05 Jul 2023 09:12:26 -0700 (PDT) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id d1-20020ac24c81000000b004fb759964a2sm2393362lfl.110.2023.07.05.09.12.26; Wed, 05 Jul 2023 09:12:26 -0700 (PDT) X-Relaying-Domain: 6wind.com Received: from 6wind.com (unknown [10.11.0.190]) by smtpservice.6wind.com (Postfix) with ESMTP id 735D0601F2; Wed, 5 Jul 2023 18:12:26 +0200 (CEST) Date: Wed, 5 Jul 2023 18:12:25 +0200 From: Olivier Matz To: Rakesh Kudurumalla Cc: "dev@dpdk.org" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram Subject: Re: [PATCH 1/1] app/test: resolve mbuf_test application failure Message-ID: References: <20230426092303.2423712-1-rkudurumalla@marvell.com> <20230426092750.2423850-1-rkudurumalla@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Hi Rakesh, On Tue, May 23, 2023 at 03:39:53PM +0000, Rakesh Kudurumalla wrote: > Ping > > Regards, > Rakesh > > > -----Original Message----- > > From: Rakesh Kudurumalla > > Sent: Wednesday, April 26, 2023 2:58 PM > > To: Olivier Matz > > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran ; Nithin > > Kumar Dabilpuram ; Rakesh Kudurumalla > > > > Subject: [PATCH 1/1] app/test: resolve mbuf_test application failure > > > > 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.This patch fixes the same. > > > > Signed-off-by: Rakesh Kudurumalla > > --- > > v2: removed gerrit id > > > > app/test/test_mbuf.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index > > 8d8d3b9386..e2b81db308 100644 > > --- a/app/test/test_mbuf.c > > +++ b/app/test/test_mbuf.c > > @@ -2375,6 +2375,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct > > rte_mempool *pktmbuf_pool) > > GOTO_FAIL("%s: Bad packet length\n", __func__); > > > > /* attach the same external buffer to the cloned mbuf */ > > + clone->ol_flags = 0; > > rte_pktmbuf_attach_extbuf(clone, ext_buf_addr, buf_iova, buf_len, > > ret_shinfo); I think we can simply remove the call to rte_pktmbuf_attach_extbuf() because after the call to rte_pktmbuf_clone(), the mbuf is already attached. I mean something like this: --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2345,16 +2345,12 @@ 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__); Regards, Olivier