From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0043.outbound.protection.outlook.com [104.47.33.43]) by dpdk.org (Postfix) with ESMTP id 592B91B024 for ; Sat, 20 Jan 2018 08:25:00 +0100 (CET) Received: from CY1PR03CA0027.namprd03.prod.outlook.com (10.174.128.37) by MWHPR03MB2704.namprd03.prod.outlook.com (10.168.207.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 07:24:59 +0000 Received: from BL2FFO11FD051.protection.gbl (2a01:111:f400:7c09::157) by CY1PR03CA0027.outlook.office365.com (2603:10b6:600::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Sat, 20 Jan 2018 07:24:58 +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 BL2FFO11FD051.mail.protection.outlook.com (10.173.161.213) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:24:56 +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 w0K6GGge024888; Fri, 19 Jan 2018 23:16:22 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:03 +0530 Message-ID: <1516428908-5430-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609066985196540; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(376002)(39380400002)(396003)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(68736007)(36756003)(356003)(2351001)(6666003)(6916009)(8936002)(2950100002)(2906002)(50226002)(8676002)(104016004)(81156014)(81166006)(305945005)(106466001)(105606002)(53936002)(48376002)(50466002)(508600001)(85426001)(4326008)(316002)(54906003)(107886003)(16586007)(77096007)(26005)(336011)(97736004)(86362001)(51416003)(5660300001)(59450400001)(76176011)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2704; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD051; 1:CbLV5QilwscRMDHBHg9CiJOGExLC05enYpBPWKNakW/uerLn19ms7/7x+HhqW5RxH0lN7aF3lxhjfVkNFpHl26HFMNS+qUHA/L6kA9S/3fOT24XYfknub0zdBOnnsn1M MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 029350fc-f303-472c-2a9d-08d55fd6e954 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2704; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 3:9fZwXoK3n4AtRDFHFNPCID23Dtf0WgFpKP2RG/p/jLcKC2GUCrRk6kxFGbOmZuTWvHEaSwuoP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Z9e0sqMe83t0BG5rAbSbk8RL9NESaRg5JagZAcNvU6vV4IIsvimBx8qWSpJobsiboUZYncIJI9zfHCjq5DeGJKQJ7KFZ088eFEGXef4KyXspCrepoc2v1cwVoqVjrYXnGci2bpx7ufF/tLuReWYqSBR4LOVeXx4nhxi4gY4nGP5oOnDsfTMXu3eVSBNu9zPubLgLBL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231023)(2400081)(944501161)(6055026)(6096035)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(20161123559100)(20161123561025)(20161123563025)(20161123556025)(201708071742011); SRVR:MWHPR03MB2704; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2704; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2704; 23:uGJKAqZVhN1VF0IO89rYlvVGwJ+ja00N8hd4SqrA/?= =?us-ascii?Q?5I3kEj5r8YxH8ann7ibX23EOcSfUA/yp7Fh/CzwVvuKQl3xMNuiVS0Aj7r9F?= =?us-ascii?Q?zsemYgb3XWbMi6Yg9WpH6c4mxq94UPRuoiGbgQIxdSuPwsAQvyHnX6nS+6jd?= =?us-ascii?Q?2ozqlz2nSdvZ0dqeCEYDoI3z4Rky1PiOTaGmMiIfjN6YoWKovUepInOnDQlO?= =?us-ascii?Q?ljlGhHovOFSia0Xdn6GMaCr5/xh9baOv5vMDiyI8kUbaRBWVcVgyiZgX9puZ?= =?us-ascii?Q?J/HKuWBzJIoEufTLW7otd4uh5Mm+ger3sTL0oWlDGVNwDtWmk6LoOO9fdxkc?= =?us-ascii?Q?k+ECa4WUFzXS3c/2NMtpE6DgYIbrTA3i/lCdN/OJfuXu61EqbUETCMSXnKVn?= =?us-ascii?Q?pMd4/oOCaYwt2iTrrmSISZVTI71KIWH4f6TPpTGQAc2756UpMwVkSw61I/09?= =?us-ascii?Q?H06W2A0vmbRhbSYjslqI0JKIua3iQLz8MdOcgzPGX3R5y/M6iRNVz60oY+2b?= =?us-ascii?Q?K+rWeUThsQF8tlQK9ujJCCfp2+PgvVtQxGODL6GPeaCHWRF2qe1cU+bHae8c?= =?us-ascii?Q?6jSvACE+h8D4nfZ4nHjZK4RVc1mG2rnzLs2F1/QghojBHlYexNrnW38RoP8N?= =?us-ascii?Q?d28xBpHhLYc78I5w0kt4Kcw7rmSG0IIJYZy1LHxvJyTd9EmI72Mtr19KjsTy?= =?us-ascii?Q?+WzQZs7IoxMFUzMMcovSQbi4LmYs8tKbw3lXo11+Y6BrHxglKExyErjfSObl?= =?us-ascii?Q?RRkTNBv1+MHtjmtBE11EdRFAnQoTWXZMiB5z/Ifk0MsLM7w5obQbskdSP/Ej?= =?us-ascii?Q?tbBpNP8Szd19nw40fuAOm6T+loShceenIB45m1/OMcY4NMvt/1EKCC2wqwCG?= =?us-ascii?Q?yzeLSjvj4QNkmedNe603f8Itj0KFKH+trcFsoOL0h6SglWnCvHcs+Afv2MUD?= =?us-ascii?Q?cD19mTrz4QAiaiRte/BF/LHJZEj5ZrP2VgOzEt8saANJbqpi8N4lp/E35kmv?= =?us-ascii?Q?WUaVahJtPdTKfGZIcqvr198GlnjsaSXny9lNZ46NnucfGFW/FiTbIBbQ0NgJ?= =?us-ascii?Q?P+azWlJEh894NaAzcsAy5tdu/DdQSznIFfdyZKtZfTmHf/Q90JcFWrK1YtSs?= =?us-ascii?Q?MOyJotfTBTxN6YXci5403rPq9N2AUJy?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 6:g/q7yj3kTzAKBPu2rDb5rhJKRoDlYfMVc8Pj7FiNAy29LPJfCF0UHSM5ZUZK6IduKtJ7IR0cZryyksAGhbsi3kTRW1z6rViToML2vM6c+sZHiCCZCncZqzVugeHODXDd3bDO7jNVRpzTSqXPS84Ca4f+fe3bH6rMQU+O/VhH/ym/z/KtWmIG1/BSyxYZlkMa1LBCTUAMc4JNgyYhWN6BKXat1t+4S2PPRHRGFnMn8xNckEC1lJr7y6G0lBimi0/Ht36AUBqFAtXkMO4rRwARta1zv/lBw924X8t3MnVSZfh0nYECRyjTRz+ybQihegdDVysSCvv350ZKb24d+RjQFfMEtJSDS4LfsNYa5c4GHZM=; 5:xZoTvA4fBjhMn4HdhhPFpm5Ki5N8JiHz1Y+8IuHFqFyc9LPpbAI/7GjUCV1cU919Sdah2Vvq1iJo2gPbOcrJncAfR4y8zZsq3w5ovFusxFQmSsjEpAK9xZuIaEJM50JyiMBgMCZ6oZYd1g74w23gWaizABjr7QQ0OF33HYgj6aQ=; 24:5sCMgtS7ryKSg83MD2DnQ/N/C/cB/ZeBT+w9EG2swNlzUOcwSnc3O+CQj49cV9qzC1tuZH51JWuPhKV3bPwfhUyOYGAlOmifmlPCESpyV4I=; 7:3NqWAUOm/B59afEV2ty4Wft2uNQzxe0+uZqS6GX/0ssLREshSz3URkWFuoIBWSJIRw3ZiGHRO6uO3WCaviwNfpPD3Ni7olEGWf294E7jMptXI+t9mgkKl+om1SGzhkqV5U6wc9QaHHgDeicorZy6oo7QnAnBKLR0QgCu0oe9uEr8ckFqomXSb0RZ7GQ6peIaHzo04Ml2Rur5JINSzQYK/8UUSzNyfKpChmLjNTMjIADbIYBWAYZzkwE4n6awF6eR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:24:56.5540 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 029350fc-f303-472c-2a9d-08d55fd6e954 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: MWHPR03MB2704 Subject: [dpdk-dev] [PATCH v5 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: Sat, 20 Jan 2018 07:25:00 -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