From patchwork Mon Jan 29 08:10:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126154 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2235585ljd; Mon, 29 Jan 2018 00:12:28 -0800 (PST) X-Google-Smtp-Source: AH8x227FtUwX6WUhYdeloMUDbk706WTgPoAP6MstUBr9MODj4gURURqru/jBAorvNSc9Fqf63HHR X-Received: by 10.223.150.208 with SMTP id u74mr7947764wrb.193.1517213548077; Mon, 29 Jan 2018 00:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213548; cv=none; d=google.com; s=arc-20160816; b=mNnNme7hxDNV0TivD5SLvm6e0Tv8I8Y75Kz/IhnsfAOJARqch1zO1WJ/ZQ5cu/jCc2 eQI9ZWJponx6PgAC6EmHaUb2F08t5OC7SOvcbiyAgz1yb1xLrhffyyhPCcL8FfZI5g6g 3oizUuR9fRuqA3/SQzrtbCBdZ8dJ2/j9+CkqDpE6YzkgmNd6g+nMCvhCFqJ219nWvnaP nsYfFHXIS2h115noli8H4uS0EXuvX0D1S76NZqkrsb7ql7NPz6MGiI9Z3kWgahonowcj 3lsq3qDr0jK52EDZT2hMvLFk8pNuJeAnVgks7n1/NX7uRBiff2epjpEzU+hJn9ZkRoCF NbKQ== 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:dkim-signature:arc-authentication-results; bh=LTvacHxuTknv/lwzdxVfsMyW6MrYpAwb1y7v6taPJ84=; b=wDLSeW5bnyPU3R0pQ8lPaS/FP89s0F9EVgdp+E24Us+NJd23kq+3ab01MfwTEMIK5X QUi8slqyZ/Po8ZBkcaXNxCB0R1EydYo/pmjAyXirjVUhQQrvWy/jCZxd67YzCi0fxQCu TCGCdm17NcVFGxQTJgUud6jpu7ev0DLcJ9oPrDidribrCtnk+M7fTuKHwGBpodtGT8JL hThhh6al6+4Wg3Q4vecbTLrwwZkKsWaY8UCqdI6RILJPUCatCT2dDCFZT/0wAxDr38RT qj+RTE+IebguyM+xDCkaugkl3TAz+/C4RW5tIE6UolaQ1jamW7CLA2DYcOUo0vM0icWx Asqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Gl3wvwo4; 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 a11si7033772wmh.277.2018.01.29.00.12.27; Mon, 29 Jan 2018 00:12: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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Gl3wvwo4; 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 4C60A1B32B; Mon, 29 Jan 2018 09:12:26 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0073.outbound.protection.outlook.com [104.47.2.73]) by dpdk.org (Postfix) with ESMTP id 8DBB81B326 for ; Mon, 29 Jan 2018 09:12:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LTvacHxuTknv/lwzdxVfsMyW6MrYpAwb1y7v6taPJ84=; b=Gl3wvwo4F3UuKwkw96D2Zs/nyLi3Zr5giHj+CbpgO1EA+0MGmBoe+dloy+a3g3p6BM5TQttlrn0JVCbUkYc32JnVQIxJH9ORcwSZ/OEQTP1weMg0+J4KTBbAFTpmVnlNcOBCnahouB/B2VzKXBRk6AaaJ7IP89jR737ZevCxcXw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:18 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:43 +0530 Message-Id: <1517213449-678-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0d21f739-ee4b-4f15-258f-08d566f00470 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 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2gJdeGdbDyBLw/ECFE/tOxx6/Um6eBOOk76MHrxQhp81SJ2TNfkz5J6nbFBdK0/GkQ2mO6FEITFQrr7MywuzsUR10UB+kMfjIyqdRss07DlfwY6fmi1zgWq5oFWggDAS+OOmBCHDZpuxHdDpRnuuXYdvup9GFABKUbxDPy0IBQ6NBZ7M7mXtazzR+9gIWBspebOVvNXS/QLUD9AEW3FGTBwUDq1i/uK9hRwIBeSpsXMJCDXD9o2wvYli0HUGXlR0AgBltDLM2c3LpSa3VDbifgvRdIyl/7ZZ38CZK0Qbh6L0aLxfP2gbvvLm2Ksp503Rj455yfCv86FdEftZFFzPxCv9h6XYym8Er0whPrBP7j03+pmNdy+; 4:PVQ2cHBVGCYxNAOAgQihpF/F75Md4nQLUBEM3E7d+FhewfUgYz+V4c6As4UYeZTVLzYOHsuyySrd/eENjuTy9lW6Cd5uR8WNS+OxaVJ7FXTpQeK+76SYqz8tta4C1F4mnWqcgmntZpaS2VIhYmRlqSEzgwNbqhtqfQS8Uy/k9bl7bBIiJ7BSL5O0Cn7sRBUzDniLFfP+Ik9veFXZSbVOonHoQXmugApSkQGBQv2KLK0SnexSFNgajZaE35LJxyYxBTDANSVvkIotr4KesMwWjd+yLuou81TQRJwQiE5OlV5mWrcL6wVOUS/1xgbl4iUC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:RCfe9AtSm8Yq30ngvi7sNTqhQBg2uWwyLxeRTtTY4?= OFjNI4SUSNOjwhd0bmflw32EawpE1WmDrRYmwnNOVOFOpvswzU83hwXfh9BtvokjrgcT/LdPdWmtIo5XXkhXdejoZtUM3HVfJXRnnUPcZtzbeQdaYKlIiU96Cf83tUvljbmVAi8O8hXKeB+hSfUmUJGUw4r2wCRg5EhT+pncovkzYkjqcyfPygJHqNobsJjt8Suj2zuyH7HZktomnDEwD9S2mrDebXRBY2OpNcrIui038nPrKrl62izhfJNuSt6OuJEO1zdFvVB7sSST1VziWxRWMq46BfNJ1fS4YMBx0wMvqxLn6GqLB3hntFZtowfpxaIKRPa59FSziZ8odipap54BD1PWY8qoD9l/TTjRe3KtTqj902nfomtjEGhIn4E6teAbBQygpk0Ew7XIQaM4ODKNJzjJorsC3VayB7QRh+UibDBJuJa2nE+RI5Ral5zTdhoc+rr3dBAgJI82FRdgBptYjfoTuQrFJJkB3mR/rm28xyE5RzK5Wb9CQJqh5FaSrUJrR8RbBRdcHYIpfaNXU+En5R8vhaQrsSgkWnT5z4UKArrb9ddEEcFiwYlXkTYGlAbhrRjAxwCkCCZ3ILIK0bHjn0qnRi7hhC7AhsD/hRIR7Y9NLMx9UJckPJPXv7KEGObeRm+3NF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11P5VrLnYA8=; 7:7+a5TnbSZz+knzm/EWLaqTo4a1bmIx2TH2/cBsVHveJ1jvmVZ2nckDA2rD2vIhrBmPUZyAlLZ4UbMtKkoEob0qfwe+d7WSS0yzAwfsDd18acC/QnX+LHnLKgwtyWUNExCDVHyKyCyLS7dEaI8V6+zXUNwEapAxLIkL/nYkr83NOHA3uf8pkcHECEC+XREmvcHsyqaxfyPkKozCwnN8muo8gW2TzXcPKbeW95vJ1iqTCy+sFKKBMeEV8YK9skXSGI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:18.3249 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d21f739-ee4b-4f15-258f-08d566f00470 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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 Acked-by: Olivier Matz Acked-by: Santosh Shukla --- 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 ++-- 4 files changed, 7 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..7a40414 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 = RTE_MBUF_DEFAULT_MEMPOOL_OPS; } 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: From patchwork Mon Jan 29 08:10:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126155 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2235702ljd; Mon, 29 Jan 2018 00:12:39 -0800 (PST) X-Google-Smtp-Source: AH8x226yyCxru37mj0ZzS/0BdKKJ+oTlFh8SvSmP9tW/znFnN2tfTLK7zzLcEvoXaVwKfMbdw3Aq X-Received: by 10.28.61.68 with SMTP id k65mr16077903wma.147.1517213559686; Mon, 29 Jan 2018 00:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213559; cv=none; d=google.com; s=arc-20160816; b=z4AmVmXCsrfKADsoIjuRZhdgf0zvgZ4h947Sf2m+VBvMUQAfbW5wSczgdch8iM6AQD Aiyh/9cfyDTrMX/CWnKsfp6SijsfYrPVmvqtPekbf2QTCr+Y2Od/6mNoHQ6/U08rlWM7 YN3n9Hw+MR0ksf8p2Ib5SRdJE4/FLzr2qttNtyVxfvCjvUE7/eOMZ3QVWbBoX7XzmKAw SNqmqXlllMYpszZ9b8c4VcalPGp/aqW0A2+/+Ol8HsqjsISUdQhu8uhhEle382vtWBnt jC+pI410z/0/C3CCZfp2eECSVt1ARt6CEhHrFpXr4ao76wkgqrUR8AfONU/22g6IkGsG JsWA== 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:dkim-signature:arc-authentication-results; bh=AqhC+4l9ZCcs0Q3t9OjqMfoRZ7nm/MnXOdXiygve0H8=; b=q2I62ZRRux9LCBgeNpWlv9LB1mdON1AkeeUFW45oZpIHMI5phre+OStbbWdQzqr4Es wx48Gc/BTXVAsvMKuVNuvRqSIPo5dwqoo+s1J5G8a7D127Qu6Iz0eZlITYvrhFPhAB9L awL6d9GP+/yY85iWaquoyyd0guDVMUwb6N8LUHS5QfQMYRbfrzx9/wMDFp2O+coZBiwY 0ozYLQjBB4pSmWpo6smGej3RgjWYYca0DOoRUzGiqOX//HdRBAzaXC9DlCMyKvgSlYpA OZVlRDn7CYqdLwU7X2ZVaN3o087EPe6/gET3h2tQDsirDYbA56kKoEiYb/SQdyvA4KLV h44w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=xeTh44rz; 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 a21si10016729wra.286.2018.01.29.00.12.39; Mon, 29 Jan 2018 00:12:39 -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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=xeTh44rz; 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 F26231B330; Mon, 29 Jan 2018 09:12:26 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0087.outbound.protection.outlook.com [104.47.2.87]) by dpdk.org (Postfix) with ESMTP id 8CACD1B32A for ; Mon, 29 Jan 2018 09:12:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AqhC+4l9ZCcs0Q3t9OjqMfoRZ7nm/MnXOdXiygve0H8=; b=xeTh44rzN1CcizSkk55OhRa0bPTn/USyFn3Qvf5gKDqF9x4OA3cVo2rKOPKlg1x2ljP2CbMKOSVfaRBd3JojXVf3hvuf5hKYyd+JwJYKj3XCsMu1nVBZ7PYneq0Qf8JdISkSjM7G71UiBSOi90gwohqJ1fgF7kaxdei/G84M0aA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:19 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:44 +0530 Message-Id: <1517213449-678-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 63d8879f-e0a8-4992-a632-08d566f0061f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:4blqymZU8GbDtlg3zkbYIutJRQ5pKuTyAg5ma2tAzY8oAcFkZLpYz3EgM6u4KaKNeme//LEGUH5QBKNUUqfmiAeyHgLu5WFYw3l61WYzDW2v1I2gpvl3Ii3Jh3Sr0wUcBAAEaI06HGmlcGBWsCM+8RpPd1H35x/2gvIawGNP2Vr8b0HCKyVne1TqQ20P07JmWhZ4C5MBmjff6U4Xj/fKeYsoe1JD8Oyz6/jiHW023uBzUHYA3rpEBFYvQkNdAwOc; 25:ppwjn4KtY0lXUTc4UDXXwcPpPJXr5geebC1ZzgsQjX4LvtQnpvtjcvohUgLzjtbc4ZTHaYHiVFpkwUbr+1BShF6Vjj42LS/r27ClENEtjQpKKJOTjhyNxsSj1xAgGTL1avJ7UCBUFK1JHS1gx/8GksoElTiaSjAEftTQUlmFr/P/MdteZNFZKqimFwWYfXTZoNLDeYsInh/OjCmirsT93fwNQUn5d/ZcwebrWECIuhU7iVsqWrExYmZkO5me4ILuhc/mRsiYxB36fNH1CaJhRAD5WxaBGpP8ajLhaRas6v83v48lVvpZ4ZYLFU/4uypsqtGZ31g9W3kdPoX3F+oRdw==; 31:8I7EDilv4rlthammBiFgOXsRzkK/yuwDmuEw3N4wSIsJymlE+J6dMhPNzq2yko4XJxib/xP0oncrSCfNY7puSfeSCs+r9bmis6p0ExvwxQEr0kbkvhQWJ9wZIp8x4edVGesBYQohKjlC8RLHAwzg3NE8u104Gcf7kTaP+GZTvmDfdJGkwTkeiemO/bpJR6MdAg3aFUt1RV50W+gLO3nMJ2jbKdWKMqMdoMkaFfToS7A= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:7KqEwg1k6JwyZNQy2/JrSDpatQD993nEyJnHPmxBj2TVXaiHYTAjYAlNamVqZyTKHrq6Lavp07hcfROO537/Oeh9AnAq0Et+nwcKBbrQ1ppm+NDu8zabP6waOQFH+8QD+SidAvMYQw3T/IjiDMrOPLd5/pOm+zEooc0/a6xL/j5o0rNezVZSWa9dhHe04eVW8yTuL1BCRrYIrpQjoOtAQ+c0/V9wGq5Eng6XWe11ltyB5x4nMGRQXvldXb/p+RszOldjP6ZGAZ3wzgGJcwWYwqx0uv/qc/gQAIqoORnmd7qnrdMyXsyVdLkR0QGHN4gpXkIbYvg1TLV2Bhk634WKgtLPuMw5bB56h0GDHqPNqK7I4mTcn67maC+HvZk0wePAwEH6vD7ijfpXoXlwR5LWDy/yuKY8D5Tqzw/XuAVe6XnQVX0zavlesS56M5kEUAJNwT5Bb+OMvqjuCDics70ivEeyXWCBNK/Z/kNsxzchF8J5do38Nx+TmJMs2ofUJON6; 4:XSjOeowl2TL9Jw4V5RosRM/S0+Y1TkLp3iUwFCDmgIg9mi+U9tBZp7ZDacs/dFRinve9GoMXONN8GXldZZeW329esIdh5JShEbPPSLi78lnDfQXCYp7jpKIocO3+hk0mdRJEe9ECieWfIYa3dbQZgWQ5QIVOLgyxaF54867nNuDnEuUiv2V50hLrU397YBQSdhUGyDIr9eSBsldscpvvrDJ8P689gEkbnVjytDG5vtLe0a03GfIs0gMSuwD9wuZq/rV/u8NYYD2Nm3aV+2Bv5ZpaAcz0E5RoyvwvjZ7hopi+2kfpkZEHz2xKRiAgvU19 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(59450400001)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:ddc2CCL8vH565v850iedcjraLceeaxg9pM01JryBz?= u+8oiXsFF4KckdeLEg8y/ma6uQFeLNqYhNtKwRJ0XkXdMBh/FuRPVDC0AGVIPVvWmaHeK5Wkj1FsgE2/VbkENpDMJAoRvLiP53ClCH5yR5K8TVb+stRo1/PCpkrzGYTrsAAXi1TPbGSgTDDl+uIfKkj6Vx9VUb7iWadeEvzNHC5jS3oJ5eDkICd407NI7Q8qcYAL4D+kHySCI9mVaAP0VebHhwrvmCiu+9heAFASmGhGqBD7mVBweNP/1xZGMOeU3nTOS6ED7OpCh1p7cGEeNS1xsU2KaKlg522zNr+JKugOzkwTHvveZc8NpPFFv+mSoIEYmOz+ncBygyjk1vcmwXOncQ0HEyavru45XkNyJAliU+duIv40rRvx+5chsy8BnexlMTK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; 5:Ge7nU0Uam9PNh+D55vw2QUN0XUjYcYYgFMbmyJVgZLxR8D6WO8YYkFpgSwAR4iSvymhBUmTE9SYd0G7c4f4lWRCsix5VPz7UVlRBC9LQno8KFlJucpsweslgGEMGl61Lx25W5nxI80hHXEU5ECWn5Yxk6xfiZbdKcJmCX1eF11I=; 24:ES5BRFK8SuhismHS7QlXJU+NNNOlb/OWiQBQ2Kc1GroGRvNpW8uOickEIbNib/ovOIgaPPk4KsQSfoloNW6OaciErxxVMReQ2NtYOlFI4Ng=; 7:ux+sspF2Ppcxa2dcca/bb1nBLWiftPOojNejOHtIx+rtI9buORFgXRf1YYaSd2kbKuOQ8Bo5zfODvtzkEwEa0LBGTv1IsPj1NpIWVDdIQpaDmwafZfRCA2pNHH3f3AcaeeJbvCZEGLyd6YsznY5pGEGN3frzXbmiYD3wMJFj4vGHXpzKZWNHm/Vms+H7EiFr4T3FmjsuRy++pOWusLauPq4W7LzxfAjKQTOAVx47RSjL/nqeHzE7W0f73F4pN2qY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:19.9966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63d8879f-e0a8-4992-a632-08d566f0061f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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" At present the userdefined mempool ops name overwrites the default mempool ops name variable in internal_config. This patch change the logic to maintain the value of user defined only in the internal config. The pktmbuf_create_pool is updated to reflect the same ie. use user defined. If not present than use the default. Signed-off-by: Hemant Agrawal Acked-by: Olivier Matz Acked-by: Santosh Shukla --- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_mbuf/rte_mbuf.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 7a40414..b6d2762 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -218,7 +218,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) #endif internal_cfg->vmware_tsc_map = 0; internal_cfg->create_uio_dev = 0; - internal_cfg->user_mbuf_pool_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; + internal_cfg->user_mbuf_pool_ops_name = NULL; } static int diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 937fd70..c085c37 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -177,6 +177,8 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, return NULL; mp_ops_name = rte_eal_mbuf_default_mempool_ops(); + if (mp_ops_name == NULL) + mp_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL); if (ret != 0) { RTE_LOG(ERR, MBUF, "error setting mempool handler\n"); From patchwork Mon Jan 29 08:10:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126156 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2235864ljd; Mon, 29 Jan 2018 00:12:55 -0800 (PST) X-Google-Smtp-Source: AH8x22725IeqeP3+kOt4SBvHVxZUfmATNIXqspBBOHjrjSWg/fCmK5z5Wn/PVdse9C9gah9bq1xa X-Received: by 10.28.150.139 with SMTP id y133mr8103684wmd.142.1517213575522; Mon, 29 Jan 2018 00:12:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213575; cv=none; d=google.com; s=arc-20160816; b=AGsLWg5xHuwvhn3Aqpw7W9DWNsDe2Ug8C4GPZfpFfBvcB3mrcuHAbWZRlz/jGsjIai WrGVR8U8Nu3O+9aQYNdx9baw1+wKTtkuECus8+NCIadwjkUIpTT1vPCCaC+VPcTuNdwb Awm0aqMT6/HCwvku/rO1dQswoAskaH+I0bcJdTiVOuBkwvLz1e4INxpv01845jVWaHIH HZQOeyzxAUZwxRPF/NJgli21HmTRUn6YboyX4lnpG95LY1CvvGcKsk8cLr7+BcrfMXPT nfUxkKrFCXVDglUqboN5YT/ej6OfKfNz48oIvskCNX5AbF0CHlBSjKLig1QVvgPKZJ94 VYoA== 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:dkim-signature:arc-authentication-results; bh=kfH+yWIkZv4tziltsCHGfL7LJyae6KAebKzXmhYVbmU=; b=gg7SH7XOchRhhhnlk+rMlgQcF8OvvVa/Kz1Cb7lJdpOPmq0QFgksVGzNMif1xvgLUP g7JN7zYbKYyxnBspDNDxn8FK5Gxj5VSTMCWmZgMUmYE11oMGyRL+OI02GyDnO/l7O9ui sWwRQO8JX+yLHUZosPSU2Fuid4Ho9elFTXUwa9K8bfz2AmAmijJ2lRHpbJdcqfdbLEum SHJWgPmD8+Y4wVmZz1znOr0ppMq9TeDd4FjgisOaIBftnhY8dllFWv6GhLZ4fAXv8qpR HGiGZErspPAj5YK9n6I/ozs8br9dtw59I9k1Co5uFHOxxbbHDiuxRgOwTRJoYtvDrPV1 A+Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=mhz7sWWp; 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 1si9943686wru.221.2018.01.29.00.12.55; Mon, 29 Jan 2018 00:12:55 -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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=mhz7sWWp; 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 DE4351B32A; Mon, 29 Jan 2018 09:12:34 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0055.outbound.protection.outlook.com [104.47.2.55]) by dpdk.org (Postfix) with ESMTP id 6A3AC1B33B for ; Mon, 29 Jan 2018 09:12:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kfH+yWIkZv4tziltsCHGfL7LJyae6KAebKzXmhYVbmU=; b=mhz7sWWppyNim5QwX3hrcuPwjh9uDhFyqpZz7PeftAJxTAA1sxV1R5E78pFXeYAgvbgr44pQho93ADsm8GDgm8WbBAr6qEhk7scKV79gSlUxRT/tlRf2wdC9f+aWwwlJ/L8f6Th76Yrq5KBZbYCSvkyhjMVbh3ZgBE+oejRr54s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:22 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:45 +0530 Message-Id: <1517213449-678-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6998ab4b-f7e1-4d1a-8930-08d566f007d1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:eQ28dDsV1LplbQ8XzpeYuCamhFRdFeszY36rpoc3pFAt+B4L1XPA5qafIsTYu7D3au1nRGDtpwb/xPgqObbQbwjUwapIJ/hNYjsNr3KKKFuPq1iKbpriExt0iz0Vl30X5AaWCuGU6QzBGm6MVtogR8j4twREtSeRTW0c06IjZRE0NkoXyNrID//5UHLvU897Gsbein+h37NLT2PBEzeQV5riuB4srng7g5ceOdD+xUGP2j7lGBor5R7HpDsWWBoT; 25:8Xw9dgK621WHQH+5La9lbWJpwKbzk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ErHKyhWcyopVJjGb5HVqVj5RDs+rpZ2lCP15W4nydP72ou6eSYlKf0yaL; 4:qIrZU4Av2riRldsozGLHIOHUrp0H5I05aMXXipFctgD75r5ibUdmS1TKhpijR38q7vMIUEE/ku/3X90vwYFhd7nqFn3H0+ZzNhpcJJG1kSYWqlXwWyoUjW8csJGOLw7p7Nih1xOZTk6ecydk9x58r6Q+P+zhe48p929BcJoQ6EprqHkNnV71zjZnVnawtpwcrA4adD4ly+bnoxLEMMLOsDyqugUN2PAH0P8vC1CDGyK+m0lMzqDIVwCtp9/A9OETi7I/1Y7jG4w9Ra+qMV/AA8Fa3odHdnPWfj5/68sYTXC0DD7+fQ0spYJKWyA/6kmL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(59450400001)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:WAVSxlg4W8zhBCzJ2f0tkwEDXbQ1V8JJlW67vzdg/?= 2utJ6M597EoBRbK0Ompea27A/9xHVhMvib+9Z1Ix+xRksmSTCqGzqarGe4/vHdzfBgyZbh8jDWktltW8T5j/eWMxUBzGnGEDG2qBCBWSCMGzbSxbE+bAIIugdy+ExlO2gl0iJn2JJYmGfTe0hIr2q0qSvR8bStoE5opKKkeU8Xej5vpybzQPVH73WCMjRQv4qqsumEXhC05hJ63Lzx+mvMJFExgaPDgnNjYPAUNhYFk9W/SrkxRWWXevv0CL8uwBjWh7pRmXfN7fNigtwZoFyMccb3ypmbP8W2AXjKK4ihOQVKl0Y0/K5XN6Er1r+Qn1ZapKMFx7pKiX19D3c0Bw5pxz29PqIKVejF3NKOeSfg+7C7PbSfqqu7uxBhN1oxDiaWJgnNbKIE/wFgk1rP872HDnPa8jsnl4H24vaYTITPTadji4EZVWm8K0THgpZfLO3qvOVcO0df8NIon1VaRl70lo/72GSj1QRiyV9hD2PVxKiQVDexj47ngE77WdwKd0zprjY68N241Llm8cXQuhXWxlFOwAN69wi5GBJ0kEMC5WAe4QpiGNvHbXYHiesFn7929OvWyJIO1EBdR8z9nMeECup8t1233XJFFOCRId/dpR7sZB5EUjiE9gZzDIq6dAzJQpuqDHfQe6KGcmMgGXmYlWVe2BLTQdrvN+ZqBrzir6FJRQgDbPOtkAQoV/KgeOpAfocFO31RcCUcFH5fkpsmhghA4Gh6R9jGvjehLc1T4Ph0Ci7AAOgcpQnLqlKw3YovF8T+o6Zcs7QOipoctq7dK0nETykjdUMAswuORw4YVNJ0Jh/e53Pa79SDCrFnE8aHReD8Y17f7Js3XPOT0NqkD2ekBc8MMJXydszbcyD8E3MHXmU5foG9+lPTY1f3ka1XU5bfJ7Mu6fvSO8/p91uxxy8xWRpTgCeV5Pj6Q1K78Wxme6sPgslp7kWg9Els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 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:22.8401 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6998ab4b-f7e1-4d1a-8930-08d566f007d1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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 Acked-by: Olivier Matz Acked-by: Santosh Shukla --- 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 | 96 ++++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 +++++ 6 files changed, 208 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/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..e8ee20f --- /dev/null +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.h @@ -0,0 +1,96 @@ +/* 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. + * + * @warning + * @b EXPERIMENTAL: this API may change without prior notice + */ + +#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 + * - On success, platform pool ops name. + * - On failure, NULL. + */ +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 + * - On success, user pool ops name.. + * - On failure, NULL. + */ +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..db87819 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; + +EXPERIMENTAL { + 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 Mon Jan 29 08:10:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126157 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2236020ljd; Mon, 29 Jan 2018 00:13:09 -0800 (PST) X-Google-Smtp-Source: AH8x226hsQBBJZ3s4h9wRmOdUw0ykEVbMvmCDHjaIKhtyFrj8j6P59CLu+UAavkpq7CVLotPNQih X-Received: by 10.28.96.86 with SMTP id u83mr15839533wmb.63.1517213589748; Mon, 29 Jan 2018 00:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213589; cv=none; d=google.com; s=arc-20160816; b=oJEuDg2mQOfC2NInI7N8r/+/2beeJBaYGEDwM5bWiLWlj+XsbSHkNBWRo9IkQB+aCG Ps/fcrkviudtSb1sJzQRNFMRMtZwTsW1r77FuY7BA/shboWjHQ5s7p/7esZe1+hZiVzR ThiQ0qv9Ml30TTRcOyHUH3gppgf9NA8wADNqh8KL84wQIet5JMZLrQJT497p4AknhAtc eu6C2p1YYtHoDrHETiF4r4PARLb0u5gh3wJ75RicaIiddfUACTAdxk9vEm5cBS3aFe8b IeQCIAG7W0FIzINv5BZYdPZjImkU9VVBgm1ikDBI/Sik544bsrr7J/vPh8oCVs8CUo/C kx9Q== 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:dkim-signature:arc-authentication-results; bh=DRAuNPQhrL3kb25fg2VE+v2SNn1WExwmiRtyf0pnBuA=; b=BD6mOrO6iyNNWPzwSblqgKqG9OEDMXmEFGU4RqWfIAnR3iKN6Jd6/XOWkVTHLcavPy CTzWMMsKVFU4lHfypcffxDz39xcW2dG1fov14J8LeFmv5T4Z05AwlwLCEdCj93eKO3tE VSJ1Y8nxOmQ2J144NYSW4nZXaLxIILwHBRVvC9pTwfUPA8FLmyPysWCHqDveRdFgi2ZS wP2AK1rGpuLrpHG6oAGokl00QWl6/tPgfkZsnUxr4CGCWIuJhBRHdX49rjtIkJGf7poT 1Uu9lR1WjqojFncCgT23yPj+zzehRCfL6eMFcor/c8wh5KdBe6kRm3buM8MLC63pZBOF 5j6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=oer8SB4j; 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 y62si7138591wmd.96.2018.01.29.00.13.09; Mon, 29 Jan 2018 00:13:09 -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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=oer8SB4j; 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 B58731B33B; Mon, 29 Jan 2018 09:12:35 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0049.outbound.protection.outlook.com [104.47.2.49]) by dpdk.org (Postfix) with ESMTP id B09651B32F for ; Mon, 29 Jan 2018 09:12:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DRAuNPQhrL3kb25fg2VE+v2SNn1WExwmiRtyf0pnBuA=; b=oer8SB4jrhGkA5nngM4D1wHhozoCrhGgCk+fdRpO6zeAi4et9cGE4daYEkYMCYQhCnsuLWIjJ5S9Y4Xx2MfqqGmiM0C2dMlO8DXOS3grg6Ae277KM6xrLv1YwGLjweyzn2baT/3Qn8aOkDA/IwnX5OqPe6e18zObQWabosJcF88= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:27 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:46 +0530 Message-Id: <1517213449-678-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c8e93976-ed70-48f3-536a-08d566f009cd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:0C6Cw+rbMCaVL/uWgAPwiNtdC9tfY9GPaQkgQ2GgEs6WJHnjXOXjIfMOis2cdaJFJzZ/BJL+xrChQJxP4FXJxxBasHyaYv8NKqhO6XbidMbtdI3Kyak4ZbNoMmAFmIcbyDfzOPbiBznvn98/tJs5NhBkuJOyvd+XGFcfZWXcFfHJndqDDPA3bf7iiefyjlnXL95knlT32SKKNe+aJLDZYo5B1iWXYnX6nhNPQMOHbjf9R8JJxWHsF++WbFVEEr87; 25:1Xxg9DrbswVox/5tWwpN9jN+48MEdROOijLQZXBkFPw1VGa3+EqUgPL1fReP46gMIwGzpcxm2v5z2ElrG3af2gW43ckUixHmGBnLkbPhmMWj0kpwzBEBRhkvcHMgqVEK3z5L15312fwZuFdtXzTpLyUsu47qDk7UqM+opGPADRQ8s3Ntj/ZqE2nxNijkOdYw5kyMEB58ghLUgMSy+xUy0Ba9FshB8OwKBd7rjhvr/YOkM2wfuEyhjRZqeOYso/s/K9JmzEsB2HMNuRgwCWihp1YOJN1CmWvGNDRuGAnDNWJyJ6fS/urqGgOgErPqtFmOFREGv+nIQw35i3ZawZXWoA==; 31:FlCGgcJkCmzwFicH19XTWGQHXr9Pg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B9PK4OmxiTvVNGf29HMNw+nKWA8zDnrqXRD1Yzs+gC+SWMC2RToT+ah+t/kmmfof3ElU0pa4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:Y50dvhCY38hV6UaNq6u8qBxzdlJZVk19alM8c5S7c?= f47jjG0xFTYvaVu1sKam06pXypwhkJqdwiISK4jEXz/QaZXTyNY/MLwwJ4jhOkzqnxwytrCIfMRwWG4R7dhCyVd3N6Zc08H8USgxn67xJxbsXJUxWpolSka81W/y3rwhW6E0TYl7ybjLIjB8BsYP85bjVFxmtci4bqAXpumxJqiRTY9lpv3+IzqCW3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krBdaJ0cF0cin6Z1Ll5vQW9o/ROasOJBWVw9b6Ai7EyeT+Z8ULHJBL/CjIKsXOl/HaiH5rL4O6ZjszcARVteUhEMjazO5nzln4VJGLx2ayKLQX3GhyN0990scV3LmGz4bKSkjQW9ZHoKE1NC9A8L1rolQJT8o0=; 5:V+tvaVL/jwP655qIM5N5SZVlHr2ssh2wOwGCBeJ9ps0BNYeuVWeJA7McmeKYiJ++EzUP+wTdc1OT0JgGy75eO8nQnJsYmsf1icEhITNzL8MizOWjS0zTsSLmYyNJcrWHTDwj+C10/Yfxk+iV1N9lkA2MaKxVVFHs+xCg5YUmOGA=; 24:7WBJkRHZgZ1Xz9++iuStLWR7WtLB9KiylthlJWOz6Ew6Yobk6YR/LflWgXV1d6NCbOhHcW4dIRi1dAmgh8XgcKobQ/tUnH7mM4zMvwXSVkE=; 7:MiNhuYQ5jt3kmBZ5Trc6WtWtGNWYewA/yGgbvqMQ2dBj1EN13wRX6gvD2t5R4sDFSm1kluaS8NsoiNFzQ6S1HRDgOAQWJzR8ghLAqND55KQ8WgesFMV72sAeDXWVjguVHR+wzUkQAhPwK+8VCzSQAx0EvNTZihsCqEqi2IKLCyoDNgZne2pzNMKvsqkiB1oSOnbk9xQbwAdBlkLR9Rjmk1JZfeOQ4Ba0WS+pC/mbtuz+ZVc/ZylxhUImEWk+nxc9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:27.0429 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8e93976-ed70-48f3-536a-08d566f009cd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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 Acked-by: Olivier Matz Acked-by: Santosh Shukla --- lib/librte_mbuf/rte_mbuf.c | 23 ++++++++++++++------ lib/librte_mbuf/rte_mbuf.h | 42 ++++++++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 1 + 3 files changed, 60 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 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 2fd4f5e..fb367f8 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1101,6 +1101,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 diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index db87819..d418dcb 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -44,5 +44,6 @@ EXPERIMENTAL { rte_mbuf_set_platform_mempool_ops; rte_mbuf_set_user_mempool_ops; rte_mbuf_user_mempool_ops; + rte_pktmbuf_pool_create_by_ops; } DPDK_16.11; From patchwork Mon Jan 29 08:10:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126158 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2236170ljd; Mon, 29 Jan 2018 00:13:21 -0800 (PST) X-Google-Smtp-Source: AH8x2249GV9exnmsK9OySaTGkCOmz/KVjt/X3zA6to33+rNjFgK7LFiDg5uu6qLfPkwKTYVNn5ab X-Received: by 10.223.187.72 with SMTP id x8mr20095868wrg.179.1517213601539; Mon, 29 Jan 2018 00:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213601; cv=none; d=google.com; s=arc-20160816; b=yCbDSBc/z5n8rWraU38m/aN/+qnNGUKEw477PMlksyGAs4dNbohdcqdon1rQQyR0Zo AIQrDpxupysHEEqvvuieyHGiVuVKKIMpfOV3fv1gP9Su6HMTEyiDXID3X+8ralLIsYoZ U/r9SSvtvQ0gdZ20bsoBGcGJoSUHCZKwPQUOj8g42el9wKaVAnSph+lCPfn5hcnQGHwh jkVnlRpGfDB9y69Vea9ESsPsXszpsFmY354HpWIdODQfmUwQ2L0+UorlBo+ZC/T+PbJd Rm9PyEw8aoUqSkmSf7Fr91a5QVzjuZBUJxeAydhEvmKoQuhsZ3+pv8weRY3n8uaNqSrr j4yg== 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:dkim-signature:arc-authentication-results; bh=9HH9fpWFfJJZjlwGreZG+f4QpxsBBQ2d0coJ42ciVhw=; b=NS5A6XTv62sbskilhRYPLRyGy4PTrWWFIMeeeoizZ8kudWPaxlbkcSkXAPrGeUbXMR Yt1iZrDMSHwItAGhW0RSE6MNSIluNYni8HNnNls1N9ImdNfyWHwByYhOcuZD/Ijp7QPA K2ZIfCbvmE5xzQ47uTS/0TggoaD0MLoK7LForGFWaxwNH247o9N1q9ZWlSxEt3ROcV4z DQXhUH4b9EzGLpSmhThxuX02p23nW+E/9NcsmS85Shk5byVcse5+N8rDG0JYcAmwP9oV xF89MuBLNgcx4X3tIuunIYrU/GQRpHFCNF+reoTq7L1kCTDX17+ejqLPB157QKarmuU1 sS9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=hjUCLbCS; 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 j1si9529604wrg.428.2018.01.29.00.13.21; Mon, 29 Jan 2018 00:13:21 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=hjUCLbCS; 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 4E8381B341; Mon, 29 Jan 2018 09:12:36 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0058.outbound.protection.outlook.com [104.47.2.58]) by dpdk.org (Postfix) with ESMTP id 4AA871B32A for ; Mon, 29 Jan 2018 09:12:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9HH9fpWFfJJZjlwGreZG+f4QpxsBBQ2d0coJ42ciVhw=; b=hjUCLbCS1hcTxtpY9jutsQmMLTfq0QiWfk5IJtW21lmZbxqr48wmJVm9pCe4G2mZDF4s/FElPEletiMnALbPSFzj3gz9dAo9ed8s278R2hJUj09sORdWSvMmcc3QMuEwPCvvKDpPXmwatOvklqHK92TcEDjldk954kk9LtDN1Mw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:29 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com, Pavan Nikhilesh Date: Mon, 29 Jan 2018 13:40:47 +0530 Message-Id: <1517213449-678-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e8faaade-9a11-4025-b35b-08d566f00b18 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:OYdpXJ7seiDL+FHdKkdKfcxBZJlKz+aDw913HMId+aJagQbGmeZDp71IoBVVvdBIZy7gbKkKpO5I/qjEbrMlQmdTsXdEnfRcNa6RhPUwTcxiWa+r0A9gjyE4g32wzHHhqVNNsWyDr4PqHuCD9yi9SryHDMDCnLjF+IoiP11XfnQmvNYyD+Wh7DQZNJXV0vC+uoPSkfOADrUTo40NZMlFl0helGh3dCbM9S/I2BfNrDi4snvmpRs+DZmUM+tJBo59; 25:kgU1X4Ve51xkfmDBPfb149xT89jKyObaPuLpjnYGJaWs6QIXFXjPiKBOveXWmsORkrEWtxUbQXKNzt3OrHAaP4MB9dZezx4MuGmUAwX8H7D8f1gAdf4n6YjFalT/4ddLjnXQGJiogrWCuRNnHumYt8SQMyV/50lHaD0S+P7vDtgW9Zfgw26WV4vCj424LQfwgNrGdLuzEtesjxHPysiEq8wd1gm45p4D9UZCRUHSPfGnZtDXFTF69PZeC5QwS4wlCZsYZaSk/egzghlfPwnURmc5hL8nEWAhZ9UYzv0u7O2edWwagUyIImgY48gsnCUDR0uKEdW3GSCXNGzh1GhBJg==; 31:shCzs25AWmDqNnZHGA8Y+rYLCWVFI2uqRaIDrL4odzcPde9WxeG+C8b4Fb+vcLA5+ZqKfaJULFKLyR8PYRJT6NCzLbccAz+jD0noP+An0/xfjq1eS79Xo0scu0g0vahVXYftzB0NI723jcMKZ9nQuuIozWptoOIY2Ug5Al/x8w71C+Yv/39nD/EI19z8BRePjJWOI+QYyzoUIt5thThmAiE+LcoueMKm5130Lk2H9Ho= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:z2/DEsvHcLgS5UM7yVCqvYu0IqxZsrT0u85g3AcLnJXgJhIxD6sfq1SVSJL5410kSi3gY5t+QwzBazStw5ElwWqyAhrQrqxHxURoxJ16rdSRMWenvj72/adHazrX+50Cf9wJeT4lUwp20Hx8+8EWtavzmK16l8ITRVH7pMRhws+rkjhtwQSW/+Gn4jPt6ZE2yDRvMBXBKu1h+FQ6ef01G+fUN8h0UR2zr/FjOpZbO6W6x1eUlPf9fhuLEfMnVHfNxWaTPIOZmZe3Y3+TxP3BZnLRxNR5yc9LR+mZaPMl8wVcjO8kvdPDG1KGfkXIMp2jiFXkZ/fNb/8o62Forh+mShcymKbPYkJWlMWzoXqpPoTStFJlUQI4G1vthL0wRA5XxICLeLALi5QC0w3eoLI+K9ELDMn7UfvxbdKdcVnizvVd3KDJv9z4LkEpJDuOfFHG7pTHURturcq6aysnpQoDaRxcqH69h35pcL1Lvnugi1NQn0tsNram3dnU5k/vnO0r; 4:RFZI4sVSxdhEzh+7+uVf5edg5ydXW9Lv2myay41QC70nf9pcp0fAb6D5tlolZ9fVm05NqRAwwpEaPbjXCBp8E5dC0BO2U5E0LElXyH9JoSZXR6BjavVLAUqSLaFAgQ6LDQHgcOppIJXKh4F3HTpBCM9+db4+Mv+0OnQYFfJ9wuJUfDCEIMIJqMapFh88lDswi+30BQ3JXd8mlYAgNxFPecXk3LqymXJZQPeqA7/xIc7+92d2BI2yBqRrdJegz/OFRAWv8wtw9Cr8ABhWu32g/iLZRa6AefVHceZFd4jw6QOWGULZyXUYmqP/kjpqHCNn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:xQQTdg/afNQoOyktJZ0nsTKZ5M7Z8ZQF0d//+WH1q?= E45XFtkuxEv4f+pq/QaQBxYetOP8sX7OrB3QE351+xQxSrEwN99u5tBoTxoGbO487HOLE/iGtN4AGkGYIohbHfpsQ9zx/iAOckAxnkX65HzZl6HJcWb1u4sEeBl6K+3WOIdV0aVqNIGQR03BZw3v1piP4++vwHapV1MssXEve7uGfnfAH7nnTF4SFEtYEQn2GnsYyCYo6m1JBu3879OsS/sN4FL7VOh7B2vqvWL3X0Z2VjiAlzukxhRuzJNjZIP03GOY75v+A8HLxHzSUBd2cYsAbiH4VcSkAVby4WUshndVQi6UCw0a7xamI8vm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lGdXDz51O2Zj1812fVS+6s6WhIw5xZUjHwaxLBPw8ESU7VNBBdkaLInhikrY=; 5:PWHeN6M3xkLFyrPaVezuPGaJH++wWMJ884yLRAfQYmXSpcVOy2bSTA1PCBrn5y9CVWKwB5/ViFd9NogG2tDgH7lI5AMOiP6BQq3yXePYakpcmgO4B027ypn21eUTsCg8If1ban1D7hZXL8zhvcFcSEPWc8mtBe2NVtblbHjjV6k=; 24:i0kwixd0V2/xoCjuXejOiK14VAVza9HNFG7gXXlZhvYApI07SwB/+3jBerb9HF9v4BOPinv6lmAfxUXJiYIkoDQ9jU4PUGXDnb+/dkU5XUA=; 7:Gncr5P1BM8sLVViFbPA9s2pnI4qbsU29ht3RoU3CnlYOajhJdR4JwqsJH6ZdM6uciYQQ+oj4py2F46PaK6JtzvYYIBIPr/QUKvLUs3SRFQkIYZKgYhI2m0lAK0Fv1eyN5er+fiPr3xNNU6TQQEuWqTVCQJEN4q392cRXCjfRBBhrLq30Kpp+RAUL7EF7I+73qZyenN3bCySr2xr+YvVNiwig3yrJk6qUNtPI4sbIzNwNvcCrh43ZDLsoL+1KZnss SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:29.0271 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8faaade-9a11-4025-b35b-08d566f00b18 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 5/7] app/testpmd: add debug to print preferred 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" From: Pavan Nikhilesh This patch adds the debug message to print the best selected pktmbuf mempool ops name. Signed-off-by: Pavan Nikhilesh Signed-off-by: Hemant Agrawal Reviewed-by: Olivier Matz Acked-by: Santosh Shukla --- app/test-pmd/testpmd.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 5dc8cca..d8ac432 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -499,6 +500,8 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf, rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL); } else { /* wrapper to rte_mempool_create() */ + TESTPMD_LOG(INFO, "preferred mempool ops selected: %s\n", + rte_mbuf_best_mempool_ops()); rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf, mb_mempool_cache, 0, mbuf_seg_size, socket_id); } From patchwork Mon Jan 29 08:10:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126159 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2236298ljd; Mon, 29 Jan 2018 00:13:35 -0800 (PST) X-Google-Smtp-Source: AH8x227YIVTAr/rcyFGn5bNwPh767x6JtjjXhC6psfv2/qJTBsfr56swlsSK+kKYlv60DrkyUCqq X-Received: by 10.223.139.147 with SMTP id o19mr17743215wra.66.1517213615462; Mon, 29 Jan 2018 00:13:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213615; cv=none; d=google.com; s=arc-20160816; b=uEfMc8m2S8cjmEdJ/bmb5XKsYz5Jc/76Qu7q9NZSQiXhf+qN1JcsjRq6y6iuM4TYcw IQinqsLIlaEziEsHr9QKOkslGpM6ofYwnon3o6DGzzzsMAIVx/iWfIwlW7j39F0Q+nuR UAD6IefrkukkTeRn+4XhYb+1ibl2btkZ92mEsH+Wma99+pxhog7Z0va2e2JzWaILfV4Z 6RRoG+W3YrcvSCfz7i0h+0T5DX1bIOJpsBGJM1rM0T628zeoOlAkwglPHu57rDBdDf0s UdxT0oQONGqVC/wnWf86nxUQh86f5iH/5I7E9CO1uR4cRqPntrHqhxbxmt8hdFWMC1Iz fVKQ== 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:dkim-signature:arc-authentication-results; bh=RXmLaWlu8Dm4nb7OZsqAQuGq1ycKwV3r9CGnELq8LFs=; b=werYMufQT0X2/+KcBX3l6VHpzxEJ4CSB2/PssIkC20gzTABDI9b1mBxi76fLp2+Zny Jhv4FmAhGGWrVXiPCdfLqJFoDmXGTxPR0Ft+aiR8JFHf/7/KpYQ04+O4GvE+EhjOwikr 0Kp4EnGv5ksCvAbWmQfERWUZYTR6DOm33+plXPJOGxw419B1cVIw9CPz/DEqcSpCL+bv gwx/OMBnrwM0AhXJPFJM1yz1d8j+I0v4mpcwZssi1qYgfbW/ojMsGE7AaKXd5TpkRB1g Jv7zLAelRCe3xso9+L3zbQxUdr9BlviYruPbINFWXVGxRzFqjZ1WCRX4ATHg4exq2AIJ smTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=gqGDnFBO; 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 b199si7084026wma.123.2018.01.29.00.13.35; Mon, 29 Jan 2018 00:13:35 -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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=gqGDnFBO; 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 680D11B338; Mon, 29 Jan 2018 09:12:48 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0086.outbound.protection.outlook.com [104.47.2.86]) by dpdk.org (Postfix) with ESMTP id EF0001B336 for ; Mon, 29 Jan 2018 09:12:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RXmLaWlu8Dm4nb7OZsqAQuGq1ycKwV3r9CGnELq8LFs=; b=gqGDnFBOE7s/JCEeEL84IyjnXw56+rLVTVy1aCE0c5RJbV8hnDTWYSpamux9UNrZSmIcJKoFiLmZVoasnN9xolUpgUiifoeKgomsLcsb8U9rdFr2NXzMF07tnvG6ytS6pX900usWFLx+dvoKPNemOS68nId8miyFZo5rwXiRExY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:32 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:48 +0530 Message-Id: <1517213449-678-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1135688a-ce63-449a-4878-08d566f00cbc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:8apRsLK4pDiJ458FinSN6VisrW3wQiRVaA4egVcdMqQAXTwQc4p3Z6bK9wR6bBDjYj1F2aT1s7kzfzUSMogYSVjEwZcdBij74bJuRFpaR8lElwlYDa2Nq9rLdWNoAvv8Go9DbYD5TzXMkzh5DbHon3kjNvMuH9ESU4YJ5rtrNTx+scUBJxusBP3fi+NXOgnBtD1R0tLlFvJd1O/Rf8SY95o3B8ctZPedNqUmmf4QbT/Hkya2jJyk8HpAoQQT+tM+; 25:xIEy7myOn+fU8xiarJvQywG+0lWWf1Zr1jAKPrzDO/j2uTnoq3HU8n8P8+JCYzrj3z9FFBqBpV3UQXf8MkN1VtujdfQwy/arjivDPYfihaaBkhH5PM97FWx+CeVatYF+teFmhWblaNYhpRk4buoeDs46VolAyvb9yK0HwGsY7vdFDmdsQdvtI7E3DEe3+UrQvSBES7lItfAqTMzTz0syWEIC8tFfzj0A9TD+cRBezYzk2MH7+vWjABPiX82XKARRRVjdo9Zjwa5yziSSopFEVHIj+0Vf0W+j2vSngdHPwp/T0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Qx0jX54a8CncFNb7TNyS0LuNSkMznOA0OcY8wmnG5dO3WLOMdOvQZv8F61EqSIGdJurURoYOfAc7XSwdxoP/SrCol1hwyxBDGGY4PkvdKaLyhEuui1qTS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(575784001)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:3GFXwO9Ydh18wHaOKYUEdQQPOLW5+nNpirR5EEfN4?= +ztc7CjMU2uxhkHnWFZ2Xscms8e2C2+auQXcQOR09AEmzXQhAQrSQSWjGh4QUltXAJNbxAuokepu1knrNBOo/WDF9tVSfUZ3qiMr2uG6Lp72/OXA8cZf7r57zpPENUT1cMeYrZwPOTQrnd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bJqrV8qkdQa2JNLsRYje1R0ptFicgU8rCOVj95ceJ1q/pXAJmEpfPrtY9ct67fAELXahCO4KFxAauD8lVEqJjJsyYtzFVLuPN3uUE9QQ11aOOlOSt/BeQV0zME8+RX/xVSEuLteKqSxcueqRkjH/wm4a53N4bEtMTrcOu4vaGMLolYMdzaSyhkdN3e983eCnv1gNLqiGE1iw1Puy/Hwy4SNaJtXspto4HXe4QAS3rawONPZE=; 5:WmtDExazCpMgRVahUeq+2HLLm17CCWdUk2AV8brVAuMpOyf1EMusr9diMkZkPp0NSJKXS97eai8GnZcuYU8efyWKJN7xKW52cZupqsbUxaznqtL61kCkfT8zdXepsFXiWt6mWbTXC8bzqeN40rvLfCS1IG8+vjYcyzj/MnaSarc=; 24:BTqvV/fQapDJXRTRQvvRAviTLkFuqhrosGcW0UMwu1twm2qkDBC2JxcH4BEW7a7j+gbv2PXL5nMXgBKgt3SgUrs4v3DEl7ChGBOrkkvc6qY=; 7:XeAOLFF6sHrtAYZkdUT7IYRnpTtDI+O+aZ111YkL5ZvaJDthVTPe6u8Q981ZOQvOT3EGc9bO7BjWCnsSDsyMG4qQix08D9uRaa2iBSkhuSIxHCpiHmvtwYAjeyTnC6z2RnVuLf125InIHFGj5dlTvue0vJv/xx2rAZVT2veqGTbjPQmEkKgmhRkPU1F7tAk0hf7GHgSIejLjSsmP/ILRU5w5MLY7VIxrX0XTlH/3pF0ycywFBk9UR+6VWN2Isn3U SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:32.2925 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1135688a-ce63-449a-4878-08d566f00cbc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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 c2ca16a..ab9e67d 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 ba33566..f5840de 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 @@ -469,6 +470,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 6fa0c3d..d613660 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 Mon Jan 29 08:10:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 126160 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2236440ljd; Mon, 29 Jan 2018 00:13:47 -0800 (PST) X-Google-Smtp-Source: AH8x227+Ea/JhY+F7vPU1RNryNvstYP1moisPnL5jOICvDRXDfZZC4101WkC/8bzKTr54qJwAPKe X-Received: by 10.223.170.208 with SMTP id i16mr19378936wrc.90.1517213627139; Mon, 29 Jan 2018 00:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517213627; cv=none; d=google.com; s=arc-20160816; b=Kentxu1wZ8IRrRxND+qL5HTJITJruh2zcrl3zpUGuYK4QkjtdpYhav0fv0dJD6YjqI ReliT2q/tZJMxymqCSIVFOwA3stkNzCaDOmGkettmQGmFHVnEQVv5gwJtc2hgb5txrt1 U61FDWFcxdOqgluFLZNMFKl+wAv8dRvWwen0JLJzyiNkfLIEEXtpBaYNb7pnmmIUHFCF rb9NulG1jDt3PL/7ALu7GQYGRH8/UHIMLdxNFs+kfBcD7d1Ex6fB4xMhnj5lBTTKQ6ny MwCOXR/jjaHTabPLAgAZ1irIMEioEsxwDjmRR4of5DzVkdQgUhItIUaimBJRx+0bHYTE Arug== 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:dkim-signature:arc-authentication-results; bh=/v7x3+fz9M6mdjguGmw/r1FH772eTMTe1WcAxYcY8Vw=; b=DQRfTWLlzU8uqzgMrqgzPyCchK3b6Uyqvyd6BrI4Sr4E7ULUKh5zvli9XkeaiH/0Hs /UyrMdVfpNcPkm60j1gaaoOKgV9Nk4MWu8eVMa916SHowtsMJ8IgVgyvkMUzZwbSVs80 WZQCGp21sELpLEHCuKCiiBmNk0K33DAtOazWUpic666F9vTd564VLxzq2uXJTxgWAaZ/ Fg5s4RPckhFyKOXnfanLxwVBtEwcRPV0jQJRk1x9qGOfVM6efRSJsd8rvfk5n9ZBaJJO Z6iBW77fUd5gh00MAyr5fEz/KqtCjKlAWNwXwb+pRkqxURDtp9fBIQIRwk9clm6osqA0 R5Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=uvE2Wi31; 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 w64si6852651wma.239.2018.01.29.00.13.46; Mon, 29 Jan 2018 00:13: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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=uvE2Wi31; 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 44FE21B350; Mon, 29 Jan 2018 09:12:49 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0046.outbound.protection.outlook.com [104.47.2.46]) by dpdk.org (Postfix) with ESMTP id F36EA1B346 for ; Mon, 29 Jan 2018 09:12:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/v7x3+fz9M6mdjguGmw/r1FH772eTMTe1WcAxYcY8Vw=; b=uvE2Wi318AbyDjBAXc7v8TfcpX6FWrjvgS31n80rch7WgH3dlDjKhw6zwChnsZsbq+b8X6wrKhtD4HKoTS58pCBifsgWV9uGg8NExPE0WSTOiMkbo/TJ4KSOvzBkfLJi5yB/BxJrqmfHDoQQSD/GXJmj3G0N7WYp3j4WzttsvPk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:33 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:49 +0530 Message-Id: <1517213449-678-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ab44ca93-a955-437f-1f39-08d566f00dfe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:+Rkv+UakJjaRTWUmL2d2Bo3vt6um9Mvq/Va9vFYeLMTym2bYPFVqNifBXo7z96N++Q4H6zWsYJy/cHYLVZMET3phj8BgoOPFSu4u7sYo3H4uLl5Nijym6klalOWvPA0kpyjhIHVn2tJ3nm/+V3qLAt5lrSNl88D+Es3pamDbOo2H8FQgaIa8095XhG/MD3X5MZh3CpRdvK6SWq5IlKW3A3q3FfqLcJ6CrVtCudpq3Dbkf8uP4CNWTxhvGxEDoQ91; 25:kpYHjHD/FdvIBnv2uOaNqgSJ1mB5nGyvwRyE4Bgi2uDrzhaLWRctQ5yt3Q7dElRXukR8FVSE0AK2OCDElME2iu8YLiZwBoX7FalNPhQOjiq4nCw5mZjspnH8T225c1f/V9cdMp8MDNQi5SvNzdEljICSUkNiDEmBOwUxMy++FgZtuuGjGCwUAQYOY80rkaj8h1S9vvTD0BK0iRJSkUjQw3zDp1c2RDV+kEoEtHGRrXTg/+Y5a5utAiv4TpSopVsJ0XGX92G3GPtTat/t/rYVyi/y/eY18HtoJ/kE0nBqis2CSJrDvz8+0WHpJtPBKBsMHA23zvBgH012Ftr3Y4Vm9g==; 31:qwBfVrId7CBOvvx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pFgwwWn58Eofwt69B3PoHA7Ijow4rKZf4XYG/LUnQ7mu6FBIl75Mjq8417spTaOJR8x3lOBzJx1LnSd0rxbSE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(59450400001)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:yS2vR8XovTZqFUXOoPYa8NN5Kow1L79zNxWvt7yux?= dpUR6iAyQubYCkMxeXkqsd6v2Fwcpi44IYCpdGlBKMCNEoAwt0Mp9pzgWh0Z5uTZyvFwfqeU7oZfcvAdTxRMf1iuR682l1ZXqAX1v90SzjUuOgqM2/2WvlNholgs2DkLh/sRjvC7F5gk4F70iiqDn3mxxIBnHAhm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P2Xw/qxSJYCKuzCdK0e/iYdbxlKkSVMNWpbt8MXPbN5pS7v3hDCcrapSSq55XNZCy04v256f7FZZkA16kKEFC9gZeFSnA3ALoanwL8FU3KrmEHvESg8CmtqkfD0KJfuzsbshe3cgMcX7nndiSbbHw+bwBAQjs1GUk4mKvhMDPREIVNzojjNxTVrfgkS4sHZYQlezuYuUaNgWUBChvCodkDRvnz4JrRw7/qBa/F5Ig=; 5:fuFvOtlohzElZa5HgrioUbdsjfnMsd16r8ogRnDWfBx87gfTyQoDFbBJrsHti3g0iBxgIcBsvDF1raMomOOodDGnHyTk8j78SMSltR2RJdjpym4WeE0w1MC+cTnclNajz4Px0Tq3pICndSNQL2iMTgEeeHL/k1/vpsfil56jdJU=; 24:JYY4gKNLpgy2hGhYz+MdGvPU2H0ghqqN4CiVJPeZRDDNEWK1ouPTC5zcdmlAAu44fCMGw2dZaMfh0oRy4oJkXXRIoVoawhuyETjn87EcMFI=; 7:H/WB5ZCDF0XrCYsym0MbPDbpZ11mGO12h0XwsfbdsiiEgbfduFCfGv1tLRGdBVo60TqHuJvw4e0pwVBLIIPxRQJDrMFD5ZLPdbEuEQS6FOaURfIjzaxEu0XkakrjXW0c3IQr3FmjTX7fOZxcIKoJGqVnQZ9a2JgOdjKnw68G0p3/awwQ/aqkGQi9m2zmkeRmMrUrzErYcndrsW6EWZ0VLcTyRAYtxEcgdgo6xZ6/E8QfqLy8P5xrJ+cHD3aLkTuM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:33.8549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab44ca93-a955-437f-1f39-08d566f00dfe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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 | 7 +++++++ drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 ++ drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc index d38d696..5d4437c 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 139249c..1539739 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 @@ -38,6 +39,7 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, { struct dpaa2_dpbp_dev *dpbp_node; int ret; + static int register_once; /* Allocate DPAA2 dpbp handle */ dpbp_node = rte_malloc(NULL, sizeof(struct dpaa2_dpbp_dev), 0); @@ -74,6 +76,11 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpbp.%d]\n", dpbp_id); + if (!register_once) { + if (rte_mbuf_set_platform_mempool_ops(DPAA2_MEMPOOL_OPS_NAME)) + register_once = 1; + } + return 0; } diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 9436d37..d421dbf 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 afda2c2..2bd62e8 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,