From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30049.outbound.protection.outlook.com [40.107.3.49]) by dpdk.org (Postfix) with ESMTP id CB6104CAB for ; Mon, 27 Aug 2018 11:39:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MSxz67k/0yzfybPA9kDVVR1coGBMuM31XAJbJZOtm1Y=; b=N4v8m1/ozb2s0WJKq3UzMhg0yRH2iojij1RmL/MkXmU4cRv97nMxgJg6ocd2EBh+mCF/Ke15KYzRPbZ7rLdwm7dMeNenHGINYpFXaa8xgTf0ZakR8SMJ6wxUH9jdNpc7l1fN8RgvMT+UrP7zkKWTycp4yRSerAZkT2DQkCMc04Q= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB3311.eurprd08.prod.outlook.com (52.134.31.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Mon, 27 Aug 2018 09:39:03 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::184d:ac38:254f:3a45]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::184d:ac38:254f:3a45%2]) with mapi id 15.20.1080.015; Mon, 27 Aug 2018 09:39:03 +0000 From: Gavin Hu To: Phil Yang , "dev@dpdk.org" CC: nd Thread-Topic: [PATCH] app/testpmd: Optimize membuf pool allocation Thread-Index: AQHUPekFFe6g4oB5lESLtbd1S/SOnKTTV04Q Date: Mon, 27 Aug 2018 09:39:02 +0000 Message-ID: References: <1535362398-6526-1-git-send-email-phil.yang@arm.com> In-Reply-To: <1535362398-6526-1-git-send-email-phil.yang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR08MB3311; 6:09DN+qHNnc7g4MIBZY640d6QrP8kf62M+3CzKa4ESuyFNU9+DHXkd3PZ/oyLpyO/hgSkNCODE7hzVs9Ubu7tShrrAllMm2qJRQbwNQHBEHi6BltTwh3l51Ctb4vXw5QLkr2xDIlvXRocY/c1hC9hjHmwR/7ESNGmoa1eTSi5MbQyAkLrPWSivMFhoTehqiqxNAC2IM6oHQWpC1PZ2lMCB/llzUNwPhXwOelu6zOXVZAL/tSBmwL+efRY5QuP3K5pOj8xjktQ2Ow44jAyTg7gTlLKpfUhuQxwmQVbFy87HzRqIvm7pvtZLashxPI61kJvOMVixbuMWNsBpzzKqnOGbKXMEraEGL+HtDFB7KihHU8TSsU9G6TvD0Oc9WC7XXJ30iXZfhgy+xfxHefjXbbVahBJlJEVMmI0aFK3Oxbk9UjUJKfz03oT5QkzupK2USUCCwFR40fS5d9oV44JBFSCJg==; 5:SZR/U4UngxoncjhVnE8A0EMtacBcqAzPOy08uRA47FCDmrZIAwn9AH1vDHXKNL7FA1rKZ5PmiDjZVUvLJMI1SfwMUb3NrQopVnx/3wEaS7vyM/Z+qsp1craJAQwGoWB+le1EcdFHBXo5wrYHRPlTAkIjgtVW+Qalx83mUgwW6IE=; 7:udgZTwUmSe8aJGY/FqN5ZlmOwKJ10ehQhKVWQ2wxcD4+tlxsfZMrTziWmZY/m0VE3VMkLH5+/twiwaAh2EdSDoG4gJDg2zVPC69J0WnYySmo8E8bbRZT/YlgP59Y70eQoI2+yNcqsfxxMide/j6efma1VFCk+OCLFFNLiwaDz8f1wZj2lUcSu8VLriR5apk29Q0DUimG74lCgzc9k19JbKJ9s22VbJsRoQh9D0Tdf+A1y+P8fbQcjV3YX3Y7jVMV x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: d1a9ab73-5d25-44f7-fed8-08d60c00ecbd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB3311; x-ms-traffictypediagnostic: VI1PR08MB3311: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699016); SRVR:VI1PR08MB3311; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB3311; x-forefront-prvs: 07778E4001 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(136003)(346002)(396003)(39850400004)(189003)(199004)(13464003)(86362001)(305945005)(53546011)(6506007)(7696005)(68736007)(97736004)(9686003)(256004)(53936002)(33656002)(6436002)(2501003)(229853002)(55016002)(446003)(11346002)(2906002)(6246003)(5250100002)(478600001)(4326008)(476003)(105586002)(106356001)(99286004)(76176011)(25786009)(81156014)(110136005)(316002)(14454004)(486006)(2900100001)(81166006)(66066001)(8676002)(72206003)(8936002)(7736002)(3846002)(6116002)(74316002)(26005)(5660300001)(102836004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3311; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: tmntOFe+iNw2vghio9kwqJki1YLiVBAYZ+TkwuN6MEnCG0aQTN2SY3x1XEitRiMijVr/KABz/1Q+6zjt4WOFPOCcOVpml+yGHlGII2+p7zTDgtVkNjf1vHS/yqCUoUMxalNTzCsz9fM4F2WtYuIeVrNMaWzQ+iYvvmwRTRjwUjLT5+KdepsUHwrQQSjU+b+BbCLBUPddaqdr9RMAOnWdhDq+DUVIDqZCI282Y2o70pf0wsacsAktPZoIIYtwSIILR9PVXuIEBr/ar1IGGZC/eMYzXYdfGiKq02F/TxkfLVNFX0n6SprldEqVgFLO4WG84DSfN4qlMb0Su83Gh8At0sG7ghFFjbXt8IJG1OyrKI0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1a9ab73-5d25-44f7-fed8-08d60c00ecbd X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Aug 2018 09:39:02.9974 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3311 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: Optimize membuf pool allocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 09:39:07 -0000 > -----Original Message----- > From: Phil Yang > Sent: Monday, August 27, 2018 5:33 PM > To: dev@dpdk.org > Cc: nd ; Gavin Hu > Subject: [PATCH] app/testpmd: Optimize membuf pool allocation >=20 > By default, testpmd will create membuf pool for all NUMA nodes and ignore > EAL configuration. >=20 > Count the number of available NUMA according to EAL core mask or core lis= t > configuration. Optimized by only creating membuf pool for those nodes. >=20 > Fixes: d5aeab6542f ("app/testpmd: fix mempool creation by socket id") >=20 > Signed-off-by: Phil Yang Acked-by: Gavin Hu > --- > app/test-pmd/testpmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > ee48db2..a56af2b 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -476,6 +476,8 @@ set_default_fwd_lcores_config(void) >=20 > nb_lc =3D 0; > for (i =3D 0; i < RTE_MAX_LCORE; i++) { > + if (!rte_lcore_is_enabled(i)) > + continue; > sock_num =3D rte_lcore_to_socket_id(i); > if (new_socket_id(sock_num)) { > if (num_sockets >=3D RTE_MAX_NUMA_NODES) { @@ - > 485,8 +487,6 @@ set_default_fwd_lcores_config(void) > } > socket_ids[num_sockets++] =3D sock_num; > } > - if (!rte_lcore_is_enabled(i)) > - continue; > if (i =3D=3D rte_get_master_lcore()) > continue; > fwd_lcores_cpuids[nb_lc++] =3D i; > -- > 2.7.4