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 D7108A0503; Fri, 1 Apr 2022 10:50:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38EB142913; Fri, 1 Apr 2022 10:50:39 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 2CC8C4014F; Fri, 1 Apr 2022 10:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648803036; x=1680339036; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=uHPc2T04AwsBE2zsH2AT1jnI7gYOmvAyzj/N8CD0His=; b=S/lZd1PcU7PB4KWNJ0u6/VyAlwIsKmW9BKV4XbKJ/y6oOAYhb7xMCOc+ ndAVnp10mdWAbvtxzwBS3x/PgfCxBg/NCoUryFR9Vo4yk8Fi4yuxaZGbM r6YBf9Sder4UpQvznS1ZDxduD1pYx9KEQh+eiTFIXv+Vhmu1w1NEO9yqf 1KSqEVmH2eLMjfN3ggBY9ob/DN0oljy0Mwb42N56mrcKavih7qaYvzNY2 fhKiIFvpezNwm227O6R+z1CX0IkQI0h6HxvYnSRddHWIHpTKAaAllrbHM hjvqKYw0n+/xHa5nXc4hud7FJPEMdohPQln68SbUxzPUaVDPRk15Aik5T Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10303"; a="285011137" X-IronPort-AV: E=Sophos;i="5.90,226,1643702400"; d="scan'208";a="285011137" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 01:50:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,226,1643702400"; d="scan'208";a="522699451" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga006.jf.intel.com with ESMTP; 01 Apr 2022 01:50:33 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 1 Apr 2022 01:50:33 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 1 Apr 2022 01:50:33 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.106) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 1 Apr 2022 01:50:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jkoUHAxzQNftuEQOjTNsphDmRzULzYERZoqBwJ7vweLd6FGQDJ1UG0pDw+MdutSLSpRs4eqcZgQFU4qlZwmq0odh6TOJN4h07sZSwurePHLQK5/07Z22Jd+K3H/LEcN4OGmKhrNmwPlzMEBfY/JO0Ww/IlNr/SPEMiPBviw46pOVwAiG1Vh8QkbsHEjYiFjwhdpMr+m/FBi7yHPgfaasiP3OkMo45WkZt35lQi+TEjxHfDki3ObgnSk+LGKLptcozx/rpL/9RlDJGBBHyzGaAfpv2eX58eVNDOf2zy9KD4gHW3M3mSkm/oyh5zyJgaGiYidvND7jh4N9ijs0nriPcQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Am2GTrhYtMuLZZgnUzuDxP6DYtVwWUNMeRp18UITfoA=; b=fLAwGuqXpOcp25+jMrLGQqrznsfQq82BFSEi9K7uonnjXWwUeNlsIT++lIoyBaqQqcJxXzl+j4a0H49vMteGFhiLS3n3Sddy98ooPf1typcBPXS4KLsogvx5cF0ipaC7QXd/CCXRbNsWkuSXNb0+Lrx3Q7AKSDAZVFYaKBg7R2MtHheVnTlKwXmSFAMNwCREEX7DQVgGhi2rX+LHkCixvaAJTqQl7OXWeFESPTjVYtAxq+jFMAgEOzRHfmVmWEBTNnhqtjuTSPUcilXk9n1iZy/DqQsml/qDjFrHc2dd1GWBWdAuXmKC/LpkTV6Cb8msUGLznxUFBu5R8wcUYO9W2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB3516.namprd11.prod.outlook.com (2603:10b6:5:72::13) by SA1PR11MB5899.namprd11.prod.outlook.com (2603:10b6:806:22a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.20; Fri, 1 Apr 2022 08:50:30 +0000 Received: from DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::215c:6031:b4d6:14dd]) by DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::215c:6031:b4d6:14dd%6]) with mapi id 15.20.5123.021; Fri, 1 Apr 2022 08:50:30 +0000 From: "Zhang, Yuying" To: "Liu, Mingxia" , "dev@dpdk.org" CC: "Li, Xiaoyun" , "Singh, Aman Deep" , "stable@dpdk.org" Subject: RE: [PATCH v2] app/testpmd: change a magic number to macro Thread-Topic: [PATCH v2] app/testpmd: change a magic number to macro Thread-Index: AQHYRK5P1gQUg1U3u0OZ/n/lln/2jazawUnQ Date: Fri, 1 Apr 2022 08:50:30 +0000 Message-ID: References: <20220329071452.1524865-1-mingxia.liu@intel.com> <20220331023333.1632745-1-mingxia.liu@intel.com> In-Reply-To: <20220331023333.1632745-1-mingxia.liu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e3b156e9-2085-4739-163c-08da13bcad27 x-ms-traffictypediagnostic: SA1PR11MB5899:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FUT+8XJOlLbcKWBQFxJWyEV6BnuklsxkLPDKPCFY28zN92v+w9lM/9HVx5y1oiCHzRrR5Po2XCRSnlYUQvTPwyoVhAtTSpqcTOBL95p/wiFitazfMxp42TrJEUfUtPejh3dIRvtYJrc1S0XGDTeWkb30SumL9kNZk3KQOF6us4f0jAUWvAkBt4l+xvjA5nL8Ds8dCJ7N009Lcuox1H1WSkk6R00/J7VaRSyIVjn9qKmS1D+RkIA8JTItRnzfYctcazsfn4XDfQewYjqSq8DFq3/EgHdAodIDze9Dmb7ig+n/mNZon4R3RibWPijbpD6BiGEBz5HnejRmEHIdyYs0T4YXK+hDIDwyrq0r6Ccf7hAR+1v0zORfhg7PFhiaMGCCNJ0ljuzTZZ2SY3Kngixjy32IUq/K6A5TE1P56dWespFZj5HLkfSDUYQdAF9k4fWjKnDrmSxbdaIWuFkLfKNehIxYx32TBY2kdxb+bDbwnu2XPBe8ah8nHQXrGlEVae59W+lzq7t2QJvzU3ODpG3Ky0ggCTvgUcQZwcyJ7o4SL4ixJoql5ctYb45GcTN96LAlpa+avEwL2eP6/8ZRJtw6QzX4qlA/6+773DnFOJZH7ZMedYl3Ry0Z2s+J3CeMNY+vHn6JCmn4z1idhbU9X8rUq+VuRxR6Q2++AviPzui6PGHdBWkbbU1UHls4kwuUTkCOgewhnktnD3Mbo8j2na5WpQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3516.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(7696005)(5660300002)(53546011)(9686003)(6506007)(82960400001)(508600001)(38070700005)(8936002)(26005)(52536014)(186003)(33656002)(38100700002)(2906002)(8676002)(66446008)(122000001)(66476007)(55016003)(66946007)(76116006)(71200400001)(66556008)(4326008)(64756008)(316002)(86362001)(83380400001)(110136005)(54906003)(450100002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fx2Dq7nV4UcGL4DT2m7sffr2GlhUmQ3TCVEqV//4Nfep0CNeBMcBV/PJbS/G?= =?us-ascii?Q?7iD8oWi1KzltObCjPx6p+sOyFr/6PCTRv1L8VztIXirwBSwnzGts5y4OITJG?= =?us-ascii?Q?sM2rDM8Y50v7uRD7LvxWUkgySF9UidES9ZtUraZVQ7BCZv4xdTGoVBkNwOy8?= =?us-ascii?Q?mvzrDfZhmu1nRVY+xCGNwyGia8tRM4RcuuOCuJ6NvnYqb4bSfwhwDYV+8Aju?= =?us-ascii?Q?bRaXWAOIntF6NMexNl85p5tdqbUUgEnTaXO/kf6+2/8l9UrKzWPzNHJY07lI?= =?us-ascii?Q?66oOd+Gd/VfTNodG2u+Ydf/JTip2xo+yg5FO9qStzHBDI/iv4lbOqjwgbIGC?= =?us-ascii?Q?q6Ndl3/KsvGVVnk1QBrW3gnQcjSN5O7w8TdojXrqYcOoP7VpZrKte/TjM4Bk?= =?us-ascii?Q?ej2pKb89iI4+TGWFnNj/oQMOmnVj/EpXA8dPPFd8MLdNBUAnp4AHIaLxmyTT?= =?us-ascii?Q?Nkqr8uoIEpXUkNw9DWkkQDWacdONAck/PzyMPWZwqpVWYJa39EaKy+60WZb4?= =?us-ascii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0QqumBRUVQOfk8rJ/un?= =?us-ascii?Q?E7FUCBXv2WWwJ9X/qs7VXgQFrA0/iL67lD4RcpMrn0jDN73kTJzCxxK8YnAX?= =?us-ascii?Q?G29qsJefSAc7917WZgHzYmUrk/o5ac4heLf9Zsizn2tLwEQq9Svw6SxsYW8u?= =?us-ascii?Q?f/XXGtqEA7nAxPGViHkPZ9cdT5iZ6PmlaCQ5JjXsRT6wKkFgHRGLVHQgPPHg?= =?us-ascii?Q?VLYgYbEzwOkUndnRjIL7D/D591U3qKw96QOSti6yhC8N7EI67IwxwyTgUPAE?= =?us-ascii?Q?04ZYXizno3uJRs9BbZHVIxwOqgqL028OnMUamVSMJ+Zafx01PQIQfFo4T+J5?= =?us-ascii?Q?sSmQuf/i2g=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3516.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3b156e9-2085-4739-163c-08da13bcad27 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2022 08:50:30.5364 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TLnprsHATW6ApYfus/ogLzcxQNMTz1vNqWsWR6oD6NxwGpPrUTApPOpjWYUF1TyVj5DZ4L0DSxRYC9n+MveJQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB5899 X-OriginatorOrg: intel.com 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 Mingxia, LGTM. > -----Original Message----- > From: Liu, Mingxia > Sent: Thursday, March 31, 2022 10:34 AM > To: dev@dpdk.org > Cc: Li, Xiaoyun ; Singh, Aman Deep > ; Zhang, Yuying ; > Liu, Mingxia ; stable@dpdk.org > Subject: [PATCH v2] app/testpmd: change a magic number to macro >=20 > From: mingxial >=20 > Add macro MIN_TOTAL_NUM_MBUFS (1024) to indicate what the value of > total-num-mbufs should bigger than. >=20 > Fixes: c87988187fdb ("app/testpmd: add --total-num-mbufs option") > Cc: stable@dpdk.org >=20 > Signed-off-by: mingxial Acked-by: Yuying Zhang > --- > app/test-pmd/parameters.c | 5 +++-- > app/test-pmd/testpmd.h | 2 ++ > 2 files changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index > daf6a31b2b..641c9c767e 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -940,11 +940,12 @@ launch_args_parse(int argc, char** argv) > } > if (!strcmp(lgopts[opt_idx].name, "total-num-mbufs")) > { > n =3D atoi(optarg); > - if (n > 1024) > + if (n > MIN_TOTAL_NUM_MBUFS) > param_total_num_mbufs =3D > (unsigned)n; > else > rte_exit(EXIT_FAILURE, > - "total-num-mbufs should be > > 1024\n"); > + "total-num-mbufs should > be > %d\n", > + MIN_TOTAL_NUM_MBUFS); > } > if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) { > n =3D atoi(optarg); > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index > 31f766c965..a633f81b50 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -72,6 +72,8 @@ > #define NUMA_NO_CONFIG 0xFF > #define UMA_NO_CONFIG 0xFF >=20 > +#define MIN_TOTAL_NUM_MBUFS 1024 > + > typedef uint8_t lcoreid_t; > typedef uint16_t portid_t; > typedef uint16_t queueid_t; > -- > 2.25.1