From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0043.outbound.protection.outlook.com [104.47.41.43]) by dpdk.org (Postfix) with ESMTP id BAA8A1B2F2 for ; Fri, 19 Jan 2018 18:24:58 +0100 (CET) Received: from BN3PR03CA0084.namprd03.prod.outlook.com (2a01:111:e400:7a4d::44) by SN2PR03MB2365.namprd03.prod.outlook.com (2603:10b6:804:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 19 Jan 2018 17:24:57 +0000 Received: from BN1AFFO11FD013.protection.gbl (2a01:111:f400:7c10::167) by BN3PR03CA0084.outlook.office365.com (2a01:111:e400:7a4d::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Fri, 19 Jan 2018 17:24:57 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD013.mail.protection.outlook.com (10.58.52.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Fri, 19 Jan 2018 17:24:54 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0JGZ6aA016753; Fri, 19 Jan 2018 09:35:12 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:54 +0530 Message-ID: <1516379639-25586-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> References: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131608562972169441; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(2351001)(106466001)(305945005)(81166006)(81156014)(105606002)(50226002)(8676002)(8936002)(356003)(2906002)(68736007)(107886003)(104016004)(36756003)(6916009)(2950100002)(6666003)(4326008)(97736004)(47776003)(5660300001)(76176011)(85426001)(316002)(51416003)(53936002)(498600001)(59450400001)(48376002)(50466002)(54906003)(86362001)(26005)(77096007)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2365; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD013; 1:ta03kg7Y+G2x77fUg++iAq6Qm2UbTCwTSc2siTSrNBMUjdMqL75MFFxU0+FaTSu10mMu3FmR9quJdBu+stvOp3C6kdMYYnIdkmFLjvHfq9MraYQGbg4+f4AjqlymA3hC MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 66985b35-89c1-47b9-09e9-08d55f618fbf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2365; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 3:PUMR7vPB6IuNPXardjQTWfpzo0ePCRJWSdE/H3HyMv3m9P/CtTme11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gb7RXuwTlhBlPoNzF8tOVZ8tckhZZhWX8BKrN0wRg6M0WkqwLt2qLpjuYFiH0JkSIVT72lOGr8s8hjgaCHoJeKoGtFDZ6qdrRZyFxSVKN2QYhVCVZgszQ6ltyv2X7y5gOc7R5IUxjqkWnPUKH3mcurToEXqySUbwer9PwjileKPZ+olzrK+D9sGl6tVCzjlEFVHcMQTnDkOlxvbRho/d X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(2400080)(944501161)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123556025)(20161123561025)(20161123559100)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:SN2PR03MB2365; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2365; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2365; 23:PtnQLRNjWJPQm0A/5sZsb23zjBQUHCqh7cIBRLApq?= =?us-ascii?Q?OmJORWI5J9uAe0GQnPOt0RRAYE1rMzLxYgjqNFyNIMwBN11OVL2UQ34TrpiV?= =?us-ascii?Q?oqeH2KsvGpQIUy1AeU/5oVT8o67dc0R8XPgjvpHtNQgtC4/deeOUjqVA+Zed?= =?us-ascii?Q?wdZhPW8KGsDz9YQN5sLEXGB5rQhHeJR9zeqmZyAKVUuN+m6r+2Mv9GdINaDB?= =?us-ascii?Q?0JyRwnCCqO1l1lJZ76d9Kg9Gre7HgOgvZ51oGjyWo8ZP4RtUDcdJsCBBW900?= =?us-ascii?Q?akYZIybc3d2eT0BSMIdItJQL6nA5I5D42owMn5uPmvTyC1R8Aclu5eW2fzEv?= =?us-ascii?Q?cseAy5u3WxCFL9GQ2TQmUO1WzXL42aQCIRUdtZzn5/aIkp/ID0ekddxr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xszN/IA2UprxXra3He8TKzfiDydDSudMhc+s5TW+WT1FCq78MlcqM4aYEOZW5v0YXBkOH6VqK99faVBUxqOLz98MW95yYqlsDIlonzniF/YhmsEqx+SbJk803upsqWY81H9+uhJc+X2GGbLs5xx3/XdcQ5VbKyVeDrwfXvSi3JelBfg1ZjKZYtOyPMt+NhTbFlOMq5FvpjSxPQ0xMIdVdI9WaI5EL0DkG5l2441W4rN9bARz+/rOkt5rpA=; 5:nBsZz178nSYJpW/pPwZzppIKTVYRaDi9kwMfJhYF9VpTJG7IJQJEr/ldHISy0Bajr0Wz6tZ7hQ+bac/pH6imkEXkfQz33KAzsOHXGjpYdDpX4ye2qzvPvzGoZ5McWq9CU4Z/KJ9y8BnMIn+PedFPG0y3YE2chd29rXPic5rrJok=; 24:1UFwERW7vfxz//RIGuGq8+cHr3m8XKXTqBbEJgx7siZerRQ5cc8uFGu9H0i3Sg9G9Uv4R+WJP7kSEMehucPxKkqZYjD3PLl5xQ3TBJaHtaQ=; 7:YB4BDGpEcQm4Y0dTOKWJG0UI06Z/Yzv2Nf10edzo2bXO/l2g2WEKoyH5wmurnXNBwVXetGg0WO/jDCxMz5f6ddq6fg7U+se7gSVMRnsKXy8NzI8aKBOT3slcFcxo+G2fGIAAmC+oZCrGJwUXbC/+tp7Y3NpRLkoBIDuc1bWI9mStXkOmHq8WYfZKN5bHjwGLSEi+iNIc/96ojNB/2bRKJ886P/6+sbhQp8+3lwB1agVRiNeCG3bz8fhto7t49KPx SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 17:24:54.9861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66985b35-89c1-47b9-09e9-08d55f618fbf X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2365 Subject: [dpdk-dev] [PATCH v4 2/7] mbuf: maintain user and compile time mempool ops name 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: Fri, 19 Jan 2018 17:24:59 -0000 This patch change the logic to maintain the value of user defined and compile time i.e. RTE_MBUF_DEFAULT_MEMPOOL_OPS. The pktmbuf_create_pool is updated to reflect the same. Signed-off-by: Hemant Agrawal --- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_mbuf/rte_mbuf.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 996a034..b6d2762 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -218,7 +218,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) #endif internal_cfg->vmware_tsc_map = 0; internal_cfg->create_uio_dev = 0; - internal_cfg->mbuf_pool_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; + internal_cfg->user_mbuf_pool_ops_name = NULL; } static int diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 937fd70..c085c37 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -177,6 +177,8 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, return NULL; mp_ops_name = rte_eal_mbuf_default_mempool_ops(); + if (mp_ops_name == NULL) + mp_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL); if (ret != 0) { RTE_LOG(ERR, MBUF, "error setting mempool handler\n"); -- 2.7.4