From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0057.outbound.protection.outlook.com [104.47.38.57]) by dpdk.org (Postfix) with ESMTP id 9C0037D30 for ; Mon, 22 Jan 2018 16:03:20 +0100 (CET) Received: from BN3PR03CA0102.namprd03.prod.outlook.com (10.174.66.20) by CY1PR03MB2363.namprd03.prod.outlook.com (10.166.207.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 15:03:19 +0000 Received: from BN1BFFO11FD039.protection.gbl (2a01:111:f400:7c10::1:188) by BN3PR03CA0102.outlook.office365.com (2603:10b6:400:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Mon, 22 Jan 2018 15:03:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD039.mail.protection.outlook.com (10.58.144.102) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Mon, 22 Jan 2018 15:03:19 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w0MDqVQU020039; Mon, 22 Jan 2018 06:52:48 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 22 Jan 2018 19:21:23 +0530 Message-ID: <1516629083-13967-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> References: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611069994952621; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(39380400002)(396003)(376002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(2950100002)(85426001)(104016004)(6916009)(356003)(36756003)(2906002)(6666003)(5660300001)(48376002)(47776003)(97736004)(305945005)(59450400001)(50466002)(107886003)(54906003)(336011)(69596002)(51416003)(16586007)(50226002)(316002)(106466001)(81166006)(105606002)(77096007)(53936002)(2351001)(8676002)(8936002)(68736007)(26005)(498600001)(4326008)(76176011)(81156014)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2363; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD039; 1:uFJkZGdgwinhi3+aOROHVU5ElV+CvHOxjTeWMDUy/fD5PSyhqnFmYXYyQYaoxJRrJrttGVqMG0t6gYSJZAbXIOEHtMT3J5xEPFgZbJ8ZN1xBC6iAcXvF6ZxxWgtrENB9 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32f78394-bb7e-49e4-864c-08d561a94603 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2363; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 3:Z7l/8dY2dVWq7bc5AIhvaw0Id14QZYyRLTlyiow21X2v9MZemuk8xNlfSoPadTLEliBgs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DZnKXl1+7/N5RZp9oeL5xy9LHTBOuFaJ0M614atectMnJSv0NpdBzpC0eRJYgvo6OqaEjefAsoj5B6Jf81LHELZsYcSWdUWNJ1i7mkFP39lN7Kmr+uJJOzzkoP1HkEauSp4yEMRWPQE3iYzCwGkM1NdjaB9gETKE+2Jfxu36hphleLpHV5OY6JngluaNo2wqYEEfHIU3V2FrOqpRpKoUnJdj03R7MKVd74tfaq/CZk2Nq1pqweew= 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)(3231023)(2400081)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(20161123559100)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(201708071742011); SRVR:CY1PR03MB2363; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2363; X-Forefront-PRVS: 0560A2214D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2363; 23:NqiCXdqcua8tPuVRZsj7ljUNECPjnFW4W3vecMELc?= =?us-ascii?Q?oglirmHXEvoIWIkBC9wmMifX6b87z7zDiRA3l92L6ICux2Zmb4qi1J1aQW+H?= =?us-ascii?Q?YkKSZQuP3AmqFIBTI8fMsD/OMCz455puLm/yRigdVAXwCYomKgyIhj01asGX?= =?us-ascii?Q?PUB/cxucmGhUfeftnyxdl1WFGdW49LtMYn2pE8TI7GQdfdxWw5aDkvSAMtjM?= =?us-ascii?Q?mYB0MyS8Cs/zPuvGiroji1j1MFhyuB6q8DMlNhh1+9lTbnG7pIYg0aHSzWKY?= =?us-ascii?Q?1LKAcz8Ni0sFrOj9tld4gAIklhOFT+TfEFjunX3T4nxW3U/ylVFz4o8pZtFZ?= =?us-ascii?Q?LYbRWz6eonmN0PdzjYzdUEgYESIGdMvGXjhoaou9nob36w1A1nyWOjdHGWzD?= =?us-ascii?Q?vnYWn1PQspYWIMOaNwxG/sVso0RAIoHPQf/jNvAcxyr0dNdYxUhtWWF8zm9U?= =?us-ascii?Q?txqDjrXWReferZvBCRIOK/S0IEDFxbbjGcJW5MLTHApIFVu7gm9/hYpuEDB6?= =?us-ascii?Q?gIV8cF7uTRXNvGw0qKHc+2uNmiMrlwqDyV7ZrpEaybfq8yp44sgsIr9xO0yQ?= =?us-ascii?Q?6b5S4C8TCntxSkt6rKOytCTkwkskhiO+w/sJ7J/qIy28TKIixFdaEr+uEtVp?= =?us-ascii?Q?gF/7bDBQyYI9Sruo629liaPzEQCDpHsz8AyDxEHBgwGbflbpAKR7peLNzNQ5?= =?us-ascii?Q?cchztMM01mjfYU3Nch4MmKwvoHsB8jtneh4VqW8SbSNPhFrRPU09D2gTeeJr?= =?us-ascii?Q?aQoGV8owqxSlJy6B1VAq1jd8gMjqM/DkmfEna68Yvrn/TNj2m2mZEQEKTR/I?= =?us-ascii?Q?7CKG+Bqc2kxT96rxitMkapIojxxxEe2kgy8mnmGNDCK3v7cpAOfVKUK234wt?= =?us-ascii?Q?mls5WHnFGwgBhIPj8RdAATy3UBnArtc2Oe8QzDQ/zFfHmAdxO66pZdw+Gxqm?= =?us-ascii?Q?ta8Z6ywrJ1PHedE2sdIoOGJTu2mOH33S6TFiJi9BUPtZo3061cCj1mi0cW/f?= =?us-ascii?Q?r+gkZvf2Z9uv4hR5MLDYpnVGz+VS+xoNKkOKfnmf8ANBbmNEynbEUkT3cFm9?= =?us-ascii?Q?bxnZHr8djsx2vqzXH3T97sVLQz7VInDnYoeYdk2YONOpiSGieYQEgpRvFMt2?= =?us-ascii?Q?KIl9edmGCV6eayJ1pFN415JkrUm4iWs?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 6:BgjLTUZfhreDJJE3c07YqOINBePQErayFAiKP5TlLK98wcxszGUN5kKwebvJ+TmoPUP5jB/4p9bOqoimJ3g5KsZip126ENT+P2nYJnDaSW7NMvRo9HqWd9IkKlm/yGfP6uNaPEF5YkX0SM9jxp/GvcdzsX1Umul0fEa2Z1v0GhQep5G9ip86sBoLOxTfDQFzbE1VEF8Irbx7OGQ5ZZXTaOwUhwEFFS4NuDnVJ+K5KUj2z0Zk79YCG4m1TDTp8f2JOh9jfA7jPZiGh/UR+9WdU1018WjhkUHvBbw4wcPR0vfZ8CLg1cQcYPChuwBaxFjMPejkCwvZhqbe1zSkCAG3Wf8c0m+LbdG8YRmXOOlTQmU=; 5:TYE5ohy+UK7PmLjtoVQd/edbbeoqvlyzCAKjTD1VHPx68Ali47kmABbNw5tYO73njezRY9j4ZNfHvgAVIZCd3r0AWFp3btc6up4bnnvfE8irMLJpaQzPgip86scmbiyeMERkK59TaBlx0JsmYYsOiAyjJYwf4Gky2hG4rrhRpNE=; 24:CfUFXeiFtMkJcy+4NGKHWJ4CWUrnmqpdVyTw2LvrA+6CTBAvJ0HRsYOgZj3mTNSwxVF7tCV4WsFAT0+tpS0c5WjkvH9IhAI/8O6aj9m68dc=; 7:QasMMKw6i6kbnSu2VThb8y+scHXHbvZWtfjNwKVZ71hsZzg+Lci6akxDL5vtXD0Iq0fBpYXbjcHyuBgC2dmZixS7FcX9vybGOW2g4AyCLdjbkzHhvVTup8YFCKZaiJPbA781GwZ8iy/oaihw5mKXEGnjTDsgKSxxwX43jENh7GAleERv6Xv3Bttvys9x6MtubHyS6h/Nt6hG6uy8j6KXJHYN47TMcu9CNQB2r2wGSmdJyEBqWC64jhS2q62zrBVN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 15:03:19.2456 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 32f78394-bb7e-49e4-864c-08d561a94603 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2363 Subject: [dpdk-dev] [PATCH v6 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: Mon, 22 Jan 2018 15:03:21 -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 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..9081625 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 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, -- 2.7.4