From patchwork Fri Jan 19 16:33:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125200 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp390755ljf; Fri, 19 Jan 2018 09:25:16 -0800 (PST) X-Google-Smtp-Source: ACJfBovotM0e5awKBG2Q1Fxg5e7KZi9OnjtpGze/YlwOWYJUtfQyrEjKeEy7UII6pfeZv/dG87DM X-Received: by 10.28.66.199 with SMTP id k68mr8839558wmi.104.1516382716912; Fri, 19 Jan 2018 09:25:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516382716; cv=none; d=google.com; s=arc-20160816; b=FERxG1mdSJfXR9YwxTUZ3sAZZp4EThGMW2j4rC5pOCG1IZPDc+OgqAz7tbAXqDJHdf bwT6QfcB6mehZo0mUnvNAIhuJ9vFYoM7s/8M2fW7hljqn2mVNqVpTUIei1EkjReByTUk dPaNNN2KS7I4KB2yAlEgSh30ceFvAbjA79C2qT2C9MdEn7PdYJ8GD5W52O+QwwEuEFUx APDy8pmbpL57gy7X+La3+uQGImtbHwPlSEi99Q/RFmYk1nwSiA327eE8KhWlrjHM+io+ w540qh+o1R1N6HAQRi7lv/DuQDGqxMEjWGuk3T6IU+YKXmIpCxQL6FB9YCJUPxwyCgU7 cI3Q== 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=vaxqslOia0QeLlx0qRv25iRI7b+rfIC8U2qjUZBLoXQ=; b=KYfdapGrOr+hBcih4jCkX3QwIV4klYZ3MIl8wzWxrcq2ULbRJWf0nKiS09Brbd+W5O qWviuU/u8F/9UtMBvXZp4F/q9EMuYKQqRRCOrkv9Xbs8qPgcsi7D6j6H7qwNW7QgjfrG N424mJ0woy0V323IocQKF7dzQPcJi9shhKcORTYrhEbovEDYk7geAmujsNDqGqNFQ/M0 bzev2GJ0fcqyFF3o5QujnAWCmgMCOwhbVSBlmFdIc9je6TLVPEVlt1+vAwo9Zq0dAD6z U5z2eVvNU2duaZn4Q03G88uET2ENRmTbD4G9zccprAXIj3oSdF0uiNQmk00jnqhWKdR2 9Q1A== 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 z9si1150688wmb.143.2018.01.19.09.25.16; Fri, 19 Jan 2018 09:25:16 -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 680BA1B32B; Fri, 19 Jan 2018 18:25:04 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0046.outbound.protection.outlook.com [104.47.36.46]) by dpdk.org (Postfix) with ESMTP id E42061B2F4 for ; Fri, 19 Jan 2018 18:24:58 +0100 (CET) Received: from DM5PR03CA0030.namprd03.prod.outlook.com (2603:10b6:4:3b::19) by DM2PR0301MB0736.namprd03.prod.outlook.com (2a01:111:e400:3c0d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 19 Jan 2018 17:24:57 +0000 Received: from BN1BFFO11OLC001.protection.gbl (2a01:111:f400:7c10::1:130) by DM5PR03CA0030.outlook.office365.com (2603:10b6:4:3b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 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 BN1BFFO11OLC001.mail.protection.outlook.com (10.58.145.12) 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 w0JGZ6a9016753; Fri, 19 Jan 2018 09:35:09 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:53 +0530 Message-ID: <1516379639-25586-2-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: 131608562971058523; (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)(346002)(39380400002)(39860400002)(396003)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(2906002)(356003)(26005)(54906003)(316002)(16586007)(68736007)(51416003)(77096007)(36756003)(104016004)(76176011)(5660300001)(8676002)(498600001)(2950100002)(305945005)(6666003)(106466001)(105606002)(2351001)(47776003)(85426001)(48376002)(107886003)(97736004)(4326008)(86362001)(50226002)(53936002)(81166006)(81156014)(8936002)(50466002)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0736; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC001; 1:F2LCQmELhG5YO1i22Q5Y38z/XMgnrcLCefUSdJACDZWM9K4QNtLDAzi7BpTF9/jwleK+h5NH5/K5cRaJlSPmuj99+p4Z3LeOgekCN4f8StRv0F/XJTp92hfkA4oM1yGN MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34f611f7-8906-45e1-bffd-08d55f618fbe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM2PR0301MB0736; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0736; 3:NnCklwHWSaPMnbiCNKm/+73Kry+RvhBCMGjuZG9eTNuuek3QrtpxvIm6sbGDguxJa8Sj2lXoP+MSHFOG/XzUCHtOr4jSonBXBU6WCJVp8RW6onZOg92UnICUCessOLRdo6rj+IiB3lO22/a3J/v6X/fEVI66g7HahcrLc9L3rrb6HzR5pa0mQAjIsAIQZasvHOqKKM+dka866UT/7PQFyyAGf3ssHVFAt/1tlA801oeF8J6tCcctttV9hoa/EInlZvZ3P+D2SWIdJkfxmisNmF4D9PIqAAzbbKAlcT+3A4nCOml9G99crO0ozdbwjce+XWicUfXkAv3diAg+/2eJlExma05CZO0+xsaWS9qRUzA=; 25:pEfIsHjbo921tmyxRUlaFBHzK5Ww2+LVJjJh1hbICQHavEdX9wikgjaiZ9nPgeBPZjhstVWGzG9jBEO2hbyzIpl8VogHjuT8RxfCxzU+rdpBEKHMuSHJLS/8aW/52h2ysR0RIXfJr8OV82e1T9abWZ7ypvvByuK9IXMwli1xxVj+g0n3nf938UI4/+JZHPneqDpoImM4y/p3LCHMXEqBWuAEoxz4nSs1ZioRqLZuXk0gAUTvVp7IJ2bdI4yYeY9mU92WGMOsjrNxTOttIxvi6415Zg5nPJEL3XNeMRPTZobGTZz4iKr/rUAr1i4PIfYgN6hGMwdk6N81vTEN8XUu7A== X-MS-TrafficTypeDiagnostic: DM2PR0301MB0736: X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0736; 31:mYVYg4FoRux0v21jfpTO4D5pGC6zVyBwWYFgJUCjjIztZRJgYmP35aDISs/UhhsPOKdfx28VZUabXdBdOpGGS4AGPavJSNZJ1cvTI9q3tczB9kP0K3Q+c36DVJGFGQxUuRtnPfOFhVXyl9hJM88yfmUWiT85tu524sWY8EW1ezNbG2A0IqHJsWsOjXORs4A+/YXyH4YwTEFqQA8v0Ffbwzujk3jiO3e1NXBGKXaE+UI=; 4:S4E6tAStp1S8vdcd3bSwTeC3he3ntveZB25Dff71VyK++SZ9z/KxoxVuCTjuZ4oygyajKkfmu3/brXRhVoJvMWgoEVNgVHKzv5CzxzHiOrHTHM6mRT5kFIdish7EGglgjKIlW5qLcMOVmQPJt8ScrlHhKYNc2n+moLMHcym6TjR3P9qnTQrgM5bSce4aA87+ZOl0InjTdNKWJ9/CSyHdTHNNfKMwFR4/PqFat2cTFqu9uU9Z5CQ7TIdry4PNZy+Htd4VqwK3fl8Ay8TLYq2uI3S3cGD5BmGjMp/LD6LlqRonYEfBtgaoKulyRxWsJTn0 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)(3231023)(2400080)(944501161)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123559100)(20161123565025)(20161123563025)(20161123561025)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:DM2PR0301MB0736; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM2PR0301MB0736; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0736; 23:+d1bYqneQDO9GLDbTIVcBhSc552gibPRHGdVSFQ?= gfxpH1Gtp0D2FqoZZ/f++xZEMHvlJDAdPbjIJ+2/yJwzk7H4AiHL4aupROIzO1067p8PuGUo+h3HtAw5TvjP3dKI+w/0Pj/nf9MGtb3EeA39g6V/k7xI5UGFXU8N2k0VDLvrlPVFuwi5QKF5/hPVdXh9IripYPbywi2ei5pk+wqM760SYU4Ms0RzW2tis4HUR3IC/35Nig2I8kue6v1WzgVhgXeDNWdLi/XSjjkfnF8NEnF6p1WYPfeKIoVAYDpYUyUABNcMTpxTmps05ZymDDhrJBnyCK5jQCqKWd2g0vbiiLosZbA+bNZXJ8d31FW78ljcKWJrOYTrqediqyos6o/DjrW70SWU5U0Wt5qTCgwWmHqcdZ2Ew8iByl0jSraVxnO0oxNrtv3ezwBNzz1FU2E8C+EsOqwqxgjyKlY67LVcB4Ez298TK1g6FPbJ/Xq9Ar4vdwW6mZpPf/9yg1sRNS9Dm0oWe9oor7ZtGtaBRQkcMVVOgzmrfhO5UL9LPkEsh67Xdejum/0I+0GDfglttiXUx5rTCtoySZWPz/zFMGOnIxw6O3fjbqpLdJ65MmgftbApcdt/2B+u5cn0akvQj0rVCs/Gekt8KGHSnTkBrDD7P8LZhovRmSEVFEmMlMDFedlFXGUGmd2aMZlnKYvG8Nh4x/VAzEbPGZxifKiSH0R4ruANxpAdzWy9K1X0KoyWlDoCG1DqSY4Box9L2RUcNYKvtnzBDS7DDQZA73k/w7s0DzIMVeR7KIK6oAUDNwy66HDsr9KvYB7avlVLdGKxuMNT4qondbJ/gg2rYl7d5BL5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3UAL43WoYDllk6K3FmDNzUTH8AcYE65Fivz0pnCSsqEYLyA34KiPZ5AKfqPvt1Nw2QDqRgaO4Kv7Uttr4GdH8U/d10sdkvVR76+9rkiKxcCeJl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 17:24:54.9842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34f611f7-8906-45e1-bffd-08d55f618fbe 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: DM2PR0301MB0736 Subject: [dpdk-dev] [PATCH v4 1/7] 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. Signed-off-by: Hemant Agrawal --- lib/librte_eal/bsdapp/eal/eal.c | 4 ++-- lib/librte_eal/common/eal_internal_cfg.h | 3 ++- lib/librte_eal/linuxapp/eal/eal.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 04cbd81..c602d02 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_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: From patchwork Fri Jan 19 16:33:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125198 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp390640ljf; Fri, 19 Jan 2018 09:25:01 -0800 (PST) X-Google-Smtp-Source: ACJfBosxsxNRRBx7+jQ2lla5Mfx57UeIa7V0xFI3VttAQF9+A301iks/ypPk1urHwfAkzdhlYVSp X-Received: by 10.223.129.135 with SMTP id 7mr10418804wra.40.1516382701380; Fri, 19 Jan 2018 09:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516382701; cv=none; d=google.com; s=arc-20160816; b=HfxHsu/qZ7yVluVhdOuMShxMb+C5nhbBhlDueQ8H5ez5CPAk6lTvCdQCnC5gROXVlY aP0+5F98S5Y6fCca+r2soPRQMhH6ceyoiyRIFS0Qzz5HN6uQh2RgUpc7vFc5vn27WtX+ MoSQcgvOM52/SyKT9U7/dWD+Z53WwXoWXkP8a6+F2WJjGEqaQqFz0158jLfwyJf5S3xF VidUIsjkUCRlPONLvENu1w2hr9MlwPKLb7ss7qqLYtdAlffhaqRjuDxl16niv080u6MI 8PO2THB1W+cYvNd5qiIN4Fk0AuwqypOGbOqagD9PL0+Av/mtb/vkOojtl82vC2lFZyiS LaFw== 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=CRJaJsynPs9xNo9w6mvn7jfMhzILWOZw0yrMGYYsx2k=; b=YgamDDLhYvl0TZ+UQRKBGw7fwODQRMkkfxiK5NRigosu/SeUiONUKBO/QgulK1/LlR OSx1hojdevY4ZdKnj4OUV5FEwWJUdckuymvY4BoK3g9LdYWM8Hsp85E5ATLCgKBA9nUz kHjIX/2FTuNaQmRL/vYOkcJChpxsUVNRxbjtNJlfukxH8B4pIwR/C8n9A1WGwK7FmF7n P4XwB+AaJfnPV0EhJgY9jPGPjCxPBng+0sOhXzQNzMZXTBVZZVtjXULrz7KpEhLvVXkM OXIHle3xGbKLprRkdG+uoM16DpmrQtYxWWkHpmZxs3jaHB3PUr2nqHse94hJn63IMXhu MZwg== 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 r76si8296448wrb.276.2018.01.19.09.25.01; Fri, 19 Jan 2018 09:25:01 -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 1239D1B2F2; Fri, 19 Jan 2018 18:25:00 +0100 (CET) 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 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/CtTme11bS6wMOc0wePt7bmaGFx4N/tDeZBrk21402FEoHAiUFBJQ/oZ4A6uF0KEKifwK+22raqEzS8HGyEwyd7ElKdz847knGjH9UlOjFcE3ew3qnR2AKHAe1gcByT7B/S7nOGSRAAuJAPNKXJaC+wpXzFo7H58r43cIWIBfFZ4NFwdimkd4aLePp1cVhBhPBjrjxkTqKZVDInF16rSBtzLWu34GaXoZV0JoAt8tuUFM5io+J2OtBr2KZ3FpMKEheLUYtAe2EQhs5o61pYZ1gOZydUa6Vx8hESe5VubQEUcNtDdvkUjJsl35khpY=; 25:g9JkNhqlGt93Qjqi3yWmhwVQCry+wcSxtIK5fzxGETQUO8m7UOvkmaKunGKaMjS3eBXWF/uYCa2I5n3/4Ssyl9HvEO6rE54XagNaStIVRGEvB2ZNW8AlBoaVjPSENMSw5xH7oOcQcRvzk/CIpXOcXGRRsiBg8oX3DZhswGgDQa6uzl2bSgc5R1YQqUoGW6iqz7HWp2Zx1EZFVaQGJp28Hf9CIVv5bpU2SizW6Rkcm8r7xOkeZtbImVPyVTHR7sGzGashZE75Jswa0zM6EkjVy7DonBcmKFhQzyom9jsa4s71K4Y1rYc9yOM9X7224aoC6hjK5lO9eUKxVue7wHRRBg== X-MS-TrafficTypeDiagnostic: SN2PR03MB2365: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 31:GWSyuczfQYZTQ6Zq1ljqIBwOGoTcrGURTz8ivaPOoIod/4dG4M2w1ljCmANBu6VgsiWXDKB1pxOp/5ogJG8ZGj0Dpt2EhYqDgPjp59MI1cY3g0iKGrbtd2nhwUEDncn5JdptT/41J81dazmH7J6lyzZC++Bbc/Q/ouzLxg+4ieZfNsuCTE4zxxibW2emIHlAcv0Og/ExPz7sdv3VRTVwd19asGpBcvcyY56z5svyUOA=; 4:BKUigAG6sNuAQv5rNFH2tp7aDyyBED0hHOwXC7ZAQPEDs9rPdp+Dtev4rLLpSG6KZoSO+xzpn+a6djp/1f+4pQHvjAeI5rPq19IFSkQlHEJJgb7RXuwTlhBlPoNzF8tOVZ8tckhZZhWX8BKrN0wRg6M0WkqwLt2qLpjuYFiH0JkSIVT72lOGr8s8hjgaCHoJeKoGtFDZ6qdrRZyFxSVKN2QYhVCVZgszQ6ltyv2X7y5gOc7R5IUxjqkWnPUKH3mcurToEXqySUbwer9PwjileKPZ+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-Micro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agnosticOutput: 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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(-) -- 2.7.4 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"); From patchwork Fri Jan 19 16:33:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125195 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp369158ljf; Fri, 19 Jan 2018 08:35:33 -0800 (PST) X-Google-Smtp-Source: ACJfBouyYyqFxFX/N4c1kBz3U5jGRTn2QfRgUg1DdeFrbpAg+WOMeE07FT+B3eH/usfkVW2PGKiI X-Received: by 10.223.189.131 with SMTP id l3mr9363142wrh.168.1516379733346; Fri, 19 Jan 2018 08:35:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516379733; cv=none; d=google.com; s=arc-20160816; b=XWQWep00sxd6I3EBT/KwpLly5IpYLJj/Mp4GUXjL6+xlHkffGqFf1BkBBlZwHD4hMf APadaDU5B2H21EhqR4XGVVcuvAdE2Rtxz2Hor2b0mtn6hsHX0ESBME0e9Rng9680W5qp CrXNzsUwpt9jOYDDBh8dLp5oXfuzl8C1CUdPcgH+C3fwRlfSq3JUrpodnOcKKFF6nINw cf3/VM2Y5CfUA5CSzHTPc2/oVNm9DfhhmjZps1WfBVP04dhJkwBNDZd3IyJK2dLaW9YS AdtHJuImr57xc+acF4Fb6AY66cSwa5k1bF0UKJBOB+bptYk37lR9aLOCKHEoszF04b5W 3aWg== 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=+oZ+r4kHg6AKFfi3duQylHSGFnKmmf045LpK4DMvkyM=; b=TIBuDyt/IEfF7P+HPP5hA8TBxY2sR6Bh7PAveciSf2sFYwfAwaxftnrEBXqXjzDLfq j9+tFGsp7w5Biuhv2sC8mmodUXWFtQ5yw/99h+8x9Syj5YeahQCtckC9SW339Z0sdRc5 k2TESHsicjJEfxFJaxE1NARhuKxzYOTkiFRBiRpe/y7R82SEKp0aefatYXa8ZkzN+p+6 3zmS3+Detre9S+oWH/DzDGKhZp6DaSBMzRHH3bOIFdpIyBvx87GYR/QTSexmg9J+LJmD 2J0HHohOzAK2syovNSGcc4Cl354E4qOwjH+wYiSxSzcl3ChU8mhHcV6VFSkXp3nn+d9e M6TA== 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 a3si1162034wme.168.2018.01.19.08.35.33; Fri, 19 Jan 2018 08:35: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 CBE781B349; Fri, 19 Jan 2018 17:35:22 +0100 (CET) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0052.outbound.protection.outlook.com [104.47.37.52]) by dpdk.org (Postfix) with ESMTP id 706B21B301 for ; Fri, 19 Jan 2018 17:35:20 +0100 (CET) Received: from BN3PR03CA0101.namprd03.prod.outlook.com (10.174.66.19) 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; Fri, 19 Jan 2018 16:35:18 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::182) by BN3PR03CA0101.outlook.office365.com (2603:10b6:400:4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Fri, 19 Jan 2018 16:35:17 +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 BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Fri, 19 Jan 2018 16:35:16 +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 w0JGZ6aB016753; Fri, 19 Jan 2018 09:35:14 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:55 +0530 Message-ID: <1516379639-25586-4-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: 131608533174591038; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(39380400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(105606002)(16586007)(6666003)(51416003)(5660300001)(59450400001)(305945005)(53936002)(8676002)(81166006)(2950100002)(81156014)(77096007)(316002)(97736004)(85426001)(47776003)(296002)(8936002)(68736007)(2906002)(2351001)(26005)(86362001)(50466002)(36756003)(54906003)(48376002)(498600001)(6916009)(106466001)(356003)(104016004)(76176011)(4326008)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0728; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:bdSpv7IA2qLgQwtRBuA2AwvQFVPEFfzmrUAtm4mIgqqtkuFf2Iuon8Seh0/LEkJi8tpARHdfqfDCjfgjsIwS2nRf9mywiTti1XD+2hgTwYvV+o60OzgGr0sLHPzNL1Sw MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1786d478-95ce-4da8-1e3e-08d55f5a9fbf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BY2PR0301MB0728; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0728; 3:JqKyZQtlubCHYZ3tv74trVRR8eW5YfzWviW4QB3xGJZq5DbIAY/FHNw3SbR+EktwqzifEcgCmSqFIC44ghshLQpYOnpZMPFjlyfOn2SLZQ9/TRkk3zW4ps6CqTZLRoRimzjijq7U5EjS3ur9987QvYV6iPIpB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5jlfsq0uNd8Beigc0Io8hTs1YeA0abBfBVkoiKNsnaW5tq8sl0IHdUGt0P+8I6FFNzMu+Kp1v69MrAkSH7VbsR4yJ7MhDhRiEzWTi 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)(3231023)(2400080)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123565025)(20161123561025)(20161123556025)(20161123559100)(20161123563025)(201708071742011); SRVR:BY2PR0301MB0728; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BY2PR0301MB0728; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0728; 23:uJ5GgoSCs5SlyXmtooQGhEN10HgOVCvHKYw+OlX?= lcFTjkTqJkd+nF8XC4uu+6Ma9q0r75VnlBhXhLr+2TiUilgBiBpK1gd4K2LuJXNlBTLPE4Q3rZHgykJeXkfIFPNBC/fqQ+pfgTXwg5xI1vYFqlLxFhGqVZFRc3kuRmSLc0cLvmrWkjS+V599sjvCajnu4XMIHpzQ6qcQP8lbQeOeyywsky+lLXnhgZ4vWNQ/yz5P0kQDP1cATYShyARfcfXqWptXJWeK8jjDmGPQ8r8CZuATA5p3CjCoQ6KPtC2Mh0h9J74y/LD4GMtwp/yOkwLwiODJ3ATyIv+U19jzcdzaG9OF/l+UC7uauMC1tF2Zm5Tzv7Mfyz5TjHcBQjbgJNuZvLow/H/HNuyMvUBZj13+vfC/c9asJxu6+MB5oSf53QPvBZJ0JQVWsOCL1aImw7JNvKPv+uv1Q/zb+pAUONs++Jy5D++1VaqFWsxk7FpW1kaMY0mdzHfnd2WQz9witQwcHt/rMk1WN6Luj9TA5DcGx/1xsSfnWLL3S7nW3MBzP69AGtTPbCxt1RTxD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N6IeVYGby5ah2Rem0eP/iO4okh5IZmg=; 24:eNGFmj88Jypfko04fxP3gr8fc/nRklWSFKiay1hxI3irlm3EGUlCagfeX9f5aGsFWEArHG93ooHi3HNM6IXK1o0fWlK1uodWK6Dtsu8jz9M=; 7:sn0IASgd+dQy8jb6rPykQk2pyK0g8ok0F7SBvKezdc70JyEy1D51yezf4JwqSS32WHrPSh/xzyejAeDyzdRoedt56hZkyUfwjzZCM12Wn7RUlmFOoCjeyluZ49tWTz8fv5Jt/GxFcxLNWrUmGRnkwlto9KnYj4ypusnvZoqOIO35CWVsF5DOHZSlNku9/8fbl7WhGH7RYuYEhewqeZGZUqC30kIwC5YdBaGzeC1yRatTSvE+JTyt9EOLSnXmX6uT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 16:35:16.9442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1786d478-95ce-4da8-1e3e-08d55f5a9fbf 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 v4 3/7] mbuf: add pool ops name selection API helpers 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 support for various mempool ops config helper APIs. 1.User defined mempool ops 2.Platform detected HW mempool ops (active). 3.Best selection of mempool ops by looking into user defined, platform registered and compile time configured. Signed-off-by: Hemant Agrawal --- lib/librte_mbuf/Makefile | 4 +- lib/librte_mbuf/rte_mbuf.c | 5 +- lib/librte_mbuf/rte_mbuf_pool_ops.c | 100 +++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.h | 90 +++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 ++++ 5 files changed, 205 insertions(+), 5 deletions(-) create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.c create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.h -- 2.7.4 diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile index 398f724..e2e3ec6 100644 --- a/lib/librte_mbuf/Makefile +++ b/lib/librte_mbuf/Makefile @@ -14,9 +14,9 @@ EXPORT_MAP := rte_mbuf_version.map LIBABIVER := 3 # all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c rte_mbuf_ptype.c +SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c rte_mbuf_ptype.c rte_mbuf_pool_ops.c # install includes -SYMLINK-$(CONFIG_RTE_LIBRTE_MBUF)-include := rte_mbuf.h rte_mbuf_ptype.h +SYMLINK-$(CONFIG_RTE_LIBRTE_MBUF)-include := rte_mbuf.h rte_mbuf_ptype.h rte_mbuf_pool_ops.h include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index c085c37..0c4d374 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -176,9 +177,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_pool_ops.c b/lib/librte_mbuf/rte_mbuf_pool_ops.c new file mode 100644 index 0000000..52c2a9c --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.c @@ -0,0 +1,100 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2018 NXP + */ + +#include +#include +#include +#include +#include +#include + +int +rte_mbuf_set_platform_mempool_ops(const char *ops_name) +{ + const struct rte_memzone *mz; + + if (strlen(ops_name) >= RTE_MEMPOOL_OPS_NAMESIZE) + return -ENAMETOOLONG; + + mz = rte_memzone_lookup("mbuf_platform_pool_ops"); + if (mz == NULL) { + mz = rte_memzone_reserve("mbuf_platform_pool_ops", + RTE_MEMPOOL_OPS_NAMESIZE, SOCKET_ID_ANY, 0); + if (mz == NULL) + return -rte_errno; + memset(mz->addr, 0, mz->len); + + strncpy(mz->addr, ops_name, strlen(ops_name)); + return 0; + } else if (strcmp(mz->addr, ops_name) == 0) { + return 0; + } + + RTE_LOG(ERR, MBUF, + "%s is already registered as platform mbuf pool ops\n", + (char *)mz->addr); + return -EEXIST; +} + +const char * +rte_mbuf_platform_mempool_ops(void) +{ + const struct rte_memzone *mz; + + mz = rte_memzone_lookup("mbuf_platform_pool_ops"); + if (mz == NULL) + return NULL; + return mz->addr; +} + +int +rte_mbuf_set_user_mempool_ops(const char *ops_name) +{ + const struct rte_memzone *mz; + + if (strlen(ops_name) >= RTE_MEMPOOL_OPS_NAMESIZE) + return -ENAMETOOLONG; + + mz = rte_memzone_lookup("mbuf_user_pool_ops"); + if (mz == NULL) { + mz = rte_memzone_reserve("mbuf_user_pool_ops", + RTE_MEMPOOL_OPS_NAMESIZE, SOCKET_ID_ANY, 0); + if (mz == NULL) + return -rte_errno; + memset(mz->addr, 0, mz->len); + } + + strncpy(mz->addr, ops_name, strlen(ops_name)); + return 0; + +} + +const char * +rte_mbuf_user_mempool_ops(void) +{ + const struct rte_memzone *mz; + + mz = rte_memzone_lookup("mbuf_user_pool_ops"); + if (mz == NULL) + return rte_eal_mbuf_default_mempool_ops(); + return mz->addr; +} + +/* Return mbuf pool ops name */ +const char * +rte_mbuf_best_mempool_ops(void) +{ + /* User defined mempool ops takes the priority */ + const char *best_ops = rte_mbuf_user_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; +} diff --git a/lib/librte_mbuf/rte_mbuf_pool_ops.h b/lib/librte_mbuf/rte_mbuf_pool_ops.h new file mode 100644 index 0000000..8559bed --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.h @@ -0,0 +1,90 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2018 NXP + */ + +#ifndef _RTE_MBUF_POOL_OPS_H_ +#define _RTE_MBUF_POOL_OPS_H_ + +/** + * @file + * RTE Mbuf Pool Ops + * + * These APIs are for configuring the mbuf pool ops names to be largely used by + * rte_pktmbuf_pool_create(). However, this can also be used to set and inquire + * the best mempool ops available. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Set the platform supported pktmbuf HW mempool ops name + * + * This function allow the HW to register the actively supported HW mempool + * ops_name. Only one HW mempool ops can be registered at any point of time. + * + * @param pool ops name + * @return + * - On success, zero. + * - On failure, a negative value. + */ +int +rte_mbuf_set_platform_mempool_ops(const char *ops_name); + +/** + * Get configured platform supported pktmbuf HW mempool ops name + * + * This function returns the platform supported mempool ops name. + * + * @return + * returns platform pool ops name. + */ +const char * +rte_mbuf_platform_mempool_ops(void); + +/** + * Set the user preferred pktmbuf mempool ops name + * + * This function can be used by the user to configure user preferred + * mempool ops name. + * + * @param pool ops name + * @return + * - On success, zero. + * - On failure, a negative value. + */ +int +rte_mbuf_set_user_mempool_ops(const char *ops_name); + +/** + * Get user preferred pool ops name for mbuf + * + * This function returns the user configured mempool ops name. + * + * @return + * returns user pool ops name. + */ +const char * +rte_mbuf_user_mempool_ops(void); + +/** + * Get the best mempool ops name for pktmbuf. + * + * This function is used to determine the best options for mempool ops for + * pktmbuf allocations. Following are the priority order: + * 1. User defined, 2. Platform HW supported, 3. Compile time configured. + * This function is also used by the rte_pktmbuf_pool_create to get the best + * mempool ops name. + * + * @param pool ops name + */ +const char * +rte_mbuf_best_mempool_ops(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_MBUF_POOL_OPS_H_ */ diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index 6e2ea84..0028c08 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -35,3 +35,14 @@ DPDK_16.11 { rte_get_tx_ol_flag_list; } DPDK_2.1; + +DPDK_18.02 { + global: + + rte_mbuf_best_mempool_ops; + rte_mbuf_platform_mempool_ops; + rte_mbuf_set_platform_mempool_ops; + rte_mbuf_set_user_mempool_ops; + rte_mbuf_user_mempool_ops; + +} DPDK_16.11; From patchwork Fri Jan 19 16:33:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125201 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp390798ljf; Fri, 19 Jan 2018 09:25:27 -0800 (PST) X-Google-Smtp-Source: ACJfBot1QtYqX9IxLlH9KIt4hRiK3DtVnfrMAaMm9tHi7otmRyxP/Ze8idRF8TgnUPq+0WqCCfMH X-Received: by 10.28.237.23 with SMTP id l23mr9126194wmh.113.1516382727153; Fri, 19 Jan 2018 09:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516382727; cv=none; d=google.com; s=arc-20160816; b=yb306orzegVqrrxII4Boq+2zNvtq7p7kC56MIbuCT1uQX0dNLfW0IqdJwvpSOaSnOO 8IAzOWdjSwANBEHFILqQ2vNkTDtxYkGJQpX/n+HAOy/JcsrHlKiN4VWh/FFgtOfThuZi +WC5XaWr7iZsb0y0jqp4g5VMLGw/pGzRVm8JRzKOn5URYafeuAvHN7L3oA1eIfVhS8PA 6liCBG2cnqFewnVdkJJIUzqYEw9Dr4XSLvYKK4XWWEhyy2+GwCn8cVFMn9XSYwrrnmUd eZa+R969jv9eERs/M7l3MlNTiiTIy6coDZzlcjJ0ZpF6OouRSgy9dGeDCmNnJ96+Ypx4 mZlQ== 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=jLoB6fWv91cZ3/FMvVblYbkW4gw7GfXvSxnrtPwQNA0=; b=mkLb13Imcj5eYJgYBUj62K2X0Jinq4AceCg0duSyqtZBYnZgzdZ6R/a2YC+9uP3QgH 83sDZFxHtxdqZHqfIfuDLKKOA4++zPlaUtvrT8KW0Vf0vzjE6U2hXGP8JH10olx11+e3 MbUlBEmFI7X7Gy6x5V7XtUzCQuXzpRUzVUKtR4RFrKQ7jFDWGrsYSs7UuLJzxpGUShRS TDUvE66Bqo+Lry2qXpHOeSF59a0gGdVh55Q2n28QItTfkP4nAhKiijtZbsHJloC2Nen4 I3DAjxNYJafe1XC8+1wkMtQr3jVbyjTL688GJ8bw9vEwwvmTR6PXSiH1sOeOQsuPOmm4 jpjA== 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 n18si1164464wmh.43.2018.01.19.09.25.26; Fri, 19 Jan 2018 09:25:27 -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 0AFF11B33B; Fri, 19 Jan 2018 18:25:06 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0047.outbound.protection.outlook.com [104.47.41.47]) by dpdk.org (Postfix) with ESMTP id 049C61B309 for ; Fri, 19 Jan 2018 18:24:58 +0100 (CET) Received: from CY4PR03CA0108.namprd03.prod.outlook.com (10.171.242.177) by BN3PR03MB2355.namprd03.prod.outlook.com (10.166.74.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Fri, 19 Jan 2018 17:24:57 +0000 Received: from BN1AFFO11OLC002.protection.gbl (2a01:111:f400:7c10::160) by CY4PR03CA0108.outlook.office365.com (2603:10b6:910:4d::49) 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 BN1AFFO11OLC002.mail.protection.outlook.com (10.58.53.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:55 +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 w0JGZ6aC016753; Fri, 19 Jan 2018 09:35:16 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:56 +0530 Message-ID: <1516379639-25586-5-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: 131608562971496517; (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)(39380400002)(39860400002)(346002)(396003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(50466002)(81156014)(76176011)(2906002)(36756003)(6666003)(51416003)(4326008)(53936002)(2950100002)(105606002)(498600001)(6916009)(106466001)(50226002)(316002)(107886003)(77096007)(81166006)(68736007)(8676002)(5660300001)(2351001)(8936002)(16586007)(47776003)(97736004)(48376002)(104016004)(356003)(86362001)(85426001)(305945005)(26005)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2355; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC002; 1:KW5VDfrU9U+NeAkYhMtUGmeKtgZbmD2+6h2ihvX3nM7I3dxobS1jmGkWBrQUvi08hrkhqCbVthXENIDA1Bu8X5HyM3J33WpwswpFzLobzhTSgu+/q7fSQ+mq1GThhQP1 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d3e70ac-2df5-46fe-6ee5-08d55f618fc5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 3:teQuqW0Xqk/wE2zBh1dKHpnB8oWMIXDYoAoht+rF4lWicB6540roeb7JDdp6pw0Knf0/vJmm+7V2aMLvAKlcsnTYHiFunmh7W3VXaeHYhF05X/0iZ36ZE4o0QXwmbkqMrzq30omiJKqHHimk+ASzxN8e34CAjRwvjeTwwt1NsoFEhWZVZemczEjGAtMLXuNoR1jplB5uFYglxnCWkH/ib/y04WkSB0U+hIRfhU3TE5Ibe98VlKQ5VO21wBYjkFJO5oOTYIq026mk5Hsyoz/MS6lcKyyqMTh8J+yIII0dyrAsS5w1E3kG4HmPSNi0FvZqO2oCDBAmLWNvVfnpsTQGllfC4r6MJm+ONcrnzOrkJGI=; 25:7TXkO7ngj+SCN7E9JyIGMGW6syAI30ehTUM8gkGzkAexrXEXeKVbT4p3FlOh6YvrtxZBZXnQfj+FJq674Uml1xSnBoiCFSAOzWOdaYD65Dpm+UZqWvCxd3JB1o7ml+IhGeBPWK7s/WZHMHQmwZ3ec3efMTAZoWAHyZ97v5JDs+j8cArwgYz2btZfTW9JT11Pk7WVrgM/4nOYY21BgxjCyasyOpwP/c6MmiIUy8vQ7cLyzXjjRCidCms1qoDAXCiOQAAfEi9KZLGk+qGjT3g1ka64n60lTA/sxAqLY6ODbSyqfumozPSXnNrq5k3X0c58xSNqf2cflAYNW/uvFEvXMA== X-MS-TrafficTypeDiagnostic: BN3PR03MB2355: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 31:Vvc21OocQgHX5E4LCtgorTTmtydra++NoUgSwigOwrJv75N26E9MTqmuuGjN0VUApwT9E+odwfMNz6gNcQHVX6e9dO6eWqaeSkRbGhsVBmZPRkleWuerLPpPRAm+QO/j8LCmQYm2Vm1wdo2F9uwKN0nQmAi/vaRBWdQcY71o4lINoNFKOEKzsGVaPERpEzJOds6HyhEw7iSI70VwjWNF5TPMGZx0Gw0eDOowCvVAUpY=; 4:sa+1f53tvor7eUW+6vu62nTajWy0l8OTlWuT+X8aTpj/PV799C4Wl61ELp+Jqnzm5+F9bKmyXtwWBdx+pTX/xrWeCxunKhMIWn+ChqQLQqzymuXNPAaJVbZMCPXy2/gUnQWS1FOzkbY2xB7c/1dCBdzjIMWNZlw3Kr+3Y60Gn64Kll5boLo8/cGMlNveQj5YAoKDhQ7D9M5dZ9NQGyrbCUTG+tSIF8oMZvJu/43lH7isrcLEhwGcqBrIdFalTIDDgO0zEweCxf/K4mxDU1N3dRW5bOQSboI7cCc/Y72SumLjhVmBekivCs5KRGRwAhD3gD/Yu9hM7ltLacq4MD4ZcBbgpS6MBGVpCcroa1uF+Ic= 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)(10201501046)(3231023)(2400080)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123563025)(20161123565025)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123559100)(201708071742011); SRVR:BN3PR03MB2355; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2355; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2355; 23:U6QKk5plJTj84rAELGW1O5o2FGgIJbqLVnoYirxi+?= e7YY3Wn7yFD3UCJmhXnxbslNhYo6axX+KczEILmd01R+3c/MjUtmrJY1fsjpIc1VUTuyyzOo3fIvJ3AbeZpxUTLkpqu1OGBaQoG021GtBjeT+BCBRy3F9LaWhGUse1w5YJHDzurRALqShlPcz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IVgTkONqu/7y96wjwTjl2MguQ88p2RKZi6EovLPDvOTeqTL9bQp24FdQ3dZgT+mELZ/1VER0d8vGmr1sq2xaHotSfHlJ/9PTJLl0wOXXN65kgg26dVnnubNoskI4T0cwlC2vsCDK8CVKqZEy1gcKxCbTl5THmJr2w9hcTRLfoDK7oZSZeivmKpiBQaNkw2jk3DF2N4vWFvAQXdCETvv1zWv19H15YvLc=; 5:Y0kugkguvrOUQr+X1m8bB2DllIlNUMrkBsh+k/jjVKWv7onKufqfV//ysQ8XiIkPPNQBKMJI+DsOtb9HbwbplI/2XbLGnexSevX3Sr7d9afG2B06fbpADgjfIfCVNl25eDtzm2O/bB5nAsUjbxntjjdUS75RoLpf9Fr8VUuVi9o=; 24:ws7gMPIn6K9Q+KX3ZIgRKktPIIKNkp0zEyPDAE1YN2r039JQOX5BGqNAQyXsNSQrVBTvlzQprM5HRPb4L4V4sExg2Kn8tN09bnqWlwpZJvM=; 7:/WSrcr9kB6wPl7YtJezlL4PIWavzJh92Vhqu+tTecpI3fTA7LeiPou22gfXulLUgdkqLnvkz823j/Iqo+dpfpZ+wtzMQQmLRAUvzsfsTJaKdqwvxJhE8RL3fkZQ1uNbSMhgN2f+jnKGPPnfZdOrljxi46XoFhmP+VdbutJ8XG/4Y8RBaQjchqdBcctWuHYy2h8aVeizC9ZyDi0jg4Y0AZDlOCW9W13h01LpF2yhgxQyxK92NZ5PzWrHDMGgQ2YIs SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 17:24:55.0436 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d3e70ac-2df5-46fe-6ee5-08d55f618fc5 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: BN3PR03MB2355 Subject: [dpdk-dev] [PATCH v4 4/7] 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 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 0c4d374..a256b42 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -149,15 +149,15 @@ rte_pktmbuf_init(struct rte_mempool *mp, m->next = NULL; } -/* helper to create a mbuf pool */ +/* Helper to create a mbuf pool with given mempool ops name*/ 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_by_ops(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; @@ -177,7 +177,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"); @@ -199,6 +200,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_by_ops(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 a594e47..e25b030 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1103,6 +1103,48 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, int socket_id); /** + * Create a mbuf pool with a given mempool ops name + * + * 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_by_ops(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); + +/** * 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 From patchwork Fri Jan 19 16:33:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125196 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp369222ljf; Fri, 19 Jan 2018 08:35:44 -0800 (PST) X-Google-Smtp-Source: ACJfBoshVUNeV91z2V7pDvxmH93axilD9xbNtNyRC8JXf/ERpnCvZdtR88Nn6JhjxzAZhSqD8JXZ X-Received: by 10.28.210.197 with SMTP id j188mr4488746wmg.74.1516379744191; Fri, 19 Jan 2018 08:35:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516379744; cv=none; d=google.com; s=arc-20160816; b=SO1BHWp41g9N9VNxDumPqck1uAz7e/SmU+J1jgmTNtmRtueIpME9bwDA9xNkDlgCyz NBFcBwIJ7oyUteISx4LJz1Q8hrVvcHGAkirEHU6Vqyf2DCMl4IA5q6x9cUgRVB+GbXgf zXS8b7aFf/qiMNQNwb0a8BBJSCGTak1jvMtHIxZ3NAQ1hg9tvg49lr4o5Ev2dG8JTeLk 6JG29nTiLdJ6uZV1UtJ8ZOIrOb2Rd4F9TeTKitiwbBt36G573MMJUEfJ/EU3QiBwfl4S XhhNKuH8fbFwTks9UP2cIAbcvn392kL0YZY2AKhmaD9SdeBRcSistxWYT3DW+3BTtumT 9ikQ== 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=fALLTtPT/u4JTQQayCnbgpCN/kJxj7Zm0JDmHvIC1/0=; b=R4tOEgJD5P3R1kDFYQS1aMg4qLFjnpvF9O/7Pe1YXFsgs1cMYU12auzmenUz5Jw2R+ BmBVOJKqVQi///YAoYKKVRdMNFjLvvyhXoay0u3Tkb6tdv+FbzB8y3BE5hTRB8xm7Yr7 1DooDtnb20D2ZTyfawaCgaBG3D/HDs9PmTtrVcqS4l/xu8iNe7O1oqU5A3h1TOQefY7M ydhaf/UfBkCIgd+IMC5KjZZBGSWYVF3uAih2sh22xF7o+EZqabUKvmtrbbODraSt4j6W fsAPavnQHT/q5YVTabSSHXmAGumiaZjD1VcR3w75uQizVLVCQm0W1m0CwmGZ0ubBQFu7 d29A== 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 i76si1170175wmc.94.2018.01.19.08.35.43; Fri, 19 Jan 2018 08:35:44 -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 5EE301B332; Fri, 19 Jan 2018 17:35:27 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0084.outbound.protection.outlook.com [104.47.42.84]) by dpdk.org (Postfix) with ESMTP id 1CD3F1B353 for ; Fri, 19 Jan 2018 17:35:24 +0100 (CET) Received: from BN6PR03CA0091.namprd03.prod.outlook.com (10.164.122.157) 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; Fri, 19 Jan 2018 16:35:22 +0000 Received: from BY2FFO11FD033.protection.gbl (2a01:111:f400:7c0c::108) by BN6PR03CA0091.outlook.office365.com (2603:10b6:405:6f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Fri, 19 Jan 2018 16:35:22 +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 BY2FFO11FD033.mail.protection.outlook.com (10.1.14.218) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Fri, 19 Jan 2018 16:35:22 +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 w0JGZ6aD016753; Fri, 19 Jan 2018 09:35:19 -0700 From: Hemant Agrawal To: CC: , , , Pavan Nikhilesh Date: Fri, 19 Jan 2018 22:03:57 +0530 Message-ID: <1516379639-25586-6-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: 131608533226227307; (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)(376002)(346002)(396003)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(8676002)(81156014)(77096007)(316002)(81166006)(50226002)(26005)(296002)(16586007)(54906003)(105606002)(8936002)(104016004)(86362001)(68736007)(76176011)(2906002)(51416003)(53936002)(36756003)(97736004)(85426001)(498600001)(47776003)(48376002)(50466002)(4326008)(6666003)(2351001)(2950100002)(106466001)(6916009)(356003)(305945005)(5660300001); 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; BY2FFO11FD033; 1:rvH+15/Bm5YQXtogzTGRjML6PPsPvu1HPPfF76qfBGLcx9DYIwog3V8wFMZng8Hnodmkej39F1HR8FOoB7P8VOolfxa39a6MbcByxeWNAPeBcBOdSDMPPv3TQpuGch36 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 779288ad-b967-4f24-066b-08d55f5aa2d3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2692; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 3:74hANEa3glOrZJtbSu+5MH+ldXIwv9A8oA9t8bLQzs/WXmJ020RsYrocLQxkW2uNp2LDuMfaKFNZxJBw5hc78d6UuRVDTETkvXBqC+oFdwjpTCyHy1ndWFK6JUMZPyi7kJ+gT5h0x3cFxqJUMqlm50sDvuYr4WqAyyqrR5fQ/21jOUjwy3IcRMNyjAJwTY7CYnfIxiJWP9IHEJmYf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T3zVwTolHnIcAYqZkapgEYTumy1E86IJm5zGBoORf2K+OUNvUUWESPsEJ 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)(93006095)(93001095)(3231023)(2400080)(944501161)(10201501046)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(20161123559100)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:BN6PR03MB2692; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2692; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2692; 23:jhw1rWrr6Vlxl1OfMmB6N5PRhXQQIfceIfXS5vlS9?= 8CpP12RTJVVWwtc/hOP2EWEmNEg0JlJTo42OkEkCHtLAWeSCfV2lD6GH2q7wBK3fIeXhVCODQfPQTHnsh1rFyOC/ulTWcMLal+IPTT3pi77zoSHmprP12CZMrLePx3b/OcGzJIig8ozXt/kGjyUTnZh3QyjTd7zFV8KMSg7n/aKutC7L/cWrbUb7mdEz/ndQEvsLAEE8Yl4ozax4g9of8iMlZ9YaHmYiBSGje3I3JKK6eF0nFc5LkSi8lFHcIIWFUTX4azbm6Ofc6INYK/O069hQbMWYB4kW1dNAE/KTzaYv1QqZIDPeLqBVNIRjckxjadmutx5dFjIpo4UyWqNnNx+aZZDk7uFeztzrzDrzSB43Jerp7pA4ntSjwPINAw3G2sNH707YxKyp5hCO4Zje1mnrGkrlXCt++l4ysD5OQBc2/hunNf9t8fvk51rdaR5sTjNxEqW32jE78VMH9ZCqgL6Nv9sM9DIONzThB5tucAymjB3S5bhRS94YugWLR1z1tIEkUV/htNJeLhm+U+kxTsjnpbbfzlBpRX41oG9rjPaG7CIvp07A5GiYQiRS1WeSa7Mog/zBwV/f0XU8E4+EcC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qQ01e86MAshqISqWMEyYlNds1WVJw9zBoZIV6K4LdHgHqfue4k52s0ZzCSmUnA0KKn5s7N0=; 7:dAHXntqe/8wZfcZBdDk7H7wZULtR/Z5tR/8ix1Q/RRe0YYaNi8AjL1HtBS8oWle6ml/pw4RnjJQXomFrACma7MF/C9n0XpaBkuKKrA9eL/qcNY7sz92VPapB1JoSqkrAWOM/KrGH4Vznxn62KZbtZGL3zm1lXoWIK0MDTeMhFBaWmWTGaWeEejOsuVQzqY5PoRyjZOmio31PCv4wZgrHyV0IamGsDg0AE8kAe+r1UHedmzeCMLRxyWdlZnXZsDjx SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 16:35:22.0299 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 779288ad-b967-4f24-066b-08d55f5aa2d3 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 v4 5/7] app/testpmd: set preferred mempool as default pktpool 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" From: Pavan Nikhilesh Set the mempool preferred by the ethernet devices as default mbuf mempool before creating the pktpool. Signed-off-by: Pavan Nikhilesh Signed-off-by: Hemant Agrawal --- app/test-pmd/testpmd.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 5dc8cca..d8ac432 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -499,6 +500,8 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf, rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL); } else { /* wrapper to rte_mempool_create() */ + TESTPMD_LOG(INFO, "preferred mempool ops selected: %s\n", + rte_mbuf_best_mempool_ops()); rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf, mb_mempool_cache, 0, mbuf_seg_size, socket_id); } From patchwork Fri Jan 19 16:33:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125199 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp390701ljf; Fri, 19 Jan 2018 09:25:08 -0800 (PST) X-Google-Smtp-Source: ACJfBotsB9fDlfHMrOFL5IE4dUPU42zp0bSCnABzMHwstgYSUIhr1UvHelfIY3sXFEkLKoy02bIB X-Received: by 10.223.135.206 with SMTP id c14mr10163392wrc.124.1516382708599; Fri, 19 Jan 2018 09:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516382708; cv=none; d=google.com; s=arc-20160816; b=ukcJvW+ZCiiUbj7gU91OLgqjhitNQvZi66fic047Zz2pLnJvMCxSNOnFZiQsyStxUo phWNbe4SZiEUia59/yDfBU2PhhIU4fMjzmXCFISyofOit1rOhYkhk48Uk8gOsey73zzu boRVXWlQ/UKOGyUWUc9gVF1JTBNGi/oaRRNZZhNngCHCLa3gmhX34QyK4GwPbMLUuZaU 8m6HyqCzaWtKvdmvovEzFs+KU/xtj/GKnF2A3cjH0cpekgnHBXABWaJ5J4hhtdHtmqOX nhjQxcgY0rPcxWmjJZGfjRh/hAwgwcjzkGGl0xMaosnGqYK/dR5uzCrSeZUGGZOKwtNw gurw== 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=OuVgcOXcpP2I+erYLXGxbjMaVs2CUS5RFZTrmenDI4M=; b=TWDXpJoBioZY1+qzxHdOiLosL6GvfhXoyOEz6K4oRsiANiQCJCVndwMpUfwQ+bXDsZ 8wkwuLfBeJJk9UsbkRkDm87ptN52fZl64cVySklUoZQNX2U7Up4iSlzW22Byl8ICruDz ZGqLwEI4/RQ+yPgoW5V3w9IvuLzqb+n9XavNY1UCMuee+vJBter74r+dEFkH1QLOHptG Anz/8oX99vlTwW5pGUaBxqIEtDgLnoDo8vcWuGvq0dg/1NGjcdx97Qgc/7G0vo2b7DJD 0Hs+linj/2HjWQP/rDJyiOxqjx09uxTKmirx59js//FORm3UdwPu40DFSa8SXj8zZiv2 jEbw== 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 d7si7769746wrd.354.2018.01.19.09.25.08; Fri, 19 Jan 2018 09:25:08 -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 5228B1B31A; Fri, 19 Jan 2018 18:25:01 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0088.outbound.protection.outlook.com [104.47.41.88]) by dpdk.org (Postfix) with ESMTP id B3D871B2E0 for ; Fri, 19 Jan 2018 18:24:58 +0100 (CET) Received: from BN6PR03CA0010.namprd03.prod.outlook.com (10.168.230.148) 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.428.17; Fri, 19 Jan 2018 17:24:57 +0000 Received: from BN1BFFO11FD001.protection.gbl (2a01:111:f400:7c10::1:178) by BN6PR03CA0010.outlook.office365.com (2603:10b6:404:23::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 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 BN1BFFO11FD001.mail.protection.outlook.com (10.58.144.64) 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:55 +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 w0JGZ6aE016753; Fri, 19 Jan 2018 09:35:21 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:58 +0530 Message-ID: <1516379639-25586-7-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: 131608562971238098; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(346002)(39380400002)(376002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(8676002)(50466002)(81166006)(48376002)(8936002)(68736007)(50226002)(104016004)(51416003)(76176011)(6916009)(2950100002)(6666003)(81156014)(105606002)(106466001)(2351001)(47776003)(5660300001)(4326008)(54906003)(305945005)(107886003)(356003)(498600001)(85426001)(53936002)(97736004)(16586007)(2906002)(86362001)(316002)(36756003)(26005)(77096007); 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; BN1BFFO11FD001; 1:IgJGV19hJEE5HL3zdgfg34JM8Dl3GL3jDU8E0V0lIwac6cdp3BRzeji508PZ9fjS2f0dF3hfORSZgvMWhrhALoXfIpW4wE1huLXPc3fWAY7cDxNKex2M1Bnone3ef0kf MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0797ef25-e209-45a5-7d72-08d55f618fc1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2697; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2697; 3:190L9X6zzISPMAfcM7AI1wflehdPP8aOAUjXDIX0BK5dK35cVO75nAiDtaRd883P24U2dFjUxVKQVwUbT9Cfxamp4AIZodBG906kGR7S19efQMndHMCZW8y/TS00sbeUfXQVqlRuhideRvtx/SXXXhA6J5GdS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HwXZfraBUAga6GLGdO9slC7u8avnnbSRT++0N1J+ceXTgmwPLFZiN+/gT3AjzhP/J7wADUpk3HRfTskZonalmFBi7drjEOWTQdKFL4QISM+Zqc 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)(3002001)(3231023)(2400080)(944501161)(10201501046)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(20161123559100)(201708071742011); SRVR:DM5PR03MB2697; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM5PR03MB2697; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2697; 23:Y0SdlnYoI3QLoTi0I+Xo2oLzR2U6RmFsjQ66UrIcX?= sy/B3OZHYJ4XA/p0jFCfBIV2XafejQZyalQ6sTg+wm3Vvv36xoKg0N1OoZknSdsf7tLDNAtDgrcNhSAdc/Q2kQJvplIajS2b80EvrjVmtbVQABH1dwTLYmD08ovyvxLQcn8g1lLOEnPqCai/2WqGOZGQ/Zt/ZmPBZo33GJR7RlhtfC6+KVraCvzONa0OgcvBTHVFXLeAwP0JLc7ziREYWMTHAWtYXerKsy5hzIE5lp4uKY9MKcH+6MaNDU+rKsOSyV9VFTvCGjxVb9Qba8M2d2c07icvpSGUGLqzIr17QjM69ZiFYbL/xgQLO3O4s71gb/M/Gtorv83BOHWxq1/XuKAmh3d8C/LPMhhZgn/3DDapta8+p+G8Hrqwlgmh5F7CJWMaRlVVh3bxJH62QmR1k3524gfs5+PzDS3LY+FFzXuzXVuBqu6vjb+3a7YCVDAmrZFKw75B+zcU9MoiQijd3sa9+5kvhjgvwKeMjPXd7JaMFQ+k5CKOwoxiaQrTgOO8Pq+az2BRjN7687cHd3upJ02bUq2Q5dG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6eWt7Yo=; 24:dxgeV6z+ibBJUGwA7Eitq9N9hb3pDm9Ha41GZGJkZ+rYTM6H01YXKB7SM5ZouUrLIsvC4qwpHIQW6LGRVJV29LU29DdHlXyBbpPwCBeoAJE=; 7:huZSJ6EiCZ1XsqXiaJHSPkJ0DpHDDO05h1DL7r4g96z+/Q7Yksp18qrJh+oZlfgwQbjRU2cJVecNAaWFHadV4Is+c1ckcBhMyAJcdosGCB8YRhVpLqrjHrpeXmOmfL15XGmq07fnZa9d8L9217rEmEKx3hVBOjQ4Zd090haOdAQGtkZ+mwTMkF35ylvW70kx/Lck3Sr2SqPE6c9OIAEkvK/yBF4dgUheYEChe5Igfeuvz6kzAFROvVqE78QUrnRZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 17:24:55.0334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0797ef25-e209-45a5-7d72-08d55f618fc1 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 v4 6/7] dpaa: register dpaa as platform HW mempool on runtime 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 --- config/defconfig_arm64-dpaa-linuxapp-gcc | 1 - drivers/bus/dpaa/dpaa_bus.c | 2 ++ drivers/bus/dpaa/rte_dpaa_bus.h | 2 ++ drivers/mempool/dpaa/dpaa_mempool.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/config/defconfig_arm64-dpaa-linuxapp-gcc b/config/defconfig_arm64-dpaa-linuxapp-gcc index 5f882ca..ba1a1bd 100644 --- a/config/defconfig_arm64-dpaa-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa-linuxapp-gcc @@ -25,7 +25,6 @@ CONFIG_RTE_LIBRTE_DPAA_HWDEBUG=n # NXP DPAA Mempool CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=y -CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="dpaa" # Compile software NXP DPAA PMD CONFIG_RTE_LIBRTE_DPAA_PMD=y diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 329a125..20e8af3 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -467,6 +468,7 @@ rte_dpaa_bus_probe(void) break; } } + rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME); svr_file = fopen(DPAA_SOC_ID_FILE, "r"); if (svr_file) { diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h index d9ade83..280443d 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -17,6 +17,8 @@ #define FSL_DPAA_BUS_NAME "FSL_DPAA_BUS" +#define DPAA_MEMPOOL_OPS_NAME "dpaa" + #define DEV_TO_DPAA_DEVICE(ptr) \ container_of(ptr, struct rte_dpaa_device, device) diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index ddc4e47..dc4bcc9 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -290,7 +290,7 @@ dpaa_register_memory_area(const struct rte_mempool *mp, } struct rte_mempool_ops dpaa_mpool_ops = { - .name = "dpaa", + .name = DPAA_MEMPOOL_OPS_NAME, .alloc = dpaa_mbuf_create_pool, .free = dpaa_mbuf_free_pool, .enqueue = dpaa_mbuf_free_bulk, From patchwork Fri Jan 19 16:33:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125197 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp369309ljf; Fri, 19 Jan 2018 08:35:57 -0800 (PST) X-Google-Smtp-Source: ACJfBot4UFxy3HoqL0LVrmCQSIS4we/eBUNYnw5ck3jr7kmWx6pIZRBeZ5i97iTRUO/NYJa42f8M X-Received: by 10.28.6.69 with SMTP id 66mr8006058wmg.67.1516379757852; Fri, 19 Jan 2018 08:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516379757; cv=none; d=google.com; s=arc-20160816; b=s2JxXr1xOlAGI7xLj6FdvKZh6PJynUuch0o9DG3E3NluNYP3T45BUdO80YKU+8W3Hx 6K07XSyQUEGYG1BX9/ri8Eg6xEuF/3h/dRzsSsia6NaIsyUYGk/BGFc62Va7QwBURfIR SrQp9vPC3CbHU6Ft3wFR91T272ubE1b1DvtnMRhWUI5cxsO5sPRHsb/bqGtEKNNGl7EZ sLOcGbiqlDicjhLme/j3uzeupgYb5lfjMcevhuYCFjB8J3SyR8WHJ7cEmfYq2ECO7U2a ZnEH+/cJRFtrAX66IMyS+9yMJkpQWZt/bxsbNP2jSH5O9nxXDpmnYx3TWZ6E/rCYqDqg cNsg== 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=0jFGjC9qE1+wiUeLtT1P80qx3GQ4klmZ7CWLItlkwAM=; b=pn/Gsmpdj/c9hS2Rz3Eg89iB2WSbH6JrF08eCSuRjmRvJHJwH9yTcvQPSvQyK7Jxnv 65xwww/uFTTGDZj83ndfM5GupqxsXvL0bVI4boRnBTvDZLf9zXtfA9iYuO0sn4kBwlXQ FVDhJh02yykmPdD+/Dnv15GaD5zk/+7QCLgQgvV41yWAyZ3u8y1MSgBgaQ08zCrt14hU Qrve/ZzbiDZUQ8yPomkHhWMuRser/TAW5I0sCJBb8GjlZqzMGBCr+fIyxgPLnS/AdAxP v/ySwUqCQ4jbJ9A+kgHBrUEfKtHBpEaqNbNnbQV9PMa3LPov3Uug7QgViAoZnWuVtEZi t6+A== 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 y185si1095103wmb.206.2018.01.19.08.35.57; Fri, 19 Jan 2018 08:35:57 -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 36A001B354; Fri, 19 Jan 2018 17:35:32 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0053.outbound.protection.outlook.com [104.47.41.53]) by dpdk.org (Postfix) with ESMTP id 163C41B32D for ; Fri, 19 Jan 2018 17:35:30 +0100 (CET) Received: from BN6PR03CA0021.namprd03.prod.outlook.com (10.168.230.159) by CO2PR03MB2359.namprd03.prod.outlook.com (10.166.93.19) 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 16:35:29 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::184) by BN6PR03CA0021.outlook.office365.com (2603:10b6:404:23::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Fri, 19 Jan 2018 16:35: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 BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Fri, 19 Jan 2018 16:35:27 +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 w0JGZ6aF016753; Fri, 19 Jan 2018 09:35:24 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:59 +0530 Message-ID: <1516379639-25586-8-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: 131608533289860773; (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)(39380400002)(39860400002)(376002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(68736007)(105606002)(76176011)(85426001)(2906002)(59450400001)(106466001)(16586007)(575784001)(81166006)(8676002)(86362001)(8936002)(50226002)(2351001)(81156014)(51416003)(5660300001)(77096007)(305945005)(104016004)(97736004)(26005)(356003)(4326008)(47776003)(6666003)(53936002)(6916009)(2950100002)(498600001)(54906003)(296002)(36756003)(316002)(50466002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2359; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD036; 1:67DCwrU+6prZFKBywjIL1wkKKMDznRrsFJKPgadP1Le7PiqQjTLCQESzvmjgXOAZDkNv6GevHJNuVHPjHG81Hsq28ztDOSvfvyk76gwLCfat4rptwn/yURttzXkpaOAH MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 713d25d5-6091-4870-fea5-08d55f5aa69d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2359; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 3:0v8Rg3VEYm9MqN/tVCMRtX/VsX95vK4ScgTmKf3bXXCu746tJKJRAxmB5/GH3nCS6zFbqsvFQdSKCSILBCzix6eQ81Q9GHAwrGz+4m3Z/YBcenTIzgZi3GpRfn7hPsLWXlm4g+idsTlYE1PyGX4QDM/Oj+eeV5z6JGC/LXYjs7ImhVrRGsYbq1NiJhM6rlFEb0rFJbGuLtVkEq9Sc87kaAOwzuqzXE4g+1wUnyfc5AXRQoJ3EcUZNJWs7s3Mj/+wfGz0vH4uo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X5KGT42Dg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(2400080)(944501161)(10201501046)(6055026)(6096035)(20161123561025)(20161123556025)(20161123565025)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:CO2PR03MB2359; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2359; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2359; 23:V/V76EEiagSkzNuqVG1oPptAwJH35ujxcErDPRx8B?= RwW3VXj8W7c5WkJvQgh0bvzWzKMpqcSQWqYwqDFM0B18cadW4rYB0iAyeGrovDPILHeQsa/z/hyLF7NLKnS4YOfnutU3fXKJ0SOXmBccEjj5cd4a3xCv7fRgmIim7spe5HWyS8DYQJInF1dCXGKRYer+TsyxmBM4dPN/VszS5yAahrONvgo3kYI4YJHWQy5EysIsAb/7V6ho3bSpK5HuUVVgWB45BVvlKp85VdqcmFL0GWRFKyvi8B65UtLPkvyJ1uKA3XiSgOd9NjD1rFXvBxi5GWOTXNSF0djijrSZQ4QohSJp9q+wtVzZDGrCjmSN6EbB19ZFxBxZzAI5JbY9vUepja2+hVUGT7d/Ut/nziM+EwpYtpbgbFHn0bLVMzr9d1XDHCLH3a++aCZrs7vs7qCUWuHG374BuoI4/6qZF9QuPWTct0dfAAa8Upz1BjQ2GGnGJNMiaC4rm2tnOD/6AAXMMB7mATsbDPjeHL0bpPcUbCBVhFs0pi5kheQeRD+4rDhEy2c9clFlGZmjoioQSrLFhtom8in3p5yN4au0SzhUSkMHvht5S5iCHEQxrNhCb1N3/mRm3DvUTmqAjmEwa4B5yVuafbQhA7NGKVmjp72KXbrhLXPUG73lJY9iq/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HGivK77U6zB3bOzm0c60GmMR2sysDaq+E63aJA4jQiwaKguCN8=; 7:N1RRafDChYv1YYpxLbss2okk95uJJ66Xokempam9/6W5w58JKcBT8cOg1KsI4W0Dw7d8KhNSrfIVtdQEYNGSJ8LHd/1exyYNMLsD6xLHYOXWYaWDEgpgYa8WQhl73Vjbh1ZErMDwHFnD+qDA1zq2DGPkRHZuefruXHN1Rzx6HJrwNPhDFZXQfGlr8FJ4Ro1K/eOvt3a7+5CV8BfP+xxwHXnq2BKLEuQM6Aj7y6kJew6fLpSCrTa2WTY+2J8pxUv6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 16:35:27.0360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 713d25d5-6091-4870-fea5-08d55f5aa69d 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: CO2PR03MB2359 Subject: [dpdk-dev] [PATCH v4 7/7] dpaa2: register dpaa2 as platform HW mempool on runtime 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" Detect if the DPAA2 mempool objects are present and register it as platform default hw mempool Signed-off-by: Hemant Agrawal --- config/defconfig_arm64-dpaa2-linuxapp-gcc | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 3 +++ drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 ++ drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc index cd3396b..c7d891c 100644 --- a/config/defconfig_arm64-dpaa2-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc @@ -26,7 +26,6 @@ CONFIG_RTE_LIBRTE_VHOST_NUMA=n # Compile Support Libraries for DPAA2 # CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=y -CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="dpaa2" CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=n # diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index ffad0f5..1dfee25 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -74,6 +75,8 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpbp.%d]\n", dpbp_id); + rte_mbuf_set_platform_mempool_ops(DPAA2_MEMPOOL_OPS_NAME); + return 0; } diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 2e79399..9b1afe8 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -44,6 +44,8 @@ /* Maximum release/acquire from QBMAN */ #define DPAA2_MBUF_MAX_ACQ_REL 7 +#define DPAA2_MEMPOOL_OPS_NAME "dpaa2" + #define MAX_BPID 256 #define DPAA2_MBUF_HW_ANNOTATION 64 #define DPAA2_FD_PTA_SIZE 0 diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 51770d4..d15347b 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -354,7 +354,7 @@ rte_hw_mbuf_get_count(const struct rte_mempool *mp) } struct rte_mempool_ops dpaa2_mpool_ops = { - .name = "dpaa2", + .name = DPAA2_MEMPOOL_OPS_NAME, .alloc = rte_hw_mbuf_create_pool, .free = rte_hw_mbuf_free_pool, .enqueue = rte_hw_mbuf_free_bulk,