From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0053.outbound.protection.outlook.com [104.47.41.53]) by dpdk.org (Postfix) with ESMTP id 163C41B32D for ; Fri, 19 Jan 2018 17:35:30 +0100 (CET) Received: from BN6PR03CA0021.namprd03.prod.outlook.com (10.168.230.159) by CO2PR03MB2359.namprd03.prod.outlook.com (10.166.93.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 19 Jan 2018 16:35:29 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::184) by BN6PR03CA0021.outlook.office365.com (2603:10b6:404:23::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Fri, 19 Jan 2018 16:35:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Fri, 19 Jan 2018 16:35:27 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0JGZ6aF016753; Fri, 19 Jan 2018 09:35:24 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:59 +0530 Message-ID: <1516379639-25586-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> References: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131608533289860773; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(39380400002)(39860400002)(376002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(68736007)(105606002)(76176011)(85426001)(2906002)(59450400001)(106466001)(16586007)(575784001)(81166006)(8676002)(86362001)(8936002)(50226002)(2351001)(81156014)(51416003)(5660300001)(77096007)(305945005)(104016004)(97736004)(26005)(356003)(4326008)(47776003)(6666003)(53936002)(6916009)(2950100002)(498600001)(54906003)(296002)(36756003)(316002)(50466002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2359; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD036; 1:67DCwrU+6prZFKBywjIL1wkKKMDznRrsFJKPgadP1Le7PiqQjTLCQESzvmjgXOAZDkNv6GevHJNuVHPjHG81Hsq28ztDOSvfvyk76gwLCfat4rptwn/yURttzXkpaOAH MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 713d25d5-6091-4870-fea5-08d55f5aa69d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2359; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 3:0v8Rg3VEYm9MqN/tVCMRtX/VsX95vK4ScgTmKf3bXXCu746tJKJRAxmB5/G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Fsx9WF9bk3uze2POBkjxZibGJHlKF4qopJxJ2TRgi+3WpEGTdAGBqfbeZnu3cVRe/F1DejSGGKbw4B4ycqjwWOiwt867E7R1jvLJNmlN9gBQEnz7V9xYSvuHW35zczuexGywF8pNnCw1SUHfw83i9CAdEAtFzDsOgJenVcIFAiciTdXoeN4Grto1r2cbTT9OjyIwON5Nv8SIAEfK0krZxREJ/znbw70NX5KGT42Dg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(2400080)(944501161)(10201501046)(6055026)(6096035)(20161123561025)(20161123556025)(20161123565025)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:CO2PR03MB2359; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2359; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2359; 23:V/V76EEiagSkzNuqVG1oPptAwJH35ujxcErDPRx8B?= =?us-ascii?Q?RwW3VXj8W7c5WkJvQgh0bvzWzKMpqcSQWqYwqDFM0B18cadW4rYB0iAyeGro?= =?us-ascii?Q?vDPILHeQsa/z/hyLF7NLKnS4YOfnutU3fXKJ0SOXmBccEjj5cd4a3xCv7fRg?= =?us-ascii?Q?mIim7spe5HWyS8DYQJInF1dCXGKRYer+TsyxmBM4dPN/VszS5yAahrONvgo3?= =?us-ascii?Q?kYI4YJHWQy5EysIsAb/7V6ho3bSpK5HuUVVgWB45BVvlKp85VdqcmFL0GWRF?= =?us-ascii?Q?Kyvi8B65UtLPkvyJ1uKA3XiSgOd9NjD1rFXvBxi5GWOTXNSF0djijrSZQ4Qo?= =?us-ascii?Q?hSJp9q+wtVzZDGrCjmSN6EbB19ZFxBxZzAI5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9I00SLWaGXEPltdlcLyXDs+U7EyvQmr6F2UhCUTynHoYSenCS/1XOQWXT2vuYJWDEHILlg7TIE7FhKV1w4LFcJ0iQr1wr6bhjPic9kE780OcV9i9ShT+YacFRcNkngkDHuLDl1AmDtZ9GOoARFSw1EwdHje/YHyvWDUYor3RGn6QSIV69w/qFHyHHqbz5ZCz8/x+VRcvT7L5h130MlIVt7mnpqZvpzAC2cpyH9qURzlcbDm9thAQw==; 5:YlEX3dkC9GaJ2oxKgpmXCcmFnUE/k9ue28WBcPIc+iAuSLdmXjzBiiwOrMYzSWpTN1ZmjrFG/GrBQ5RH/o9ElSAYkVNRUP8I8mU41Owyl9LpIQYbg7L5979ahcJTblRYFi7aP6jDWp4WwMGgXT4nS8ANR1T4NDSYtHFjuhOzTns=; 24:T2V+c7Vw4t4vjuULtBOrOq5LyUVpwpkwDz4QlE6BxlSUntjX0OMQgEAHfHGivK77U6zB3bOzm0c60GmMR2sysDaq+E63aJA4jQiwaKguCN8=; 7:N1RRafDChYv1YYpxLbss2okk95uJJ66Xokempam9/6W5w58JKcBT8cOg1KsI4W0Dw7d8KhNSrfIVtdQEYNGSJ8LHd/1exyYNMLsD6xLHYOXWYaWDEgpgYa8WQhl73Vjbh1ZErMDwHFnD+qDA1zq2DGPkRHZuefruXHN1Rzx6HJrwNPhDFZXQfGlr8FJ4Ro1K/eOvt3a7+5CV8BfP+xxwHXnq2BKLEuQM6Aj7y6kJew6fLpSCrTa2WTY+2J8pxUv6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 16:35:27.0360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 713d25d5-6091-4870-fea5-08d55f5aa69d X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2359 Subject: [dpdk-dev] [PATCH v4 7/7] dpaa2: register dpaa2 as platform HW mempool on runtime X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 16:35:31 -0000 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(-) 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, -- 2.7.4