From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0041.outbound.protection.outlook.com [104.47.36.41]) by dpdk.org (Postfix) with ESMTP id C6CB3A48B for ; Mon, 22 Jan 2018 16:03:20 +0100 (CET) Received: from BN6PR03CA0060.namprd03.prod.outlook.com (10.173.137.22) by CO2PR03MB2357.namprd03.prod.outlook.com (10.166.93.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 15:03:19 +0000 Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::139) by BN6PR03CA0060.outlook.office365.com (2603:10b6:404:4c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Mon, 22 Jan 2018 15:03:19 +0000 Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Mon, 22 Jan 2018 15:03:19 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w0MDqVQP020039; Mon, 22 Jan 2018 06:52:36 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 22 Jan 2018 19:21:18 +0530 Message-ID: <1516629083-13967-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> References: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611069996897930; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(346002)(376002)(396003)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(16586007)(106466001)(2950100002)(316002)(5660300001)(105606002)(86362001)(54906003)(6916009)(104016004)(6666003)(69596002)(2906002)(336011)(6346003)(48376002)(50466002)(2351001)(26005)(36756003)(53936002)(77096007)(305945005)(97736004)(356003)(47776003)(107886003)(68736007)(76176011)(50226002)(498600001)(8676002)(81166006)(81156014)(4326008)(51416003)(59450400001)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2357; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD030; 1:sRPdOlC0PyjxdGXACrIrB4E/RsVkLHRg2YFS7VXDse/f8jhNkUFpeYVLKUqy/Z8EGVn9OUoewwOOmGIx0gxdwetQRppL4UkV/6fNdQmPYoKiDbJ0pd5xz9UEV2m3YIc5 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f29b02d8-18bf-48ff-352a-08d561a94621 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2357; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2357; 3:oueY5Yl19kNyNb570vL1E0ydKNC6a63D/iDYujZLH5H5abWJJZF8JcCEe2F0mofSNpXaspuKlDuRWedmtjfAd1yoiQXGdCn5MEC4Bt8jcihA8ig4HXYN+doOcDfpp4QfXCagmXeJHAzS8rJ5+yMIqTGyrPmpRU5NlnzLRisLY1v5l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jnB0LykF/gpCXVOZ+sPAGyQ1ucbJVBsHsZEEAEM30hN43PSBKnY/R4OyhDGjk9vEIYeBJgfL5vShewvxV0AV4e9JzA4k 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)(3002001)(10201501046)(93006095)(93001095)(3231023)(2400081)(944501161)(6055026)(6096035)(20161123563025)(20161123559100)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123561025)(201708071742011); SRVR:CO2PR03MB2357; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2357; X-Forefront-PRVS: 0560A2214D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2357; 23:u3mDK6cCGDYc4sgps0wi9wmYsBCdvHfisgIxu8Bte?= =?us-ascii?Q?Mz3/ZXtNr8DFKxAsF2LBMsGmXMxjUwNOkxdnmftEwLY1FiRilOb7Mgbjq0IA?= =?us-ascii?Q?KFLwgUYRLP9d2aI1f+zUDAQS9tvXyi91r9lnBHJa4+ERY4Ds1jdfDOpFCrBu?= =?us-ascii?Q?ivaxuXlcr9j36yaS/LZxDOnm+0Est+GNiS/EUuQjR3XtSYS+F+Yuuoy0J0iF?= =?us-ascii?Q?RPdwuAap0WSgCCNpec1x2tay4v8vT7yAMRfEJEHrovIsOeOv8UTZMC4V8yHQ?= =?us-ascii?Q?yl1PBWJ6LxOZjTTOFGReJmp40ZJyRDQi+in3OoeThfeRQuePt4GdNjaxtcEA?= =?us-ascii?Q?WGSa9mpwPIytURvZ2dl/oI11XFPosUuireW1dtzcUbjJkAeyTl20kOBhDMua?= =?us-ascii?Q?BPKiMpqPcRTxJJZyLHcp3+cf60G+k7mMS2S3GNhs3azHNPNXF4HJ/6WzkbJp?= =?us-ascii?Q?+cJKFQLgocOUDJNyZ8M+JSmThJhZoBWn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u4MaBhmynA/inhgPstLdCfxtnWFdw77UzKjRsIf2V3vmEC244QD/RC3Woo3nDGxvCtwGmHHFoTtW/hzkQMViHtG1qlcZuQKp4cxoERKWIKyrrvG0IUPv8ewod0Ch2rWoDD4=; 5:P38imPkwac/QmhbuGSPcMJzj4QARXx9sXhvNy0VjzSCpxWcSV3fFpuB0Zu0jFPRPYb+iuCm9N/Xy9JrFm6XGdf+6uoJ8862gwGqHZYJhNRR10QLjt+qPfLysn5t1BwGCfPVfS74mXxjhZnjQTZRxD4jzw71P3IwuvGdEfm6IE9s=; 24:yKKp8K2vIok1O0PlUiEYM6k8owK2y/3NZlI8KX0++Lxvux3swDmW/j8rnRkGXXMmfgJpIXJO/9zyH1WE0bdJAWsHfnWtmnCqq6XVaqdS/kU=; 7:4/g4ulJxUJ7DzHNJPLhMKT2SJEARP8d4Yoe2okzWQ/33n1Uwr8VwYJzlPlsHgvpNQ4w2CncqrjWWM9NaWFtEV9S3aC5FIe9gAOtMz8RLIYPdwebfc3tj+zIT/6l7XQDXna5i4LwX8A5+vUaQjZzU4Zog1F1h2GtmX9kexVOideZ8DQRqhRBaMxjRecSXPXpwSWuHiriPwx4KSsh/agBi+gj7YEVEkj8k6jJmDdQc6Cs43oHBQqbwz5JR6yMpgc39 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 15:03:19.4401 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f29b02d8-18bf-48ff-352a-08d561a94621 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2357 Subject: [dpdk-dev] [PATCH v6 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: Mon, 22 Jan 2018 15:03:21 -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 Acked-by: Olivier Matz --- 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 7a40414..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->user_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