From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60049.outbound.protection.outlook.com [40.107.6.49]) by dpdk.org (Postfix) with ESMTP id 7C18423D for ; Thu, 29 Nov 2018 18:28:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fqc1OEWa22QGGd8005ftoQ82Jg3Dop1T+vXfE6ZkH1I=; b=TsRWb8U3NlFGSsaNp2+9iNaDTD5x674U49rccQM3aT44cGP2JpsKhfUVC5m3aSqDFBm3i5FPmjzljtGCpMVnox3dDwd+utDBmfS5Z2cI5N2ga5y7neMIONrRTwcCHI1txnaQTVxYVISsvciJfx8aKMi0J0KxqluqkcmX19Of2C8= Received: from VI1PR04MB4688.eurprd04.prod.outlook.com (20.177.56.80) by VI1PR04MB1599.eurprd04.prod.outlook.com (10.164.84.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.16; Thu, 29 Nov 2018 17:28:45 +0000 Received: from VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::742f:3fda:5cc8:1e6a]) by VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::742f:3fda:5cc8:1e6a%4]) with mapi id 15.20.1361.019; Thu, 29 Nov 2018 17:28:45 +0000 From: Shreyansh Jain To: "dev@dpdk.org" Thread-Topic: RFC: Support for multiple buffer pool in examples/l3fwd Thread-Index: AdSICAccQlCrmrDbTlKNn0iDx74mFA== Date: Thu, 29 Nov 2018 17:28:16 +0000 Deferred-Delivery: Thu, 29 Nov 2018 17:27:37 +0000 Message-ID: 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=shreyansh.jain@nxp.com; x-originating-ip: [14.142.187.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR04MB1599; 6:I5tO03mQ6BoSQjG/ojhTtQdYlP8XpdVo7n6kAPdSZ/soxxEW5KVefBgu5xGXNzafEEWSL2irjlrhuZp45Ned2Ju7PSmeteBTnlAA62/COA8uBeCF1KGn3DeId4n9NEjr2I2C4fFDir0Ax4OuQ1uEO8jAUlSC4ak7BRHM0R3RbnGQSMBeXzCuSos1k+7AhvGGR5QDOqk2pv1Fr3E3swTtu8d/+geO1yMZFGTte9F6v2/U11CWK/hTJ72GIfiwBFYoWbG6i/rGm5gLOllS1mJO7RkfoiQP6trgyKOklWWC/9ACH/N43B+/SZrkVJLJYTyLZzEG6R/rTLMyeECE+56M9f+3tLpau2wf9SomWYSIWVdF7TqVfWBmKToETiur5jlLCl0g0/T70JtZqzDVe2P6kKwELG9CILNoowKYZWfYZ15UIXvMHxFrf2b7UwAoiuDAP9FDgH+zYqDB0kXf27581g==; 5:Fr4d83xZCsF4HjL3alPA6YldGZR0u7RasDS38HXSMeovxWgRP0hVsw2qnPyhkyBwHOZZxUuBb6zT/s33Da+bQLALzz4+k4O4KE05E6M9QJ9fjxHpa6i2+3OzkJlumASLbz5ovqW7LxlDdVcSX4a1mV13IXoGgaw7FFfQQ6r6Mks=; 7:/4qSHi9NZhqhSodqIzZVj0yI+kQK5Me81bJKlM+6K4eh6otf6b9VZTQczPBbCSnctq74llIN3a2HgW/DV9KgF+QiXZje3s8T3gZE3qrV0MvHcMC2SkKl1QLFz9Krj6qrPt8pdPC1BoAU/TQ4cJc85Q== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 9d416f2c-4e36-4b10-0bf2-08d656201d9d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB1599; x-ms-traffictypediagnostic: VI1PR04MB1599: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231453)(999002)(944501410)(52105112)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:VI1PR04MB1599; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB1599; x-forefront-prvs: 0871917CDA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(136003)(39860400002)(346002)(396003)(366004)(199004)(189003)(5660300001)(7696005)(74316002)(6436002)(55236004)(2501003)(6916009)(53936002)(9686003)(6666004)(97736004)(2351001)(8936002)(71190400001)(6506007)(55016002)(71200400001)(68736007)(105586002)(106356001)(316002)(5640700003)(305945005)(7736002)(81166006)(2906002)(8676002)(81156014)(1730700003)(99286004)(86362001)(33656002)(186003)(486006)(26005)(25786009)(44832011)(102836004)(478600001)(14454004)(256004)(66066001)(476003)(6116002)(3846002)(78486014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB1599; H:VI1PR04MB4688.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 7eX/IxuGpXcex2/t+BT7PQXZmvrutxXJz1z2NTivASg0YBn4ogpQznVOou3g1I7PogLEPbLWof9Fnih3K3y2+k3aaLl85rQn6JNFJHwpRrC+Zqp9nlq8w3QDvyJHSl6bmmitNy9L/isrX0dT1H4N8RTvAqVn0KkRB2YdRp994Kjm13Sgorf8yE0j+1lyVKAusQl91txl+BKtk8y5OEpVvvmQQ1A3zOOdxB69QBtSSAW7W26Aszzn8oH3OYD4KK4eA5eVQDpk0mh1GNO1RSoCHqhs6oU6K7GL6LEckGweIsQx+Z5Hs6ZIm/U/aYwwy0xxgPYZ1rm2oR7k98YRNwdjTwIHCrYJ6FkBlV7I4JtckKk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d416f2c-4e36-4b10-0bf2-08d656201d9d X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2018 17:28:45.4340 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1599 Subject: [dpdk-dev] RFC: Support for multiple buffer pool in examples/l3fwd 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: Thu, 29 Nov 2018 17:28:48 -0000 Currently examples/l3fwd/main.c has support for pktmbuf_pool per socket. L136: static struct rte_mempool * pktmbuf_pool[NB_SOCKETS]; = =20 In various setups, having a separate buffer pool per port (or even per queu= e) can achieve performance many-folds higher than single pool case. Being the most widely used/referred example application for raw performance= , examples/l3fwd needs to support such scenarios. The changes I am expecting are very minimal: 1. Changing pktmbuf_pool[NB_SOCKETS] to either - a multi-dimensional array for pktmbuf_pool[NB_SOCKETS][RTE_MAX_ETHPORTS= ] - or pktmbuf_pool[NB_SOCKETS*RTE_MAX_ETHPORTS] Such that for a given (port, socket) combination, a buffer pool is allocate= d. 2. This would be done on passing a l3fwd specific argument "--per-port-bpoo= l" 3. During rte_eth_rx_queue_setup(), pool passed would continue to be the on= e for that (port,socket) combination It is also possible to extend this behavior to per queue basis, but probabl= y for the first iteration per-port can be supported. If use-cases for per-q= ueue arise, another "-per-queue-bpool" can be added. (But, that would also = need a larger pktmbuf_pool array. I am hoping to push out a first-cut very soon. Regards, Shreyansh