From patchwork Thu Jan 18 13:26:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124953 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp125731lja; Thu, 18 Jan 2018 05:28:02 -0800 (PST) X-Google-Smtp-Source: ACJfBov3iwBlssy4skTw6ltra990iEclL+ZBrNnJwqb8ui7fItScAY6v1u+2nRmqbnpNYJtEHnSs X-Received: by 10.223.157.196 with SMTP id q4mr5660817wre.55.1516282082499; Thu, 18 Jan 2018 05:28:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282082; cv=none; d=google.com; s=arc-20160816; b=UwAP3KHmvy8EVV2S8JEgV2PwF/Ah2W+9YCThRCJzth7CpKNsQrPXII+KHc0cz7me1t KV5iXxVTnENvSgR0Mrbg3EbyhkBVNmL8JcMijVtKt39ex/il1FbhC1oLxscaDRfB2+r/ db0kzAsCvFhuL0X4AkwJXu2QxhIVVMNlTi5FQopmmkl+tJTuIKIVLU2KqP6zIqTvqBfh tbrqwLYsBOV2DVx7SOKGyHnLORhSlrg/29Vec8vYn6+QOvPPS/1wBXtNC0yfJGG4ak+B YVm1e7NPVHHXGvf2PNr4D0ubgio7MAuohzsBqrQvZyv4ZPLYbgWv1EBBZsTEIFXlhTGH HPhw== 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=GBz5DLI4NKQ3BZg9ILvTAr1J8pLKR5GH6MobCGOlm34=; b=VAAqFnLcywik0c17vkVgFqa5gCBt8p4OOlFpy0r7BbFBZn3gFWK6kClMpOBjDFAbkm JPQSOfZZpqLmksunLGn6PbpmDawnqlE0iRFqVuhgH9ahO+V0NXgNq6z/DVz33i0N0zCe EZw5hTur44Ohfq5RYEXqZP1wa9qXktZh1gbi8cyVqOtuLM68xNqUt8ndzdvwSn36qeUn JXlHo0UTGXKbTNG83meSe2DEEVhve9j5TA/oY2zPIh6SJkSU7+WqxLuec3q3EkDsD6Uf jJ+UTLLNTnM4cd+qlp88O7bnn0EQpk6VPzhql52mVQvY7oexVa34q056VvHEFN5pncqE tqjw== 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 74si2501208wmh.65.2018.01.18.05.28.02; Thu, 18 Jan 2018 05:28:02 -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 7904D1B2CF; Thu, 18 Jan 2018 14:27:54 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0085.outbound.protection.outlook.com [104.47.41.85]) by dpdk.org (Postfix) with ESMTP id 1F37A1B2CC for ; Thu, 18 Jan 2018 14:27:50 +0100 (CET) Received: from CY1PR03CA0006.namprd03.prod.outlook.com (10.174.128.16) 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; Thu, 18 Jan 2018 13:27:49 +0000 Received: from BN1AFFO11FD041.protection.gbl (2a01:111:f400:7c10::157) by CY1PR03CA0006.outlook.office365.com (2603:10b6:600::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:27:49 +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 BN1AFFO11FD041.mail.protection.outlook.com (10.58.52.252) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27:46 +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 w0IDRdIk028023; Thu, 18 Jan 2018 06:27:43 -0700 From: Hemant Agrawal To: CC: , , Date: Thu, 18 Jan 2018 18:56:26 +0530 Message-ID: <1516281992-6873-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556682700679; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(376002)(39380400002)(39860400002)(396003)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(296002)(8676002)(6666003)(36756003)(2906002)(76176011)(53936002)(4326008)(51416003)(508600001)(2950100002)(8936002)(105606002)(106466001)(6916009)(316002)(81166006)(77096007)(68736007)(5660300001)(2351001)(81156014)(50226002)(50466002)(97736004)(47776003)(104016004)(48376002)(86362001)(356003)(16586007)(54906003)(305945005)(26005)(85426001); 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; BN1AFFO11FD041; 1:I+npww5v6NgrdX/Uhp8DMu1qsAQW1HB7ZweSAL/2YndhABtXmPDlrfgqOCAtQtoP2PWSHF+s9hbCeB9RZqH4ONJBfkROQiZWu/sArdCN54B3et5IRNXPqNUFn+DWebaB MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dc22c7cb-d779-4f3d-5787-08d55e77444b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 3:v5uKAzWBBsO/0Lhlr+h5UOiBaMKsX8mWgVpya+VaRUmpfA9GukprxA65RYTeyeYd2nmSGacdmSBiRlYj8RmSJ3XjjmWFTPa4u81NxNM8jOAit7LT5kJiZctv0WkQvMQhvCDnFaUr7/l7qkR6q3RPq0uEyIYJ64bKu6/k+5I739CyzOCNOKJW4DUGsWbtySlbXsEQrwESsTaI/Hh3gdbGQDV65W86G44eblmKhH6vPLdT0PrbdxYDG0B1zTFNx4f12471Wt4alynzaY/jhXLxADqTv8RjMr/dYF7t/vgDt8sWcBAduOTi/loWxTSBna+usyEpk2xUuidbkBhCHJxfuFGPB7rUfRSCOpy1Q35eI7Q=; 25:w0G8AoKb/Pci2X9VY5VM7bcbxHu8aSbKMRrnShi6rs9RgtShKPSIS79kIB7CLkMCkdMhsjuZyShgv6xr0NaJ6OGSqoy5d/Wwp+dj+rmRuTRQ4LbxMfhlx1mWrtsIEsOPPreiRw/tjmt39d17SrTuzmFlsBDRJD7gs2nMam4eYt54aP9LM+Wy7XFD+RaT3YcZDXV0o1X9CGRDcRfx5TmDyBjzf1sJK9DvRxKS6qgQHFKWoD69QAtFjG6axp7UYgB1dhX/fPjjArBQqPtaAppI+Vjw77rpyEH+ICq56EVOyXjWqrYjz1KcoZltklRdzyfFbdl/6kZVEjTFnhBpcxgHTA== X-MS-TrafficTypeDiagnostic: BN3PR03MB2355: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 31:tBENxGwPwpwa11ZcRb3hHT8due+ddmZDiRhg1ZQJ8HIv5jw6r66aB79VGIZKNr9dPNu5ZMR03DrJ/jXvbA1X4OucoGsLgQmba37N1ynsA+LQSPdN1PRDaCRuTcMpX4rKtXQUwOgH4qKoqPVzfPGNp/6w2oHR7wHaAjyjbU2HKyYJ3/mkheOEbCttapppRY1SgTGRd037MfBWiWpEoXMy0uxtM9JP0Ctim3J78DVfRfs=; 4:7Z3ucFhH1dtfxUZfawat6rIdqpyv7vD2hAlU2nbgb8OCDUblWGcJpDQH0sjzsNZV6m98lFBqp1q+NqxP4v/QLCbY8I9osq/Iujx0XnXO8oll5aG01x+Xy8hGfRxup8b4kyA3QdMYU6fwyVnmL4s9BDoPxh4ovGUlWZX52dkn9oneNKGiRCbjaAlzasavh/NwMe59Mq+1hcc/mBrjjq5HW/0H4w8KW2sd9Md1ZwwbEjabdmz8loDkw6vyo4jvzebla0GzsLbBnEqysorp9D+/x/tpiXY1MK5y4CDBd6mJFJnZNp6Mfd08W2CVdlXWP/lE 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)(2400062)(944501161)(10201501046)(6055026)(6096035)(20161123556025)(20161123565025)(20161123563025)(20161123559100)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(20161123561025)(201708071742011); SRVR:BN3PR03MB2355; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2355; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2355; 23:wbqAnqKikOwj14vstfNQpa9A2uSI7Z5124nliTsUA?= 8P+bg78t2vQjTSSfkIsu0S5bZkFqHguHRw5w1S2NUEO67l12qGlJAfb0rneb3lID/o72uBq7S9zNripBQNjluwk3iGyFjserggALXe0YTj3YQo3v7kCwL5WQ/QGoeBoOrF8UHZRUm2MESnfaKVDkJABbNfhrELvz9v+Sn1PFPVFncbKXL4TvExZMh8vIek/jCCtE/JZNMVb6kct0JnqVcSAwoqt0C0+Zn3GSlZPDn4js9kPidK0wtpksZkwiYIGRcr6BAy9NVnTyUZtO2Tyj/u4TzH3j4g2q0mZ6v9zfikzZ9tXCHeiCvkT9rWQqX2Hj/B+CiHHbxc3B3jMZH2sNxaCXfmWtG/r4pjVm0jIgWSAYwcI7gWpV05A9xK6QTQwh9QKM7aFMSbQW/LeOOq3seHzouOJFX/YMjvOME+A3WCfbgASbI4mWjW6pQHNOGG5CnlynmwzrJYHAIvU5Pz2JbEMD23mILaa+hKGPWC+NVQBtlBsgTftMFKzXLR391Gw0i4NdAOPnRQDLF5g858ZYs1366CvXCahsq92KhO4R/B3YBRsXhALhSjielONDhtgbqE58Zrii/pCju4EY8VA+ua3irsEQ3xDNrSroXnGEMYQp8HxFH8tntjDF4601i5bo5BhHAt3zJwdpSIW8qEWg2J6PT9oDT+HUU1nbtj28YnczKiu2gaLGOYQhACL31QwBZKjHN3IVUmjx8tEXfaysrhYmTbSNZkKXVUT9AuaKH42buEmgWXU9VkkmhwxDOz0pxmaf5hDik1UGs3vPCE5e50sAY4GcSn7OyD3roKU115mM1ktWiC0hUVgaaujYhk3v4O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+3ZFDn1dtpTn9/pK4abnIIC2uQ8mY1MoZRRomO5i0tpCEAGxun8IEnVY7cuT4n+Jh+jlpKCw8VxeEAfD8TjFwLuXlW6ccshBQz5eLyhw SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:46.3513 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dc22c7cb-d779-4f3d-5787-08d55e77444b 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 v3 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. 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 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_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 Thu Jan 18 13:26:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124954 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp125791lja; Thu, 18 Jan 2018 05:28:15 -0800 (PST) X-Google-Smtp-Source: ACJfBotx0jUpVTL9LSYBtPNMSJaUoUETIlvp7iI98BQnaKXLCMYA9UW5Yo6SmK5mC1ab3tGrYgTH X-Received: by 10.28.232.131 with SMTP id f3mr5254214wmi.69.1516282095084; Thu, 18 Jan 2018 05:28:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282095; cv=none; d=google.com; s=arc-20160816; b=zmFjGqwOjx0j+1QxTtq4XVNoSP0lzbRENBaJA63JiMYYBYTTXaBfRLqnIZRzCcVjS9 PgPIKpuykEWs3hyyqTNe3vttkA5+9/4xqQvVO4PU71m0W8hK/ua3yyb2ernJ/3U7Ueda iPPsR8cJYy288bmVWpAasm9OPSaTDVR8O07OUH5rElU0o3yYq3XsJtQWfWUG5rkvZN8H RC2ILQO5HTBQa1lIYqKW1jz6aXpXNGLPHbdUKEd3BeIyoh3wt5B1RfcCxJO7dZaTGtbA Cak9kT7Ha5cupY0L/FekglbTg36fE1gK0uRe7tiggFQ8Kev1JWwPDbD0cBNwp8gvoyD/ p0uQ== 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=kNvJYfGNbUXJuCLkS6Y9sDt/6ji975jJSQ/I1hAk5HM=; b=C+p5FuPoQI9w4dvES79TbuwGWRFCK0Eo5HesWj2R7Mnnw0fPIRohOQy0AvVHy2+gmO 0fgqtxCyurcZkYOyN4knqexRof0p1zkQxST4nqWtBdTRpAoTDmoyp77vmwfTbQwHfRkL 5Y3466avDS4LYsdfo+wLdEHF99NLzFob8NJvN581bWYeEvbt+y7SsvKuuY1WI5uNSmpn mnCGMwQiWG4QHc3murUnVbdPfuWOQJYBRYA0PrsckeOzP8y0rZTxuSg/ZGAx8AJuyx8u 16HwxYwMxvki/rg010dv9p7qwFIRL660uZ6akx9GUqzVk92vQtQtJEMBpVcAw6nEMotT 1t2A== 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 q14si5749690wrc.14.2018.01.18.05.28.14; Thu, 18 Jan 2018 05:28:15 -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 95EC81B2DA; Thu, 18 Jan 2018 14:27:57 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0040.outbound.protection.outlook.com [104.47.41.40]) by dpdk.org (Postfix) with ESMTP id 5703F1B1E1 for ; Thu, 18 Jan 2018 14:27:53 +0100 (CET) Received: from CY1PR03CA0017.namprd03.prod.outlook.com (10.174.128.27) by CY1PR03MB2363.namprd03.prod.outlook.com (10.166.207.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 13:27:52 +0000 Received: from BN1AFFO11FD023.protection.gbl (2a01:111:f400:7c10::121) by CY1PR03CA0017.outlook.office365.com (2603:10b6:600::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:27:52 +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 BN1AFFO11FD023.mail.protection.outlook.com (10.58.52.83) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27:48 +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 w0IDRdIl028023; Thu, 18 Jan 2018 06:27:46 -0700 From: Hemant Agrawal To: CC: , , , Pavan Nikhilesh Date: Thu, 18 Jan 2018 18:56:27 +0530 Message-ID: <1516281992-6873-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556712687398; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(39380400002)(346002)(376002)(39860400002)(396003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(4326008)(305945005)(104016004)(51416003)(2950100002)(47776003)(6916009)(77096007)(8676002)(105606002)(2906002)(356003)(5660300001)(16586007)(68736007)(2351001)(81156014)(81166006)(50466002)(76176011)(508600001)(54906003)(6666003)(48376002)(316002)(50226002)(106466001)(8936002)(296002)(36756003)(85426001)(86362001)(26005)(53936002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2363; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD023; 1:WJpY5fqxOkPV+DBo3kGlmD8L4PhgACZAqvJLBADvFrsiYscuTTUYyiRySotf4NOPjkJUgqHeHbPbkKISP1TTMj5ERy3QW7ZHk6+xmLg/xXSRTo6OVmuOT8wDZ2QZg494 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54b9504d-0730-476e-e726-08d55e774614 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2363; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 3:/KPzWfA5GUR5F/hyy8oChDKHXxOR8AdFskRLrJjXNf3OYqoulymjX+o/HHjZljjKZGHe2OOaVfiN6YQpRe892TV4ann+DvtM2sRzQZP6wkmsx6Ijt7I7bWhzbtHWhDIrbJmkZDflwI8eZITsqi+gezg7IZlWVZxNOFyCjRdxiGET8GEi+J4dUiipF/A2JlXUTE0XMLRQ/UWU4tUJVW/YqFfaD+cX+F2Zlc3KbSNVtnWZ4iNsCnCZeF7muQhD6R48cFuX03AKa7gFQXObAvp3rmYVL3NHVerJG13v+oLvuOPhltJG1tattmbVpKnGMrayPxuEae9LWwBuqVizyGNDK21u6hdfy7g5gjtgt3erAXw=; 25:WFLlG0uWc99LsqgKZ01zYz2Ts9sqVpV3FiZAPROr/f+oM0gE+Y+Z977bX3BK5NVM4na582Ks239tPArKTTaF/aFvgvSHjI+0+bP56/6uavqpWusZcL/bqWt8vLzYZ/ImcfqPBys/MGuJX0uFL89RJsNDZZQv4ugSgMS1gkVmgTHrgxHz9+tqs9vbq7C2ph3z21hucVR6zo9uN8e3Zjcupvf2GTx6VYNREwQ41z/dpUJouOoYqanQw5WJuxK8b9ApP6IP0N6wPGQgOsVCva0/UalRAsIliG45Bn/OIuzIY7eYMIJfFx6zPLkeZCZwM4a6rEY7laHCqN1zvHilkf3vLw== X-MS-TrafficTypeDiagnostic: CY1PR03MB2363: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 31:+qOZyal4W3LBxLLcxYVgjAdhzX1x9ErZ7lpz7n7u0DfSMftEx0qN+yeE1lj6zwIhDZaXyFlPXDw/KaUx2XwcR8L3d6WwxsvqTZu3zFFAs6BsUJ22M/xYPCsDEQjdHNrUSw8JA9Ew6ZmjHK8ZUDfSoDQujjf8DtS+c0zf+kBLt77TUvN2NG4O5S5eGf41yGLhtPkXWVY6Kd5U0q3Jv9VAntHo62IoRg+97LGmVCRAe1k=; 4:RREyP/H95DZ3wYdthqDuiK/TWNTzVe/aGhp2nF8FfwVSNxM5mXTxz+m1NObhqvlBpL4Nbh7VRwxgt9s3vBxzFVWj+OEPyxOV3TSdSsZus1Wfbds7tBtyVkdMUsZolP/AAfDVkYD/r50XXplaZz00AWc29hFvgCjCWKgjky9WDu6XOq6Jim5HVzVn679AWJUCCARmC74burSh4cAyxBdPgQiuEDAArX7pHL95ToS1ndOKQRu4mkIoTltXDLacTTIOufO56AzHKD+9AuGaBhOGJEti1l2bxnaSQVBXD+zSLBmW9cARlPpt4JeM5uSaiSMs 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)(944501161)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123559100)(20161123556025)(20161123565025)(20161123561025)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(201708071742011); SRVR:CY1PR03MB2363; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2363; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2363; 23:dkM/60l+ONnPfu/GX2A/ksHzqtFwSRg5M7u96k/i1?= jSQ2aIVpDHTCp7uZW5RfP4H8TFJpLYcdcZRWCuJPVOW8JLr7SzO62+wcrQetdE9AD8dmNHrN55MHGSlk0DScDOTY5M+4l7a+MhBP9oHQvtKjjxoQdyeHaz6JB2RwPj6RsTygke0sQzzsj9uzm/Dz9qflAeTPx4VlS8nS7LOnzryQBVOw/obyujwO/WoE2zrNp0NAUDCmgEaYRtj7R0u+6NjSkbqsGYDIoJw42qmNv4Y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MpMAtZ/xd8XnIp7hz6Oc74Z2MXHNof40u6XrS4gNLe0tRDTItAlnAdBIFGKPPya+T4o5UVpHl98fhoeaEum5HGvHiqrevzPDBdj3n+YdSAsIbx1ySKyPgAQiOKZwyK0Sg4HmtQ/Wi9k65aoUiTqIkmiyXE=; 5:yWNvp38CddPXMd+zmZ5t54P251M96dTAuAvvH3mulAiFZiQSqlrh55pZbIajAbDc12/vBBmHcyrwMUlyXInVr1vLynROh9RUKrgypS+3iNQv3N8jXkEAPE6uV5+EB8Xy1xqyIbL1AdHa0YrwQXhVR3xvQ7RtZSmuq+qrGERrWgM=; 24:ZF7sbRI31Se4pJ20QcLwimSF2vBaMSriy+CcfRkd2p9g1bZJUlJWWCPM68WyKjMnXChQ6uZm0MK0dfWNm3x1DycmP39SEddrGD1/s8LgPAU=; 7:xnXhGepuPLj93p0B+CfjU4hG58E5+epnj+fTtYoGoizpN41dSqzbGkWl5BQwtKapHUxUkHxlsMmCk93HoTQ96tliMuNJSDk/5G1c8MWxegtEsPw+AsKKIKLQ9Vo6Mfz15IBZCc1k5s25QTwKeuvxe0FTl5hLup2yBdJkd+D4XYvPXH9NlDD+qo5Mks08C0rCDDHgfIbTGPwtz4oMm7VhodMAVyjZk+/kfwnPi6SxaKAsUVrX2UBD+iy9MHPLyNWF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:48.9918 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 54b9504d-0730-476e-e726-08d55e774614 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: CY1PR03MB2363 Subject: [dpdk-dev] [PATCH v3 2/7] eal: add API to set user default mbuf 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" Add new API to set the user defined mbuf mempool ops name i.e. set the provided ops name to `internal_config.mbuf_pool_ops_name`. Signed-off-by: Pavan Nikhilesh Signed-off-by: Hemant Agrawal --- lib/librte_eal/bsdapp/eal/eal.c | 6 ++++++ lib/librte_eal/common/include/rte_eal.h | 9 +++++++++ lib/librte_eal/linuxapp/eal/eal.c | 6 ++++++ lib/librte_eal/rte_eal_version.map | 1 + 4 files changed, 22 insertions(+) -- 2.7.4 diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index c602d02..64f010a 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -117,6 +117,12 @@ rte_eal_mbuf_default_mempool_ops(void) return internal_config.user_mbuf_pool_ops_name; } +void +rte_eal_set_mbuf_user_mempool_ops(const char *ops_name) +{ + internal_config.user_mbuf_pool_ops_name = ops_name; +} + /* Return a pointer to the configuration structure */ struct rte_config * rte_eal_get_configuration(void) diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 2aba2c8..7645b34 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -307,6 +307,15 @@ enum rte_iova_mode rte_eal_iova_mode(void); const char * rte_eal_mbuf_default_mempool_ops(void); +/** + * Set user pool ops name for mbuf + * + * @param ops_name + * mempool ops name that is to be set as user defined. + */ +void +rte_eal_set_mbuf_user_mempool_ops(const char *ops_name); + #ifdef __cplusplus } #endif diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index e8c7100..46b2bb3 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -127,6 +127,12 @@ rte_eal_mbuf_default_mempool_ops(void) return internal_config.user_mbuf_pool_ops_name; } +void +rte_eal_set_mbuf_user_mempool_ops(const char *ops_name) +{ + internal_config.user_mbuf_pool_ops_name = ops_name; +} + /* Return a pointer to the configuration structure */ struct rte_config * rte_eal_get_configuration(void) diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 7088b72..3529885 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: + rte_eal_set_mbuf_user_mempool_ops; rte_hypervisor_get; rte_hypervisor_get_name; rte_vfio_clear_group; From patchwork Thu Jan 18 13:26:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124955 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp125853lja; Thu, 18 Jan 2018 05:28:28 -0800 (PST) X-Google-Smtp-Source: ACJfBotddie5uUn69TMhMSzjlzmGQUGAbqQ25mBMkHl6KO6oR7ABgChfaZ0bOx7Ujbt8/edz8vg8 X-Received: by 10.223.158.194 with SMTP id b2mr6700234wrf.265.1516282108584; Thu, 18 Jan 2018 05:28:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282108; cv=none; d=google.com; s=arc-20160816; b=mFmcNuAKh57AVIA7nfh0L8op3PSq2GXHNdph2mej0OuxtsfPBuQpbFqzPMNSlRxRa1 rswtNm/DsWFqyYu5uLfpyVrR2UXtF/ypKJ/NekUAjxzg+qx09Uu+cIVvSr/qb0rwJsHv j0aiyulQn07lpHx+/yD1gj7j7yzV837pv07NL5mgQjmeB98gltxZtvi159h4oDofNQ6A Mg+W6qe7C0qxmTK41fszNi7G5mWn39C+10n+8Jy5lOsynu33lGQQsdpHQleX9lZnET/x 4FbMAtcMtJJIYin1EpZaqI6gf30C1T6lwyHxegcWAXPidnUHqXsiqwFRhBUFDr9ArHQF ThmQ== 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=gX5pK6obn41po+3AvmI5EvJNtQS5lyNt4veGIC5XwvA=; b=kD73yEAPCHBe0musg6/78NIXadvv5hdagurgMvjL3+HZOT7A1eXK1tZ8b3GI4siBXc XNJXUQDHAfcJbglGrxfbkIMKv3HFTwg4ztkozTL9UyRpUAyge0iP1bDs2gNrlOZ3pDeU I5/tGhJlVEpIfuSowY1x04Ed6H0WVQTgFfagxDUWl2mU7fNWIKj3SMXudcKMtvI9AUce QnG6zB1ZhOZLr6HPrCiSRFiPbuZeuJk0XYspSU9eAAwrBQI5sks84dMluBv+RYqkd4LP /15Yc5gK385gKwEYf7Nt4kpgJytEemMsjmSqrV27pPW8uLprVU1jlB70XXIBYnV4QPGq +jLg== 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 25si6343289wrw.123.2018.01.18.05.28.28; Thu, 18 Jan 2018 05:28:28 -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 8374D1B2E3; Thu, 18 Jan 2018 14:27:58 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0047.outbound.protection.outlook.com [104.47.38.47]) by dpdk.org (Postfix) with ESMTP id 6D12F1B2D8 for ; Thu, 18 Jan 2018 14:27:55 +0100 (CET) Received: from CY4PR03CA0012.namprd03.prod.outlook.com (10.168.162.22) by DM5PR03MB2700.namprd03.prod.outlook.com (10.168.197.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 13:27:54 +0000 Received: from BY2FFO11FD007.protection.gbl (2a01:111:f400:7c0c::170) by CY4PR03CA0012.outlook.office365.com (2603:10b6:903:33::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:27:54 +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 BY2FFO11FD007.mail.protection.outlook.com (10.1.14.128) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27:51 +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 w0IDRdIm028023; Thu, 18 Jan 2018 06:27:48 -0700 From: Hemant Agrawal To: CC: , , Date: Thu, 18 Jan 2018 18:56:28 +0530 Message-ID: <1516281992-6873-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556736814824; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(396003)(376002)(346002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(68736007)(16586007)(106466001)(356003)(51416003)(2351001)(508600001)(305945005)(2950100002)(6666003)(6916009)(26005)(5660300001)(59450400001)(77096007)(47776003)(76176011)(105606002)(2906002)(97736004)(53936002)(104016004)(48376002)(50466002)(85426001)(86362001)(36756003)(316002)(81156014)(81166006)(4326008)(8676002)(50226002)(54906003)(8936002)(296002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2700; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD007; 1:2vcNMnuccWbF+IT1FRvSxYCOJ2pLfdSeypQUAC7A5cmVxUu0YsKSnewJlyU6nsGM4cb8pCgrItIunv+QKOZrzom+AV915h2EGKKxJqFUg4eWhTfkpJvdnsAvY8J3l6kM MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f38c87b4-d0da-40ac-0ee8-08d55e774785 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2700; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700;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U2uLKEw5IN+g87Eq26QZNsp9Rb8tXzpNZ0a5sZa4Y9YtA+ATKaPmw4q7HhklPpMnkKYnvVVMLX9RQTfMyRwKncBFyYYEWnOVrCMLk/OT+y+2DpoEj2O+9+cOcXr1qYZZgqMUa7QQd7G2qhz52PLEwCHiuGH7UJZFl6/b0lDA21G8e9r9rMYbCNZJjTv2kLtsGZvON1XVYHdjgLSrodzkrySM4+BDsNW6bPMKLvuJW25OJ26ZRagUaYBUm1U1Y5Zr+lHiikOc 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)(10201501046)(3231023)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123561025)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(20161123559100)(20161123563025)(20161123556025)(201708071742011); SRVR:DM5PR03MB2700; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM5PR03MB2700; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2700; 23:PUTw6CkieLUBmEpTf8GMdTd4ARgjcH+kL45iTz7Pg?= ZV6UddqbY+sUp0Pnfo1LVuJQHp2glTYAtgn78LPutEfoNl/enDdE9xRLtaG8eG4lF4ohfrVGcM67C9P0LlVIuA2GVpeKw63PmM6GJDQxKKJBpdpj/ru5m32o/GJMS+PGjzAFo/TvLt5bxGysvHlHf37HeuZNLvvmZ+juZaRruPbNHDCI62Op+Tw6OEFfrzutMuO1tvZuRiVs0bySEVlsx2eXOOMenrKhcQeNxkuva4mSxCryNi27C0Mxp08mDp1qqXoJc4ad3x7FK0uNqe8KTCbNIaSSlkoudpvB/Hb3sVtnfzcsjlPN6v2oUZdh4IjCVNHr4xpvjXoIKrGMyl9roChrnss2OGxGtNmJfez8j+bohH1GPWVc6XVkh+yKmOrp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9oQ/WT6tj0f98NjB/l6RaYV5I7cZON3D1MX7h/tfzvOKEm+nHcI=; 5:SS93N1AI+pO6q3WwciTsZamI0J/zi51t9UDRKij+VSPePXCnP6am+cx0/YTzCagA+eK6jmGNAInbZLLstrsu7e3eF8qIlOi9lOGmWgPNPSM3cIb3v1190PPNzn2aitHEOnN9R3rVzj3iNu5kmCMIJ7cDMNMRtIvNz9fr2Z67YsU=; 24:JHfS2yKHkWMgGyrnJkCUpu4uuz49UbiA9rtrDELQb+YIttrcr6fkVN78fKVQU4Q19XlYTQw/6P9mvQI/aA4hTvP/2V1hQWJJ8yTyYak8kpU=; 7:s5ElCx110Pv1AQ5CQyVCD/g5xlHWKGTjmJquHZA3Xhj0tlv5wvj8Bu202J+r5vTrz3U5AA0KEncO2hEf+tWDi3gv8hAeSXI9u7Mu/CfHUeFgsOManjHP79FcUGbV85edgFgoUiHTO118RmS5yM54MVfYq9chCNZSRvvk9/irFInphoXK0TJwLDEoi62CTSuUQgLDBksn+Iwn7nG+rPacKGeLZQKjDaEmj7Fv7OB2r0Kj66I6tGV5mT7LWE/mpzLl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:51.7314 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f38c87b4-d0da-40ac-0ee8-08d55e774785 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: DM5PR03MB2700 Subject: [dpdk-dev] [PATCH v3 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 | 68 ++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.h | 87 ++++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 +++++ 5 files changed, 170 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..8e3a053 --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.c @@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2018 NXP + */ + +#include +#include +#include +#include +#include +#include + +static char *plat_mbuf_pool_ops_name; + +int +rte_mbuf_register_platform_mempool_ops(const char *ops_name) +{ + if (plat_mbuf_pool_ops_name == NULL) { + plat_mbuf_pool_ops_name = + rte_malloc(NULL, RTE_MEMPOOL_OPS_NAMESIZE, 0); + if (plat_mbuf_pool_ops_name == NULL) + return -ENOMEM; + strcpy((char *)plat_mbuf_pool_ops_name, ops_name); + return 0; + } else if (strcmp(plat_mbuf_pool_ops_name, ops_name) == 0) { + return 0; + } + + RTE_LOG(ERR, MBUF, + "%s is already registered as platform mbuf pool ops\n", + plat_mbuf_pool_ops_name); + return -EEXIST; +} + +const char * +rte_mbuf_platform_mempool_ops(void) +{ + return (const char *)plat_mbuf_pool_ops_name; +} + +void +rte_mbuf_set_user_mempool_ops(const char *ops_name) +{ + rte_eal_set_mbuf_user_mempool_ops(ops_name); +} + +const char * +rte_mbuf_user_mempool_ops(void) +{ + return rte_eal_mbuf_default_mempool_ops(); +} + +/* 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..8f6db54 --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.h @@ -0,0 +1,87 @@ +/* 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 + +/** + * Register 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 + * - 0: Success + * - -EEXIST: platform mempool is already registered. + * - -ENOMEM: no mempory to save ops name. + */ +int +rte_mbuf_register_platform_mempool_ops(const char *ops_name); + +/** + * Register 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 + */ +void +rte_mbuf_set_user_mempool_ops(const char *ops_name); + +/** + * 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); + +/** + * Get registered platform supported pool ops name for mbuf + * + * This function returns the platform supported mempool ops name. + * + * @return + * returns platform pool ops name. + */ +const char * +rte_mbuf_platform_mempool_ops(void); + +/** + * 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); + +#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..3d60046 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_register_platform_mempool_ops; + rte_mbuf_set_user_mempool_ops; + rte_mbuf_user_mempool_ops; + +} DPDK_16.11; From patchwork Thu Jan 18 13:26:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124956 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp125943lja; Thu, 18 Jan 2018 05:28:45 -0800 (PST) X-Google-Smtp-Source: ACJfBouFgt/dHUJ0EpRV8Rr/+OLdIPBOcurjzFBQ091B5iOKkWyrrd3znttXtE+9Uu2+fk9JhCnF X-Received: by 10.223.164.206 with SMTP id h14mr5979045wrb.229.1516282125207; Thu, 18 Jan 2018 05:28:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282125; cv=none; d=google.com; s=arc-20160816; b=s1q7/bj8cf7qqLvm3jxv6oFz40nYn1sqZIx0U1LI5c6RSHQXG9b8JEK1nT/vxdVHt7 jfMTyN7p9rUeBYcXJFPKD11BMA2M9aOBJimcxSOx6HUTcDZppRHVG7Sw47CXk85sHvBm q4tDOXwCEl/UZ5ZrzjZAyjKfCEYYy1/Y9ZaqnVAtrhLZWNbrlilAe7inB2z/NZ8Y0wT0 elt+pTZ0aILNeAA5CIU6p9aXoiTRCKGgfmKOvJ3+ghdIVXv0BoteyIDgOTN4vCiejX4M Mssub/Gp8nysV8k+7cbHgszrORDO01p/qQFnyYmijoXpDrGLq3ojvGjlNLJIEJr1X2gu CSXw== 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=GM4OJVAsrTH+59QZUlOxiPgUuTzOtvaJVXkguTkhWmk=; b=mpo+Ma2Bvr25rd/BBpXIL2PrgRUsJD/mIiAhwzog32KEQzur72Wt8W1ewQr1+tE7Wb duYfR1sXCvJzKAAOHm71dQU6Xd7mfnZ2RhTOVty5tYqG5xhgDIFxTgJhkYa6QmSgQVjG Peoo3K4JOd+YoaPKU3+TGPD3nWfhYIzovj/hbDXPmt6t+JmOx7GJqQT1dUv+D3YeL6OT X1+oJB1ak7HDA0IXP+2CB6HzQSex3OhEM/GiXUXnGqgfzpsuWd3j7/XT+yvfRZRS1pJa 2ElA7CJF7YJs34ewK1Shic7wqtSj8yzQzvQ0AZW262ke0PGvnOp+sCioCdxlVInXiub8 EAsQ== 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 19si2589714wmh.53.2018.01.18.05.28.45; Thu, 18 Jan 2018 05:28:45 -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 358571B2F1; Thu, 18 Jan 2018 14:28:05 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0082.outbound.protection.outlook.com [104.47.42.82]) by dpdk.org (Postfix) with ESMTP id 988BD1B2E5 for ; Thu, 18 Jan 2018 14:27:58 +0100 (CET) Received: from MWHPR03CA0051.namprd03.prod.outlook.com (10.174.173.168) by BN6PR03MB2691.namprd03.prod.outlook.com (10.173.144.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 13:27:56 +0000 Received: from BY2FFO11OLC008.protection.gbl (2a01:111:f400:7c0c::104) by MWHPR03CA0051.outlook.office365.com (2603:10b6:301:3b::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:27:56 +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 BY2FFO11OLC008.mail.protection.outlook.com (10.1.14.255) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27: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 w0IDRdIn028023; Thu, 18 Jan 2018 06:27:50 -0700 From: Hemant Agrawal To: CC: , , Date: Thu, 18 Jan 2018 18:56:29 +0530 Message-ID: <1516281992-6873-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556759969045; (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)(396003)(376002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(53936002)(97736004)(2351001)(356003)(48376002)(305945005)(105606002)(5660300001)(106466001)(50466002)(4326008)(86362001)(8936002)(50226002)(8676002)(81156014)(81166006)(68736007)(498600001)(6666003)(6916009)(2950100002)(85426001)(54906003)(316002)(296002)(16586007)(47776003)(51416003)(76176011)(2906002)(104016004)(36756003)(77096007)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2691; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC008; 1:SePTPyGEcaXKr9eWbWeBqGpkyl0HNwI6FIYrCDtegc4cb16alCCfhCl8EajJViFYRBXJE7xAu/pDYDPHRz9gCJJ2TYhrIbqwiQ1bQyShHPS5ZNOYasGUsdbSASejsUub MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e25b32d-44f7-478e-5d15-08d55e7748e6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2691; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 3:Yyew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onbwT0bKcxSzUmUexs35r/wV1aO7j9NysEWsgcenrzHjdCFwfvyY2ciBWLXPTfmnsbfAD5SsxIZWRfSKbc/YS5mex5OMNYM7X2FybK6dp2BfTk024HTIFz43reKfG5kOf2Ei61a0MfRZq65d/xMi7rHhi1eqawcqaCnpfHXQ1Gl1Va7d3ofu1pee1bewS4Lo4hQderbONzZXweQmuDdQyHyiFb1FyMME9Y5l8Ebe93kZ94Q1HPBFyreU4R9k2VcTWYBdrBVuzNFBKJFXbM8dgPEmagesNIM9aNiEphKw5Yod84LRgt4GqPQFQ= 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)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(2400062)(944501161)(10201501046)(6055026)(6096035)(20161123559100)(20161123556025)(20161123563025)(20161123561025)(20161123565025)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703151042153)(201708071742011); SRVR:BN6PR03MB2691; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2691; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2691; 23:KUd05Q9RIr6QHQROX5hBrqFC9CiowCiVfjNRiJgmC?= Rgc2nWrbDeYPCcpPADCcsmo6VpjU7HEgry6+sJFWprBQumsNfg38c4RBQuHZmFimfF7aDvT3ty1ORgqeO7FeBFoNlSgsCbqpxCZn4QAHvPs4U9aNaD1Dgn6SQUR22Cjgnki3U0WO1yQVf3Ma9V0iZlhK9Xkoti06Bj7WjLW8YTxJ7txnF/PYqpTeidC/Zc7ZtCmE2PKXU2TIOXRgIogUfdHid9b0jDKFJBzD+ywbQdKCjTR7Vg3WUmNJ469Mgxafjqn9Vo4unxil9xjJg/o6OSR3F5lHiLRHBVU/rNhqTJn0lHOF7db30AJf7JoA83Tl298jMbB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3fM3aGLLDNGEQ1N5K4HP89GEYvpXGIKUzPEs=; 5:PPxV9pYpAHKvx7jhmL5WjJyAtASzI91agyenqKCRYWzMKNKruntmvxjO+OmCw1S7LqsPNTTsLwuUC03hHVH+aI42N/L1eHH9LFenU+5Y/COaGUKcvEnh1llMdDJMsIhiW6zuJx/I7a4SOnrZ+GTA/155LV/QhYHhhOlSWsTDeho=; 24:GB7LB69fBpzHKC4v/ljwBgKWnlwZEwtKYAgusaJ3V0wZmBNsGlO/7VY3zVUTXRcrGO7Q78nn8VuL0ELv34TwSy1BZNg/sABL+0Mka5QMDgc=; 7:FsiELKqk9A4eGY2vpDR7hc1Z32HjRi1aO3aw9/ITX7PKDeBIg89gUsfpvagf/LfWFx5J4ALCVtZmXOHo15CttIVKdY41fopZnJ89a2bq4H25DaB588X8KzyyhmEwbGvTb7OVhDaDslD8uDR/qpSooZlOUrjeMHGPXrPotFIUTgRwNLYS7+zdyzuJN8yCv/ndS34z5vS4xFQiTFH89IGEi97Kz9IM5e2B0UVE5BG/Expi04lHMmQOnDq+dNswslcY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:54.0625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e25b32d-44f7-478e-5d15-08d55e7748e6 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: BN6PR03MB2691 Subject: [dpdk-dev] [PATCH v3 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 a827e6e..4fee7e9 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1089,6 +1089,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 Thu Jan 18 13:26:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124957 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp126015lja; Thu, 18 Jan 2018 05:28:59 -0800 (PST) X-Google-Smtp-Source: ACJfBotCiECyOMypuXONvGpNXpqxr1rknB7apFQH2YuYxelqdfeX0F88XBmS9fRpGTy5Lj+Ok0Pc X-Received: by 10.28.29.130 with SMTP id d124mr5674833wmd.139.1516282139133; Thu, 18 Jan 2018 05:28:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282139; cv=none; d=google.com; s=arc-20160816; b=T9SQ/q5574+siO/XDLksObMNMgAXoy/WorPFHoDK+6IKo+GGqmal/mfUlLFobjzpx+ 85jPSItJghCp9wXhbwxL4HuuiGkn6V8IpqSuu0NuythoGj6Bdy8DxZZZS6coesQ+pcLs L8RKCMjcgwkMG1HXdwM4jGeidkekJS2omvveSY8SqxDW7v5ndSnpDhsVOXX8/MNNGbf4 +zN12V/7Otrl6S+AlEsP4WrQBjyEUShwaJVMziM0UQm8XotlcqA851mqMFAihiDCxrLc /jPWJjxuMfl77+/yu7/3Ek20JEc0kylSwagqIp+CmH8jdrMcI7j2X9G6v+lBujvSPTiR HvMA== 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=VDnqYiD26gGFGpVl1zqtI4EOZpNaZOAn4sZJLcbK0LY=; b=rdpPGN/iW6Fj+OpyabrSR8fvgKoVUQc/yg12pCxqkrJQPpN6+AxzR/Toog/R4KH5eH 6JsDSPwgGEoZ+d/QezJfXQsH90wbK8L2XnvJ0+8GtywXlR7vgqZHgShwcrsMUNtjzRWV UMyTJ4zdb8lX1ZeEAITTILjNVtuxjdds/1Upv5zhHo1W1+qvPR1Kywb99Nw8Esp4TJYA ZIYVxgl8ruI9H4s8Y7HhiAibr/6PtKV5lArBhjxFcg6bRVj5q9GO3g3OKAvIReVmfyuy tVwUc9fAAwQMFvombFMGmVM0N86LNth7Ulnj6Qf9gSEYKHktIXOWooymZhCnN4lqASon 6Odg== 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 w32si6406570wrb.20.2018.01.18.05.28.58; Thu, 18 Jan 2018 05:28:59 -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 384ED1B2E0; Thu, 18 Jan 2018 14:28:08 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0061.outbound.protection.outlook.com [104.47.34.61]) by dpdk.org (Postfix) with ESMTP id 1776F1B2F5 for ; Thu, 18 Jan 2018 14:28:00 +0100 (CET) Received: from CY4PR03CA0083.namprd03.prod.outlook.com (10.171.242.152) by DM5PR03MB2698.namprd03.prod.outlook.com (10.168.197.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 13:27:59 +0000 Received: from BN1BFFO11FD009.protection.gbl (2a01:111:f400:7c10::1:113) by CY4PR03CA0083.outlook.office365.com (2603:10b6:910:4d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:27:59 +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 BN1BFFO11FD009.mail.protection.outlook.com (10.58.144.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27:56 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0IDRdIo028023; Thu, 18 Jan 2018 06:27:53 -0700 From: Hemant Agrawal To: CC: , , , Pavan Nikhilesh Date: Thu, 18 Jan 2018 18:56:30 +0530 Message-ID: <1516281992-6873-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556787424016; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(376002)(39380400002)(39860400002)(396003)(346002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(8936002)(50226002)(68736007)(5660300001)(47776003)(85426001)(26005)(316002)(16586007)(6666003)(53936002)(77096007)(97736004)(54906003)(296002)(104016004)(86362001)(51416003)(508600001)(106466001)(81156014)(76176011)(36756003)(81166006)(8676002)(6916009)(2950100002)(105606002)(50466002)(2351001)(356003)(48376002)(305945005)(4326008)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2698; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD009; 1:uHeB0QWj3gqSyCIWUdtkoUZAvfM4jXD795c3rf6ZCPBikOcwug9gosrrvmyTf5yIKAV1yD4eYxW3wd2DzG2VQzyhw++w20r3sI1aLNgJR76odcJiw8YpyZfU8TqhC+Of MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7850f2f-849e-40d6-4b10-08d55e774a89 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2698; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 3:Z0LBmobfArzoHNcUdVfELiSkJgds+CX84N+hqKvJ6QlnSr+1+UEkT3DhZLsFNzO8MbXxLaem36LsFyrXt2idLMTIz8ZdbfWUdk4nfSYCwNS9g7Ue1hqgI9l4AolUQxpPLpm+gnjGKNqaTO6BrsHD8j8Mq10yv7/pA4DIKR7qLImV8EWIBBIRTGGunrXAJDu7EQG16BGgrs8neNkiguyIPYT/iSPIsi8Xj8BqOD/YqbhUd/BuUBLIAIEQxR24ZKXpxKJp02sgMCb3JOma3gNYdiDlh0foUhvwG/sgQ0oHmNqar3Tn1C9LO1G6E9XDf8TTR/ma8xf9xbrm7ncIKtv8xObg0ddYMsiowqw/yiV4+vk=; 25:3KyU5eZ3EBaZd7GTSiZSblDzhYMvT0ixNXNQOedKrFaepnvux9BiOjaNEXhcILSJdawUATtyQNynExrnF3hHiHAAO1eu1CKHOdA6qCrkXtFoanQrRch4yKX2iNpcwuEVtzUGVPl9i+KNCfYGubpcHrp8/I8r/vxuGiMrjhmVpLdpbpo+x8VG2rbDzgZf2HLHqQp8LxHbFDwhpWRvjDrVZOCh2BB1HutbtF6UaP8pWFb+lsJV3Le1t5uCTbW5ubvqqtIzT3NiS1f38eYNh64PUFO7wYsqfy9POHQThYlqrU4Uo9xyqOb12oPFQmAPJp/+cd0sVJjYvDFf+IHCqjaGsw== X-MS-TrafficTypeDiagnostic: DM5PR03MB2698: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2698; 31:NYDPHe1qEUbVO6XWe0lAEHvQqrFYLVMy2rsbF2PWxQXnndEs9tRJ9J8r3XMZ9RW+eJCJa4gTBW8MpOWFYoEL5Z/LiOpQshb8l8L7tMD7jtFGnkLxyStto48ndstGkbLm+igmbSpe48XUYRCl+6ejWzZSDQXxcpu75QcDxghwUHJ6c9pi2ttvXC6tzGFLoczAdQRmqjLx6gThy6myAyUllTPkZnxiD47XsBXZcK253m0=; 4:3+YpBFekAN1kOLv7nCQYlKwJc0pXHMhjxLjYOXedp2oGBsy6cx77ooogetEhHFLAc3UGueVbx1zi4ucfcBNz3MNE7OIM1qgYGM9nQQuhH0ciaDyVWbZf2o3wcB2ju14FsRnEvFUAOAEJ6Z81iVe77KCTdZd8g0iwlVvKbXsEGNxpgFrkPjMinhRD0XJNzbpsIXOcaUE9BuT9DY6KIZAJBDbnmMUnj7u8iwZWYIjRh3gisQAu3Ui0bVuvqTGehXm6HmhRgMNns2rXM0m/KBF6gg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(2400061)(944501161)(10201501046)(6055026)(6096035)(20161123561025)(20161123556025)(20161123563025)(20161123565025)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(20161123559100)(201708071742011); SRVR:DM5PR03MB2698; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM5PR03MB2698; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2698; 23:dTSd5FP8XUjN+pGrTapOdBEqO+3+IFukxsE7J2vOV?= 9kEyseQItEGHbT8uffYQ5RBrSK05rjO2m8+3tBu1DBwvBhgwXONRa0MPKlQoAFbFbIZBBlmpdtBIlmPGE6EKTyUUab4dpEQbzMjuTCpwNAiNEVjzDkR6jHF0jzSQ0lU88qRq41D3HDyPDRmHLCI1O8vBDCHKHpjduwNzPmt1oxEUkQwKhL2pudh7FUYTFL+CxEI9iB2O2B7YcnYY6HI9Uz0QyArfzmLM2xqBKy4UpK4iiw95qZFJvdz5WX8XGyxXFUNykSfamr6OVShPNp8stRCHmoIlBg9ySq+RJxbnychkWW3VCCYUuGQe20zGOongg551/1nDA4VuS3nenZ1zkugnY7sgBVM71c3NY4GLYf3A+tj1Fpe80X07AbuwfjYbALV92l25n9Y2Is3LTo2RcuZbSc1QVRP9Y0RmZFDHQbhOBJv7lKhj8bE/BY8uPI2oZPJC+cJc86aoGDuPY/8yOujXCyh1SPFn0fingvWhrv0djVCbdGTCX9gqlZ5z9ejbuF2f+9vpYtM8KklOFKjvwplhx5sz3SThS0KeX/YH9n9A0I4OVVc3H3gALCCq5uirrSidRSgr89Ax0p7eIzseFaMSGHtlfbuZy3nEtz8Rk7ksYU1GeaB3xyW/NejIqP+yhMJWinHQ4864CzOJi0e/AlHkd5pwG8u3Osi4pHshBXRNzR51lafoZuwoVbrCwVSQypNiolRNubYWnXqFgN0GR8PjSjNBIJrqPyrt/osl32HvaOjZ28GixQPcP4XOBWGUBibnZkV7bFmghQjefNnVPm9WT+yK9m+TDvmuAe9L5HSs1QpJDViDixxiJA+yfwi8qrMbmkmCDq1hbJhW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FPXCyRri6fQf1kyKbxTdzz5VVBpV6mZPJcwfpLiMpqMKeQUH6qxoC0+sSjcyf/UuV2YAsTdleALG0YKO8t0LlLzSNUVB0qlXoYeQse SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:56.4663 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e7850f2f-849e-40d6-4b10-08d55e774a89 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: DM5PR03MB2698 Subject: [dpdk-dev] [PATCH v3 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 --- 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..34e07c1 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() */ + RTE_LOG(INFO, USER1, "preferred mempool ops %s selected\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 Thu Jan 18 13:26:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124958 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp126076lja; Thu, 18 Jan 2018 05:29:12 -0800 (PST) X-Google-Smtp-Source: ACJfBosS8GnPqFgeEwqSsMaz9y0FwnchmgKV95LdgHJJPcVinMTNU7fcZLz1DYhPbgNVFWs6+6Qi X-Received: by 10.223.156.132 with SMTP id d4mr5956059wre.104.1516282152264; Thu, 18 Jan 2018 05:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282152; cv=none; d=google.com; s=arc-20160816; b=fD94P33L/xyHbCOp0/ANlOvbpTn5qtt0WfjB7Ycxn8vSDo1a2JRL3khIqEKjVsh8Yk j0yp6vxEDFJmYnlVBHtM1WHcqn5Rrb+aeN/anMp8xOXJMaJF0K/CN1JofmaZocBru/pp dOSvemfHwa8xGX4mCTDpLrUh+01Oby+M8+hVKpKVxdD3BGU3YzuM/nAkQOJNMIGVBAMK FXWDgXvkhU03Qz/1xAKHKg+Qhr9qDjsJIjTaxUu1zJJwEoE+a0Eb56AmdvCik/ksRKMi lPpRTtWowPzE9MYsy8g7ROC8qZmJgv/lUxeU/xL6E9d1dHMXu6qT5kvE9dy1LVXvDW01 1MVQ== 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=kMp5AJaQKyv3Rj6Sg/Bu/DT+ZjFT9LacwXno9wMV0J8=; b=UzY5Ji0lULH8elwkP7QD+cPgjbqfEleYEABgIMMzhss/uB+9/W/zZ65O6NM2ZkP+i8 iO42oelY7/ukcsFkWIcAoas25sCaI0P9LsbDUCADiQc/dvI090sTRZZxJwyy5BnR2qIl T9fEQbJZXGqE3q6dO4T8AnwVH+nsLwKQjPH/MWJPYrSuV5JRM4XjTkosR5JAbvo+K4l8 eATNBzJioRIDdXd3xQgaty30kPMeLNJhjbhX/Z7/kTeOk8OQdg/mnzoURKM1AsFCUgXY fpARAJyY41qKq9H6wNWPZUzQyfzykl+mdU+lHacGp+G2f13fvIvbdC4oUYCMql5ejaZL w7iw== 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 r124si5523276wmb.84.2018.01.18.05.29.12; Thu, 18 Jan 2018 05:29:12 -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 22CA21B2FF; Thu, 18 Jan 2018 14:28:09 +0100 (CET) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0069.outbound.protection.outlook.com [104.47.32.69]) by dpdk.org (Postfix) with ESMTP id 386F31B2C2 for ; Thu, 18 Jan 2018 14:28:02 +0100 (CET) Received: from CY4PR03CA0078.namprd03.prod.outlook.com (10.171.242.147) 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; Thu, 18 Jan 2018 13:28:01 +0000 Received: from BY2FFO11FD016.protection.gbl (2a01:111:f400:7c0c::154) by CY4PR03CA0078.outlook.office365.com (2603:10b6:910:4d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:28:01 +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 BY2FFO11FD016.mail.protection.outlook.com (10.1.14.148) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27:58 +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 w0IDRdIp028023; Thu, 18 Jan 2018 06:27:56 -0700 From: Hemant Agrawal To: CC: , , Date: Thu, 18 Jan 2018 18:56:31 +0530 Message-ID: <1516281992-6873-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556807916811; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(7966004)(376002)(39380400002)(39860400002)(396003)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(296002)(8676002)(6666003)(36756003)(2906002)(76176011)(53936002)(4326008)(51416003)(508600001)(2950100002)(8936002)(105606002)(106466001)(6916009)(316002)(81166006)(77096007)(68736007)(5660300001)(2351001)(81156014)(50226002)(50466002)(97736004)(47776003)(104016004)(48376002)(86362001)(356003)(16586007)(54906003)(305945005)(59450400001)(26005)(85426001)(575784001)(969003)(989001)(999001)(1009001)(1019001); 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; BY2FFO11FD016; 1:Ny6/BLRXvgYnKb0/wJFGiE9xsEEoaAab8zNC8HPsgQBJBbFCPksMGu9TaDvyuSBslQeFjSUtPe7jRIY9qsHahAybaMkr6LkRNG5l57jBXusTWqdmHdcI+egxegbLwFe3 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4023d2f2-8e26-4551-fd0b-08d55e774bc1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 3:3DTFdWMrMoRsxdb4JvXomiMvNrzIgG6a8DY4Mrw2LN8ZeRJEX4nFvzXrj9XTH6JSJyATiuyMcA4zJOkYG78FpSQDQjH45dbnQWyTOq1kh7K81/Q0XLShc6rg/NNkktnD6fJLgtajM1XcKWmQfVDm4+rXiM/0X7i8Je6PULNmO5I0Nr3j/YYlhB+OEyLpIGwilsgvWg6VATOoZClZBJPwPlkyB/pFuixHItVs5asmkNDzEY+glZCJJBnlqdc7xWyy+pb5RSUzwmB3faaeSTKjd40elvZwkhHbGvUQ0qFmN8/xM0JD1AYmJ8A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X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(2400062)(944501161)(10201501046)(6055026)(6096035)(20161123556025)(20161123565025)(20161123563025)(20161123559100)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(20161123561025)(201708071742011); SRVR:BN3PR03MB2355; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2355; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2355; 23:3KWI5Scalsf65zGkH93XXNTtkvYVK3+4JxO9tftfA?= BXpduAkWBWQQc+74pmOaONmltp6fr3Ds/XqxNvl786CoAFOfHsaRgG9lbERhiFQQLPBQjHBKzP3ZLMU/JLHs+K8qctbn4dWJ6c4dHZ5cNtAL3V0A4NPJ7TUhYR3+hVQknzuzIuKsmpFfjIDiEQcf/LOQxxHDCBwXbzQIqM+6xj3y4uMESYmFJ7u/c6SbipnEJcnPCM84DVVJxWNTvTn6RpJF5qnllj9C8GjnMm8Lvf3CHqSbcaNYqAs/biP9M7u737cCOm+KdgQ0WumtaVHa6G82thBjNTGO1O7jLrvGdqjuFKP4kzYMTR+wVhKHk654RBu3gdPQYbDCV4/k7ABPoi2AnFvDK83xK9Y3f8E5AqoNL06LYJrNOjwBpbB+ofln+HrUQ9XAFLGrfACtC3tAPqRaVxmq7W/CcNBd9l9spO9XvEYiu8ewZDuwimUbPOEIlyolxSDHx0Sxgjp+mMqGf/7m1hsXRa4etuw4RCYk51UQy/r6KVK7x6vs7H3vDh9+elTbv/jyuxsNZEFh1cNGRQRlQRgQe8GPlz8D71GZoAMfnymThTSVJGtLOVjPi5IIUfys3IB2ZoGqjN095cfEaAi9ugJf+uCVLXVRitvBeFVapgHgfYaFFoWhDHCF4F9HmOLklEnckX8RE3ktX9Rcu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+B2TtW7mVMXc/QMqSOLj4IZpf/Q+14FLpcehxpyv2BNuhnIWay8hoiuRf0fTUjMIQ=; 24:fH6gsZguDklX9yy8KjlPoka5Uh3n7RNAkuuSrOyE10twEzljweU1z5AgI/gGowwiAVHd8TSaSBC1tzjGo51yyDwgJO+4aM8O3+bpHzfHnco=; 7:7vuSvjdodi6qwtxG1lzXAJ4kNDu9Ev1CZxq5C808OdSqC8IJJqr26bTEtSJ6xNU+h3fH3SuEaB9egw5dMfJMtuarsivsMjngW7x/QD5qqu7BNoD7pgkTpBrzGDndnBkR12WpwOisaiknx4Jaxdn4XqMpJ7krsoHmJXQviDGMK1vsfGSycvB/0GpcMUMQFkPjkUe5AMddbItyw3ysG8hlqEuBWAvB+1gFdtcjnGwP44uQUVmZYiwylhVPK9Oejpzr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:58.8416 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4023d2f2-8e26-4551-fd0b-08d55e774bc1 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 v3 6/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..70f8470 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_register_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, From patchwork Thu Jan 18 13:26:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124959 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp126165lja; Thu, 18 Jan 2018 05:29:25 -0800 (PST) X-Google-Smtp-Source: ACJfBouc5scH9DjLbiSIR0wnqRDxIeDqZPWE4hkNULhDkDWOwWvvr915qZ3ZV33Cyj+q4GyJ2QhG X-Received: by 10.223.184.197 with SMTP id c5mr6212858wrg.105.1516282165065; Thu, 18 Jan 2018 05:29:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282165; cv=none; d=google.com; s=arc-20160816; b=fI6KtVuT6hOFOXilvsokCV69f40a0GTiSQsqaNFClndM6ASeDyDb7SzNYSOBThaMaJ 2rFnyShhqRakKGbSXWcEge9X3jj3UE1SELlHxztRrAyBOOHl/L9hPh2R1k06kRPNGU0f uNv3MUedTXHC8H9SK1SupEsVwWZioVLJ37JjheicQv5iRA8Nx0ClsOKMNDSU4A75nvxa 9tvH/Xi/vQpf+wdbyzB6wnf8q+wE0bXtsGh6Tz1RUBi1XZFkuAEepNDhMJif7a2ZQ+eb GTHqjJDQpjPv5DjWzI5wLP38CC7YO/wWzbVoxEGaIAU7r6fKXmxQIcWkVSp9Rx438mAi 8e/w== 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=+4e3Yc3rL2v/6eBnERocHlGX1qw8l1US12SA9nyldz0=; b=Zva7RxFmQS8u+Ao2BHLkVFEXQhm5NF/mDJ+8JnLCGnaLpsZLjD9YOI/+MubIWNqc3f ONmLJhtH2BgUrWzCI0Qtg0XkpC5t//WAXBdIO5ZRTzZoVgOTz5ga1Dgr68cmfND9oQPi t9DaTg2yAKsV3aJpf3THGMj1v7jM/qrAu136Ni5w4Fin5vxoelZyCPofT1mj9yd3KTzs X8nc+Zp/lXN387z1psdt/Q1TQWHjr6u3xzLzukYNF4UiO0r/snbLdLNwXgp4c1yGeMLU wBxul3zZvyrVFccqu/HIqOPhBVIFbYYKV2fztQYhlDeJa4+4PSzfW8QXoM8/GZyAqnCL jVOg== 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 t12si6607712wra.453.2018.01.18.05.29.24; Thu, 18 Jan 2018 05:29:25 -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 3F10C1B305; Thu, 18 Jan 2018 14:28:10 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0086.outbound.protection.outlook.com [104.47.40.86]) by dpdk.org (Postfix) with ESMTP id D80F81B2D8 for ; Thu, 18 Jan 2018 14:28:02 +0100 (CET) Received: from CY1PR03CA0025.namprd03.prod.outlook.com (10.174.128.35) by BN3PR03MB2353.namprd03.prod.outlook.com (10.166.74.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 13:28:01 +0000 Received: from BN1BFFO11FD036.protection.gbl (2a01:111:f400:7c10::1:180) by CY1PR03CA0025.outlook.office365.com (2603:10b6:600::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Thu, 18 Jan 2018 13:28:01 +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 BN1BFFO11FD036.mail.protection.outlook.com (10.58.144.99) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:28:01 +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 w0IDRdIq028023; Thu, 18 Jan 2018 06:27:58 -0700 From: Hemant Agrawal To: CC: , , Date: Thu, 18 Jan 2018 18:56:32 +0530 Message-ID: <1516281992-6873-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556812069082; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(396003)(346002)(39860400002)(39380400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(50226002)(8936002)(76176011)(86362001)(104016004)(97736004)(2906002)(68736007)(85426001)(77096007)(26005)(16586007)(296002)(2950100002)(5660300001)(54906003)(53936002)(6666003)(8676002)(81166006)(81156014)(51416003)(508600001)(6916009)(4326008)(36756003)(50466002)(316002)(356003)(305945005)(106466001)(2351001)(48376002)(105606002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2353; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD036; 1:jZa/SpKp/JfLt05X/4RkZ1hlwDN76YFhf1bfXh26VayDv705UHKHsgGk8qBGimIFo6lCwJ6CwQkRCT/DX1AWFO9ZLrbsVGScrwLaVPyqEkhrpyPm8r0jguUC/7sn8bMR MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8a6bf03-1b79-4bcd-58da-08d55e774c01 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2353; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2353; 3:mFBxyIILS3Gn14fQxt/M0+cWNXQIKr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5+7KS93SUJEyJWTXrJkgWdGB+SRlKKPis1J1tDgTxw+dOS5gWG8zxWa2g1u08YxqhLkpgOJd+OSRynXKEOOsuRiCGkPG+L8sEYj4kjJN7SGw8b/rRrjtb3UUbFcTFJMEsB+bQB5obSp5ujW1eR2kcYxQWXtfXqq2EGBdaUM4ZiYwl9rpCi1G9IWvyozKFJrt62OZtfO15n0BUqauCz9qeWpE6Pp6QSTIXqaViiXcJiaTxPe 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)(2400062)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123556025)(20161123565025)(20161123561025)(20161123559100)(201703131430075)(201703131520075)(201703131441075)(201703131448075)(201703131433075)(201708071742011); SRVR:BN3PR03MB2353; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2353; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2353; 23:gd7IkBIr5gnc6r6OY38P0GGIgu/evyi/n1fbrEIsh?= EgnFoZwgGJD7JD8FYtNuY+Bi1Fz0mkT477qB3nLlVbmNr87YJmzup/vkcXatvFN2gCauAiCsNpS7vL2WaTeo6yZkpKNYJNA3lwT0Ll4O1/EYrUNvmRUA6l2S5rGoFqXyzg58eSr0YwA30fMJnWgakAYfBH0w8QHDJRqpQ+k7AaSql3hA4a7RI3D4GJzmyrxB3yGU0qFCdVDdlNTll/JZDsu2wWPTYDF/TtHRIYtXxtVZaH0P1d08uPPemMvSquPSg3gJWs2xSB7GqzdbRaGqPric4Q9hC44vTdHwLJVMHoJWDwhXcRoPrbDkiOypvb+cIx4BMUBQ6V++UF1gMKoGbka231Ou8Qtutracvrrosq7AgyjY/MiNaiCPbOYtDQ8nrILmB/HecptSWWJP2yrA0jE0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OzCoktrnpjP2zXZ4kCHTGDkO7yOahWZARcJMRvLdKqkhmP5IdXeKMeQeSggKsczkHCLE+kpr9roLNuSHIJC+2TNEKxkRLf/7dbJleAsi6v61xoeO7FHcyyrrGoDkHgvIMV4mfF/LUkRejcdKJg=; 24:j7I+1ohPP+XNLDbjjviO2t9/Cr5y228Q5Y1lAQfvWIaB5Bml0/81X/Pn19KgbgH0WMdQBJcrHjj13W6IUVT0Oo4IEEJENzPA03Jqv+CopW8=; 7:XGM6MBU34hHaYmPtFNFEXJcyMAh92BuchLoG5Fx+w74CxeRLvF3X7Sg8RbDG+yGPi3byoI0B9Tv3wq4TisYUzC55nJJXErXDV/1tyrHb330N8VXB9Ty2xvW+gBHgeqDe8mSo2qnjO7hAJeA6h8JzbvpbeK90QtNIR+f/PB9coQyZVWVY9kq5dhb0u1rXaRKJFvcrsLYq07U8i8nKlKRcB1UfvPkHSJA8sG7TdWOy7vhA+FZjtizOvibUePdEEWmT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:28:01.0354 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8a6bf03-1b79-4bcd-58da-08d55e774c01 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: BN3PR03MB2353 Subject: [dpdk-dev] [PATCH v3 7/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..4cec726 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_register_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 ffb81c2..0e8159a 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -247,7 +247,7 @@ dpaa_mbuf_get_count(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,