From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0079.outbound.protection.outlook.com [104.47.0.79]) by dpdk.org (Postfix) with ESMTP id 223A81B480 for ; Fri, 12 Oct 2018 12:05:52 +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=HQWu4qsM4Te95aDN5peAC3n8udnwNJ0TmDUSUSmbGuU=; b=XxfdOBaAM2rJTmTEPWfkcz1MHwrpBXtnPBlNc+S8k1C8QiYCakDXUCNpoEdR8wniouDrZpOJnLyXcbGNYVLVgoNudlmOqb4pEVO7b8p7T/Rhw0br5z35ITCW8TdxZK3UYOvnZXs8/UOPiWgnSDl0kmRwWYEK5xRmP3OB6QPy9Qk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM0PR04MB4676.eurprd04.prod.outlook.com (2603:10a6:208:75::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.25; Fri, 12 Oct 2018 10:05:50 +0000 From: Shreyansh Jain To: thomas@monjalon.net Cc: ferruh.yigit@intel.com, dev@dpdk.org, Nipun Gupta Date: Fri, 12 Oct 2018 15:34:18 +0530 Message-Id: <20181012100426.29349-8-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181012100426.29349-1-shreyansh.jain@nxp.com> References: <20180926180440.31726-1-shreyansh.jain@nxp.com> <20181012100426.29349-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BMXPR01CA0004.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::14) To AM0PR04MB4676.eurprd04.prod.outlook.com (2603:10a6:208:75::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c8c16f80-a9a2-44c5-52ea-08d6302a4a2b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4676; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4676; 3:elNmdSv4dAbySx0ae0EnNLDo6FfLbF+YVtQk4C2tb6cBcgmqjIS8lQJ+Gh2JdUnad3wETm05Dhp0nnGkEov9c7FwwetT/gBfrMBtix5iqQpaHL2SOBVGhwmX6VUXblqXsEZsc0yxg7FOLHcTo3PkJ/gs+2TjC/l6uI0/WWrl7S1zXupDSXNBec1+yTX/FwzhhEv0DD4LBp1hdNoIiQJ+HnT4vMG+8dI5YcHnljUY6e+v1GCXSfn41hyy6wwfb1eM; 25:lKT/T8YC6VOQR0ckXmJWF+3tp+87/LU/5ax2bcs7UyF3l5htH5oFbyJJ+uSlleSY0BGo2o6U/WUNs1WRv6MItg5+heGd3nI1l0zsucXs6xy7lq+I+eljNUdUDjFaXfVe7GO9DGhUYpB9DXdGiEQGguPn+85WbYiQuGD1KkVRGJJxR87NZoVFciEHDyQbAvscVMM4/8JG4ophPt5sUxxgPnAYDazElgSuBZa/GvRVmZ5i9ELylcGX+GaEm7gvctx9SezaNEg3h/uYFVMtyoCjExY35plNzOkvsH1FGDntJc6hjjqKYXsXlXhItpY7zBE0kRNJw9JfrZs6oSf63L9Vhg==; 31:Yr0A/1Wb3F5YkTehAY1ZqDQ4saXTntL/jP6RLfpaIvtWAY3WhWmQxaiDRnXWVg5IPB/VZMqaXhjgm2fz9jJjoJTx6anMUsp92bzkzJPIU4+DBBu+S7sH8zRNtfMwLmF2aZHYGXDmKOtuW8tASwfZv6T/RFqNitB0wcWWLzkrlxktnb9GmNxvi0UNBGQIS0JZp9BRAvIOcb/2O1aboSUwTFb+GZwPL7qSvFqjz+YLano= X-MS-TrafficTypeDiagnostic: AM0PR04MB4676: X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4676; 20:TnhjeRw4PQQEcjCMpHDdRs+Dj4EsKzjovwKAVwJNdbrze2JdNDACSwJxGkqA+ivbc9yVxwtZkcDLacZwL4CH8EoX6GQntZnjXCNKvkkqMsBjHlN42Vd7D4t23HskmVMzg0Axg1RYGaXsmnieCDUnRuLF/j7KMJtqxg+WtfB0tf/kzXjF0P3oY0j0VrFt0acXkOOh3/hVNsDgDwlgPH9GVdTDWiTb3MjATI7qvQkUFAH98wPMlaHEKxtJz4Szc1GxJaM8V3p2Bz3SEWtk+7QG0+zQmvY3ypxCtEntq0TJRSobjSiBJl4mc2zmtaYE80RxfftB/uXar1RYz2FcAlpZpkRRbf9R8qxUB65dKCdHSREG695nGTgJNMq5RJuXtxmHxExgQalirKd9QSQQIYCznEkyJpHFZn6ZX1pGn1b/5pa8GVMu/z2ebfyL/3i/dnqmmXMHxOxKCv/26pQrZcpGi5Ijon8t7P6vfj6J72qzcBhzXFkH1tE+I70rxp7asXJy; 4:GF0/U+Irdxq2n6+boSgOin7xe95Aj5qURCzw4hmZ5Hw4u1zG6rLPgGwI57CEWAGGo+UnwLRhPNdbV/OM294fWvzo7fSce6FrAN+1QtMukDu85Jx963GwjDmVQCMaB83C54WXbGj6DlidaMRmCv1GF2Camx7dpq5sLk62vpsKynlajPzB/v8wcZUEz1E502g8ZSOqbdOt+C0kpFxbSSOg2zOBQJv32SOQw19M7Cbhg0WPSf0TlbwqKq90QcL+w5PSjlbbdhsB7BoOx98ip/UzQHbG15/1nJOkjKnZYP3Ovp6bpXAnVtCNu2xF5CCG6b86lttaJPhaeAu4EpQnRy1BOeNEMAXjextNbPldIswL618= 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)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:AM0PR04MB4676; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4676; X-Forefront-PRVS: 0823A5777B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(346002)(366004)(136003)(39860400002)(199004)(189003)(2906002)(52116002)(16526019)(14444005)(53936002)(8676002)(478600001)(186003)(386003)(446003)(105586002)(7736002)(106356001)(6512007)(6116002)(86362001)(3846002)(81156014)(50226002)(68736007)(1076002)(47776003)(5660300001)(6506007)(8936002)(78486009)(36756003)(316002)(26005)(66066001)(6666004)(25786009)(55236004)(81166006)(11346002)(48376002)(76176011)(44832011)(2361001)(956004)(51416003)(2616005)(97736004)(1006002)(50466002)(486006)(476003)(305945005)(16586007)(6916009)(4326008)(6486002)(2351001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4676; 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; AM0PR04MB4676; 23:SkdHJHwW48RoV9UFf1Z5Ti2mS3rUaQaBGtqVkxqKD?= =?us-ascii?Q?PSRgzrDWq2eLG42exCnzpj0NKbqy8bLiI640Js2Fp0RmzFDj8GI/9dq1dh2C?= =?us-ascii?Q?rS+21uMR/2Mfm2sZPs/YkDGNVLi/0n7KH+jsMI70uXl5kNDtaadv6Fpebi3R?= =?us-ascii?Q?wvC27bWyZTzyMDr8mF3d0n3NDXBvpoiv6AAa6wblIxz4zA93L8dDvXZnmDuk?= =?us-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38mul+rFuFjfcX0aOrihAQSWxwILIsEwY2bWYPSdFMfqzzhjdUto4TJ40qLQ6XpTxb20IeLsQGeMkqF4g3+ZcTKGC1GLeUBdCG19aSlSn3veKXun3jurDZd/I/IpwqRS1/YjmdFXawASM08SIPw==; 5:2b1XkOuUR36ocALdhdpy3kGM8ehl6f6UShTNlQqc96PmS7kKqjYg/KM6fKQ92YPuSdlPxAxLxNVDGBUNtV9uNVlL1ebwNaq8KM8ccD4N3jToJw4HlhOd3duWe8axBLY+ulodGU+48PUw12IIZ/ldkhubtS8lQKnlU36v47AMgmU=; 7:KhSp34WA0J/Q+YYYUeYcU/rVSqewotGupBDvYx3VCst45S9drCdag1Wi/vCk6NPQoara33ZR+DWkM/Y1rSiKvR5ymNlqcvn2WHnREjqgZNJaLZsIf8m+4Vv+XyAFyRHWsujD9QfqxFtcgkWeMKXENRW1gZ8GBS0kSd9SdyVpeyi2MAw2cZ74auvTazxJ/9QPfckSebUozdJRBq7JfP2t5nfZQuMk6pE9O+KLNMjmHXb6kcJvnaU8V8fKdLQhXx6A SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2018 10:05:50.0759 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8c16f80-a9a2-44c5-52ea-08d6302a4a2b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4676 Subject: [dpdk-dev] [PATCH v3 07/15] 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: Fri, 12 Oct 2018 10:05:52 -0000 From: Nipun Gupta LX2 can support upto 32 frames in one hw pull request. 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 | 2 ++ 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, 48 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 8717373dd..dcc4e082e 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -121,6 +121,8 @@ DPDK_18.05 { DPDK_18.11 { global: + dpaa2_dqrr_size; + dpaa2_eqcr_size; dpci_get_link_state; dpci_get_opr; dpci_get_peer_attributes; diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index ee95c2b7c..3e51b9e3f 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1237,7 +1237,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*/ @@ -1396,8 +1397,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 24df8d7f3..d9a33a266 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -109,8 +109,8 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], evq_info = &dpaa2_portal->evq_info[queue_id]; 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