From patchwork Mon Jan 15 06:11:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124470 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568610lje; Sun, 14 Jan 2018 22:12:40 -0800 (PST) X-Google-Smtp-Source: ACJfBouOr69Q5QtVpSFhlXsp5I3mTyTymAFVRJLXbZDhT7eKB6KqUP7hu/xlxlmqjiMZ3kT92aiP X-Received: by 10.80.181.130 with SMTP id a2mr25204034ede.287.1515996760306; Sun, 14 Jan 2018 22:12:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996760; cv=none; d=google.com; s=arc-20160816; b=VYxKUYnsWhEIUsXWyoI8QAHQCSQI/YxnY6T3K2wdXrOCJQiwISUN60d8ULoMGtPO7O slQCgGXIGWYed/m/eqWYwK7SJSRGTn8KUh611PXih0vI9s/8chUaZUOrrrL8IDdbrDLr SgvXgBrZLK6WDRSwCWCYH6mDrOsLGf+uMAPe1Tio6TwE+nZzfqk9pn47gAVJL9EfPlB7 b1NK4YHgzCueGUQQr3VZTbotf/zry4EQSvq8W3zkqgMO5PmAjsb0YD+UxydjGi73J994 wi4BitpuQ2x2JTAWIPs6UwiCiP8V7DW7sb7s/7z0ghZ0dOQbiqa8j6gqKjUIYLLF/rR2 jwmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=qhaH7Kpt5vTt4/qRDwqnLJwwLlYufDnpK/sYY4OGFe0=; b=fpHOhRlYwwlmNYznkwp0Jkf+JftmGpCZgBjM4bg8Rv4OgKLRs03QPB9GQVKGblB/PJ l+uL7hZ/8enRYurKQgChH4MrA+w9RFmqSm3Pm1jPOXQ4nMzHnuWvLvckcajjusEs4M5m Z2fu62dbzX8U6f4epER+JH5ptKuMg7mD9EzaK9sT+t1yMa5vypc/tBVplriryfI9yfUo iFHCLL2vRDK4SBDCHHlt2dS0jILYyPhnXTpiXx5I15YG5mX8+3g+Hb2iwjHvT1VGqb54 po2enyCLOEV6OkXmCSavfVkM3ym8COe32rsNiyFvxOCbIsSEr3cQsSe+472+XSf0cqxK Y0Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id u63si48639edc.43.2018.01.14.22.12.40; Sun, 14 Jan 2018 22:12:40 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF61B7260; Mon, 15 Jan 2018 07:12:31 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0080.outbound.protection.outlook.com [104.47.40.80]) by dpdk.org (Postfix) with ESMTP id 82BD671B5 for ; Mon, 15 Jan 2018 07:12:30 +0100 (CET) Received: from BN6PR03CA0094.namprd03.prod.outlook.com (10.164.122.160) by BN6PR03MB2692.namprd03.prod.outlook.com (10.173.144.11) 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 06:12:29 +0000 Received: from BN1AFFO11OLC004.protection.gbl (2a01:111:f400:7c10::129) by BN6PR03CA0094.outlook.office365.com (2603:10b6:405:6f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 06:12:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; 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 BN1AFFO11OLC004.mail.protection.outlook.com (10.58.53.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:26 +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 w0F6CKAF011776; Sun, 14 Jan 2018 23:12:24 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:10 +0530 Message-ID: <1515996674-26338-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703487678465; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(396003)(346002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(51416003)(76176011)(4326008)(54906003)(498600001)(48376002)(6916009)(85426001)(2950100002)(6666003)(316002)(16586007)(5660300001)(68736007)(77096006)(50226002)(105606002)(53936002)(106466001)(2351001)(296002)(8676002)(8936002)(81156014)(81166006)(2906002)(36756003)(47776003)(356003)(305945005)(86362001)(97736004)(104016004)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2692; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC004; 1:4rj2HgwMglhhnwNH9/z9qHskMJJM0gy5Q9IOZlo17qCYXX69/mfi/WLKh3lA1Y9F4TFd9bBFIKUERhFLBwdGgp3f3guG9pgKUEt52XAfrPGFQe/6uybMEwn/yNSTwWe4 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a7336db4-21c6-46de-5801-08d55bdef49e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2692; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 3:2hmpdM7H5gGfxCJCfFrXD868V+AkBalSsS/Eh/17C+YElbX3B8ioVGLndkLFD8TXQp2jc6uMpOb/7e2ymJJsWgeR8Rv4fOCeigI6honxZsw2O4eHekMYbU2xT2faQu5Z3yRNwIIzs8K6z24YP2zW4BYwx6qPUyVRcgU0slKMn01M+Bn2NvAiD9G/zjsEhK2mxI0keDWKaoxbTpTUCjcqQyzfrBGMTbFwiJLGK+dFeeMmrPhda1OfetIPZSxf5r1koMjp8LpIdoXs983nr24F1MR2GiwJQvfpK72oy6yapJClwiGco2IJaUa4hmuKU/bl9xntzpSp0kfhy4Drk9UivnvlC8nYnAvSOVnGZSoQL10=; 25:5FS8ASGzO26QuSqV0sxbukgjfnkd6YBc2ODu49acA9JenEDya+Gagy5/2rU3bVJ0t7Z4EiHDDEe618pj6lhU3pC+QZejfNggiHzQlzStrWcrlpRo+36Pq9iDd9jeMPVr9hRj6ChGuUWQ/ABlxIPnsMp6wHeH0UZnSLX3OW8aEkUF1iKg5ml4Yq5EHnhvVst3Cz2j6LyJU/MPkJ9KkjFiF0UHku0HuK7Fwk/zopjGPLjfBvJJXfEsknLhzOQtek9nt83fxlB4x0DSfFtlMr5LeIV4aFfobTM72BJFMBuBLb6PWnEzNY1cNl57ee1nWxeE4Gd1lGphisgPHeoVYqL8vw== X-MS-TrafficTypeDiagnostic: BN6PR03MB2692: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 31:guZvWyoA74vcO0z2DOQFuFzGnztcI5ldzNRMeODYahq3o4SQsTe+aZxqOPD685YiHYoL5eA3ZHZ0bOd7WY7hqlNv2dsH/i0R1WKWOP8ho3Kd3gROrVRP9Ebmt09UcBvOi/uo5Ws9NMqIngjF+9+wP18zmfSUdF76IXlDokijR4fVcTnZvffFxXGxZ3ezKiLekvsnLM5XqGmLuVH6DSpQitRN8IT5Xd7Pj1ASI2Qr8gU=; 4:BX7p5YXAu3DkjqxRwRnE3d2qLMqLn5k8PmelXREx8erUkt8HR5LyNBoM+F21mZ7uDp2NNKzpjKT8hLCmeD7k54T8kzHyl72NCt0jfjU/JkBBtqw5CBgTLJ+W467wgF974ovDIHSVEJBxVfrI2xopxKeoomxQzfUFkvbI6zMqVevAPaRPzrSirJVCxftj7gmXahsuh6F5KmXUfVvVs0L84n74llQ709cme2RdRlTQ/3qRn4rGJ1MB0z8qFDfJ8vsjwbmUHog6IArQAYT7ZkK0Hv2d3J708yqgRmGQFoDJrfehwE1UHl/OEX57oT2Nhdqt 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)(3231023)(944501161)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123561025)(20161123556025)(20161123565025)(201708071742011); SRVR:BN6PR03MB2692; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2692; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2692; 23:lMnFQVl97AtJxaA7yBuW+BFRb74Ov1MNEItF6OSng?= sMcgEw3ml7kvlk6c8mBIxdXvB4ZeooQYxYiNNkgRaS1b6Xq7r34Ls5IXzMiFQsVddhVaLbm41Vz+AWe+mdsAeRh92QWcUoQME7+dG/OUTkKiuirTGIOcdx/pt4TInGHNAlRAk1cgxCiHywutyO1Zh4jsaBwj8kpewfM6lks0WFbwZLzsUxwoA/sSZFyG6xI11ID0NUPvSlY/WduDZ6YZCzmV6X3+DKo3POjZbvMTVIiwUm4kD0NC5A8WdeggbmEn6jS31lmf0jhrrczuWdSfeAZgemPT5GKsUoKvzKxKBI1xwHeMzuV51QRAS5hXpdimJMpbVdV6eoX07c6wb2HlrrsLl50uSEQXk8GwOK+UDcUvG8HFMbD65SdJn14GSlJ2oMaMucWm2ndJf5tzdJfDW8RA+sNu4Z0zIu8p9wYJklIlZbq3Vu+jcM9gbOMEMjrd+oETv6XqlWISlA99SIT5kD1Oa5xgNE/xTa6YakAy70nw87d+zpw32ZNwf8Z4gEm3OXESNmF4cCnw72IUCXwlp6cCIL7z+UY1sxBecaaIR1MERwU8f3iohejxIrtB6TwjSo6X+q/Xw779FGOqV1V/JR9MQ6R7bb2Uu5bhCo5/5o7ZSlWJJJ6E9G2CSXvKvvCAAHgaWRVE5jv2sC7KmVI5HT/eg5D6aSK/EsdyLwtxSGuLs+OiB7MkL/141tgs9UGKYyZUvws6LeABdgc4n57TRF+Q1ggoCE0FUksTnc8NJXXFDfdI98KLjhUNub2nZhPSSH8pYYxxvEU17DfrdCgSfxuPbXYjdc7c/iM8DvgGiHkK9PsVkW5C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ARMqmeeyhGhIY4XTmGnX1V+ia4tDCaoFD8Q0A2V32zzxGEfxx8RjSonqq15ObGu8CQ5WgPgmWBe/d+8wgEY5tdaex9MnF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:26.8490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7336db4-21c6-46de-5801-08d55bdef49e 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: BN6PR03MB2692 Subject: [dpdk-dev] [PATCH v2 1/5] eal: prefix mbuf pool ops name with user defined 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch prefix the mbuf pool ops name with "user" to indicate that it is user defined. This patch also 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/bsdapp/eal/eal.c | 4 ++-- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_eal/common/eal_internal_cfg.h | 3 ++- lib/librte_eal/linuxapp/eal/eal.c | 4 ++-- lib/librte_mbuf/rte_mbuf.c | 2 ++ 5 files changed, 9 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 369a682..8261bb1 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -114,7 +114,7 @@ int rte_cycles_vmware_tsc_map; const char * rte_eal_mbuf_default_mempool_ops(void) { - return internal_config.mbuf_pool_ops_name; + return internal_config.user_mbuf_pool_ops_name; } /* Return a pointer to the configuration structure */ @@ -397,7 +397,7 @@ eal_parse_args(int argc, char **argv) switch (opt) { case OPT_MBUF_POOL_OPS_NAME_NUM: - internal_config.mbuf_pool_ops_name = optarg; + internal_config.user_mbuf_pool_ops_name = optarg; break; case 'h': eal_usage(prgname); 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_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h index c67685c..1169fcc 100644 --- a/lib/librte_eal/common/eal_internal_cfg.h +++ b/lib/librte_eal/common/eal_internal_cfg.h @@ -52,7 +52,8 @@ struct internal_config { volatile enum rte_intr_mode vfio_intr_mode; const char *hugefile_prefix; /**< the base filename of hugetlbfs files */ const char *hugepage_dir; /**< specific hugetlbfs directory to use */ - const char *mbuf_pool_ops_name; /**< mbuf pool ops name */ + const char *user_mbuf_pool_ops_name; + /**< user defined mbuf pool ops name */ unsigned num_hugepage_sizes; /**< how many sizes on this system */ struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES]; }; diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 229eec9..e8c7100 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -124,7 +124,7 @@ int rte_cycles_vmware_tsc_map; const char * rte_eal_mbuf_default_mempool_ops(void) { - return internal_config.mbuf_pool_ops_name; + return internal_config.user_mbuf_pool_ops_name; } /* Return a pointer to the configuration structure */ @@ -609,7 +609,7 @@ eal_parse_args(int argc, char **argv) break; case OPT_MBUF_POOL_OPS_NAME_NUM: - internal_config.mbuf_pool_ops_name = optarg; + internal_config.user_mbuf_pool_ops_name = optarg; break; default: 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"); From patchwork Mon Jan 15 06:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124471 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568636lje; Sun, 14 Jan 2018 22:12:50 -0800 (PST) X-Google-Smtp-Source: ACJfBoufqryOvP/TLdybeBba9e8vmlyOyhemPwQHNRekYZce0WQmeb21TeaK0juxcO9gqNKONt0l X-Received: by 10.80.245.52 with SMTP id t49mr17608308edm.47.1515996770710; Sun, 14 Jan 2018 22:12:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996770; cv=none; d=google.com; s=arc-20160816; b=LoY/BUjaKE4gF1z9L/B3WNFkOFiFmGBW5Bmh4o6LIduIUFpRsyRID6ZTbG40VdBXOv c1mpZzdV3qayvheNFdQ57OvZTkxN3i7117immiZJHqBLBsu2PvCzHveQRPqCOEb0iC8K pgeKhKvgFTw66x1kWOsoqdC7orTHSrbDSCa42xD9QfD1VX+fOC1C+y5McOsjcW0BKwc5 SxGSe0sGgMzJSlEQgcxL0iD6NxUUckiBH7c7fdPf1vbr8u461zJnsM2IzdUS7mkyXCJE XyEcoOmDjpVHcDNDkqUfvW3ckYI2GG9TZY5+k28CWFB5tOey3hdeBOp9Lo5FRGfZatfV ffdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=JVAW9LEvbFFRd9JtBLiBIIYCCmtgZWJ7zKKH0Wz9T9I=; b=qAf/I6zPKRwmd379rhlh8GFBVKPYONOWdnRcOM4WwM5Duig6kTvlj8oBYdopCeyh5R Ds8y9aQouYKM5cbBJx1XKRjRLlfR7OSsfVcYJJrVNuvVt4adeKG+hxZ/KnqjAO10asWa S07DN3zpIr4R0cbgbjclSF1kZIxNo8aR7O4gaTfvDWhs95OZ26ahUikAia70NAOtOLJm UJmr5Ed7juqqhuOjZiT4VMLnC/ZzRhfcPbuiBLZhftWCCHqjY9r5LuBfkm1hlvIXPaFK xXCtHC4xOen+KbxkxLO5nQxYLaA62bMQQnPCJIEj5hfjodFRYoO0aoktlGnR+3aWml9G n0fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id d5si2371736edj.327.2018.01.14.22.12.50; Sun, 14 Jan 2018 22:12:50 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC83B7D19; Mon, 15 Jan 2018 07:12:34 +0100 (CET) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0047.outbound.protection.outlook.com [104.47.32.47]) by dpdk.org (Postfix) with ESMTP id 7E0F82C57 for ; Mon, 15 Jan 2018 07:12:31 +0100 (CET) Received: from BN3PR03CA0079.namprd03.prod.outlook.com (10.167.1.167) by BY2PR0301MB0728.namprd03.prod.outlook.com (10.160.63.18) 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 06:12:30 +0000 Received: from BY2FFO11FD037.protection.gbl (2a01:111:f400:7c0c::150) by BN3PR03CA0079.outlook.office365.com (2a01:111:e400:7a4d::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 06:12:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; 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 BY2FFO11FD037.mail.protection.outlook.com (10.1.14.222) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:28 +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 w0F6CKAG011776; Sun, 14 Jan 2018 23:12:26 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:11 +0530 Message-ID: <1515996674-26338-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703490807565; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(346002)(376002)(39860400002)(396003)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(498600001)(86362001)(575784001)(2906002)(48376002)(104016004)(105606002)(106466001)(50466002)(76176011)(356003)(4326008)(6916009)(2351001)(5660300001)(305945005)(16586007)(51416003)(6666003)(85426001)(36756003)(53936002)(54906003)(47776003)(77096006)(97736004)(316002)(296002)(81166006)(8676002)(81156014)(8936002)(50226002)(68736007)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0728; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD037; 1:gwYc1//r2GLQxIkM01LJCXTpo9Un2bHbtjb+gxNwjZPG9+3UzTgJfktnD9w8rbgP8pTe3jIOqI6vDRNcmM18yG4G02HOjxY0tpFXgLc7ggSDw2yJEmlqsM4pa3dUPyYc MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b05bec01-4bda-4d5a-170d-08d55bdef4ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BY2PR0301MB0728; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 3:XHAFaXb++geRK4Kri3OBlNr/dHuo7td3W3Jjv+dWG6amNdmAfF7ufY6vlCo01iA/fYPJ+r3CDnHSmdmxz1AePqKH1dQN+9U694zbN+iOuVUZX7kmhfWjxI7b6pbIuZgZnYjkrBwqtPQcNbMbuejLPUZ2y6U31hyh5LERy0s1JkSv7jobWJ5xA962AD7I+rJw9MXlaSZeW/44hbdMg/lQZSrG6MYko6azCO5nCnxRLh/LWDCatmjFI4C0vWxkGV2YV3mwJK3+muW1TnBZo68wUNOfLxYfGvqwEinbdAITajT0Ne3mV4xhVSFTURAmFJ0PbSsJhJaFEbkiHffshm+WtbBxct2LcLoCKdncNzwiasE=; 25:lOz0YjN5QpQmdjKVs2rcUpilCOTCv+Oi+plMR5QvzgrgsqNoInJLXNWaYHV4Hv8jEMalqovxUViYBqBM2tTUInPK/R/OMhN5jJnNU6nyrQFDUGrbgR2O2OfiEWUUV6duYwoW5uj09KKbv2mU/OxHPVsrnWaNrZ4uazN9xVUBJmw8ETTmMjepOF/FcSZFvCd9BYES/HvSEmHfY4DauYY9XrL/g7NypLdd61JEhFe5es+PwYRoZaPz/4LnHe6G37eBZbvrt9W7r/uJ0Xee1NdIMLFp67rA1rHUyVsGCHeSfVphp3UuKCTZEVd1SBiYjumZDQAU6d0RPblhygvIcra+Ww== X-MS-TrafficTypeDiagnostic: BY2PR0301MB0728: X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 31:RE70igVaEo6FVKEG4BWmgfyLxY3+CyLYVL09XT+WqSWc7FKsxAGa0TsGVoe+XwwrT5Wi12DV4J5zkDwmLNRlAfuyo1fmZlZ0f0cj1C/l34tLzMG+RIhz2TTn7qzICi5jIsE++KmDYYC0wnW/7HAu81QMuHZHnHAf5wzyVyswNvd1N4vp7L9h6XwhK75OjsujlE1qbZvZ7ZuCy7tN4KqPs3VupZ2vARzbLeLwkVDhemE=; 4:Nk/qAxb0YC3kVaDNBFhKNX26Z+B97FPI36I3gxv6CW8r7zo2MH5y6TL6jnhaCm4zNrn5vE9c2NdU2LBvk66sXBozt18sRHvOv4ds6t4M/stGC1wTyg+6o8DdmgymR98NfP/bP6ZFox/k3BPx/M0Q4NcBaa7T4uD/z6vEkb3rqzTA3Au6EMmT9cVZUZPw+RxPZXVdx7Cw5UIYfM8OtjNRVFvbbTMrToN6EYmjRdm6L0CU7VqmxuAPk8NSj8UKQOBbeRNapKpew1HIQ/MPB+5cTC/VAh9bjs/uViAJPFlOEyyePIEUOw245601BnKsPUp8 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)(3002001)(3231023)(944501161)(10201501046)(6055026)(6096035)(20161123563025)(20161123559100)(20161123561025)(20161123556025)(20161123565025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:BY2PR0301MB0728; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BY2PR0301MB0728; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0728; 23:vw4Koq7qsdr1/e3p7DO1gUv4EMGe3856yBh/CuI?= TaUQOF/yDg/AN7gxB5fB6VZg8eL8jHbKu06kyH3cm4PQE3RO5/rWVTeMEZUwwzw8wBrFnrB0H+bEjqKcD1cPKuIKT+/PUKIEzV6rgc0oAZMyFjwIjwaeJ6MIvPzE1C7oMIxVpyH4urptDjOwSPUEdpHSBv6EnFwMx0J+BJfXg9oxpeJAC9SyWh6FmJLfJoypy2OseBcElvb0OXo56dsXelsbBMaFFbFqOO6iZuBpQI+/TpJmohb3HM8sh6YWllylComlq/uYD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BwpD3VnDaBe5uVAwxG54+eQVZiuw3pIV1Sqr15jZ4cuhzpsaWnQPzNWcZo+dNZSzTgVai768AJIim901pdKjh3zwUn0xhgA4qNLBfmnD4iFVYyUQQWPk7qzBlmh2TmWdZKpY=; 5:fRz37IJ+NN0amh3tJ1lUPV2vFsFRGRhKsRQqvN7Nj5SwS3AG5HiXu5g8QssEtDV3cLxosgd3WT3v8oroZzgwIpH8A+6fm2bA7yiwXxcCDM/FQocn++g3yif1gJRE5ARoID5iLGC5oKQMTLAbVKcH046A45AFSrHR5UJVrN2X4h4=; 24:CuyTUWZJUib/H9KsshlaxNe/0kIPVvPoHxgfg3w8PBQeyo17/Ylj0Kk7sF1n4cknDelT/B3FFXFdvbELtdlgf67zFqr5n7tiVLYOTs8oUuY=; 7:Wp79shz/EzK0r5Xiq7D9G8a7QtYIDQkriLMjLOS2ytzCZw+s6ycv46oeRsKh1qSRlA3HCDzia2B/dvCt+lm3Jmr1f2lnG/mazWAwx32w2tTY0yvooBj89dgAfuIpO5mHU0QAnixDjAFD2B6iD6WLY3QPIDNbhjLlmy2pj/JyyRbfSw+t64muZcQ7O2qexzRN5ZfjK7Cjm/RAb8PMA9k7a33IjHYawXCzolqhWuVUWKAvzZAtu0yPwUIvhGzZaUor SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:28.8935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b05bec01-4bda-4d5a-170d-08d55bdef4ce 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: BY2PR0301MB0728 Subject: [dpdk-dev] [PATCH v2 2/5] eal: add platform mempool ops name in internal config 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal --- lib/librte_eal/common/eal_common_options.c | 1 + lib/librte_eal/common/eal_internal_cfg.h | 2 ++ lib/librte_eal/rte_eal_version.map | 1 + 3 files changed, 4 insertions(+) -- 2.7.4 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index b6d2762..1ed0ddb 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -219,6 +219,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) internal_cfg->vmware_tsc_map = 0; internal_cfg->create_uio_dev = 0; internal_cfg->user_mbuf_pool_ops_name = NULL; + internal_cfg->plat_mbuf_pool_ops_name = NULL; } static int diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h index 1169fcc..12c5b8a 100644 --- a/lib/librte_eal/common/eal_internal_cfg.h +++ b/lib/librte_eal/common/eal_internal_cfg.h @@ -54,6 +54,8 @@ struct internal_config { const char *hugepage_dir; /**< specific hugetlbfs directory to use */ const char *user_mbuf_pool_ops_name; /**< user defined mbuf pool ops name */ + const char *plat_mbuf_pool_ops_name; + /**< platform configured mbuf pool ops name */ unsigned num_hugepage_sizes; /**< how many sizes on this system */ struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES]; }; diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 3fa1e13..909691f 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -203,6 +203,7 @@ DPDK_17.11 { DPDK_18.02 { global: + internal_config; rte_hypervisor_get; rte_hypervisor_get_name; From patchwork Mon Jan 15 06:11:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124472 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568683lje; Sun, 14 Jan 2018 22:13:05 -0800 (PST) X-Google-Smtp-Source: ACJfBosJKkAaqbtZQ/h07MOWIqbCZzFw6Pl35z+dj3Wh3g12U3a7367v5l5fPIO97r+Tk+s7yjTr X-Received: by 10.80.243.129 with SMTP id g1mr1160691edm.6.1515996785218; Sun, 14 Jan 2018 22:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996785; cv=none; d=google.com; s=arc-20160816; b=nmt6GyEapitXHtjZpocobyR8oyk6I0QhbbG8hU3wT1WVKHdYaFIYEaFmyBAJXcvI9N 24yZ2L/Wt6qfVed97/1Y9hqSB/KRryrMvu1xUuuwAN4SRycIaQ6zkuTG9qAbAwIIckRY fP5I2V+OH5D6t1PQJJBSfz2ELmkXfM+Qtw42UNpSGzDiyr/nrl+dL9ovrMInvFIXqkln PJaTInl2fbxHzDP+g6uKe3+qkqc9cra9LiGvMPIkV7Z78WFUAsrC54TY9jY+mbRQyRjf /+BcrGNP5b4TEeJEJW0NZk4M00wB2fj4qWtfhZIkC4c+39tujNVAC4+BlgE/E8VG2BBX 8VKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=C1U3RSEeqKRCKDB/yxRtKXJjuyx8vUnXo92hkQlpa2A=; b=JF/Yhua6ZLgtyoE3hACw8h7TUqNVJhgzXkA/bRK6JQA62q4tWK0wrsO42NiWDTSVzR DKub6m7Ces+GaXqF73JFhEd0dVzjmQ86d5JimoA9FnogW04S8EBgQqg5i+CbsCedt6UD FVg8soAs7qz5gpmnXLRGbnglih+zbNGFcVajBFnqE1tOnHZ8uwgJxoA9zwe3Zou859TK XbU06mp90kFxR5LVesmF1fIpyoIU39DIzs8029nYfTAc/U/WxvHRWP4gv4mMtmrTi/Cg J5havb7YdCH8zERQXAegzoiDvBfBxMXkngp9t+yIt3Dka9B94Wj2CQutRwo8O8T/dWXi vZ/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id 6si9280327edh.127.2018.01.14.22.13.04; Sun, 14 Jan 2018 22:13:05 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A6117A495; Mon, 15 Jan 2018 07:12:35 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0044.outbound.protection.outlook.com [104.47.41.44]) by dpdk.org (Postfix) with ESMTP id 1F7157D19 for ; Mon, 15 Jan 2018 07:12:33 +0100 (CET) Received: from CY4PR03CA0004.namprd03.prod.outlook.com (10.168.162.14) by MWHPR03MB2703.namprd03.prod.outlook.com (10.168.207.137) 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 06:12:31 +0000 Received: from BY2FFO11FD010.protection.gbl (2a01:111:f400:7c0c::165) by CY4PR03CA0004.outlook.office365.com (2603:10b6:903:33::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 06:12:31 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; 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 BY2FFO11FD010.mail.protection.outlook.com (10.1.14.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:31 +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 w0F6CKAH011776; Sun, 14 Jan 2018 23:12:28 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:12 +0530 Message-ID: <1515996674-26338-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703514032424; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(396003)(39860400002)(39380400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(47776003)(48376002)(97736004)(77096006)(85426001)(86362001)(296002)(305945005)(356003)(54906003)(16586007)(316002)(53936002)(36756003)(498600001)(2950100002)(105606002)(51416003)(76176011)(2906002)(5660300001)(2351001)(4326008)(8936002)(104016004)(68736007)(50226002)(8676002)(81156014)(81166006)(106466001)(6916009)(6666003)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2703; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD010; 1:3vb1Gcz8tQYiSNPf6aBPxf0C7PtgLEBp2Qcuv8Gv37QjKYgq9rJkAZS0GSBi7PzX57nSic02BAA+PYJEMOTX86xYIs0qag9Ree+VsMGDkehFU8gBIakP5vvH1VT31gqi MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3a7944d3-fa8a-4213-7928-08d55bdef630 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2703; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 3:J6EFDk8CLZ4yblbTAGBuHcWG86JGTlpomRqMsBb40+24EwOG4VrXO+qFvbEwmacUIutE9n8vGEH+9atE8rzFDjZGzAPEFGQZ2K5qFcK54mTvFJnGJHWmOLMLBoUBDCWTzCRTiJt59C7e/EM3/xwGb6VvQJxRfusmHxkWiG1k8fqmlOkGB12EyN0ADDnMuhayq+Vh+9Fyug4wM+sRC3NaSrjkhjJl7gv85SZOcyf27Cskc7dQkhhtWI+pLSbAssl2Z/cVCS40Jw66O2BKHktg8gPpQtuDcGAsQqF5fsg3U/TJI2QbnH6U6DZ1vh9jUlKVzC/b0QS8PEegSFetx/WSD23nsuUTYYSrQzNIbGowcFk=; 25:Dq4vSUAi4oWcfl4steNJnzJnRbVHpQZ8BTLESSH3gV6dftaXr2mQrWWgXvgo41+vZmqbXsFZihdCEM3vSNpbbjjD4EPL4WoK5MVo69eJUcGCSCUeVAWspaPgsaYTklYgbE7Y1Kyj/eTz9qqPBKqTj3/x9PkxQYh/+t0GFzINDEJEU+QJkP83jyRPO90ueEMOZK4BB6/WhrRuyIqRXaft/T4VNLnaUkmRmZjiYF3RPbeGmewpqo9BLs0GdSmmXsiiaDqUbnrAeWmgiuDj+2X3FLtYYQg4wscRdLQE6BjYKlY+gPNnEfq8QedJokGb0CyNfV58GC+V/F+d6maBd2wPsQ== X-MS-TrafficTypeDiagnostic: MWHPR03MB2703: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 31:/UhmZAN0kOjPb9BxyrWdG9H8YULWY6V4aBVXB6rZ8uNe8F9/F2TM4on1OfbeIaI5k0K7649OrtbYNxoJKh7vN5zLJ/+JhJpNcn3r8udeVMALB4IhsCCEldb3TO+1BMGcpvGRm4Xu4VqfCsDamzl97srm96K6nlP4YJiZW7/o5DBmxhd7HFj/zF1mrLRPy8u1xJ4PFaqGQSbIV5ErUpS0QzNyfnuo78RhEUnCLQWhxD4=; 4:A6315ucxFHHy3EJYVNQvpn2u7rS2YYiBf0Not/ReArDH1OfUEEk1X37VI9x+U4mtSpNs62Oj/0lcvggGCxzsGdtmPyPIDxl6f4cwk8sIXiTjw/31Y4Ax+O6XvfZYjyzJG/x2Q/N2DsaeXeWyDsg1Nmv+okAkZGZLOjllc91BehB+Oxp0Xa457CPR8x1HE3TVmyqYwudRRkM5OBpzlDByHMVFoP7uMLCSsKJ5rrj/T09ZaRiFV7Yf5v4QZOl/AvALTlEzNaQjRPpuSXGxG/sDcbsw8hl8W6Eusx1jhO4JHh2wobb5Jd0zi3n5omYg1vr2 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)(3002001)(3231023)(944501161)(10201501046)(6055026)(6096035)(20161123563025)(20161123565025)(20161123556025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123559100)(20161123561025)(201708071742011); SRVR:MWHPR03MB2703; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2703; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2703; 23:euXv10DOqSEDjyjgipyoB/DUmZh8GnrrO0GYw1xyF?= CE9YCbvXjLP4bPy/N5eCbpk7nWZo+qFw3R3bJShNGqhRQfsmiuey8WQgIxMiXZ372tTcX/7j9QwBjErKPwKw9DriNh81C+Sh36E/NRNq/4TxIox0l/uz+oL5WL4N9Ujvp1jukHzGhjkcNxxEx8ZW2susxfrKwPDEAjgOe8IvgddzzO/WRpErXjRZTZ4mL4eWEl+bQ+ft7Bd2zSX+9yoP29wQ5E6uvsZtBjLLIL+k8YrJsDpvo7taieC9X25C6MAX5pJGs5xu+bjyL0vTxuHi90L2IJG4OO+Bwfp4RYkSwAxpHkEgpEAencffUDM4s50TyWIOSNoLsbENOaBrQRvy6FDcLgOfB8MzXiHCcMNFZT32Bp268q4tZ++nmVheI//zid6C7gCWRwyQqf4P1kI8SFfnj8mw8ajPDqBLatklzjh2YB/LvuSZee8pHWeDRZC3AsjOxPN4mOTRP55rB9n3au5kppg4bew6hubWH0Xl7CtCQiPdGsaUZ7RBYhGJKaFviKC4IU0H4wNT8Ip1uaCHQG/1HJFebovs7u8tfxfaevc9gJMs7u1thUJgyu+Ng4G9HEIu1QcDhLTUAl2KSJKGKng+oFNSVoHEaz/Iyw1+44siUSzIczYp0L6DVZLkth85l65wbsaZ3JY9BDn71T7fWxisu2u44Iy6sgntpmpTBqAYSpnrk8Ez6ZVdzbLEPlCUTrkuNcswYSicwt3aBbXTs602Wa9kJLksj9ail+JjMxwTF48aMZPVrcCGlMOxJNq2ggBfgFMamYfk2efzwZFLyOrOfmo/sQr+Dp4vk82FJnw7KIrxkdEpIblVYtBAVG41yycvBDk/5M66y8FPHd/h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GxI374+7NqYi0mpAKloPXJFP0L+Hsy SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:31.2160 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a7944d3-fa8a-4213-7928-08d55bdef630 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: MWHPR03MB2703 Subject: [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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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(-) -- 2.7.4 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) +{ + if (internal_config.plat_mbuf_pool_ops_name == NULL) { + internal_config.plat_mbuf_pool_ops_name = ops_name; + return 0; + } + RTE_LOG(ERR, MBUF, + "%s is already registered as platform mbuf pool ops\n", + internal_config.plat_mbuf_pool_ops_name); + return -EACCES; +} + +const char * +rte_mbuf_platform_mempool_ops(void) +{ + return internal_config.plat_mbuf_pool_ops_name; +} + +/* Return mbuf pool ops name */ +static const char * +rte_mbuf_best_mempool_ops(void) +{ + /* User defined mempool ops takes the priority */ + const char *best_ops = rte_eal_mbuf_default_mempool_ops(); + if (best_ops) + return best_ops; + + /* Next choice is platform configured mempool ops */ + best_ops = rte_mbuf_platform_mempool_ops(); + if (best_ops) + return best_ops; + + /* Last choice is to use the compile time config pool */ + return RTE_MBUF_DEFAULT_MEMPOOL_OPS; +} + /* helper to create a mbuf pool */ struct rte_mempool * rte_pktmbuf_pool_create(const char *name, unsigned n, @@ -176,9 +214,7 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, if (mp == NULL) return NULL; - mp_ops_name = rte_eal_mbuf_default_mempool_ops(); - if (mp_ops_name == NULL) - mp_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; + mp_ops_name = rte_mbuf_best_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"); diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index e4e3917..d26e8cd 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1081,6 +1081,26 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, int socket_id); /** + * Register the platform supported pktmbuf HW pool + * + * @param pool ops name + * @return + * - 0: Success + * - -EACCES: platform mempool is already registered. + */ +int +rte_mbuf_register_platform_mempool_ops(const char *ops_name); + +/** + * Get registered platform supported pool ops name for mbuf + * + * @return + * returns platform pool ops name. + */ +const char* +rte_mbuf_platform_mempool_ops(void); + +/** * Get the data room size of mbufs stored in a pktmbuf_pool * * The data room size is the amount of data that can be stored in a diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index 6e2ea84..b8e258f 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -35,3 +35,11 @@ DPDK_16.11 { rte_get_tx_ol_flag_list; } DPDK_2.1; + +DPDK_18.02 { + global: + + rte_mbuf_platform_mempool_ops; + rte_mbuf_register_platform_mempool_ops; + +} DPDK_16.11; From patchwork Mon Jan 15 06:11:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124473 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568738lje; Sun, 14 Jan 2018 22:13:21 -0800 (PST) X-Google-Smtp-Source: ACJfBovsNXNhFm+KA17nqNMziTajxKGwLOnKh7ijdo1DHMwt+APK+6C3QZxR5p9esDB7ixh+Lx/v X-Received: by 10.80.139.155 with SMTP id m27mr14630437edm.98.1515996801809; Sun, 14 Jan 2018 22:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996801; cv=none; d=google.com; s=arc-20160816; b=m2gSF/PR7qyAFtrbnBfRK9Qpygw2trAFQx8fbhgWi0WHJ6p1cYzPpEVuhFSlStXd2D W0BxPvxotA0Ae5Khsig5CC8AaIi2IBVdpFWYBNdhO/BHyAg8nNjD0a9lPKqJll5VCHos izEO0tSOFgi0b4dqdbuwA3uvfPm9OAtbGcrJcdzwvuBEKQFD9753H+LbH99Ngr3hC+6A yshBQEBfubs5TzJHU7oVB2QQCYAmb5uPW4dkjlv3ifIBdRTTu130pnlwmHxqMPCS9YXg lSWciiarUVKcKQpTE3ZDfnouQA6xCnogbjMUIyIEHdc7AOQekkUun1Opalbdc+3zHXOw 512Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=tv2SU0fSJOQVBEntxKRZ/EarOrsWQeM7RKj3ldngg3w=; b=W9Uz/5bZ8dOzyX9TqGQ9DBKhdYf8VeR3Ubuly4asOzeWJDSzKxF8Ccj/Xu3Q/l+COy c+Dl+gMWsukMgOyE7sXNk5zIHLaO+qzd6i3d4ci9L29NWtjqaQBC9D2leQTkNTLo4EJK x0a1MDFQMa0JEXo/wJwQM8b2RNRrKJGmTKA4EGwOAWD6IW4X/pcgC+RwzqvrJZOkkYCi 8CLHMewUYa6PJ8H/qbfgAvWxN+/n7d4efjd2P0x0oKWeRlhvw0na+vxMjGHUGyLECFy8 87G9ablI3H/vy+IX3dXSruyZvJyOeEz4lOrD2XTR0+M6Hc0RnQA6FMQUhKOzDKY+aCoS dtHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a20si726650edm.487.2018.01.14.22.13.21; Sun, 14 Jan 2018 22:13:21 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0EDB7199B5; Mon, 15 Jan 2018 07:12:39 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0064.outbound.protection.outlook.com [104.47.40.64]) by dpdk.org (Postfix) with ESMTP id F3A24A498 for ; Mon, 15 Jan 2018 07:12:35 +0100 (CET) Received: from BLUPR0301CA0034.namprd03.prod.outlook.com (10.162.113.172) by DM5PR03MB2697.namprd03.prod.outlook.com (10.168.197.135) 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 06:12:34 +0000 Received: from BY2FFO11FD024.protection.gbl (2a01:111:f400:7c0c::186) by BLUPR0301CA0034.outlook.office365.com (2a01:111:e400:5259::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; Mon, 15 Jan 2018 06:12:34 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; 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 BY2FFO11FD024.mail.protection.outlook.com (10.1.15.213) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:33 +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 w0F6CKAI011776; Sun, 14 Jan 2018 23:12:31 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:13 +0530 Message-ID: <1515996674-26338-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703537009293; (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)(39860400002)(39380400002)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(85426001)(36756003)(8936002)(86362001)(498600001)(97736004)(77096006)(50226002)(81166006)(81156014)(104016004)(68736007)(8676002)(2950100002)(356003)(53936002)(76176011)(305945005)(316002)(296002)(2351001)(6916009)(48376002)(5660300001)(106466001)(54906003)(105606002)(51416003)(47776003)(4326008)(2906002)(16586007)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2697; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD024; 1:iCs5LI/dGU0Xs2yPj84z6PfcFc2p5GK0hdha4sf5ydztOKi6cFBpjwEo1Sz4PzIgnpDtTPURtTXzWxpljnfcKJ+AMd0O5UOIbfKIr7yrdaj46cxo2pl/ciDo6xtUVDas MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fffc6136-2571-4df6-128d-08d55bdef78f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2697; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2697; 3:wIDpJf1L7wyr+lPjMUyyWgHNwmHSjw4apTxUs+79Sme7x6/+GuBtdScxYOmYXvpqUu+ABsRtqaEzqgPWG555yWXVUm0Y+XoJcdWPYsKfH1T0WcLR0mKfAPhBU7spwiSZX5r5/7qW/cGzm8CsylyUSG9kU7hnLUqMSl3N8ZVxkOV+tNcZ73neQRVPH60muuz+TabABvG5nHvmrRGRh1bwLXAa1vdve2d+3Mtxfn7iIMLZ6DK15nI3OPc57w939EaArKjA7pxOQMWLwdr52sVwJq7PQuTRSVclYNGbrHauPXmMBtbaPpJlF+hLzDlBcCL1Eb+YwkRVrxEt0xo0kVHZ58AiKZUdfspgATyjiLbiv8A=; 25:rBduJW22NauWMNiUL0EzSCj+04gSvQMmoLSwU4t6UOV6BaXdrnhMvsmNrY1etFm0e1WH9ZX3mBciuHoMrrhFOpmVcQTh6Ymp/EaKKZMG5EeWGOvJBnHuXChkFapaDcW2ZdMxmSfULcTJA25qElT/GWJXltfC4cXfPOxl0f4GV02wTJ7s+N7nRF7NJR0xFWQ3jaZvWvCWJi2EDn7AJ/Tsg9KMbPj0TbUqyWNYLKLtlEvsU1F7S3ojJp+WbzUGMDU5/e993yt3guZDoKdv+NbOE3cg+nt/WfUDwhN6rBh4r4l03/K2Bb7pCnplzMgMyyMd3I7W7nW6fWECpSCy4mCwHA== X-MS-TrafficTypeDiagnostic: DM5PR03MB2697: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2697; 31:wBp5vuouCbArcvu0l0An6fvhWFMjiqrsRknHUYXhbReclIm9pFbHlxPmkemyZc1vanIAeoSacS8i1EufQbfrDbK8jGcwUiRcDIgsI10kURJ0sZmTupxYP0ExY39ZwxGJro/4HcE16aWfftVhl+oBlr57Tx40fHe9K8oFqr5hHvOIptpO21Y56DId+wC0riUHvJmulldPhwjM5B7WIA7u2C5jLxhFYYPkri57Bl9Lelc=; 4:HlH/468XhKW/GQjBJa2r4gmaU5OAoOkSP/MkVxAxlfGc1lCU29RzoTn0o0WNOuvVRdxA85Kc786TLF/J9hxp/acYfmoECHZ0T5yHGivudS1Ou570U2FxSfcJu5RLX8hQST9OdkEXG/TWYyZ1K9hZNG67LOEoKk1MiXHpJurWhAGEcDfDzIo2LnfqpmzX5iaWtucPtVjWu2d4XOvaqKcsHxjo4EhYt7kuoeYatDvGOtSSJEubF3ZLQpOijLtAa3gwDFh5IJ2V8lWY8VQ2uebkF5JPzClVbLrKG/z7QMAROxKV4khXHnH6dc0INSVfIJ44wTC+YDl+5GXvxaudT/LXc4ks74xWaXNU8wsrKoJ8S5c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(3231023)(944501161)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(20161123559100)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(20161123565025)(201708071742011); SRVR:DM5PR03MB2697; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM5PR03MB2697; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2697; 23:blWj0yIlOZ5vS/ohphAEhMM0SJZdI0XHeg6CRkF4/?= odL06DP1BW2IeTsvasF1S/gI+xfwj64dV0Itj8uMHyPjfGwdg6NJcEKLWI74Jf0gA46REP/Py6uiInAbDclv4Ezk/FF3I/O4hg2IhoGeukt9PivcHrT/CpaSn7FvZcFXgptHQM79RyyIBm1dml/IbQ/uEoWAFHLkKougdwGJ/U6OYBGM/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Cwu26d3Edt/Q26NddrBSuV5UGG3swFoVlSCbqUj+JYgOeWH5D838HFsG/ZaxlvgGDlK1lKKjX9AA8wy+PD9RdWRR3STyJfu6DP/HbvjqWyVjr47dTr9QV9xqDhDyPmmMFqVKVEfQKRxsQs1orALHzMUQa/8j5rZpXGE/UVM=; 5:GU0MemS+mHIdiYfwqC58e8jsqeg70n4hXPjlEkAYvaMVGgdUzw/NwtNxivZ7/S3TXHVktdydSA9zkfTXYp0Wk+BN09AojJLO8fai7A+DuoAPOslsW8P6tjm1Pc3dOPPvuLxQNbleoqIdYpWcXrShn8pqnW1maMeX6Kb3rpN1aUY=; 24:tSgKBABr+0ArQdWDzYaRl028sBKN7K4zuu3QSbMeSEBDOUZdFi+IRTzoGLNBAguBie4WPICZokLrRQ8vgFhtW7TNQ9bhggkLd8JQPgwYGHg=; 7:6ryvmC4HRtjHtsiHz3DLGIqCXoXyedBxWBPtoPjUyiJJK6VmYx25qA1LJTxEmoHV/KdgE6WiNQft/Z7BOFYS2eEK3pBNHB/ejh3E0R8ZRDUIsGZssHyHnCj3nc8L4Yu4OHpH5hXaw460CcOarv5r91Kcl36lGs6tIlh3ft1fFa5hgrSzeGaEjCfSXkHG+2V0/2+3CvgR9Kgn4k6tTKmh2AYnA0Oo4vnaXHFI6tkuKKbNcTybn1kuJxeunaPnvrC5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:33.4981 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fffc6136-2571-4df6-128d-08d55bdef78f 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: DM5PR03MB2697 Subject: [dpdk-dev] [PATCH v2 4/5] mbuf: pktmbuf pool create helper for specific mempool ops 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Introduce a new helper for pktmbuf pool, which will allow the application to optionally specify the mempool ops name as well. Signed-off-by: Hemant Agrawal --- lib/librte_mbuf/rte_mbuf.c | 23 ++++++++++++++------ lib/librte_mbuf/rte_mbuf.h | 42 ++++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 1 + 3 files changed, 60 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index fd3b6f5..482676c 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -186,15 +186,15 @@ rte_mbuf_best_mempool_ops(void) return RTE_MBUF_DEFAULT_MEMPOOL_OPS; } -/* helper to create a mbuf pool */ +/* helper to create a mbuf pool with given mempool ops*/ struct rte_mempool * -rte_pktmbuf_pool_create(const char *name, unsigned n, - unsigned cache_size, uint16_t priv_size, uint16_t data_room_size, - int socket_id) +rte_pktmbuf_pool_create_specific(const char *name, unsigned int n, + unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, + int socket_id, const char *ops_name) { struct rte_mempool *mp; struct rte_pktmbuf_pool_private mbp_priv; - const char *mp_ops_name; + const char *mp_ops_name = ops_name; unsigned elt_size; int ret; @@ -214,7 +214,8 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, if (mp == NULL) return NULL; - mp_ops_name = rte_mbuf_best_mempool_ops(); + if (mp_ops_name == NULL) + mp_ops_name = rte_mbuf_best_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"); @@ -236,6 +237,16 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, return mp; } +/* helper to create a mbuf pool */ +struct rte_mempool * +rte_pktmbuf_pool_create(const char *name, unsigned int n, + unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, + int socket_id) +{ + return rte_pktmbuf_pool_create_specific(name, n, cache_size, priv_size, + data_room_size, socket_id, NULL); +} + /* do some sanity checks on a mbuf: panic if it fails */ void rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index d26e8cd..f958e3c 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1081,6 +1081,48 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, int socket_id); /** + * Create a mbuf pool with specific mempool ops + * + * This function creates and initializes a packet mbuf pool. It is + * a wrapper to rte_mempool functions. + * + * @param name + * The name of the mbuf pool. + * @param n + * The number of elements in the mbuf pool. The optimum size (in terms + * of memory usage) for a mempool is when n is a power of two minus one: + * n = (2^q - 1). + * @param cache_size + * Size of the per-core object cache. See rte_mempool_create() for + * details. + * @param priv_size + * Size of application private are between the rte_mbuf structure + * and the data buffer. This value must be aligned to RTE_MBUF_PRIV_ALIGN. + * @param data_room_size + * Size of data buffer in each mbuf, including RTE_PKTMBUF_HEADROOM. + * @param socket_id + * The socket identifier where the memory should be allocated. The + * value can be *SOCKET_ID_ANY* if there is no NUMA constraint for the + * reserved zone. + * @param ops_name + * The mempool ops name to be used for this mempool instead of + * default mempool. The value can be *NULL* to use default mempool. + * @return + * The pointer to the new allocated mempool, on success. NULL on error + * with rte_errno set appropriately. Possible rte_errno values include: + * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure + * - E_RTE_SECONDARY - function was called from a secondary process instance + * - EINVAL - cache size provided is too large, or priv_size is not aligned. + * - ENOSPC - the maximum number of memzones has already been allocated + * - EEXIST - a memzone with the same name already exists + * - ENOMEM - no appropriate memory area found in which to create memzone + */ +struct rte_mempool * +rte_pktmbuf_pool_create_specific(const char *name, unsigned int n, + unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, + int socket_id, const char *ops_name); + +/** * Register the platform supported pktmbuf HW pool * * @param pool ops name diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index b8e258f..9b53502 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -41,5 +41,6 @@ DPDK_18.02 { rte_mbuf_platform_mempool_ops; rte_mbuf_register_platform_mempool_ops; + rte_pktmbuf_pool_create_specific; } DPDK_16.11; From patchwork Mon Jan 15 06:11:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124474 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568765lje; Sun, 14 Jan 2018 22:13:33 -0800 (PST) X-Google-Smtp-Source: ACJfBotStdQyEFinIdN2+VI+wbAi+mecOjVMRqb5O21lyQhBanxEhwsywHpytRK67Yp0AYZwy8Jo X-Received: by 10.223.137.26 with SMTP id s26mr30293883wrs.164.1515996813848; Sun, 14 Jan 2018 22:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996813; cv=none; d=google.com; s=arc-20160816; b=vng3m8czP9C2pMRc1NstzW/WBi2gBf1Lin3YBJflX8rrEfCzSCAm7x5DoUgWEnlLIu zr6p3ktRdqGknbb2tSnw2Ev5dlVy6AERB7hDOQXVp5PeKUOVfz7LvH+iN8FiDupNBYP4 Mr8y09ug3+lXAOEeqJDYdqTOyPTDqvDmmGuELonVlX3mhESw+ClgYX5kosawND3R2F0U BjPP8P3cDX+6tnVHXkcSQPegcW4WtFTuy0uzO58sRLR5tFIBwRWPOWNmTG7d8z7E/xWY vqOjP6dwJGJ98ebAUzYjy8fiAt2UEMCtm0vwV+ghHTUb8l0wMmRmjDCAwB1x79KyRMVC 0tfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=v7zhtCA7kodLNihcXrxMuHqTr1f7naOTU1DOoCrY/Jo=; b=e4Bq4I4LSQr14aUbFtGakWmtMHJ7lqJZwf164l3MUYhbGNKlElFD+gXPzXB3skhJMD aRBMYFR1ODOOOdsixFwSU9WVMX0iz9+fLLD5I9KD5doMPoqMRux9DLucEIbJRCccaKSV HZM7J/j61PLZEB8VXakBjWAV0Mv+4EQKGQvuzUwRuAVZjitrLQDgoAx4lVx2rwGVoY8m aYuWZtbRHRZYwI+xcBKr6iHdrO2Gur3RgCKdxJTdW6KZqVCmSSS2dymifbZ7U0mEERt7 gJBD5q3uyxF8DwnQE+fsErTtSwzlEum2uevPbzF0w8N8TqTpj9Z9iE0vWeOggA+CyDf0 xEjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id j23si10852738wra.308.2018.01.14.22.13.33; Sun, 14 Jan 2018 22:13:33 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35A91A823; Mon, 15 Jan 2018 07:12:43 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0056.outbound.protection.outlook.com [104.47.36.56]) by dpdk.org (Postfix) with ESMTP id EBFF612009 for ; Mon, 15 Jan 2018 07:12:38 +0100 (CET) Received: from CY4PR03CA0090.namprd03.prod.outlook.com (2603:10b6:910:4d::31) by BN1PR0301MB0723.namprd03.prod.outlook.com (2a01:111:e400:4c::14) 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 06:12:37 +0000 Received: from BY2FFO11OLC003.protection.gbl (2a01:111:f400:7c0c::156) by CY4PR03CA0090.outlook.office365.com (2603:10b6:910:4d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 06:12:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; 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 BY2FFO11OLC003.mail.protection.outlook.com (10.1.15.183) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:36 +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 w0F6CKAJ011776; Sun, 14 Jan 2018 23:12:33 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:14 +0530 Message-ID: <1515996674-26338-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703563665310; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(346002)(376002)(396003)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(50226002)(47776003)(59450400001)(2906002)(8936002)(68736007)(2950100002)(2351001)(105606002)(305945005)(4326008)(6666003)(106466001)(6916009)(498600001)(77096006)(53936002)(48376002)(5660300001)(51416003)(104016004)(296002)(76176011)(50466002)(81166006)(54906003)(97736004)(81156014)(8676002)(86362001)(316002)(85426001)(356003)(16586007)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0723; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC003; 1:nsDwRHh4Vt1/CVg5cau4AlfCsV7snIZw5FfZ/Zy5CqY1yaY/4Hd4b3RjKpJq2oi0XhKLPe2uLoRLhq5zBpdVxKBHKyOqwWQpFFSQvRgLO4/Uj5B0smrdsL63Ef+4oXVU MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55330b68-9fb4-4519-6e41-08d55bdef923 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN1PR0301MB0723; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 3:8cvo+b50eBFXmegHVyOEQhT2Yf0wruxHCYd2zDx05W62Dzdg5QoTJ2a0X8ir+Kl+xbIUnNZytLzJ950JAYHoIuulGgDIdVMH9qSbtdT3atySQv5GuJdAtJZjCvhgl1T5NJLZ6EyArB043aaU6+uX2aWIMtO6yuAlPFEVZ8DY97KV64IRNN0rel/6K8zXc2p79IHGwz1s25GclLjgznx7TGLAT9XSJHHFyjKaVKe9cqJaLzTdH8c5CQ5OaHZ88YSqWsRXSPnXBccq15LHiApSLkEro/ekNcAGCqF1AhbJH3JVeFqPwd/ZKST6KAl4PJXjbiImPteTMw56o5aB8Divz/G8+/905ZhRMamflBdteVI=; 25:4HLSOmffArJHdyWrsLLorJVTQvDAig+h92SX4ugQ/JzJhdvFhyJs9CarY8Q82+oGTno9an9FjwtQac//u8IebmQ52fCgzLHOwoTYaR2Y3BHVvG2I2LKg4jBB4REzpMCAlpCNFXuEtqpfyg8wWyIsgreFrs/Mj+0q5qe4PRUtLNBxlCBg5VD/2Uf7JwErO5keKoeziYY9WQh5WexMQrHg3fkPtDiZ8xut8iru7QpEJRx4mLsMoJ77lD0gDV/q1FGydUE0ryLCauEL9Zduvl4Pd0vblcs7TxGAfBKHqQW54NKfttQPMEDHuWvyojUhEodJqNyJBHNMS1viXBc+15PCyg== X-MS-TrafficTypeDiagnostic: BN1PR0301MB0723: X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 31:a6npbtlx47dm5qk8jHrv5e8t2pw3OQkgwfvopthO3m2TO4V4tL3cGxT3gSG+k4lg7D2NG6C9gw0ETY5ulyjGmttpGdMYTPlRYL40vV0XnkThEwRMrlsHa38nQM+rDc4KmNAgvhnHnEs45EXzUkKLS7NUsln4ZTNCGSm6zDHJj/ynPOuidFEWmvfcadp/qTiQLnfE/x4E8PSQPZ7Y80M7gN5m8UWZGK551mVOftCpCw4=; 4:D14qf2Y9/o5VaHzXJlTloIN8IUczmmQAiWTO89cCm3BqSG53Gso2B2tBNlUCoh28/RbOWwadMZBW0C7CYccY8MPcvXrtziCAtWucTjQ+QjUq/ZUfbwNh6DHjesyFD0kZVpS5A41q6C4nanKBQ18MF3cse/0qD6cYxa3HSCnAwQANaPpkaBxpFCsuux2gVIiOyB/4SMvp5XYtrG/AXz6AiDjnJTUI4HxvbJMp8qT0g4DO4m9dtqanRXM/fEBSTXu7xX9eIxZgWs3C9usxx1VsWGqiKUjnN5PwlF9U8pxSooHsaiV97xISzWEQZIc3LhLE 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)(3002001)(3231023)(944501161)(10201501046)(6055026)(6096035)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(20161123563025)(20161123565025)(20161123559100)(20161123561025)(201708071742011); SRVR:BN1PR0301MB0723; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN1PR0301MB0723; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0723; 23:aPKw1WPwZH4siWc9I55ZNK1Z2v7ssOFRjZs0X8q?= 2CN6wjDKmvRpyxRNbXHhdCcyzlr4NHTNJCiVodvVK9bAcBPAV8sa7Z/Lod4o5LZ8Jeh4iQMUQN5oH4wxbO4NYb9YAdiLbuW/V6Iz8plgq7VVY6hC3UdP5gjtkKCCKP1EjRik76MF7IPEG0vWjoZ8UZeYVSRkq7tj9TpR9FFNp44QBu9e7FdKj9ght40dl1o/8YMRXMF5CC+NVdRCBUKri0gGX8nyQhl7dHQNofwTr/HJtRuk309STIvJblZAuUzdXXt/Sxjlt/BYbW++fTeE9cJUtawTiZUHQRkJQ4C4YklDCsRS03EmdjSlHsRqveJCeiONK8Fcfueq0JRAVNgCvMp3btnpCDKH5XypUue5ppaIyHzYUotWtVhCmbfOOE3U3CDcSzmSDhG0hy1uPlQqbuqqgBjbG/26GtpH3EDz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+BHRawp8mypEcb6BkFzsGy2BbUm4Z+rMDjRDxvXa6k43l1Hc6ptxsUsJJUlFTuQpqK7AjcxUWdNenWwQqOFXDU50MVaDyHpOn5u4ZBuXFqtICHfViGA/VFvb5PEmDEZyx4v0AE+hhbqqWESySw=; 24:ajevq4H+VoWKv4+PL4clNED+zjJOVX78QGH3oADaTQkpoifHbhYrxE0AMu+dY4Wx6trP8EzVBSG3IO0fRG8q0iXB1Vhi+Jxu55dFgz7stnc=; 7:jsbwXKRUjIO/HFXgbqCU5repfuEhBr4Qc25uW4lu7PFue0i9Skac0vLozZjjza02jqgbuog/927BqFpAMVhNhz/x+DiKwaFxGKSVI0Pyz9mEbDoMTUyYu8Jf8YQPxMO6P0Vc1cTbcyzMcVpoSOBzgJ80JoseR/t2IRhCA3I0ML5qbx/EwLjfBzfh/lRv7uvrvEZQVLw8lPVi1TIzkCBdbb0ip6jc69Kr7p7QcWjZQ4QMjCZCtjVdNhDVKGCVtVMi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:36.1637 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55330b68-9fb4-4519-6e41-08d55bdef923 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: BN1PR0301MB0723 Subject: [dpdk-dev] [PATCH v2 5/5] mbuf: add user command line config mempools ops API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch add the user command line configured mempool ops name API to librte_mbuf and sends a deprecation notice to remove the similar API from eal. Signed-off-by: Hemant Agrawal --- doc/guides/rel_notes/deprecation.rst | 7 +++++++ lib/librte_mbuf/rte_mbuf.c | 8 +++++++- lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 13e8543..ec8018f 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices ------------------- +* eal: a mbuf specific API was part of eal APIs. This is now being + moved to librte_mbuf to be with other similar APIs. + The following API is target to be deprecated on 18.05. + + - ``rte_eal_mbuf_default_mempool_ops`` replaced by + ``rte_mbuf_user_mempool_ops'' + * eal: several API and ABI changes are planned for ``rte_devargs`` in v18.02. The format of device command line parameters will change. The bus will need to be explicitly stated in the device declaration. The enum ``rte_devtype`` diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 482676c..c587d3a 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -168,12 +168,18 @@ rte_mbuf_platform_mempool_ops(void) return internal_config.plat_mbuf_pool_ops_name; } +const char * +rte_mbuf_user_mempool_ops(void) +{ + return internal_config.user_mbuf_pool_ops_name; +} + /* Return mbuf pool ops name */ static const char * rte_mbuf_best_mempool_ops(void) { /* User defined mempool ops takes the priority */ - const char *best_ops = rte_eal_mbuf_default_mempool_ops(); + const char *best_ops = rte_mbuf_user_mempool_ops(); if (best_ops) return best_ops; diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f958e3c..7feacc0 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1143,6 +1143,16 @@ const char* rte_mbuf_platform_mempool_ops(void); /** + * Get user command line configured pool ops name for mbuf + * + * @return + * returns user pool ops name. + */ + +const char* +rte_mbuf_user_mempool_ops(void); + +/** * Get the data room size of mbufs stored in a pktmbuf_pool * * The data room size is the amount of data that can be stored in a diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index 9b53502..d4af497 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -41,6 +41,7 @@ DPDK_18.02 { rte_mbuf_platform_mempool_ops; rte_mbuf_register_platform_mempool_ops; + rte_mbuf_user_mempool_ops; rte_pktmbuf_pool_create_specific; } DPDK_16.11;