From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0068.outbound.protection.outlook.com [104.47.33.68]) by dpdk.org (Postfix) with ESMTP id 12426271 for ; Mon, 18 Dec 2017 09:56:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=J3PYPcMpAH83FmQ3z5g5y2HPoNC8BR1Fv0RqwEyph3k=; b=Rz0IvwJKUafHsledakMTbdcgIUG/zGadS2bhnIXCzckcBHwzb8jwiw4uCHW9YGU5A/QerJYOYI4QUsuAf4Q3fLSkupcZIQumw9Lpqegp6wmJDcANNjdEgAxVme7quZh1HelHd9F5gY5TRanXb8ca2ETYsAUBI+0eto95OqdY2iQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Mon, 18 Dec 2017 08:56:08 +0000 Date: Mon, 18 Dec 2017 14:25:08 +0530 From: Jerin Jacob To: Hemant Agrawal Cc: olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com, dev@dpdk.org Message-ID: <20171218085507.GA20578@jerin> References: <1499170968-23016-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-2-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513333483-4372-2-git-send-email-hemant.agrawal@nxp.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MAXPR0101CA0052.INDPRD01.PROD.OUTLOOK.COM (10.174.63.14) To CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3e98e20d-7076-444c-ecf0-08d545f52f60 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 3:+Kjnzrr8BKaWw5EmIZFB8UECKkoD4UUL/ythzk71sZJGBGmudQC3hlOC/xicGWg0SQbpdCjspkuA2FjSHcxEH+Kp+UflU6fDammBQavsmvfjvSZnOLrC6NoR5OIAJznPjhrj/6C47tkDplTvoPgEnIechw8eldsuoK1A1nD2Ge8Gn9CfDSDZKNha3145RsNs9l/coaqibramtxLllCJWJjMnwCkS12bJLOOgcKirJ/VLQDmDOcsZp9hOvLsdVsIm; 25:Hgeu8TB5r3JSB1S2GNKtiDI3LCRCR19pEXlSq2ArKHKTy+7FuYoYhXLoGgwVN4ywZs8RtEmKDnRYT2p4Gpd1ccHtyC57mNminxQETKi1v0kCEbiilBuDOeXgH256d0D0Q6/DS2iwgTO32ZMDy2jkNHPFsmrLAU3imFUWleQyvakVhfZS2dbSYh3WxCTSvQpNgNbqrw2JZy1Q0iRhBzxjyUZSWlxgwMji1jb/+f7DH6/KUkhZV3P9z1X8AMzSfhOU9bbZe+QDbZc/GG19vxZZdHKx5jVx8O+NwH83J3soWANeHFP2npH/Db0/WeV6D0YGgcHMCNqdgajAfef/sCZH3A==; 31:z3rwQscDeKZCBkYtO21HIhR4qTAjUQ5SnTv9dwHNpw9NKWAckgdlqi8VnVYQ9u/VSL/nsAMd0+8g6+GnuSEwGm9fEuGUG570FP3yyzlt2WYj1YloyKBAQUu/0AqM0S/ASygsRZX7+5f23qRs/VjGhFPBehu5ojGPmABhPkppscRsUjQIu7NixYiVK6bFeyPwlEQVLfq88iyVY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Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3231023)(3002001)(10201501046)(93006095)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CO2PR07MB2520; X-Forefront-PRVS: 0525BB0ADF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(39850400004)(366004)(13464003)(199004)(189003)(3846002)(305945005)(5660300001)(2950100002)(7110500001)(58126008)(47776003)(6306002)(55016002)(316002)(16586007)(8656006)(9686003)(42882006)(33716001)(386003)(33656002)(1076002)(229853002)(23726003)(4326008)(5009440100003)(16526018)(59450400001)(8936002)(25786009)(97736004)(76176011)(53376002)(81156014)(6246003)(105586002)(53936002)(106356001)(478600001)(81166006)(6116002)(2420400007)(15650500001)(33896004)(68736007)(6496006)(2906002)(966005)(50466002)(83506002)(66066001)(10710500007)(7736002)(72206003)(52116002)(8676002)(6916009)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2520; 23:p9+70B6433zOE2OtdO/HI0ljbvun7GLQW2kEZKcsh?= =?us-ascii?Q?ar3L06hxKSk+nz9JRIWFQsGvZzb8GU/GJr9sNPtV1SmmqhYZDnwuhqE2KSmk?= =?us-ascii?Q?pXAxtl5efx3tv++7xMsFxI/Df8OwR5gDOtNPdrrZesMjBdH/7D5gbCYTv45B?= =?us-ascii?Q?ER/WUpqiDbbBcCeNBFLQ+qAcNwVjDvOEkSxuL9CrQNVqkdbKThejMnVsClkY?= =?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e+uTJqYOlt5fNF+Dn9Zrd8TzC1hSc1Bao88xE1wo=; 7:DuU9qnl5sO0tlCyKcsQr59VonDmWBt6itANr7Ea2gDzWzy21+J2F+fobZboJbFIREzH82CcRtPmdpACr+lMdBDS2wyHkvHN0CQZOK4kb3fXl+vLVLb8e/Hlw93Sw/7W/6PdOq3NIDwCW8L35gVoKovw/rch4We/iUNZdQubw8VQ7+3QIRpqt7o+4bG8hjhM6h/OJfcgTENGkIOYO4newhomXSIdh6vsoCLD/VtRQ1Y4UBa6sQ275AOpjEQu350su SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 08:56:08.8853 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e98e20d-7076-444c-ecf0-08d545f52f60 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2520 Subject: Re: [dpdk-dev] [PATCH 1/2] mbuf: update default Mempool ops with HW active pool 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, 18 Dec 2017 08:56:13 -0000 -----Original Message----- > Date: Fri, 15 Dec 2017 15:54:42 +0530 > From: Hemant Agrawal > To: olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com > CC: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] mbuf: update default Mempool ops with HW > active pool > X-Mailer: git-send-email 2.7.4 > > With this patch the specific HW mempool are no longer required to be > specified in the config file at compile. A default active hw mempool > can be detected dynamically and published to default mempools ops > config at run time. Only one type of HW mempool can be active default. For me, it looks very reasonable approach as it caters the basic use case without any change in the application nor the additional(--mbuf-pool-ops-name) EAL command line scheme to select different mempool ops. Though, this option will not enough cater all the use case. I think, we can have three options and the following order of precedence to select the mempool ops 1) This patch(update active mempool based on the device probe()) 2) Selection of mempool ops though --mbuf-pool-ops-name= EAL commandline argument. Which can overridden the scheme(1) 3) More sophisticated mempool section based on a) The ethdev PMD capability exposed through existing rte_eth_dev_pool_ops_supported() b) Add mempool ops option in rte_pktmbuf_pool_create() http://dpdk.org/ml/archives/dev/2017-December/083985.html c) Use (a) and (b) to select the update the mempool ops with some "weight" based algorithm like http://dpdk.org/dev/patchwork/patch/32245/ > > Signed-off-by: Hemant Agrawal > --- > lib/librte_mbuf/rte_mbuf.c | 33 ++++++++++++++++++++++++++++++++- > lib/librte_mbuf/rte_mbuf.h | 13 +++++++++++++ > 2 files changed, 45 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 7543662..e074afa 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -148,6 +148,37 @@ rte_pktmbuf_init(struct rte_mempool *mp, > m->next = NULL; > } > > +static const char *active_mbuf_pool_ops_name; Global variable will create issue in multi process case. > + > +int > +rte_pktmbuf_reg_active_mempool_ops(const char *ops_name) > +{ > + if (active_mbuf_pool_ops_name == NULL) { > + active_mbuf_pool_ops_name = ops_name; I think, if we could update "internal_config.mbuf_pool_ops_name" value then we don't need any extra global variable.