From patchwork Sat Jan 20 06:15:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125241 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp175030ljf; Fri, 19 Jan 2018 23:25:47 -0800 (PST) X-Google-Smtp-Source: AH8x227Ux8ncry+hpV1E9FSGonxUNNv/Z75brZPaL6mNt98xxd5AqkhJLuIpt/82a13Wn0xOhgdE X-Received: by 10.28.47.73 with SMTP id v70mr557632wmv.41.1516433147938; Fri, 19 Jan 2018 23:25:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433147; cv=none; d=google.com; s=arc-20160816; b=hfwwSXkaCD7Zo4NdRFHs52QN0NVKVtkwaI6ZUhaWi7OU/uDuAHezBKzJE7xI+qO2/u hdEnTf5TTD9q3PUKUIPVjhdVi8sxs364TtqoBNqDVBUxdybZM3g4e2+GOJTn0iDwRNLn a8qxQXomI+mdLx0J7alzrdLKARViTVI06ZJsoysM/azIyBBQtp1qa7d3OvODPJYy1VPk /sagDYm6ijAGMg6NWJMhx6nX7cHXgqISHa702gAm24MktZmkN8Q/PKYBr/P+Xae0neXr OePRaTNFe5/pYnYi9AxJ9E+sO1bR8GaXvjLsHJVzORQVr+WDhvZGPvZjtBD7alKQ4qQl LF0Q== 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=kvp5EJV25p0JqOW0CfO38BoZRI1qkUwN6uwCeW/+fbvFluZcfUpCc+fp70w3p4Gf11 ZSyPkYL6so+OH8Yn/dG85mxyq9s1Av2Ztlw7dY5ByZlM0YgrBElyPc+B4F14e3+Z0XgB qCG0Y7m0c6n9nfkM19RBodjQ+nApt7N1rAaM9ME49pYw+N8mb2cd8GT4lKAaLeqIxEzu IIPhs/cWZlW2bN6IysGyejA/iOJ2HWKPOvMaSzI8W0DICuqvkNhHNR/to1hWzJaNK/zx raB3dtPsX5jcnaTA0Qaiv2O8NqZxv9/RdIpS1gw4c21ateMyyBys/enXRkVg6bKxMKtB bfSQ== 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 63si2028085wmh.107.2018.01.19.23.25.47; Fri, 19 Jan 2018 23:25:47 -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 02B291B2A3; Sat, 20 Jan 2018 08:25:17 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0055.outbound.protection.outlook.com [104.47.38.55]) by dpdk.org (Postfix) with ESMTP id 812901B1D0 for ; Sat, 20 Jan 2018 08:25:05 +0100 (CET) Received: from BN3PR03CA0068.namprd03.prod.outlook.com (10.167.1.156) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 07:25:04 +0000 Received: from BY2FFO11FD041.protection.gbl (2a01:111:f400:7c0c::173) by BN3PR03CA0068.outlook.office365.com (2a01:111:e400:7a4d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Sat, 20 Jan 2018 07:25:03 +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 BY2FFO11FD041.mail.protection.outlook.com (10.1.14.226) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:25:00 +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 w0K6GGgd024888; Fri, 19 Jan 2018 23:16:19 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:02 +0530 Message-ID: <1516428908-5430-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609067026392450; (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)(39860400002)(376002)(396003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(85426001)(4326008)(107886003)(8936002)(5660300001)(97736004)(336011)(47776003)(77096007)(16586007)(54906003)(86362001)(316002)(36756003)(26005)(53936002)(305945005)(106466001)(105606002)(50226002)(2351001)(76176011)(51416003)(8676002)(508600001)(81166006)(2950100002)(81156014)(50466002)(2906002)(68736007)(6666003)(356003)(48376002)(104016004)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD041; 1:59jTHHaJlptqoQ6B99pV0G7wtF8HbW34hF1pyma7Vwq8AaKmnfbf+NmRbL9IL8dptPiAW9qXAUWgz8grpBrfFwkQaNr2LMPJ3I+mopFZsaELGhE8cR8gTxq+SU5SQaFw MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00aa075d-d9e3-48fd-c422-08d55fd6ebc8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:VHMDPnaTswBWMIDB10halWPirD3PNkeZVgWC9y4qNr82Vh7xwvkGCe1qRxvgPIT3Z84+2Nw6r0HSHcOpZI040rOab5FOCk20O+9GOVljVIPVOeURmC1RZd+GVQEpQ/33yeI4oSi2sD7F/HoJn8d6gyiNOKmPRNi4MlIRmX7xeT9sx1bvlpjFA3pCiH+Lfj8NNBzXZwKMJ4ym2zGNRjfigKQ5fnogYho0SvL7KP24wS6fFlrfWjeyfAC1tHs8U6leC1f4HmUIVG7vqzBIY8X11C6fN7992L61jlZZ/oe90yE+6Z77gmSdUd3+vPQZ3kY2RfJh8P3TQUGbEShcvq/k7KnN+Qv0JEKtvLRcaw8YnMc=; 25:EvqHcljf68RrR8CnE1WtZ57EPgJUQmdamOknN6IcAC5CXBhF9NHXqFDGuttIeKnw/xWQMMqq6W9JIBQaFLzLvGUAOwgp+Fi6fkdht9aQ5CKnaymYw6hDj1ymjtFBcVPJAPGiqJEWHw70E6S05P47AFSirDCEiWVeDjl4jw+WOCIwDdafWjuVk5By1hu0aqcs8MrjT75qniFKrcKw83u0GIuTI7OTLSvMXM/OCqJaYnWSo5nAsnUQAwSYFn3ls9fAJgy+PNnNMaR2jXL+pQz6ioqrdpzHvdDYKEIOmikUYs1y/HwvU90rfL4dINsSwkES+njSUG7Q0X7Tf03lEtXwEw== X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 31:EYeDNCHhtWWZAfaAW6w2vOqzvy9DEOBtYKmRGZEQ7qIU2muk2DR7c5QN8CQ29Rt8WjychefVyWDmEGHgRxVOJOhRU5RMePjaDI1/D8yjTFreZp5nISdu64TImumkkYPeijqP0upb49M7QNTY1Xhp2ojEetu8Lj/fhz6EBwlDq3ojs23aUp7ufsZjsjWDRcjISzp5l8L4oLmqAK93gA9yW6e5V4Y+blaIqmh/hwVjc2s=; 4:gMeQ8Aw90HOkAJ0zOvAXktZXxkGyQ5wFrb1YbP477ALPKgXjm3BglDs20TVKbbLbaHoQ9u2toIH7hFNivFJpcILnF53ip2S2McaWRw+g2u0b/rQw0CoP4urhDZabzWATs6sEe38v1glVQzgqc2LY2W6gUymdXz+RoBi9KtvTXFD7NU91N8i9h7UcfuUMLTqOr825MuJYFEsouFNkTJGJ2antA6qlBr9iU/oeOP8Azfu776AAW1SopgjAjcE3GA26UNSgVcYhP+Xgz6XDDqFHeR5w2ji8C/FsPw4jdu7WLUzkHvMlWmJMj2kbDfiafn7G 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)(2400081)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(20161123559100)(20161123556025)(20161123563025)(20161123561025)(201708071742011); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2696; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2696; 23:Q/gusAUJJuIYEZvOkmvHaqvmY3J0/vIqGGYaszm2F?= emNU6g5S8OnW+PG7CXLayqzx38yH4Lo8N05Ecdqdoyo23rsLApJ899zTSO5wqVvR5o6m0Ghsd5kc0NAvdrdr636xj8Sfg6oMeksgOOmgtCkWVN4X0DWVS5/sPycXiOa1/JrIOTQc02DkD3R+OIy97DhSlTa4QqqvLhQr67XVRjUVVtEnv1NUB30LW1hoyyiXkZie6BKGwntD/3anJoh7ZojBKNhO14xfomJQVGWOJd3nV1wuhZhj1T5rL2EJqEFho5Qnma1wbvk4MTd/MsvcAMVkqkWPZzUBjwdF8EPxozxbQFMpVdembU87YlAbYxL1z620j4FSnugEAw2tHONlxICgrYYjbXL8hGrET+CExp+8rHp8zewGFDD9JCDXJ+5GBV+JSVYPev3ga0xE7d8SELxyHBnO988dYLXRCmEp8k324CEQxACACLLZd+EE9sCrI/5bZosDCnoTqV36ikACEFzrbWz6yuLJbpb1mpWmYmA8JRDos6oGsDbqATLkWZn5KJvs5tVNJt70Nm3n7mkA2yc1eMEpP2eRC+JFusmH9Y6uNdcJt8N2pI9oZc58QNb5hSQnjaRnW6VoEIxnSbTuBIUFYy+9q6YuGpW5ZkvJB7s0AUW9H4zb7couAbF+oiooOyPr9BCvYDsJqdG/yo0i3tZwAddtq5HbGv36JEnt5OFTYKL8JGXVlmuS0L75ZppgkoQ9pxHHNaiVSV7TLeYrmq+EvdIIgSeRdhOy12C+rR1sZPF8HtO8Yzbps4CbiKjD9oCKH4VxS0NlJ8BN/mNL0/8ZcLUCyTDsSxwngeNNpM0ka5rcgSEtONU8Sry0Dtq5j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ETj8S72a7m0pSfnYSusOqFr1Oc21Pai6zftmycM4uKlGWePC8O1SUXuYOP77AodoRWAv82nqgJBxzCkxtrGuV7JVe26abx9AKW3gddgJn8/JIzuSev5Y4Re SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:25:00.4240 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00aa075d-d9e3-48fd-c422-08d55fd6ebc8 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: CY4PR03MB2696 Subject: [dpdk-dev] [PATCH v5 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 Acked-by: Olivier Matz 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 Sat Jan 20 06:15:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125237 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp174832ljf; Fri, 19 Jan 2018 23:25:04 -0800 (PST) X-Google-Smtp-Source: AH8x226y8nbkH3XZKVQxWchhu1S/dQmGms2fUISbW1IjNmSGjWNprL97FD46nVx9hvrpxiGbO9l/ X-Received: by 10.28.138.85 with SMTP id m82mr561333wmd.56.1516433104375; Fri, 19 Jan 2018 23:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433104; cv=none; d=google.com; s=arc-20160816; b=mQUTfkMgSFKUa6gInQGTCQXDA2r8aGyQaUe6Qs/ai31FvsINRwxZw491trrUdKb/BL rb21ZBjXw7eyUrAkc935bJbLxphdyxSl4aNTLPLSoFmIcUew8O+KZEXs+6suhu1nYQyC szOJWowq7UZ7ObkVLxYq2Lij1QG60BjI/japeKXCCIiKqPHsVALHehDIQMBvPK9j3Xw1 xM5znfETSc9PBqZ/kM59K/KIpwTE6LRisIMPRDzUOkXW3kXLmRtZxUmRlgjaQ9q5cmZZ FNMwMvD2OEuLVBsfVCmameKtMwEIQPA7Bv9CYWop6/tqYRdl85Q5VOEn3B8/EBNgIANH gcZw== 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=C0rmsYn5tqV8CoS9c0vycrGcA8Ow8SvM+11YZlchyVWXB1itW0mdFW6gXoh3o/ZJQY LlTPl/hn6F3vUczCn7aXwuKDI/9qZtpy6UsI+SEDJpq2d9APhoMiE59E0ypY3Xyoui7B 6N/5OM1LHKzSVhoearr73wPfV3QIs6vTSJ1N4qWCknIaY/C3UYmXjn9r3GYoMssBQdD8 kFtqmwWP6qPvf/WaxicFqOclGW0BN0IJ/af4NMUxk/9sGIwzOkxC3FuZD1w65q0uWGxY yxyXglMpIR07ngm5K5WVE5YoM9K3Up8fOZumd2o99HdFsRsvueEJokhLFagozJBPhCBt A3Pg== 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 c6si1795386wme.34.2018.01.19.23.25.03; Fri, 19 Jan 2018 23:25:04 -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 467311B1BD; Sat, 20 Jan 2018 08:25:02 +0100 (CET) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0043.outbound.protection.outlook.com [104.47.33.43]) by dpdk.org (Postfix) with ESMTP id 592B91B024 for ; Sat, 20 Jan 2018 08:25:00 +0100 (CET) Received: from CY1PR03CA0027.namprd03.prod.outlook.com (10.174.128.37) by MWHPR03MB2704.namprd03.prod.outlook.com (10.168.207.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 07:24:59 +0000 Received: from BL2FFO11FD051.protection.gbl (2a01:111:f400:7c09::157) by CY1PR03CA0027.outlook.office365.com (2603:10b6:600::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Sat, 20 Jan 2018 07:24:58 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD051.mail.protection.outlook.com (10.173.161.213) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:24:56 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0K6GGge024888; Fri, 19 Jan 2018 23:16:22 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:03 +0530 Message-ID: <1516428908-5430-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609066985196540; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(376002)(39380400002)(396003)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(68736007)(36756003)(356003)(2351001)(6666003)(6916009)(8936002)(2950100002)(2906002)(50226002)(8676002)(104016004)(81156014)(81166006)(305945005)(106466001)(105606002)(53936002)(48376002)(50466002)(508600001)(85426001)(4326008)(316002)(54906003)(107886003)(16586007)(77096007)(26005)(336011)(97736004)(86362001)(51416003)(5660300001)(59450400001)(76176011)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2704; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD051; 1:CbLV5QilwscRMDHBHg9CiJOGExLC05enYpBPWKNakW/uerLn19ms7/7x+HhqW5RxH0lN7aF3lxhjfVkNFpHl26HFMNS+qUHA/L6kA9S/3fOT24XYfknub0zdBOnnsn1M MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 029350fc-f303-472c-2a9d-08d55fd6e954 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2704; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 3:9fZwXoK3n4AtRDFHFNPCID23Dtf0WgFpKP2RG/p/jLcKC2GUCrRk6kxFGbOmZuTWvHEaSwuoPk83/PzcmzpaCSL3r66z9gvSw8T/xDIDxAEFHLBXbRVe31nQESbJlEL3Bfr4Mln0dgv4m2/hjqdaM5NOiYWAAE/Ftp06nMTJ8XhG1TJqQUKAP3r2qPnRA2eh0d6sqTgC5EyAw0I3HbaivInAA+kN/lnLhzp3NBKSrTn1fj/h+Amc/azImNWaujxP5ogL6wFnvwxq1A+o2qgTVnOizZKtCm9UH0gXUxnPEoQWooB0JHSBO6yWZh+pm7/8TahxrJbsVW4m+eF5yjNFqaKmvea341HPI8LqFgqO4r0=; 25:dxV0LQ1RWRm+rJfaWqzA5KUmc5lzkgZ5P7xafyiKFB1JE7ZFooACNGTQz4RNf6if+/r56Jf8XooQNxFaROxI6n0SKmtmfwvvg5kQx4xzwSAesEzu1UJBVotIV8YWjkCBWOoIAeHNTVF5VY/fBrSJZTmZ28pRDFMFfvJvg14gypSz9X7w5X9UPZ9hxLQWZd+uJ5kN41/sYtOggBZsMQuJs65as5Gp5NsfiuwkGIIf+yqlNjB3ahVr5Oyk15LztRZC7AV4QPm//D7Srq15LStSLdyWK0NAZzw2xN27FxxTVeof3ByPJ8vZAhzSbauQu/EVb+3TKWsap5hneYrxb64vHA== X-MS-TrafficTypeDiagnostic: MWHPR03MB2704: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 31:2aUpg0g79es3n9SeMvqeJhloeBQ8hcbYEpyeszaUrJgS1W1/u5o5UaDSRgHP8pcSj9EmiR8X0odJRcT/I5jxE5EltV/PW+UCvBpO0BvT5nAhPwiPQwaZ7LgsTydmW2Py4qlYfxASpx+mx6zbCATvhtDn4+3WEX3/G1q0KI3tI/g6dBggWSmNtbaYHcX6ABX2RJyZvj9DrJ49Wl6hmY8dkeDFGBrPYkHr4tSpftkzgT8=; 4:+gaq60YxagnLSxoZHUDkwEaaLhr+qiUwYcc6+mnQuC6IMQeMMMQRZK2GWoJNRnxLXjNmqfVBhxiu5wLqLzTO701JuKgbO82U2VKcKg81zfa0Ym2PWPN3gkxCEuZ9e0sqMe83t0BG5rAbSbk8RL9NESaRg5JagZAcNvU6vV4IIsvimBx8qWSpJobsiboUZYncIJI9zfHCjq5DeGJKQJ7KFZ088eFEGXef4KyXspCrepoc2v1cwVoqVjrYXnGci2bpx7ufF/tLuReWYqSBR4LOVeXx4nhxi4gY4nGP5oOnDsfTMXu3eVSBNu9zPubLgLBL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231023)(2400081)(944501161)(6055026)(6096035)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(20161123559100)(20161123561025)(20161123563025)(20161123556025)(201708071742011); SRVR:MWHPR03MB2704; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2704; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exch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99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:24:56.5540 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 029350fc-f303-472c-2a9d-08d55fd6e954 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2704 Subject: [dpdk-dev] [PATCH v5 2/7] mbuf: maintain user and compile time mempool ops name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Acked-by: Olivier Matz 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 Sat Jan 20 06:15:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125240 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp174965ljf; Fri, 19 Jan 2018 23:25:32 -0800 (PST) X-Google-Smtp-Source: AH8x224tDgqfXuqsqotYffsnfei6KP8fBVjMhIkxgd7JacRcu2f0ERP3nAKEXG1DIn9eVQyN4XEy X-Received: by 10.223.193.71 with SMTP id w7mr952160wre.88.1516433132265; Fri, 19 Jan 2018 23:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433132; cv=none; d=google.com; s=arc-20160816; b=pF/IIEuhm0W8W+ZxtM5Px1ccfpSWcYMJjEA1Dd8ESp/hufP1ieU9juLnrhIuZDHa/N ilNMsqvQQX7rOy0T0G2ql3RJp4jGFFmbafz1215deOn561e5cXq4Z4gaXEFzpHIkzdzn 334E335nH2tUYOws87AV6zTCgtLfWkjl7KJv/tY3GVBzpzJshqSHU22kHqtIJddl83Ci tb4Po9X7Pcuiy4c7uUIQ8W5c24kJT2l7FSQqLKLjMiIwD27daZo05Al5A4u8D0Zb5ZQo TWd6lNQeLQuSJ3Z60eqo4RBS1r/ggA9zhpx2d+iXCjKCcyKWNVBGCOwnG+KLLCpLEeJ8 OKlQ== 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=tlzofG2mNt3jiWAtf4TsOnphZ6CMGyIkEP7ni7CZdio=; b=pfOBVpuzsAMv8ag6RQR6gESpFZY0+McUBNZOlcV3YxrCc/1MY7dduHzFnym0WcuKga 3butdL33/ht6EG0RZxiuhbObk0Cl50Gl2dGMst8ki9OTsY9S4FauNCVANBiDkcwwLRvb 4kNke8AY30EKGizbCFny0Ro3S4kYK9eTGnPCJ9ynWDvSMVGkoyBUkfJx3zWtu7XGwbmh TfyRPyDyuD0RkCidYZeRXyobksyVAjYMnVe/HjdMbzYpMr11KJq0t2vIK8F8HIA/ivYL myzaJTVqcnllvKy8+WEAKDnICMWjd79wgG6LS2BooMzdspXxDlnn8JTfUKLnG4RHRlBK UulA== 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 c2si2055218wrf.317.2018.01.19.23.25.32; Fri, 19 Jan 2018 23:25:32 -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 A327C1B293; Sat, 20 Jan 2018 08:25:08 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0050.outbound.protection.outlook.com [104.47.42.50]) by dpdk.org (Postfix) with ESMTP id 7AB8C1B1C9 for ; Sat, 20 Jan 2018 08:25:02 +0100 (CET) Received: from CY4PR03CA0107.namprd03.prod.outlook.com (2603:10b6:910:4d::48) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 07:25:00 +0000 Received: from BN1BFFO11FD036.protection.gbl (2a01:111:f400:7c10::1:125) by CY4PR03CA0107.outlook.office365.com (2603:10b6:910:4d::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Sat, 20 Jan 2018 07:25:00 +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 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.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:24:57 +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 w0K6GGgf024888; Fri, 19 Jan 2018 23:16:24 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:04 +0530 Message-ID: <1516428908-5430-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609067001258042; (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)(346002)(39860400002)(39380400002)(396003)(376002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(59450400001)(4326008)(105606002)(106466001)(2351001)(107886003)(51416003)(50466002)(48376002)(76176011)(5660300001)(305945005)(85426001)(2950100002)(508600001)(53936002)(6666003)(2906002)(54906003)(50226002)(47776003)(356003)(86362001)(104016004)(77096007)(36756003)(97736004)(81156014)(316002)(68736007)(6916009)(8936002)(8676002)(81166006)(16586007)(26005)(336011); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2367; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD036; 1:jvk5LREHM9JpUen9UknJUFe+AuL0qWZ5v2W/8D7cl6H8JcEvGC4lDG2NpA15WPeoU/L6Fyk9awElUT/Ejfc6jx5EBNBWpYY2kEzGrQuUHPCerkudjf8SQ1BNntWZOq5U MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 65ba6d6d-73f9-4e0f-3ed9-08d55fd6ea49 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 3:CRd/mxKgm9OLjQwO7/pqNRTZpEk9T5ViDFGQTImL7i4NN6fA6YGPSmXeDze+6GRHrELAdckCJexN7lNkeiKo8KvLixZ5CzIFAYLmcHBcGmI+NpTx7inY1RE2Iw2pHpKe7KV9IK0ZMOm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5Unkk9HcYvt0ONHEwOYn7Wul9gTynkcfhsRWNd/Y7Xit/8WIhi3yayCZ0q+WuzVDs3uOxIp/wwjob3V5BBtX1w/2MTZniWb0IMXwb1t8asEr3NqJei3HP6jq8LDKyN 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)(10201501046)(3231023)(2400081)(944501161)(6055026)(6096035)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(20161123563025)(20161123565025)(20161123561025)(20161123556025)(201708071742011); SRVR:SN2PR03MB2367; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2367; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2367; 23:8eukEDSOy7xyDnfRn3tO7jaKhRrFrUCXqXSbUfASm?= AI6rmxKwEYflh1w5JFbMHpkNMq3rXesRIkxfzBckMYy7RmdWxgAdV4O50KkkJ+7Pc8mAIwV4zqJ1JT4SpkyIagbWrDhwXo8KKNn2TEwu+EdI7elmeu2kEEAcEuhqIVZVOMv4chzIGzZEvJogOEjyeI0ldyV7jk9TsSv5OXSnXteoLCsS/SzYXNGhMBkJf8ehCDCrvc1a0dv7JHkPP/GcXr2zbxDclGJHrRZl2h56ynujCN79eqS7PAQxeATdTMLZitLCaXHAnMXzcAUvYQDiKkhL85hcAMegLMsu2FoW3r6ckDS9/3hNasxKPpaMmIhh7vWIJpEWAyJ09ffvfhynBv/by04s48NE9I82s/4h90Z2YB7yjLnP2cOl3oyBkHjAdkslezg4XfqxVDqJ8ifC55vTw4QHBEhyoRCnqKmq5UO9QuBt2+7daW+DeDwLieFfhN04wXYB00Nz/4gjMRwOgdN9jVylO8V934KCTn+yo3kKes2SFG6XJokcJNaG4NBKJ19JvjJf6dupqTSVdXaAHoH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LWKso8b6e2ICry9jgxL1hUQXo9sv9HqXRwJTE7fZpgK7yM78JRZlJvvbL1p/hHK0cjaY+9VF1fUEOXQxLSM=; 24:7PLmp6Us4vgs15UaUL9kvzVlwfpnFGbH1drpYi6QdPSSeRo/QfC0hFA9/qd2/sBAWF6zrcHKcamhqJfNH0k0Qt921MrhufxEK5ImKDuKiNE=; 7:6vlKtIGlwIJrLF5WIewIwcklj4Z9kdozO6OpYxGUvcsTMXXv5/81mJOHBmZ0X2fy5YWtwHsI8WCIIbeiW7ZItLWpHUnjB9wdDfWng9gMFNyHVyRqs6xKrW790MOffxukZoV0FNfzds74KsSIioShWUv8o36l2AaH861+DKn99PQUffyunDkMIy7riyBiSmUgj+rEywG7QfvNvC0P97po5CpquFaf+0jBpNPm60/mqgEVvu90iZ99WeC9CTswEDim SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:24:57.5205 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65ba6d6d-73f9-4e0f-3ed9-08d55fd6ea49 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: SN2PR03MB2367 Subject: [dpdk-dev] [PATCH v5 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 --- doc/api/doxy-api-index.md | 1 + lib/librte_mbuf/Makefile | 4 +- lib/librte_mbuf/rte_mbuf.c | 5 +- lib/librte_mbuf/rte_mbuf_pool_ops.c | 96 ++++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.h | 91 ++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 +++++ 6 files changed, 203 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 Acked-by: Olivier Matz diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 76d606f..8cbd92a 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -136,6 +136,7 @@ The public API headers are grouped by topics: - **containers**: [mbuf] (@ref rte_mbuf.h), + [mbuf pool ops] (@ref rte_mbuf_pool_ops.h) [ring] (@ref rte_ring.h), [tailq] (@ref rte_tailq.h), [bitmap] (@ref rte_bitmap.h) 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..9aa1541 --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.c @@ -0,0 +1,96 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2018 NXP + */ + +#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; + 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; + } + + 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..b4a2d54 --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.h @@ -0,0 +1,91 @@ +/* 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 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 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. + * + * @return + * returns preferred mbuf 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 Sat Jan 20 06:15:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125239 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp174914ljf; Fri, 19 Jan 2018 23:25:21 -0800 (PST) X-Google-Smtp-Source: AH8x226k54NpdFzfFGvNxMTYXE56E7B9djritUxrAFXm5W5U42fNGuf+j0IzwLPPZiYJZukyl7WH X-Received: by 10.28.110.3 with SMTP id j3mr560347wmc.97.1516433121082; Fri, 19 Jan 2018 23:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433121; cv=none; d=google.com; s=arc-20160816; b=fkGJiodARYxRwMpjNm5RlsE5ZoN1O2JhDd0kxmXBmDFXCy+HDHI4rVw3cgP+BuZ6KQ iZtrCCT/CmfYU0KFYFMRawXqezNCnhRtjlOJ/aMCfKHEfTF/730t70LIyghNu72LQqSx 7VUzpNjfst/6Q55EsZYCQFGJv+DNVXUTYD207YjN9Tt4/927arLSa0gjol8y5eul7E/U SXA84+Fu/XTGIxQfB5ahqjotmJqzzlbTBZ+YQ1IZ7b14n/m8CEnfqY9zM0ZZZBXCtmfK lPadqsRAdlBJxIzcpqQoUpgb5+k4hXHPCAX71m7ZUJbuy3drQYKklc46+enEY6TFn7g+ 8vHw== 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=noWkvq0zZ57KpEUgLbT4aliEcEUKDBn4t2kVlYmM2CuEFbPsmW4K2T8YWttURilKl9 t9NmiXl7ahGiio/goHjWBpCXpiHMApyfyTqs0+rho5nUO5VvfBSsbCOt+NzF90qy+lDX wWY5M24Ec1/5nCjnG0BRUt1aDWWORzUuH5/Tbtcb36jb8ZninD5wo/waWiEWUhVLtc18 VavIkRK5bne6eUlgF/xqiheuDgcQdv0K1iUkr3u9mDzU9wu//1CcrUoqflY1Y5/QbAHJ TMC5HBnYLoTsBw3n/EcL/IpLBWQmAHjnvyDtdsXCHHUry2/xL0yPuZB2vw6C/R1CBtcb 7HLQ== 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 j12si8690161wre.336.2018.01.19.23.25.20; Fri, 19 Jan 2018 23:25:21 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8639A1B1EE; Sat, 20 Jan 2018 08:25:07 +0100 (CET) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0077.outbound.protection.outlook.com [104.47.37.77]) by dpdk.org (Postfix) with ESMTP id F1A141B1A2 for ; Sat, 20 Jan 2018 08:25:01 +0100 (CET) Received: from BN6PR03CA0084.namprd03.prod.outlook.com (10.164.122.150) by DM5PR03MB2699.namprd03.prod.outlook.com (10.168.197.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 07:25:00 +0000 Received: from BN1BFFO11FD031.protection.gbl (2a01:111:f400:7c10::1:178) by BN6PR03CA0084.outlook.office365.com (2603:10b6:405:6f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Sat, 20 Jan 2018 07:25:00 +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 BN1BFFO11FD031.mail.protection.outlook.com (10.58.144.94) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:24:57 +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 w0K6GGgg024888; Fri, 19 Jan 2018 23:16:27 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:05 +0530 Message-ID: <1516428908-5430-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609067001570039; (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)(39860400002)(396003)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(81166006)(81156014)(2906002)(305945005)(8936002)(356003)(8676002)(50226002)(68736007)(336011)(97736004)(5660300001)(36756003)(50466002)(6916009)(316002)(76176011)(48376002)(51416003)(6666003)(2950100002)(16586007)(54906003)(47776003)(2351001)(86362001)(104016004)(105606002)(106466001)(4326008)(107886003)(53936002)(85426001)(498600001)(77096007)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2699; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD031; 1:z/LkUJAobfIz5x05RI/n28TotR8mzZ/5krdLMGe4kZyQS+BIANeVWHIdGrO+6FX1nyYuFj09zpqie44P9RgBiueRjNmmTmBR2PSruB31WDtRici8XuDK6sYoaKSPbojC MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ceebc27-4905-416f-0196-08d55fd6ea4e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2699; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 3:VcVnUzEERs1RkyXSBLjwM2ugL2BMVzoduTG8be5RNKDnR5Vho7kIwoeejwTpC0y3GmQEL9Y6ZdwuJEoXIDPFg6g944X+AY2ujXERDnIDVjIKWFB5OuOi8XHzcntqlosSQ3/WV3FCy9tR8q4sP+H1YvvF+n7zJHbzPuUV6rYHxGmM8g4/a6EK0P2cdqE2U7+xI9t6/I+UacxdKhEOZAvhL6IWjtfm9fQZboRMTSITg9FmnwSxdxUMyFgZyUwsTQdgoIZ/xc3+HHstAbhkb7ILejvMiT+mRrz2+jEUoWC1rhGeehibg/REtUnrQPBtFCJz1VBxoQjyb7Is6RFdTbdMj9Tlnoe1jXchFnsErZkIOdQ=; 25:9TNzemQnW+auGd2xXy8ZWdRNMHrbEmDuXZvERVEKqyKCvLMQrjXn793yVZMC7PMsdfwpjXVdLA+NzJSjDHbTk6kHSKm3VYc6rgMYmC9gIXN0hAsyapCCiqaaBxs8oFxz6ivdudrhYtXEWO3IjaN0M0bSOBLart8vav0R7d9JZaBvNS6nPU0uZE8IvVjcVS7cs/7Pkky4WtYw3XFzvrHaQqepKgFmAWU5XTrURWjXDEuUqPTyIVAdLS8QZGchw0fcSWgohSrVC9TCAe/BzWKAPthCHFMjL/04GjLXM194u2k4rgTCh4J8V4F1lThaSXyBG2HxLb5j0Ng7wv0KTUnxXQ== X-MS-TrafficTypeDiagnostic: DM5PR03MB2699: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 31:CbTjvTvetF1cifCWeyxax0OuQfp0NiaNRRPx4HEm6lvYjgjU0GOUg8Eo0lo8mz/LF1utlTS/17n9VBs4ogcMsWSXlsINb6V+ukgWk0DWuR2Nsiz7GjKd/hdBIgvDmoRzeDC0VLBBT4NIPFWRALWXdPSvMWT/o2T8JCwIQUS3BLmyj85UugV9oGkRD90uqpmC6I/8pv6qd85DGaF/fDJz/hG14en4q/ZjNyGrnpyZVAM=; 4:4OBHX66pUJ0K4Yd9cEi4P+TXBY4lwJFC4yCXsg3DD+H+y9lu6vutDSzVgEZBfhlH/VO1AUsuGblglK/Xy2hPdThzAbtXI/xmVuG32s+qZ2xYzte+nlboX5VA3GmakkCWew4SwjylStlbVymmbq9cYf3eF/lBayHqppmmf2DXbWxGy89hkbaPevaCSX13Fw7v2LIBecaRNb1NxfnugYa8gk2oOX7bqoN/fVGYXmOHvEpy6DGgi1U54pEEwwDykDkwzop9GXqwiYty3+mbMeeZRtiXQr+Spmfbiquu9X2701P7phuHmwWMWKs1p5yhyc4dKdI9G9cgfQXC31qRS1lYKH/hvyOqFteUPb1GIduveSo= 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)(93006095)(93001095)(3002001)(3231023)(2400081)(944501161)(10201501046)(6055026)(6096035)(20161123563025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(20161123561025)(20161123559100)(201708071742011); SRVR:DM5PR03MB2699; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); S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SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:24:57.5361 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ceebc27-4905-416f-0196-08d55fd6ea4e 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: DM5PR03MB2699 Subject: [dpdk-dev] [PATCH v5 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 Acked-by: Olivier Matz 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 Sat Jan 20 06:15:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125243 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp175088ljf; Fri, 19 Jan 2018 23:26:08 -0800 (PST) X-Google-Smtp-Source: AH8x227nN2p4zbwFR+JTeAXph9zMMDYEuzqFuUBIbHU76lMXT+7K0cHAUPYxXQ00gMn1vUq4DVLw X-Received: by 10.28.52.134 with SMTP id b128mr485744wma.66.1516433168229; Fri, 19 Jan 2018 23:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433168; cv=none; d=google.com; s=arc-20160816; b=ToHOLKbcHP1YN2ssTxrRvwb7a9IxbSKz6B6Eafm67mUvtq7+PCOfbNY7KCVIIBviqi dBjfu70vgvFCrFI6uMzMoWUG6co0ogaDrr95gvNLhCGY4XGPdIYsStHQGvHCcEpHRsjG I4V4iTLBzRWnczr+tAtmkutai1SnfIdJo4BJLrzjv3TZN6j06f2qzVHdy1XZXBGb08iu 7WlYSb+xRmsZQtrvywwL43L7+cAraeRJEMCphsmH1sJXJYIOXdjuJY64vY/+rUrHN8eD C56sTE0XXXULXXL24eCMuDf6fVkucr058pzQLz9V4qBWRGn71gGh3Fyq0Eg+X5lCMe9Q gMBg== 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=SZP54E9JIOkiMH710bReoIDEItRb+fgJrkhjjwpa7MzzFjORA+N5LSucpY5ARL+kXm 5E74LkJoa+s9yVWfatFu3JZUPwr7muJhL2CT7fYt3puZnB1xv/EEtdn0BrmBa9hqJB/f oV1sD1e4MZii+O1c27Eb2nXJcEN34nPw1oKMp2Os9B7UZGzUfG/+A+j2xNZDt6xOqETX e6L+pHMRCJeUT5OyftZHzRD/IhM4m9Ho6wm89uqhs88Gokn7+xfDs0NF2sFev0sVXw2l 7sTbUaSx/2CYRRkHztcVlychlTqJxGVj1mt1lWJubPqsudUshV5MpQO0hfYRXSjLkfCr 00Wg== 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 a1si3833918wrd.204.2018.01.19.23.26.08; Fri, 19 Jan 2018 23:26: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 45FB31B2BE; Sat, 20 Jan 2018 08:25:19 +0100 (CET) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0087.outbound.protection.outlook.com [104.47.42.87]) by dpdk.org (Postfix) with ESMTP id 10E331B29A for ; Sat, 20 Jan 2018 08:25:14 +0100 (CET) Received: from BN6PR03CA0082.namprd03.prod.outlook.com (10.164.122.148) by BY2PR0301MB0727.namprd03.prod.outlook.com (10.160.63.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Sat, 20 Jan 2018 07:25:12 +0000 Received: from BN1BFFO11FD048.protection.gbl (2a01:111:f400:7c10::1:173) by BN6PR03CA0082.outlook.office365.com (2603:10b6:405:6f::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; Sat, 20 Jan 2018 07:25:11 +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 BN1BFFO11FD048.mail.protection.outlook.com (10.58.145.3) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:25:08 +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 w0K6GGgh024888; Fri, 19 Jan 2018 23:16:29 -0700 From: Hemant Agrawal To: CC: , , , Pavan Nikhilesh Date: Sat, 20 Jan 2018 11:45:06 +0530 Message-ID: <1516428908-5430-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609067116355459; (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)(376002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(86362001)(8936002)(50226002)(105606002)(5660300001)(81156014)(316002)(107886003)(50466002)(68736007)(2906002)(51416003)(85426001)(54906003)(48376002)(336011)(77096007)(16586007)(76176011)(2950100002)(97736004)(6916009)(106466001)(305945005)(36756003)(26005)(8676002)(81166006)(2351001)(6666003)(498600001)(356003)(104016004)(4326008)(53936002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0727; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD048; 1:3TotR24XUR2qGuDM8EViVwo0da8e8y79wJOsOenlna7/5B2+6kboIvBAO1gv7OjN0L0I7Lp95/jH8c7bYHGABrWy4XNsrOeWZXxawEEBBCowQnFxGohwgv/UDAgIddmL MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1581e7e-4136-46c9-7374-08d55fd6f112 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BY2PR0301MB0727; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 3:dYioEM4NJiQETvDexAf/9Errq5v4zGlAcy9IJdxB99cd2UQrGFSxToWFWw682H0MAgkliSBTsupXuYbHB15R8VY5TsyQSej2j/YnZ5PeghLRqyCwiheAoKYjc3p39oPc8hNzYZFt8DXWuKYAbi/6o5ph/zsl+ewvDcq49OqRkGTRtvGx0uFyNIqB6iismXAczBMhI05jKKRH+EzVlqAImm8rQwhh9b0f5IcispyCVrU4DCkcdZ1VR7fHOYNC6m/EPQATZ4qYQpXtGgL810q9+rMDC2DiS81WvZTtcmp5A0dyjF99cStXiWKv7R2GCJm1grZJ5myLMACSIf9HBSrwNHPe0TT31oQEDvQICi0KylE=; 25:rSrvQUE6QmwudLqLzETHKYhVqZ9gdtZAFiCIabPA+p1IL80YliahCEy/cLnCTCcvQ/sOR6aD0yrRoCdfbFccxk/qghiSONY/6PzolIyImty77IOBUwvpR0Ic2UrSSsH1/NN9i/91+TJWgkOpRunmojlKYboWgqKgzKjr6BoAUbkHpL7kYg6sGHIx5HOBVktz3YNY4vWnbjJJtaRqm4rptjMwJSSC5zMtr1NY5IkbnT/HjtD+Ldm2GmlLyh/sX2dZNhMpdb1NNdFXr7bZf+6yR+S6bvpsqwQ7uM6Q1X1Aa7l295Rd3hx55uW/l9PYFr1mjB/IUhb5H0E9l9ROK7JsKg== X-MS-TrafficTypeDiagnostic: BY2PR0301MB0727: X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 31:rFPO+qEvSX3hohE66YVDHFyxLW8BaQH0P5M7EVMsd839TUFZcX293tvO9blQ89YkAAo3lYQflM37q6dXKzObRxrAsfPIb2XqoigjI1zh7KgZP/tjwCrLF8HEIt0rYtQM0wX1VSX9rw5rBWuuXDCr8OsaxCVXmZ5FDTCYS8wtEJigKnX6EgefvGo0aHQ0PlAv2/XoYNNPFqIXEgh28xJXxKxEeyIPFe/Fiiy9aMkBPX4=; 4:HXdqwqLrJ1Oksu1pY5JblTcHCDAK3HJn/NBpFHLB3dBFVj9RsW5DfkBL2l7U653W+jAQAnCWGMhprOcsRSm/hOrqy1ZL9hq2FMe/KkHRCFLssezwIY9dGnsMjgHXdfCwXrUZWIRBhZqjssiHN7HqvGOKLofdkY3F27kDgj8LfMtjHKhwb45GsK96Q1xx3T3AusCqby7nQXTGSQAjcpIg1ntxIz51jscjohKzQ+ufseqYzIh2AhpgIW5+uoZS4JOvJj2wxdkgGsgKZ1olJakn0DWvNhNzRwiZJsDHiUTWX/P+dpNLmNVrLsLDhDMJ9z0b 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)(2400081)(944501161)(10201501046)(6055026)(6096035)(20161123559100)(20161123561025)(20161123565025)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(201708071742011); SRVR:BY2PR0301MB0727; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BY2PR0301MB0727; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0727; 23:MOARDkp/TXoztcnogaM8c1bmm74jrtCPiK/2bBD?= eSGt2ycX3EUYu3eXTcOskY5w+iPPTnx/bNzwMSmn3+pxpiuxM4C8RhoqZhhwanM0CQ3QWAKbqjzAbHapLYCDVirlQI+JN6HLNsgZganAS+UHm0XJuA96fGy5MaGQLRAB1CQh3VTNk0JhrD5jqqFM0Yg12dgGLV4CyiZ1wVhL2v1z5BTevTT/BSWXyE+g5C30mE5J9t1BryxBx48N+G+ONbAB+oYYF0MsvFc8tfaDvqFl2l+7bRqQRAU/qjh2Zy+OgFEiist7RJ+D+7IF++tWFvkNGOJs/nljhzFVgY6Wz3Gh9VRz+C3dAR9o0g+iDUPa+Jx+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IxTrVglnpnA0KUoYcMdj/YlThaADjHDdifAS+gCmx9gi9agxuIqke8fM=; 5:lmuCFdy5M98kwYGA0rpcO1ucfjaJq6gXvB5kvwebppNCpCzlMUmTuZD0dnXSOe1PRy6BcjAJjp29YxRePxkQBKODB+gZY5RTibRjaa5mfkNmXYohfTPRmigSv+p8LtdQOb8u0XDeprlAxWe1AuYWbmBeA28sAaLoyCKNH6t+ZQU=; 24:61mbY2fBapQpZXsDC8bM7uKGuNhEvWl42v3irDWtwQFpmpz/2u3UCnNETGbJUDSbkowQ+/Cuwyy5vDI8v8dQp/ZMTFOAz/qYhNe7D2pUPvY=; 7:Y/qxl1hmByKsZPvJmlGG5G2HeUAeI1zVHPMhmtUvYTKHpapWlY/3AUwChTgydyGNBWqnm58QbuO6J2TqThQLwCuBezsSPc3KN78TGDmmqJYMSuHqwmbZXf1KOc0wJQjmVYGgnuEVdUKXuHzt94XDvd61JeKgG3vPT8o/syCE/BkSdPb9DSS63JCxwPluqYhH4IEfwbqiyqB4BfnzP2TqVPburGuPIRDnBDOBppFvTCeATp1lCAsDRj0R7KAkdHOt SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:25:08.6093 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1581e7e-4136-46c9-7374-08d55fd6f112 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: BY2PR0301MB0727 Subject: [dpdk-dev] [PATCH v5 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 Reviewed-by: Olivier Matz 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 Sat Jan 20 06:15:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125238 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp174874ljf; Fri, 19 Jan 2018 23:25:11 -0800 (PST) X-Google-Smtp-Source: AH8x226h25V3Fu4GT22E0bdM+BL6Ck8TBiYq2hC8mOHv8ylLYu/be1bfSDKnu64xnhdOb66NBET/ X-Received: by 10.28.93.80 with SMTP id r77mr467898wmb.73.1516433111659; Fri, 19 Jan 2018 23:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433111; cv=none; d=google.com; s=arc-20160816; b=GuKlBA5lzkSpNvp5w3fkeqx+YDrp8ZV36akuYl5rY/g6G02j9FcBNi2qIOl+ZEDZlt pwu/zQ1LedDVNmuWC/5G4jxX7Kz91h+pKCWiZvR+9LFqon6C63Mu1SQiU9vTzOor1wsC Gr/2NXriyTJk0M1ySOMptJETrZ9HXDqdyhXEaxBVjzeqvn2HHSxrBoN+MPubq9C5zrgM jVON0vE8S79aQf0TNJILqVs8eE2xcb1qUVdGCtGB77Ec8mO+MPSe3mOE0XcE8BJ4ZXOB cZl2ntqjrUlhA7ac9YL/53oTPO47lYxiRLnEFZ2fpG9XekdtLtjtUgRGdD0EhnIA0kRg zgUA== 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=kH3AJADAx4IfAcfxxE4YwVVnrVhHUaf0+mu0R4Qt2vq/SxFirOm6BDEKNowgUfBd2b oEpd1Ucw3duQYxf6jKixV+lHJu73f1I8wFEtjdH7SlRrhc5QR9hhjXdLefI1am+BJX7Y Ju1l3nptL+ylSMhcrrPqDiENl3hCTPBkB6Rm2Kz8pMMbLagXtNxHHupse52wtPw5IdyG Wu7Qtcgs6iq0bTyjinLiAaiTOtHDq8PC/ZD4t0WfJC7OlqrxLWu1HjzqlPkwiANRi3po 6QIqp4veLHhmzt1BbBZgXa1DULpxx/y7Qh0/+QHmSLc4in1nf1ECiXzXbZ+NoMGclBFR u46Q== 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 x9si8564587wrx.97.2018.01.19.23.25.11; Fri, 19 Jan 2018 23:25:11 -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 8C67B1B1D8; Sat, 20 Jan 2018 08:25:06 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0075.outbound.protection.outlook.com [104.47.34.75]) by dpdk.org (Postfix) with ESMTP id 489271B024 for ; Sat, 20 Jan 2018 08:25:01 +0100 (CET) Received: from BN3PR03CA0106.namprd03.prod.outlook.com (10.174.66.24) by BN3PR03MB2356.namprd03.prod.outlook.com (10.166.74.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Sat, 20 Jan 2018 07:24:59 +0000 Received: from BY2FFO11FD016.protection.gbl (2a01:111:f400:7c0c::194) by BN3PR03CA0106.outlook.office365.com (2603:10b6:400:4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Sat, 20 Jan 2018 07:24:59 +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 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.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:24:56 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0K6GGgi024888; Fri, 19 Jan 2018 23:16:32 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:07 +0530 Message-ID: <1516428908-5430-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609066986576531; (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)(346002)(39860400002)(376002)(39380400002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(4326008)(107886003)(50226002)(8936002)(81156014)(8676002)(81166006)(47776003)(68736007)(16586007)(54906003)(104016004)(86362001)(316002)(2950100002)(6916009)(6666003)(5660300001)(50466002)(105606002)(2351001)(106466001)(508600001)(53936002)(48376002)(36756003)(51416003)(2906002)(356003)(76176011)(85426001)(77096007)(26005)(97736004)(336011)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2356; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD016; 1:n43o33XKgSAi9gyJIQNekKVxnFV+0vNE6db14lkFuD6EvpaOvPqpiZQFcjR3Np3dBcubcIDGmAXZBHkjoRlIeCDxEVlOrX4xacI3PDD0YTj25rpQpSXfcpFsNKITryub MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b047a02-5200-4837-2e2a-08d55fd6e956 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2356; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 3:cQoLaO9+L63pSNzKMi60xyq1cvYCVM1IqzNNxpPmhdxsDCHa3mixtf8JUSTCkigG8zBhAQyuQH4hBgAgRrjiucf65bK71EVbgbJRBhnUp0npNWbDCbrs/+8L/2sbBDv3wrAFGxdQkIAJeig7XX38kPGIpeDXrLhTOmaWkYe/gmR63wS8pR/0hNHxdmihvPdqUhi3EOiy48KDFQ9aaqUVyl96MfSOCPaLR2xiiio2eVNmrnChodXVjtxXBTCqzK9Mxg9ZKtp/TCi20hgCGueakjoD2TQpdsU9M5Syf6t5B/pouL9xl2X0MkCXG5IsmGD+on6yhxvHWrD6jPVBVAloTrhfcogZI7VkFZRx6FNun1w=; 25:q+ogsKwRGtTMdr6flBuvE2IKDxjq6uFFAgBRf4yQx+saMzZYyuMGZ+ZMU4yydVFUjBMvlncpmCe+q6OPgjgdfZmydAFXUXvBSv1lD80HchDoaTdG5wSh0HGsAeGo1wX/YOsxe0mAPmIiT8AOJEMgCCdOiFju2pTsibAYooSoDYxrvNX7UI619Ywephg+CpV3OCq6KE9aDYlMxIVRW58l2WwM51+P5F5acHUJ6Os7OE9E4cEZYm1t/yywbFRMRRNaO4j+82kAzUinKx68jVoZyq/gHDiIrRdttbDihTeoMYqFOT53gXnhKUzlg8xZLXPOguxWoJEgnCmm8+myvRCFRg== X-MS-TrafficTypeDiagnostic: BN3PR03MB2356: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 31:yjySxwCXQgSuuisMxmfYRoqeRMkLs2GcC4/r6fu+y6R3MKsfXwtm6H207o7XlEdWkJHzPnBSYmLaJvNFI0DfBBeEpj6auKEzwA4/Wqswkl9iLRMEXfrXTw1/1sjOhVtLCZ0HoIxPFg3ObCiZ2SxGwGhhBmTbOFuplCJpynHzcj001OFBYkUheFpWWqAdHYSjtS9mFnES61AHp3bJxTNTVajcyq57t/ympxcQh4StnK8=; 4:o3HGW61OAHmVp0Mq2SvhG3JnWoNNUn2lLM1c4HkwOVhoDZ76KvQtYrTl4wiRL6Ki3qaGkLMXzya6X1HGC/IJdKPUP7El1StIA9C77z4s9nBDvEqxValkPfpEtXpRmsIytRby3BxU3cLPmE5No/IXeO276Zoup5xhaau2ccOBPmjyAbOWutovUXpFSeoJ82joLRuThOerh1x3EaTZ6y3bAghgAL6TMjXEdF0XILL0nYFrOYdauP1Hweht1mWbTF1fwRnR5Fq7z+pJ6oVs6l/xIFuxd/4fwY0jlpafYiQIe/JUoyYNnIQAWUAThpgjgkLx 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)(2400081)(944501161)(10201501046)(6055026)(6096035)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(201708071742011); SRVR:BN3PR03MB2356; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2356; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2356; 23:b2mxjFJsEMOpedjPoyBXKH4I8YZvAHC5g+9Eq9Zhc?= JDG8BY6c9Yem7v2Ci+fHcpRyKsYrbvib470s+XfT9TfbZIUU1Mali1TP17R0aQLOGZa1DI061ZOSj/cNvx+AcFijh2M4PPEfPkmJKZToQ10JcytZPno+WVQHq7mREvsMPzLeZrpzC+0TN0ISVuYdMSj9OBQRibP7abMtibZmaVoRs2YMJplcDDAoklhhJ00ERIlECIH0BOQ7vlURVCTHhDYVsJEURpHu01vCGay+4brz1ss6iur02sgm4UFnryQoQ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wyE/sP0s3KLxx3+owZo5U1za4qiUjy74jyZtLwF4J7RjG2XTk8q0HnbaEDLGRLaKyIkBv1y2E7JYoVAvnkib286DWWBrm/2qpTmQ3QYuT4yQp7XJ0euyXTnYLD6813Hdc1EaGfgcYlCejmN3U35ylxzOSonM=; 5:/AXIzp6/c2T7EK5b6harNmIB4nIB7/MmnOag5fLkTIv0lb1fBPZBRVjdzntgFwNvavno6STxIDmc30znkOmiNYNzXf/d6NkDq2dj7nWLwKAjT94SW0BnN/+ovz5T47sC+bLIA/xB4+aQSpyWGaJ+89aqmKVSC6Fn4kxU60F4e3k=; 24:JqoVZ9aPUVoFjkem2QORcUSMXCIcti1CNGwb2aLvgY8PdKRSyyH01ZjCVeYbkid2Wir69/tVJmqNNQq7/uz4C1elToZ6BnWF/P/u79CoVbU=; 7:5pGG4oRpQw7kKFdIA5CknsFH570zEPybKGXgfpoiTm/CtRctMRlzXHoWxl02YtOYH2uU7B6X/imQc7Uq7TIDxgdxJxIy7nzXn2XegED/T8vZHnYfjxwh8yDN58XZPg0mPfoSyQqJ/Gqigt0NmJZadhMUcEX+5K5mjx+DjmutRjqKxlDs1lfSHtQIc8lLlTyvboO30/F9npUdrXsegFZQ6GpJektU6L2Zl6eYSi2KHUTN/BLssaL3pL85Gyz8Vd2X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:24:56.6296 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b047a02-5200-4837-2e2a-08d55fd6e956 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: BN3PR03MB2356 Subject: [dpdk-dev] [PATCH v5 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 Sat Jan 20 06:15:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 125242 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp175058ljf; Fri, 19 Jan 2018 23:25:58 -0800 (PST) X-Google-Smtp-Source: AH8x225b23U8VzJ+q/D10e7zyEX3a8F3aY1BFqOkkjIKdCwZpK2mST1YxmAYYxUo4SmA5fCvQLBK X-Received: by 10.223.158.5 with SMTP id u5mr837878wre.197.1516433158330; Fri, 19 Jan 2018 23:25:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516433158; cv=none; d=google.com; s=arc-20160816; b=wrNQmfsDQraUSaqW9hy/hhYsqZvq/2MxjtuQFr+j/PxQFgtuBYWWxdGzxuzjKE5114 GHHJcvXlNXDmPzBAwESbx8ZuVTeRKdIypDfD3mhu6FYxtnjxjsYCzjGH7t4n+q35MzRa 4lc22EkqmnDpsXnommCPn4DLGsD0OqH3mJCadGVuMuqB9WsKCuOPkgLopSLbtglxX/mp v6CaB0oQPVp6WmaP0oJg0sXewO9s2LaRgOD5S5kKyMfU8TE/7B4RW6yIDBepgfVdnnZq +jqtdta+oQ/PlBWNDZ+fKXMKDZQdvmn3rs7ldMApCW8Ui4xur1tLvhtWtBIgexrbDHyt wOaw== 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=jjXlQkFBCj2FU3nRbIOIaeBDV5e1z/YRMJaAx5IMjQ437rV889mlYZPwTWFb8jYFPU FX90FURaHYWb/1WFdG7mV7e/6fRU6SsvASAS9EqmGDw2WoPe6ffH5rGfqlG64M2EmgIe /XoJd/0wMq7ibIe2lSDmr3RESBr094xfODLcm9mWoz+mavu4VaLi4zmqS/g2HNMQnxLf xC8szC8t9NBhJpQ2711FyhG2vYGHBdJpvxzBsXkEqnKC/I9zNute6Gdgn5Z4UjWw3Iw2 cavR8eabESAU0vhWVFkzGIDc9R2BqD/WtRDzBLL1TfiWvB1//Bfso6Hi1Pqg6lj9Ijvk 16hw== 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 p204si2087336wmb.227.2018.01.19.23.25.58; Fri, 19 Jan 2018 23:25:58 -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 0A1C11B2B8; Sat, 20 Jan 2018 08:25:18 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0084.outbound.protection.outlook.com [104.47.41.84]) by dpdk.org (Postfix) with ESMTP id 767DF1B1D0 for ; Sat, 20 Jan 2018 08:25:06 +0100 (CET) Received: from CY4PR03CA0008.namprd03.prod.outlook.com (10.168.162.18) by BN3PR03MB2356.namprd03.prod.outlook.com (10.166.74.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Sat, 20 Jan 2018 07:25:05 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::152) by CY4PR03CA0008.outlook.office365.com (2603:10b6:903:33::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Sat, 20 Jan 2018 07:25:04 +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 BL2FFO11OLC005.mail.protection.outlook.com (10.173.160.91) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:24:57 +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 w0K6GGgj024888; Fri, 19 Jan 2018 23:16:34 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:08 +0530 Message-ID: <1516428908-5430-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609067045817438; (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)(346002)(39860400002)(376002)(39380400002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(4326008)(107886003)(50226002)(8936002)(81156014)(8676002)(81166006)(47776003)(68736007)(16586007)(54906003)(104016004)(86362001)(575784001)(316002)(2950100002)(6916009)(6666003)(5660300001)(50466002)(105606002)(2351001)(106466001)(508600001)(53936002)(48376002)(36756003)(51416003)(2906002)(356003)(76176011)(85426001)(59450400001)(77096007)(26005)(97736004)(336011)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2356; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:h9pJWXoKeJ8FQzHE5xjTNsyNrbKHELJbiQlXqiS/8eE8XQh0kHVkP1fjUNUWG415PugnXb+BSUghCMLFW8kQuoUMx/CpXVWIPlYdMEY+vT5r9Xp9mpluet+gmlTm0kxm MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc2525ef-490f-4840-2b04-08d55fd6ecf1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2356; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 3:/V5npJJcGtSmxiR4VWPe2fiHAhD049HzP5Go+3KG2L4tKPD1wyKbRqBGfN+hInLZF5gsBtD29HJm+LKCNknfFCScTowo5G32J6SvFU6kYiKzCwGRKCPzniW2sSG/pnw5IowB8P9W6q1hZlOPFYS9igh2BZpmlLm3DY6p+wi5pR4xgqYzVDQbfDN0RYMPE6Hlc7vt19qF0PwqibcQWxbjsT2OXcP7ZN3R/oREb13129mjhFciEsuq3pPEmlWqhYWWBCLW6fMgl2guqCVlTvUsF7cY/jvB49StJLW/2jrUbDLL2fXJ+Hx13wTuaS5vrVFt84E2h+fwU/0H3wa0Kh8JwU559Xafnvo9Dtc1gNssnMA=; 25:vig6lhmCPMO7S+8vhueFQcAp7G3ituygfOY+KnHG0LJ5lAswUwSuN804KgY7X6oC67V3xHrFzVF9naic4ZvnQHoCILhdEimH0lyw2tlrQUij36Z5iIHW1B+lRODBjJfw7Xpuilkg7AwL7FSBltkoADb7PSlymaDmDPsGYvhv48aELeomIhUrEO/sOH3gzDWJrdD4a4T7PHP8xa6ogSn61jUGvq72AlOam+W50jbYIqsQ22sYL1xd4QH2/gYymnE7o0EcCRoT2sAK3vIfZaUCt2p+u47HwndyO8CQhAv/KkekyZvUa1LnnmFGkivsece0lcHjPuLCXk5AH2J1Nbr9Bg== X-MS-TrafficTypeDiagnostic: BN3PR03MB2356: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 31:kPLu1Ah3XQ87lDxLCH0651MuBWW/HRnSvLbQTPEhGWd/zku/QgFfC+tsyUqazT+2J+fOJ7OYyGBNiVew2zjm3anYAiL0/zntw4WTAbuhUghEIRy8EVBvsz6uQacoP/6dCeATdv9Z8Rl8ChNszZhFqeuBNMffpBKYHscpzmMOTr62ws82GMm/QwKNKGKeIZRp4pr9R/Mro9LW3IpTys6E1xmeUwA164lUAXxmFC/TRUk=; 4:08ZL/AtoICO8hF4OaV//hkKR1tAJCwoWq4tgmpAMm+x7430z6yZ6RrBLA3fjkt/z1l7HTycqInDktljF1C1+dfgnhaAwJ/083ZfADYTdZsMHGRNIJX6faSamGo8c89XWwtwgSGwehKUrW6vdGIw1dyMHZy+HwywgibO3u55bLl3BzxsZbmTlXDCZQdyIVPJUXIRaX3BpX25zH9/rnzjgcKhZAumOHUHT2uVfYBmj7iYZTlfjZ9ow0s5+HI/xpvNxRe55Z1JJL1nTSMDader5dHYQGpn2Z/1l4jChio7i8NdhfhS7FKNN1FFQqK5A728Yi7IYKvo0fkttCj956Z10aQ== 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)(2400081)(944501161)(10201501046)(6055026)(6096035)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(201708071742011); SRVR:BN3PR03MB2356; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2356; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2356; 23:R650uckrGLuSaRfB6G9GMIdN+w6VS/8ujOT8Gazc2?= esylzrYFLxImJ6WsmS7k/PeMSzX/1vi8yRDUqC8wZHPi42OLLQPzDDp5qHFDrHUuHVcUvPl8ffMdYwzvTgmQs7WXwnLXGbVhTrlLNDHfdpH1YkfadHJHDud/LmdfLil05A4cJYeyoSWUsTgcD0h4SQQnFaYmG9SzJunxe7TkTodkTfE5NYUFffk02lzDErlMYMSj9/We8PrJ3h+21rMEtaaGEWLs2AVp57J+60FpIukt0nyz9vXSh5r0klT2BmahCRjLVMVwCBWxGyVWQyYPw+d8YRCNaj572sIw0Gk35kpQGJpuA3kcNwVCwlyEz1mF/lHAL6Ab0iArmOpnfKIyPh5XllmINJ+fR6f6QB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8OxC6BzXj1EkJbOlOvs6fJof9VB59DpHkJ2jTv1rHgw+h19/iMLFdxFRWZCczQSUjs5zCT5lMCYMRfJe15J+QaNcH53H9bPg==; 5:rFKu2fkFEg9iNJQUgJwpytnKlGbE0wSzZ0Kr5MGF33VsdUqCKlGZlLoq2P3yqC1RiQrjpWNxAtaaC13ojIUZwxuxrPTdel3mW+oIZiduDKpivT95nDQlPEs5fl4PUY5DVIVdOHSmo1yBkg/mZYNvQiPzK/UccfKmjJV4lTwM7gA=; 24:cOWjGQlnsC5EyWJVqKNIAFO09DfvZlUallLxYD/kisfbQI0/6JpQDVBXkJPIi8dBX+RcegO2mZ2XoaoV2cuFemsjxtVgOfnj4n9nS3YHBSI=; 7:A+fG8GvSCFHEvEiVSCslPS/0i/DsLCTgNHTWXNxqZ5FwJXU9/uspS1JFwUVhThlQG39mZRMd2PbxPsQ2/QgdAd9Up0/bAnIb//xuELXbK7nXoI5c92ew+zSt+j+d1p+Bo1OX7pb/zBlUGiEfMKKnG1RrXRSSd/IfBnA4WP5stTBH2iI4D9UsHgOIwu+z3yIRwKqUu3XbX8eW9c7zRyzv4L9Qt0mlIORNIIWfmtjqvgJtkZH7FMu/kL/sQvB23mwV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 07:24:57.5620 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc2525ef-490f-4840-2b04-08d55fd6ecf1 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: BN3PR03MB2356 Subject: [dpdk-dev] [PATCH v5 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,