From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50088.outbound.protection.outlook.com [40.107.5.88]) by dpdk.org (Postfix) with ESMTP id 058791B48F for ; Wed, 26 Sep 2018 20:06:04 +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=O4Mjz3SEY2B0sR/4KHSeQm+tRBXWckOJrTjlGCa+YWk=; b=mRde2eJBEYSt+vV8ksK+r3ym0B+gmL73z+8cbikMR6JgUGPENlDqXmgSB69fa1RMSptGbWpDOI6W0B2bpsjH7dlTAhxqzHmPuAiZzYnMt2r0dqvvOePb+Dgzag4MaQHx+lM9SIc9ptMcic2Ly7/rPbhq6vebLqqFZAP8YJGtQk0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM6PR04MB4679.eurprd04.prod.outlook.com (2603:10a6:20b:1c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Wed, 26 Sep 2018 18:06:01 +0000 From: Shreyansh Jain To: dev@dpdk.org, ferruh.yigit@intel.com Cc: thomas@monjalon.net, Nipun Gupta Date: Wed, 26 Sep 2018 23:34:32 +0530 Message-Id: <20180926180440.31726-8-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926180440.31726-1-shreyansh.jain@nxp.com> References: <20180917103631.32304-1-shreyansh.jain@nxp.com> <20180926180440.31726-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0014.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::24) To AM6PR04MB4679.eurprd04.prod.outlook.com (2603:10a6:20b:1c::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 04526ce8-4bf5-4aad-8b6e-08d623dab8d8 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB4679; X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4679; 3:S2z1+NwewtSRQNfbur1+jRCu2cslE9V5kPLIonU29iVXPxuAYdeF1sZv5NfDONMMXLm1KoDkvJw+4/Hs0SdrZwxGLlRyFq4r/lqd8YdtyDIgOW+60cXbk4ca9A78N7DzFBkq6yBoBsp/+s6BVStjbJYVvqHTztnWhMm9RJZqLOgLyfKNC5iOO2sHvtY+6YgKL0aX6Am2UnDa8HRl2mqZdSQRPvdEOCoEhRJSDyCoDVc5v+BLrPVrQulup8Baz9xg; 25:uEsPzPtK1qHQ6t23T9PKnXCSgTcs2JsvNAmpMQDGPUOKvZu3SVv/6MgC2zG155CTrRwie+fQffw3fa0OLuqgS1bF1JWjI62UpbQLlH3ZjdGj5TPBeAEAY8RXNGgYm5wpDV41sAYwTPOv3grlPNaujte15e5FMdd9+TGYwTCBFLRHStJwS1meYt3VTWXKKGO34lq4vgnKKtPwqvFBnRABS2wkMRpj5HfacSABz6eXnSTSSfp7AYEjuc/Vjdc6fU/b2yx6ulrZlx3ESJwGHDycKm4ZiS7aLCjppDi612ZbRpJ6kZAIh0BrGrTo0IsMDgYnJ7HkQAFbby0Ustl7NVVBFg==; 31:0dnMZnXb10c2a2k+EoEKrhAjOc23OYX+ce3vgPM/XrwNljQ+zhCcquwN3jsL8uEGWindnxgvfz/PXkVNdysU36OuhKuJmCldpFv93P94wgpPj47NRM3yJVov/aTG/0sSJsMWY2T5VnGFD7IBtw31bANpc6qE0KRnjkC+BO5DzabP6KPbq0F3Wl4NDJOpbP57ZbLvQ6nigEZ7KO/jM4wf3Adk3nQoa9w5CudIU5PE/Es= X-MS-TrafficTypeDiagnostic: AM6PR04MB4679: X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4679; 20:p/cnh/Ww6AxUQX2sIOm/e+NafBHg8L+EzI8ZJwprKhkS11ShiGSYO7dEvacOOqdglnLElvqOx2CsvRHqc+mpcytKcN7wiSxQxGKbYHnfo3goeuikshB1OAYsBHLYmW9YYngbZlLu/6EC8ODvU28NBUE1b9DHdlW1l5NB5CP6HOnRrX/+81PLQnadQAhKoSKLzxcL3lUAGzJXPLZ5SIGEwMMc1Z9HgZWrHNLyq6zLiOasSDuNfm5KkfFQqQ0EICne+C5zqzxwDLuU74kXgzR6FKSDKIoFjNX0S/ljwgfeC1n/Ag8Ey0N7E0e4ysTVNzGNp2yJvgm9UW/HfspUT1goGNbQRc++kUmgur/8gP4Dcgny720GsiZfPyRXPve5JcElHvdX0HEOR79Dp4RbQEh4G8vbOCBvq7j94lqbFTcgQtjAeTd6EPiXNTRO/40p1PkO/6DqXepWtn74iGDE3gtczYGb0wczBJS883OegWSApO9Po31u1ZM3Ol0yAKQbC9/a; 4:9bgBxiUtWERyZu2tbNRStdTwNOrB9CzzZNpfsOWR4p5qqo9bT8Dr6H/+tFa/GGUEGWfI8k/e0sERlDzSap3wC/dP/8j7AMm7LOa7wmHmqMF886254Jg+pax9NqA1/Irdk0ezi1bUpmEvaEuAZwWmh/1pMFY1roKleEe1saVozCfrRZt0WgwV7mWJB5pYWCX30bw3LB+sK1LdeLHuZP/30lFqW04CTf9ZWwovhONOLrdy5swKA3nIa9QCBobKC5T8h5L31ktKxum0EePWY9IkfE4TkFieHd46P6olWA6vBhHBGC0QJ/ive3Uo//gk81FDhGWmlrJjO1Rtm6oQJxCGZioP3Updv6NBzllCbhLPB0s= 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)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:AM6PR04MB4679; BCL:0; PCL:0; RULEID:; SRVR:AM6PR04MB4679; X-Forefront-PRVS: 08076ABC99 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(136003)(396003)(346002)(366004)(39860400002)(189003)(199004)(11346002)(50226002)(446003)(47776003)(44832011)(956004)(476003)(106356001)(486006)(2616005)(6512007)(66066001)(305945005)(7736002)(6486002)(105586002)(36756003)(86362001)(478600001)(8936002)(16526019)(81166006)(50466002)(186003)(26005)(25786009)(8676002)(55236004)(48376002)(81156014)(4326008)(3846002)(6116002)(1076002)(6666003)(52116002)(34290500001)(5009440100003)(2906002)(16586007)(51416003)(316002)(97736004)(6506007)(76176011)(5660300001)(386003)(68736007)(14444005)(53936002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4679; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR04MB4679; 23:1qxZ5VZDWxrictd0nAYFGmD2YxDVx8Nd8/zoZVny7?= =?us-ascii?Q?LwIhg6TdOXu3MAewqSJhIstdSTRezPBTlRx2dp337ryrVD3pBMCQS5MynNtP?= =?us-ascii?Q?IIqnF5fOxb1yt8Qxf2mKJbdKYQ7mt2M3lEpncdGq9glx/Sl6MZrrXcSXU8hc?= =?us-ascii?Q?qUoVdr6AlsNh8NASHWjygzEt6Bx2DGRWhx9A8wcflGuK1uIX+RGPv1X1Aa3N?= =?us-ascii?Q?Q5zOTkUaj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JJrbeC32iS7LmXwyvJvnjH0B17wjiFL7K/coTUHPBkKEYl9whFiZsfMu/v+tobMTc0a6oM+SVN19AYUKYIgLuNI5AuJgwW/Q==; 5:1MFYZeQAHtpso2/fL1b4eFUhcGgMio3OveHsklN1dz+CrDcZDdxpeedITmh7Lnaa6Z+0pV3CFuyA4OfzDbXdjmiOVfdEVqUcbdKOdTr7w8dwJIi9BhA7pRsnHP9TojHdINLmVt2P0VD/GklkbphlgOGdMQ68EMYwk6oezIUNmhs=; 7:mKbIoqpsZzl1+rafCAiPiWG58oAfAlfpfX9mWuvw9+hvdIiHaF0WrhQwnkixUcHZAas2bIOrCZxRyROvGFQnJ1TgE5bKbNrUK7CB2RWUKgLrlXE7roiVVR05HeAgf9TPIg1eTLEXM+FsUJSMgFU1Zw42MX1MEmrAKenyxOFcCCyAbuAyd/3MDpmaHWYj5SynTPqvvIsI4EX1ha34v2AkONJGYWDte00GvCY4ukCnSkhOI1VlKug8P70oet+6Qh9P SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2018 18:06:01.4139 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 04526ce8-4bf5-4aad-8b6e-08d623dab8d8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4679 Subject: [dpdk-dev] [PATCH v2 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: Wed, 26 Sep 2018 18:06:04 -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 e77039870..7765b8d80 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1173,7 +1173,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*/ @@ -1322,8 +1323,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