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 85F6FA0A02; Wed, 5 May 2021 18:41:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14DB440143; Wed, 5 May 2021 18:41:03 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1C23D40040; Wed, 5 May 2021 18:41:02 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1061) id 6257A20B7178; Wed, 5 May 2021 09:41:01 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6257A20B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1620232861; bh=ze+cN1cjEt6DxK9aZ1YacvleV4eXEDqlKW+HrjXBZU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kYhmGAdB8oeBR+ANLnjNzItp6q/S2j7ORJss3s5K/qdWO8WyK1UAdk0rh93qdNNQh KFNDYx5xro3O3c34/goWj3qwdPMiHeUCmpgdHzhDRXqaRvXiM8ULSOq71Yydkcuc1e oQozZbomBU1SmceEDS6fUpNL6eJhl7ZQFEtsHb2Q= Date: Wed, 5 May 2021 09:41:01 -0700 From: Jie Zhou To: Tal Shnaiderman Cc: "dev@dpdk.org" , "dmitry.kozliuk@gmail.com" , "xiaoyun.li@intel.com" , "roretzla@microsoft.com" , "pallavi.kadam@intel.com" , NBU-Contact-Thomas Monjalon , "bruce.richardson@intel.com" , "ferruh.yigit@intel.com" , "konstantin.ananyev@intel.com" , "stable@dpdk.org" Message-ID: <20210505164101.GA30464@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1619805162-10684-1-git-send-email-jizh@linux.microsoft.com> <1620088449-14770-1-git-send-email-jizh@linux.microsoft.com> <1620088449-14770-8-git-send-email-jizh@linux.microsoft.com> <20210505160920.GB22459@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210505160920.GB22459@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code 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 Sender: "dev" On Wed, May 05, 2021 at 09:09:20AM -0700, Jie Zhou wrote: > On Wed, May 05, 2021 at 08:34:34AM +0000, Tal Shnaiderman wrote: > > > Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code > > > > > > External email: Use caution opening links or attachments > > > > > > > > > - Make printf format OS independent > > > - Replace htons with RTE_BE16 > > > - Replace POSIX specific inet_aton with OS independent inet_pton > > > - Replace sleep with rte_delay_us_sleep > > > - Repalce random with rte_rand > > > - #ifndef mman related code for now > > > > Do you think we can reduce the number of ifndefs by using the functions rte_mem_map, rte_mem_lock? > > I used rte_mem_xxx APIs in V3. DmitryK pointed out that Apps except unit tests should not use these internal APIs, and also rte_mem_map does not support hugepage with different sized. Given that, decided to work on the mman related part in a future separate patch. > > > > > > > > > Signed-off-by: Jie Zhou > > > Signed-off-by: Jie Zhou > > > --- > > > app/test-pmd/cmdline.c | 3 +-- > > > app/test-pmd/csumonly.c | 2 +- > > > app/test-pmd/icmpecho.c | 4 ++-- > > > app/test-pmd/ieee1588fwd.c | 8 ++++---- app/test-pmd/parameters.c | > > > 10 +++++++--- > > > app/test-pmd/testpmd.c | 21 ++++++++++++++++++++- > > > app/test-pmd/testpmd.h | 2 +- > > > 7 files changed, 36 insertions(+), 14 deletions(-) > > > > > > > > > > > > @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf, > > > } > > > } > > > > > > +#ifndef RTE_EXEC_ENV_WINDOWS > > > err: > > > if (rte_mp == NULL) { > > > rte_exit(EXIT_FAILURE, > > > @@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, > > > unsigned nb_mbuf, > > > } else if (verbose_level > 0) { > > > rte_mempool_dump(stdout, rte_mp); > > > } > > > +#endif > > > > Why do we need the err flow ifndef'ed? Isn't it needed in the MP_ALLOC_NATIVE case? > You are right. Will fix in V11. To avoid the unused err: lable warning, just need to ifndef the err: lable instead of the whole err flow. My mistake. > > > > return rte_mp; > > > } > > >