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 031EDA0A02 for ; Wed, 5 May 2021 10:34:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5ABF410E2; Wed, 5 May 2021 10:34:38 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2081.outbound.protection.outlook.com [40.107.212.81]) by mails.dpdk.org (Postfix) with ESMTP id 49FAA4003C; Wed, 5 May 2021 10:34:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PHcxQqufIePc53Z/H5pq77mruk1FyMxitu1tTchmGzW8qXAUpzArxsC/yUmHeMEYIcvHPKAkKqUuLyslUVWGvw9HRbahh17IPnRixGjcz5ZzLV15DOv845Jt2URxW1woaP/wXKvOx4iT5aPBKtIXz6JjWGlB4gCJnHtVG3GldWW17KnAHmmaxW470yjibvdshHPyvdWVvdunu3airKXtpnKvJAvMPhT8EbZ8ik9/jjAPO0pZfW46qAFypuh33b4eAg/qSsg/EqOrAPoEH0lnQ0tvxw0PhmtxB8IBFv8KcsuC+X/jE25GO2zvBltD0Kh96nsfmXPrQ0sfnMDFkHwkeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M7S7pI6lnF47gvJi2HhsLWWN1g4cDr85vKYlnXBGCjY=; b=mgJri8QjUArjcVNK5Y4EuCCu7CA+JlM0aWdt2eRnlnnFNNJ3e17QKkoAXkVdkmxnZTkCuzf8Px+1XWw6a5nl5cFNhIrSwtYqDOwe+1kQ6zi2sY7I9pfI4RSjy9eMFOUTsABhhmUEJxn9IzNTOtDIVssU/8aAiGVZ4kY3mfZqPAt3VwNLTe+khWPGeN//dSGjzjraCt/2yzRLdPCMfAHItz41ATKMy36Xd8lQZAkg7yS4nWZVBgVev3D73LL5z4VtfkXWTHz/1ax/5nbqpynFfLkcM1rT7uBrJ6YHCJl0RuD1zSImkzdXSCTRSMMJyfJz3P1YFFZjjtEd3kXoyog/6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M7S7pI6lnF47gvJi2HhsLWWN1g4cDr85vKYlnXBGCjY=; b=ciAF/krnyGuwKQfKfDgZFLexQPKUq8dgneMnQ/2mKZsT97eM5L4hDLNezFv+wiz2QdqARWPHoYAfE/r6/8O/ctVDZRZf92NNlN/vTdq7Ai4En7rfJq3bE3bF8QWrpoEBg2SbUejjMvbGiH5eqQZEOQmGZNmkbtR0ueWprMJC0okbkwxYHbQOwJCCDrlGNh4zXJJ1RAG0Yd2z9pikUOlx90J7W58BGoF2y9WAm3kXTGDCdh5KrBBWNgkPi/KQc1V8ZBoFpWY5SxdtHjYEXBdkVG5aaf7WjV0y3mhHE9KciMB1IOdWtG2n8oyevds+Yc++0LPhUVcWnfZaD0mRN81kJQ== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5230.namprd12.prod.outlook.com (2603:10b6:5:399::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.26; Wed, 5 May 2021 08:34:35 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4%6]) with mapi id 15.20.4108.025; Wed, 5 May 2021 08:34:34 +0000 From: Tal Shnaiderman To: Jie Zhou , "dev@dpdk.org" CC: "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" Thread-Topic: [PATCH v10 07/10] app/testpmd: replace POSIX specific code Thread-Index: AQHXQH02OIc864IswEWuB5ZxW3wZIarUiz/g Date: Wed, 5 May 2021 08:34:34 +0000 Message-ID: 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> In-Reply-To: <1620088449-14770-8-git-send-email-jizh@linux.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [5.29.16.219] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 657d1627-bc41-46ed-900a-08d90fa09ccd x-ms-traffictypediagnostic: DM4PR12MB5230: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xCdW+0FRRo8imUR4jRWG6GvVhQws5C6VjkxqGWeoNim0CjNeizdSfQwAw5ov4YKWNdAxG8lh8FHCPZnA9h+5+z/CmbjMamCRW3JqfGXiHswtfcu7n2CwwYzYm5lTTXR6jFswvXtGWLLCbCpSYPbdz5a4IpOpx/NOsdsdEXk8NWiLvinJ/W+gJDKvYV7t2Ve5odih7mM09YtE5AtZd+pzYR/LVjXChkxjFU3BhmwZ9+49CKVwf3iikjl5Pu7v3qP0oj75qF1pFVDIWTnTgOZc+6A9KEoSQTH969OrvW5JOo22hKRtRgYwMjWBd6UGlsYzhtwAYNJ8GFMXL0FGVDdIzZAwYA9kdU/r3w+WzBelMgEINm8M5/SEYH38FS51tEW9Kd7pYonTLDJzhOV5ZUgzvSXAQA97bMSL3N8ixQapdSoxOcn1CTAuZwbJzFc6CVCSI4rWMM+wxYrdKhorbRpf2MBXV66Yd+tX9SNbf4vfdatyABun8hgQ0rUJfGcPp1l12d4VFt871e2lpEN7E8nhyozVnviBuJv9W85KSTtUUvs3rq57GdkCYBURDKfMN2IBNAWAkO9u/drstSiG86BLvBFd5c1++pYeoCd7qmQiHbE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(396003)(136003)(39860400002)(346002)(2906002)(4326008)(66446008)(86362001)(7696005)(122000001)(8936002)(478600001)(6506007)(38100700002)(54906003)(26005)(83380400001)(110136005)(76116006)(33656002)(52536014)(66556008)(5660300002)(186003)(316002)(66946007)(9686003)(64756008)(71200400001)(8676002)(55016002)(66476007)(7416002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?9U16x1KynsxcSzof1HA+ssYYZkZU5YoG6p/ePkQ/f32eg4BpvKLOuHIg28S6?= =?us-ascii?Q?OQN2X+OncfvCkidJJWsaF7gM+z6jyXUrVkywyDLOo4ZpyDt094pD/Ejh4PxV?= =?us-ascii?Q?FM5uOplQmX8a3KOcsWetlOIPgQjIQ2n4zxVTDR23K9mo0suh7N6X7MyDC8ZH?= =?us-ascii?Q?o/6u8L59UmXhQQYXqLQ56Wi27YUJx9DRLRozvSLGo0XKUeaJome3JCfUd+j+?= =?us-ascii?Q?iG5/dNIEjVQVOI6tXZiISNKlnySCFDF5imzjD3jXccLAqwwarpFNSNnGX2Zs?= =?us-ascii?Q?woK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AaPrhvgUh1f3JtQpvJJZ?= =?us-ascii?Q?1yghvZNGqJMUkR081sABsab3cxsxR1tvu/yYU5XZlLIlGxnx9TYKo9fUcG1U?= =?us-ascii?Q?rxiWLk/CjuMQX7d8GDzaHHfeNryz2Zf39PuWWgxwxI+Enqow0lAf3orp9FYT?= =?us-ascii?Q?DdU=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 657d1627-bc41-46ed-900a-08d90fa09ccd X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2021 08:34:34.7864 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HF2JQCBejAeQ3ihKBhaSiJUgzcdne98tvb1kiyVnj5b0bXS1XxkXjEJihHkpE/4S6zdAggvNW+VCk8CKWZQPEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5230 Subject: Re: [dpdk-stable] [PATCH v10 07/10] app/testpmd: replace POSIX specific code 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 Sender: "stable" > Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code >=20 > External email: Use caution opening links or attachments >=20 >=20 > - 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? >=20 > 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(-) >=20 > @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf, > } > } >=20 > +#ifndef RTE_EXEC_ENV_WINDOWS > err: > if (rte_mp =3D=3D 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_NAT= IVE case? > return rte_mp; > } >=20