From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40089.outbound.protection.outlook.com [40.107.4.89]) by dpdk.org (Postfix) with ESMTP id ACCE4559A for ; Mon, 17 Sep 2018 12:37:54 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=oHjJpuGs4i5osTYIplx6zi5wkA9HfR8xxSu+tUMV6uM=; b=xPpndJpEpF2Iak6ViSLCyNe+kYSYvCvIqtR9CY31vQ2MoeLf+mowrFfGU0V70jLmN8UQp3GO9O31ZA0xQEQzTeeqPqKwnkcCCZviZyCIaItlbbLGHPHmZLNosqfg+87bQGBMojJF5dIyEw0b9sSk0mDV/bxi23qZb1tsMQ1dkcM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM0PR04MB4673.eurprd04.prod.outlook.com (2603:10a6:208:75::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Mon, 17 Sep 2018 10:37:53 +0000 From: Shreyansh Jain To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Mon, 17 Sep 2018 16:06:26 +0530 Message-Id: <20180917103631.32304-7-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917103631.32304-1-shreyansh.jain@nxp.com> References: <20180917103631.32304-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::32) To AM0PR04MB4673.eurprd04.prod.outlook.com (2603:10a6:208:75::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31589c30-5fa3-455a-292b-08d61c899fde X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4673; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4673; 3:86Rujm6IdrHTGt/SG2ETdSsgLHWkYIfj226Kpl7IELDTkwMIg46XAZjjftO50eQbxI1FnpmzMkYlY2BUvY8HBq+r2b1pNegdG7M0WJmyzwvViQew1abeZ+ccO6fSC12b1NLJsktr+r1PZuFUgTMtj5FVWPTxUD//9Lg/cmuzvMTd+XNHDWBOT4X3p/6ii2GADLyD5G/kvTgiXBCFNxJizjsZCrh97Bok9K+qTdA0ip68Ca1ll/AIMOxwRLTGxHpD; 25:lWBdjC0421JGyzqGN85TWXLgJpF5SC6XVBMLYCMneMojb6XJpHtAxwgC+PNRidT999WjFMD8QaVBwbNZHhGYMqttvVFojHFx287opRymdf9OdBh6va21Q6cYx0l+mOINfdRCmQXbYaTDxt1WZ9p5buMfZcXkogBEdHf/7HldqKWDDQhef+QIPDHPjNM9Z6OLYxNptrMVaXGzNL7IloPd7w8dsPhcTun20Cp2O2IszPTEXonPOtMCdZAbPLUxSoxqXuA47o0F9oW+WcmKRjhiv0GfNqYDRhR7j8Dnt6+W4maJIpg03hBH7lz8kQSiALD6eKDz5iel5lQi2rYNgY8TVg==; 31:QHiPDwrRtudG73EMeB4tQt92wjbEsRFMqtZQaIV8ghF+5JPoHUBZrgCi86d06abfnc4Cj5Dr9kK7Z2gts3ircVvPjbQA/7EAMd2BRxbFUcgihd0k8ttb6tfA3VHVn1NCeSZROCldYa6odQ11EIwUljJ7lzbNuyYR+ERw5eeEDIymhpRj9OAPdT2gvOWin/qAAHDClVZqhaFsQG0QCvxpLGH5GURMQTgoT/NenValpe8= X-MS-TrafficTypeDiagnostic: AM0PR04MB4673: X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4673; 20:ZEFYyXbXvUJnKqXmRxIc79jA+OZgqplqJqy8vCf3ALeSHRsah8JVML+38IqUr1xPsHJnQuPAqF6YEAtvGMaDZv/R2CXj7ijYvr3YQEPkr9fbdcTaxJ93hAH5eUXWKtDb3KKzNZpW2sFUvqhtyDbEY4YK+PYwwtlrTOWkCF/xONOzNFmbWfhxMg7pekTXUH/WSbvvCnvcCGq1HXgDys+E1tkH5kM3MoaNpCcsBumIM7axHNMatioFEPny3VqJDtT3Pl3mP1qiZIfZu9CyoJOIM3kdIng6XT+Pe58amuOvALN4rI/uoaGiWcJExMrXk71lNSdXkOTt3tZC45FHYGLVPcemfcky6JpdH8KUR99sVKCxA8hE7wz2ym6RVwaU9quQZ4IHidSjCbC9dJA4TV0Sp1eujPT9hZIWJt6heKoVOnHjMRCj4lYKYHhxrSQ8SeiGEdVUNvPsYpYP6az0N9LV2KAo5N+7N57z/+lb9aryJ2TCQzleF5ckinUbxeq/VlpQ; 4:aWl2R3jAlBCqfJYSBCOTOz+b2ynnTy3rn0pG1FmNCN9JvpThyCw69hMdINYbKiYS7c8jqcCpXxqPDmQFMsBB2sX6AzpF3UL7AG7x55DqZEqNauNs2h8pikNMmdEGd6JwC2O8ErQAtzT9AGTAONAVNeSCwIY6SH30aU+Lnh62oIy4plZR4RvWDmP2gbzOnOTBjrQBZePQ9OWGnlO1DhTIhtfGr6jz+1uxIaCR4XgGoDjCFNIVYEbLHiCQ+6R1F7Z1GaNvTVVoiasP7j2VXZDXh3fPulCW64gKYyubBl7jthsjvDBhCo1fzlK1w5YvxwCGATkYtD5nl4g+TYLRxTxXbGHSXo7lw8nTGfEoswqnkGA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050); SRVR:AM0PR04MB4673; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4673; X-Forefront-PRVS: 0798146F16 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(396003)(346002)(366004)(376002)(39860400002)(199004)(189003)(16526019)(48376002)(186003)(1076002)(3846002)(5660300001)(486006)(6506007)(386003)(16586007)(316002)(36756003)(14444005)(44832011)(5009440100003)(52116002)(6116002)(2616005)(76176011)(446003)(51416003)(11346002)(956004)(476003)(6512007)(47776003)(106356001)(25786009)(50226002)(2906002)(68736007)(105586002)(81156014)(81166006)(7736002)(6666003)(305945005)(8676002)(8936002)(4326008)(86362001)(97736004)(6486002)(478600001)(50466002)(66066001)(26005)(53936002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4673; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR04MB4673; 23:QjGifEM2OtL4DCQXZNyApBEA/1xoQkZcMSIyoBM5+?= =?us-ascii?Q?0H4tLajVmrGRj4mmdfosEOq54PixPAzHt4wEBvP9jTclR3In0t5cojXAn85f?= =?us-ascii?Q?7Iyj3q4rii1JblwtEkszRJPeZRGsa82kJjth+LQZEhnt+1Jt7VYgnOcZeoAZ?= =?us-ascii?Q?6B+aM7unJCeH9G/3XFt3wsjyF/ERXYzrrUbJXaF3yKCBXtV1/JXS+fAGFF0/?= =?us-ascii?Q?9dyeIRg/wZeT+ALwb05l8uuGbMJf0wWEAJL5WXg0HFw09kkLVd0lb7j+DHw3?= =?us-ascii?Q?qZecCc95kRqdOt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YROk927vDs1cL30SVV48WlgrcinjN5iUDKW0iHYCzF3j0abW0sQgJTudqlEvCEVYto9ya8fstF+s7Eud8c8lx8hR1xVWiPeJpeomnBwwLBovpXtkgxwl5PLw=; 7:l1Xh2noqu4xAnwdP270Sf7+PWcIV1/tBguv004I0J4Cdt2xEClFS5xGPxhuUpP4IoqsSsQK9xw7am0J19J34XfAq2Cxx2dAwNvCkiNyFJbFu9aNa9J1aaJ2YJmvDMuD970G/kGm22L94d+zyXCd3Ol96EzpHeMjbOM3D5mcjPBX5JA6De/hTAkzej/6BEMdL7Klba9rwOOblemFXVzvOdqjzdRSfmn/KK3s0mL/hVIznLQbX12tuFqdgEiKSOlJS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2018 10:37:53.0238 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31589c30-5fa3-455a-292b-08d61c899fde X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4673 Subject: [dpdk-dev] [PATCH 06/11] bus/fslmc: support 32 enq and deq for LX2 platform 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, 17 Sep 2018 10:37:55 -0000 From: Nipun Gupta Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 17 ++++++++++++++-- drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 4 ++++ drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 22 ++++++++++++++++----- drivers/bus/fslmc/rte_bus_fslmc_version.map | 8 ++++++++ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 7 ++++--- drivers/event/dpaa2/dpaa2_eventdev.c | 4 ++-- drivers/net/dpaa2/dpaa2_rxtx.c | 8 ++++---- 7 files changed, 54 insertions(+), 16 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 76f80b951..ce0699842 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -53,6 +53,11 @@ static uint32_t io_space_count; /* Variable to store DPAA2 platform type */ uint32_t dpaa2_svr_family; +/* Variable to store DPAA2 DQRR size */ +uint8_t dpaa2_dqrr_size; +/* Variable to store DPAA2 EQCR size */ +uint8_t dpaa2_eqcr_size; + /*Stashing Macros default for LS208x*/ static int dpaa2_core_cluster_base = 0x04; static int dpaa2_cluster_sz = 2; @@ -125,7 +130,7 @@ static void dpaa2_affine_dpio_intr_to_respective_core(int32_t dpio_id) cpu_mask, token); ret = system(command); if (ret < 0) - DPAA2_BUS_WARN( + DPAA2_BUS_DEBUG( "Failed to affine interrupts on respective core"); else DPAA2_BUS_DEBUG(" %s command is executed", command); @@ -409,6 +414,14 @@ dpaa2_create_dpio_device(int vdev_fd, DPAA2_BUS_DEBUG("LX2160 Platform Detected"); } dpaa2_svr_family = (mc_plat_info.svr & 0xffff0000); + + if (dpaa2_svr_family == SVR_LX2160A) { + dpaa2_dqrr_size = DPAA2_LX2_DQRR_RING_SIZE; + dpaa2_eqcr_size = DPAA2_LX2_EQCR_RING_SIZE; + } else { + dpaa2_dqrr_size = DPAA2_DQRR_RING_SIZE; + dpaa2_eqcr_size = DPAA2_EQCR_RING_SIZE; + } } if (dpaa2_svr_family == SVR_LX2160A) @@ -492,7 +505,7 @@ dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage) for (i = 0; i < NUM_DQS_PER_QUEUE; i++) { q_storage->dq_storage[i] = rte_malloc(NULL, - DPAA2_DQRR_RING_SIZE * sizeof(struct qbman_result), + dpaa2_dqrr_size * sizeof(struct qbman_result), RTE_CACHE_LINE_SIZE); if (!q_storage->dq_storage[i]) goto fail; diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h index d593eea74..462501a2e 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h @@ -30,6 +30,10 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io); /* Variable to store DPAA2 platform type */ extern uint32_t dpaa2_svr_family; +/* Variable to store DPAA2 DQRR size */ +extern uint8_t dpaa2_dqrr_size; +/* Variable to store DPAA2 EQCR size */ +extern uint8_t dpaa2_eqcr_size; extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE]; diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index f2eebe65d..ec8f42806 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2016 NXP + * Copyright 2016-2018 NXP * */ @@ -31,11 +31,23 @@ #define VLAN_TAG_SIZE 4 /** < Vlan Header Length */ #endif -#define MAX_TX_RING_SLOTS 8 - /** > 3) = 8 for LS2/LS2 */ +#define DPAA2_EQCR_SHIFT 3 +/* EQCR shift to get EQCR size for LX2 (2 >> 5) = 32 for LX2 */ +#define DPAA2_LX2_EQCR_SHIFT 5 #define DPAA2_SWP_CENA_REGION 0 #define DPAA2_SWP_CINH_REGION 1 diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index b4a881704..a9cd80ad0 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -117,3 +117,11 @@ DPDK_18.05 { rte_dpaa2_memsegs; } DPDK_18.02; + +DPDK_18.11 { + global: + + dpaa2_dqrr_size; + dpaa2_eqcr_size; + +} DPDK_18.05; diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 2a3c61c66..2bfe2514f 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1172,7 +1172,8 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, swp = DPAA2_PER_LCORE_PORTAL; while (nb_ops) { - frames_to_send = (nb_ops >> 3) ? MAX_TX_RING_SLOTS : nb_ops; + frames_to_send = (nb_ops > dpaa2_eqcr_size) ? + dpaa2_eqcr_size : nb_ops; for (loop = 0; loop < frames_to_send; loop++) { /*Clear the unused FD fields before sending*/ @@ -1321,8 +1322,8 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, qbman_pull_desc_clear(&pulldesc); qbman_pull_desc_set_numframes(&pulldesc, - (nb_ops > DPAA2_DQRR_RING_SIZE) ? - DPAA2_DQRR_RING_SIZE : nb_ops); + (nb_ops > dpaa2_dqrr_size) ? + dpaa2_dqrr_size : nb_ops); qbman_pull_desc_set_fq(&pulldesc, fqid); qbman_pull_desc_set_storage(&pulldesc, dq_storage, (dma_addr_t)DPAA2_VADDR_TO_IOVA(dq_storage), diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index ea1e5cc67..2831e141e 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -80,8 +80,8 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], swp = DPAA2_PER_LCORE_PORTAL; while (nb_events) { - frames_to_send = (nb_events >> 3) ? - MAX_TX_RING_SLOTS : nb_events; + frames_to_send = (nb_events > dpaa2_eqcr_size) ? + dpaa2_eqcr_size : nb_events; for (loop = 0; loop < frames_to_send; loop++) { const struct rte_event *event = &ev[num_tx + loop]; diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index ef109a621..89cfd2929 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2016 NXP + * Copyright 2016-2018 NXP * */ @@ -476,8 +476,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } } swp = DPAA2_PER_LCORE_ETHRX_PORTAL; - pull_size = (nb_pkts > DPAA2_DQRR_RING_SIZE) ? - DPAA2_DQRR_RING_SIZE : nb_pkts; + pull_size = (nb_pkts > dpaa2_dqrr_size) ? dpaa2_dqrr_size : nb_pkts; if (unlikely(!q_storage->active_dqs)) { q_storage->toggle = 0; dq_storage = q_storage->dq_storage[q_storage->toggle]; @@ -699,7 +698,8 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) goto skip_tx; } - frames_to_send = (nb_pkts >> 3) ? MAX_TX_RING_SLOTS : nb_pkts; + frames_to_send = (nb_pkts > dpaa2_eqcr_size) ? + dpaa2_eqcr_size : nb_pkts; for (loop = 0; loop < frames_to_send; loop++) { if ((*bufs)->seqn) { -- 2.17.1