From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0055.outbound.protection.outlook.com [104.47.41.55]) by dpdk.org (Postfix) with ESMTP id 49F0671B5 for ; Mon, 15 Jan 2018 12:41:51 +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=OXYC31LuLo/eNN/ImpurxA7SN0qZw10TV9B0Cj2qvo0=; b=GfY8+BsFB/lAjYI8hNUsO65a9v3kIMAHbmASSksQu9mKlWkhn+BLKJXL6H3sMHezYyN3Qf4HDQ7113/JUnYPBaF/Mp0VaF4qwGwnR8wsYSj2CL6NlltOvr9tf/1bC3dYOK01SEz1ZQPFuIztFrF5xWOqrLelVsZ3zAqgZTMD5so= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.200.202.243) by CY1PR07MB2521.namprd07.prod.outlook.com (10.167.16.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Mon, 15 Jan 2018 11:41:48 +0000 Date: Mon, 15 Jan 2018 17:11:29 +0530 From: Jerin Jacob To: Hemant Agrawal Cc: dev@dpdk.org, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Message-ID: <20180115114127.GA29114@jerin> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-4-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515996674-26338-4-git-send-email-hemant.agrawal@nxp.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [106.200.202.243] X-ClientProxiedBy: MA1PR01CA0096.INDPRD01.PROD.OUTLOOK.COM (10.174.56.140) To CY1PR07MB2521.namprd07.prod.outlook.com (10.167.16.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0e7a21e-e191-4a64-92bc-08d55c0cf751 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 3:nF2pSGc0aGYzHQ5pPe1PNjgywlFZnLHbOKDcqsItkvalxHBiHUo6Si08OE/JC0SHiKjjtbazCNlTLY3OeEYK36ZxAv9YnSWlFbVDepSZHkHHxMOV8Nsdwampix/1MyT069jDSuv6OGjie2a8eSEdzSVH30sQ69Wo57mJzBpyAosM9Lk4VbmsAqJgSsI3Z8X6fUF4k4/ZGokQpVaSr54oZSBpvzcOP1mOUA7OwX17LmwaVoyCjWg/hV6qHjDFA9tk; 25:sHLnLGkM3VNnZngWFri7qwY4uxGCqqyr0i9Zal2e4pUyRfo3+x77mwf494avxwLaPb9tbMeGNhcu1P5MTrLRgyvI58vq3RBxBiNAzUMnE18qpaLKb/DUX0gn6g7Q8XUTiha9AUlOC94wPBG96AqW53pMHEfSbKsXS8LiF/die2SkefO7XuId0lsmd+BT0lceuvnYPOeOM65IPzPxnURWCIE6XnVeVtJAUXNVVKHtP9llx9m0trPJOt8XH4epVinDB5uObrS9t0csKtJffD06IhnDAH4Z3T+QJaa1fy8RrmSsANoPG+4XPMRUFD/gJ1PUjekZv7Jx2DlclfBc2WefRg==; 31:2dPwIiM0YOt2AVLkqaqPMyqycqVKSWHiZjWQLvtUJXAfLKNrWkpPkVITyq2jAiByfbkf5cAGcTGhD/x1yme8zkgQgjhR6aHcWHm9ciPGrJ/CMO9ja9OU9sTyTOCB491LiZojIpBAUlgjjGWg1ejoJGSWvBVzn7r9n3sLyQVmewCctOqI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v9c6Eu0v8H94Dtgp+ZR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(3231023)(944501161)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:CY1PR07MB2521; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR07MB2521; X-Forefront-PRVS: 0553CBB77A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39380400002)(376002)(396003)(39850400004)(13464003)(199004)(189003)(2950100002)(42882006)(47776003)(6246003)(1076002)(4326008)(66066001)(6916009)(6666003)(8936002)(3846002)(229853002)(6116002)(25786009)(2906002)(23726003)(5009440100003)(305945005)(7736002)(107886003)(478600001)(33716001)(97736004)(5660300001)(72206003)(81156014)(316002)(52116002)(76176011)(33896004)(68736007)(8676002)(6496006)(8656006)(386003)(106356001)(53936002)(105586002)(81166006)(33656002)(9686003)(16526018)(16586007)(50466002)(58126008)(55016002)(83506002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2521; 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; CY1PR07MB2521; 23:1bOLcnd9OLq2Nwah9Vf9/YuHaUzjJFrXnBzt7bB1d?= =?us-ascii?Q?a1bvNTMXE+ZsTKXD2MxVc6p+UvT/JbIbtKf1wj74V/EcFdkwCq7oXQcKg2tq?= =?us-ascii?Q?lqPfZ/4npF38tLKUoWhZ1nMRp2rnZ1gsclET65b+rB5pCrb8sECMn8foTCqx?= =?us-ascii?Q?2DwYnTxxGyMOGEfNjU5Dd5BO5UcV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owjiQH2uH2xw4DlA9wPzYnmYpmvokYq3sKe5n/h20ToqIv6yfJgLaSXfvwXv9roQ5a8PB6bD1NgDtexeoReXzCkAJxncnNWyZT1wSIWOEcYvcKDF5aIJn07pZKhq0l21o7riTBhzm/vK3TjBeY+OrjsWPapJM1W3uRlnzO/qrTsqOo4ZE0SJAIo SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 11:41:48.3036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0e7a21e-e191-4a64-92bc-08d55c0cf751 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2521 Subject: Re: [dpdk-dev] [PATCH v2 3/5] mbuf: support register mempool Hw ops name APIs 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, 15 Jan 2018 11:41:52 -0000 -----Original Message----- > Date: Mon, 15 Jan 2018 11:41:12 +0530 > From: Hemant Agrawal > To: dev@dpdk.org > CC: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, > santosh.shukla@caviumnetworks.com > Subject: [PATCH v2 3/5] mbuf: support register mempool Hw ops name APIs > 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 platform hw mempool > can be detected dynamically and published to config at run time. > Only one type of HW mempool can be active default. > > Signed-off-by: Hemant Agrawal > --- > lib/librte_mbuf/Makefile | 1 + > lib/librte_mbuf/rte_mbuf.c | 42 +++++++++++++++++++++++++++++++++--- > lib/librte_mbuf/rte_mbuf.h | 20 +++++++++++++++++ > lib/librte_mbuf/rte_mbuf_version.map | 8 +++++++ > 4 files changed, 68 insertions(+), 3 deletions(-) > > diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile > index 398f724..85c4f9e 100644 > --- a/lib/librte_mbuf/Makefile > +++ b/lib/librte_mbuf/Makefile > @@ -7,6 +7,7 @@ include $(RTE_SDK)/mk/rte.vars.mk > LIB = librte_mbuf.a > > CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common > LDLIBS += -lrte_eal -lrte_mempool > > EXPORT_MAP := rte_mbuf_version.map > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index c085c37..fd3b6f5 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -58,6 +58,7 @@ > #include > #include > #include > +#include > > /* > * ctrlmbuf constructor, given as a callback function to > @@ -148,6 +149,43 @@ rte_pktmbuf_init(struct rte_mempool *mp, > m->next = NULL; > } > > +int > +rte_mbuf_register_platform_mempool_ops(const char *ops_name) > +{ Should we also check the following? if (internal_config.plat_mbuf_pool_ops_name != NULL && strncmp(internal_config.plat_mbuf_pool_ops_name, ops_name, ..) == 0) return 0; i.e avoid returning error if the same the driver but another instance(different ethdev port) updates the same ops_name value.