From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0071.outbound.protection.outlook.com [104.47.36.71]) by dpdk.org (Postfix) with ESMTP id ED03B1B01C for ; Fri, 15 Dec 2017 11:25:48 +0100 (CET) Received: from BN3PR03CA0072.namprd03.prod.outlook.com (10.167.1.160) by CY4PR03MB2694.namprd03.prod.outlook.com (10.173.43.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Fri, 15 Dec 2017 10:25:47 +0000 Received: from BL2FFO11OLC008.protection.gbl (2a01:111:f400:7c09::111) by BN3PR03CA0072.outlook.office365.com (2a01:111:e400:7a4d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 15 Dec 2017 10:25:46 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11OLC008.mail.protection.outlook.com (10.173.160.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 15 Dec 2017 10:25:37 +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 vBFAPe5k017334; Fri, 15 Dec 2017 03:25:44 -0700 From: Hemant Agrawal To: , CC: Date: Fri, 15 Dec 2017 15:54:43 +0530 Message-ID: <1513333483-4372-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> References: <1499170968-23016-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131578071380416755; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(396003)(39860400002)(39380400002)(376002)(346002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(85426001)(53936002)(305945005)(5660300001)(47776003)(110136005)(2950100002)(36756003)(50226002)(97736004)(68736007)(8936002)(498600001)(50466002)(48376002)(81166006)(105606002)(77096006)(106466001)(51416003)(86362001)(575784001)(81156014)(4326008)(8676002)(16586007)(356003)(104016004)(2906002)(59450400001)(316002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2694; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC008; 1:0CjgwDrgaWMd+LIFPVQth675sGiSbcns+Za1SbB77tydGPTXUvTBLU7o7REqWWjZVk3xpKMlwoDJjk+1pVLyN7RdB1WqZHxPyJszXOWr8w9Khmd8CQyP2VjYjcRsU55i MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 699f4647-2303-4147-58f3-08d543a62f53 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:CY4PR03MB2694; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2694; 3:c3AJVPoakVuVsinp4aC6OQUsLBHrazjwzoa8e1JOX3ItQlncARalVlpK8IAaBEmYUncvdcg70m59Z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rR0qkLeQDcc0uyl5/vllssJLOYA7yf4buKAtkyEN8ERaqW4q8wsupjB8m79o0mM/5Aanxvm4GitiXRhnRRPvFa3oYrBbFryRFJYNSVBlqJ8L9ggUHS15cdiYRhSOOvTlq3Jb0tCM3zBGGIuEH9jQWRAntmnzg89Xb4z3sLV+WDrws29QvesjITmKouclP69SfjiMoAZAKWOJCGUp3TlgqX3KwDslUKSvEqWYVJ8v8bOitnXBl1l6BoIQzRc239n7VzWCAWdN4mw= 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)(10201501046)(3002001)(93006095)(93001095)(3231023)(6055026)(6096035)(20161123563025)(20161123561025)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(20161123556025)(201708071742011); SRVR:CY4PR03MB2694; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2694; X-Forefront-PRVS: 05220145DE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2694; 23:HmbKSpfOv/Ji3GIgHFh3o/8905K+v8MkbNIsdavi0?= =?us-ascii?Q?7CYGaztcRR63ra7UosZ0jlcbe24gGuhTf7z7wBWyXwXPXEFN2+0A6rQ+mt0O?= =?us-ascii?Q?PGQiOsZPfXaOgUZzjlII8S6TsAsQabOv10oNIbSBCPKHWTjY11OjzUqjuphO?= =?us-ascii?Q?z7gKfFoxx45vyIcROPW+ZGuVXxojvGKmRLZb3NlQsgH41ReUIUJTVZYFdyqI?= =?us-ascii?Q?AQBhbk4jAImvTnXU8kXubzDJfCKSKK+45tUTGIlLPTDPX9TB/Ji/OWwxw4ED?= =?us-ascii?Q?ERkoY6ZsQczxFRTNj5gf/9o/kWgkFoxrSFu8Fjz3VspWfM0ZP4ON9BE9WqiJ?= =?us-ascii?Q?tUmspCQPd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wmzi0lpViUswzpRCZFgG2WP6tB7hZV45E5G0cog3S2HM9Pk38OjODEreZhb/W9HixnYdISL0SblkKtTUn/j5AJeStwr16K2AO6I4/PJ9sIdtcoiRkVx7X7nIQ6NyCBebcdYc6twHrUStWOywyaPi8Ji8vPgMxphzYJMyYla1/w4F+MkKGKlPHJ+LB9XPqdnbfTVUQzHjALOGtN04bBCNKzqZdnf70z2f9M=; 5:epfRL8TDzyv+mhpMuaPWR67Le6n8rV1zqcN+Kvgs32oP17oY37dcD9RKkYzV2sURpyYDnHy9WL7Nvfmw1/e1j4QK/gsAaRGtZvPGOaziD2B/7vFAMgyN0E7CDUCEnOSZFt4CX3+Hd2uBFK21Rpt3yxRCfVru5+SEIUGxMPPUV6U=; 24:x3VXToiQAEaCkoH0T+w9niSg7affiXS3wk0qnRg/MXDpHVu8FegVyKUuZTZEhychEcM2F4wuUDCU+g3/y5vbb+hwoFry6XR+XaFRnNy/43w=; 7:gCfdX4ucLfA7EZMZvDWYk5D+LVVgH3UevrE3NA3rG/CbbIxwxoGI8UfUL9KW1HPqg6l2fYKbch1sAQ0XlGzFIJYpN2n0X+f+mSGDKku73Pq6qHTKZPwsqXPmwoD12Won9A69TSJV5gGt26Dq+PbIUWp43xLhORrVSGlpb7Sp04IKJTbmjRF9Rs99cNuLW9WEqWjcgCilvWwtPAkttWFSXUHgA9zQqG9agjpdKxpAv+WDQ7sB3wQDQmSjxlfyg7fO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2017 10:25:37.8700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 699f4647-2303-4147-58f3-08d543a62f53 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: CY4PR03MB2694 Subject: [dpdk-dev] [PATCH 2/2] dpaa2: register dpaa2 mempool ops as active mempool 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, 15 Dec 2017 10:25:49 -0000 Detect if the DPAA2 mempool objects are present and they can serve as default mempool. Signed-off-by: Hemant Agrawal --- config/defconfig_arm64-dpaa2-linuxapp-gcc | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 6 ++++++ drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 ++ drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc index 91f4993..703e8b3 100644 --- a/config/defconfig_arm64-dpaa2-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc @@ -53,7 +53,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 334e1f5..5a6f292 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -64,6 +64,7 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, { struct dpaa2_dpbp_dev *dpbp_node; int ret; + static int active_pool; /* Allocate DPAA2 dpbp handle */ dpbp_node = rte_malloc(NULL, sizeof(struct dpaa2_dpbp_dev), 0); @@ -100,6 +101,11 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpbp.%d]\n", dpbp_id); + if (!active_pool) { + rte_pktmbuf_reg_active_mempool_ops(DPAA2_MEMPOOL_OPS_NAME); + active_pool = 1; + } + return 0; } diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index c1b842f..2b0e871 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -70,6 +70,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 8bcbaa8..17c7d62 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -380,7 +380,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