From patchwork Fri Feb 22 11:16:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 159022 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1609726jaa; Fri, 22 Feb 2019 03:16:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IZtR27FKZby5ayMhdW5fVA6wwQWfFXzGQqolx9uaqlOLcr8yeuFstB0n1J9Fy+hNnkRe1fy X-Received: by 2002:a50:b7b6:: with SMTP id h51mr1345351ede.277.1550834195391; Fri, 22 Feb 2019 03:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550834195; cv=none; d=google.com; s=arc-20160816; b=LrHZXzy/Ndpw9SypDoStOEwBlu6rr9cN/Z9irTL1/iuEaFcoJhAFe/2sL1QFxACS/r WB6YHJlFpBsqCU9/Gv14tgttcn7aiLnABooKv/05mq2zvFYZcSNZ9F5Xmc0WAjWbzNJE fsFIdq6j4lCb7DVtNY6ASDPmde6sKopfEvsHCenUfPv3p7jRqMka/8V6E4ODrBLHNT3x MAHvn6SZlJHiCCqo8B0scHOJlwZllc+rRQF/SvFp9wN49A9enxYWoSdl1mE7HSiu4A+T 5UKfbCRszxcrR77dFxuaXZKIddss9sG3o1/kIKeGQhqWqou1po/8kFj/ypdWFT/wRyf5 cGgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic:cc :to:from:dkim-signature; bh=mKvbXxkw+voZiLdpyh9oZQS+aZNW4jp6Px3LJXWJ2Q4=; b=DkkvSI7XWelJ8uiVs3NIZprvsgw0UQFMsB6hrEU8s9jgPcw6xmyOh+zoWBu5igKObR iNauA8Pr0NBj5mNFviaXFgfrKJTPiNPo7fzdCfP7X4K5Lqhg3/uTVYbkzvLD2lixb44A zT1wqFYmrkgeUDxrfOSwK3aoEROOa2r/up2NVxnt2cjVKVykp0+KAYfwMOfoslZkPGeR Jg9ekivaEQ/hxAuUJFKbBhQsD5u0ZEEqsnp1QqhzA/asOMAko6codd3/n9Nd74s5LTuE DjlsXm2IyK25+ZWYcsovaDYJLHfw95DAvBV7q1hr4rIA6wgOwhTlehcV9b+uD1RIa/v7 F7nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ZKgX+Fpc; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id gj14si473593ejb.183.2019.02.22.03.16.35; Fri, 22 Feb 2019 03:16:35 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ZKgX+Fpc; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99B3B3576; Fri, 22 Feb 2019 12:16:07 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50064.outbound.protection.outlook.com [40.107.5.64]) by dpdk.org (Postfix) with ESMTP id D69892C30 for ; Fri, 22 Feb 2019 12:16:03 +0100 (CET) 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=mKvbXxkw+voZiLdpyh9oZQS+aZNW4jp6Px3LJXWJ2Q4=; b=ZKgX+FpcL3Pp8BLsCwjNya7NvKpBkbxUXPFkcDh0TLbyfQUd4CH8xVS+uSR7Ub8oL9NJpeOhi6PkCp8Q2oEhTRZQHxfOiVpqP9ofdzyJmhJ4PEJeRX9LOnHgVwVBcenwsUkSSF701lDo3kFz3VGSGvoR9DdbvfbsYvP7mPrHeTY= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2431.eurprd04.prod.outlook.com (10.169.134.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.14; Fri, 22 Feb 2019 11:16:03 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::1cad:15be:6f7e:cb84]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::1cad:15be:6f7e:cb84%9]) with mapi id 15.20.1643.016; Fri, 22 Feb 2019 11:16:03 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Shreyansh Jain , Ashish Jain Thread-Topic: [PATCH 4/6] net/dpaa2: add support for 16 Rx Queues per traffic class Thread-Index: AQHUyp//SYgKOxysLkKCc1tn8V+jJQ== Date: Fri, 22 Feb 2019 11:16:02 +0000 Message-ID: <20190222111440.30530-4-hemant.agrawal@nxp.com> References: <20190222111440.30530-1-hemant.agrawal@nxp.com> In-Reply-To: <20190222111440.30530-1-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [92.120.1.72] x-mailer: git-send-email 2.17.1 x-clientproxiedby: BM1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::24) To VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 38919ddd-a2f7-48b1-88c5-08d698b7214c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2431; x-ms-traffictypediagnostic: VI1PR0401MB2431: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; VI1PR0401MB2431; 23:8oM2qbgG+u83Zjp7AskCETBE7mDkjoa29AXeI?= =?iso-8859-1?q?oQNEY2/cerwQ4IT8VyVcoGNpr?= =?iso-8859-1?q?15oWFdGhFrmxK1CbFmMFkPQBkKki5knYqlIvXn9Vf1oZ3agczAU?= =?iso-8859-1?q?E3IPigWULgYHKvhOF/d88HJFTNpUr9D2QS2JrRh3lfD1JNh/XhN?= =?iso-8859-1?q?mRHyvTfckV/NGJsW3UTiOUrnx1Z6blyfI1yVDnhrsDeys1D4MvJ?= =?iso-8859-1?q?KVFwV20M9wBqDgRWLqvQJFoIC/m+7puCXWjvg7xAqhnINzkFMVg?= =?iso-8859-1?q?Q19S2cp4u/mCToPtnJe3BQ/oOyRoNrh20qOWa03e/yQmhM2ph8D?= =?iso-8859-1?q?1ZlvHkV/NdEK5N9YlomUy5azEuzYCET53CCAZ0Eh4/2P4rigBjx?= =?iso-8859-1?q?gzrTRJ4zkQoRfDjiOOfm9UCa2ZxzkrDksL1IO5DfwAoGn41A/J1?= =?iso-8859-1?q?qSxK5Z3W4Vaa8U6DVQb3CAyQ3n0r07IDQk7mOy4SJlrD574Ar+5?= =?iso-8859-1?q?2kSQjzBqMHBRWN7AGolUp8zkJEjGRcEwrr/rImMdcu28LuH+K/J?= =?iso-8859-1?q?gGVYKQMYfP4TDL0ekp0DX7IIJKy0Y9MHiJLAi4yGEByXgSwMJXY?= =?iso-8859-1?q?TWCJSFMCF246GlJ8B6tMGJpKHEdZ0xrXqKYW2BZ774geJ5oGzzD?= =?iso-8859-1?q?9M5fcUKtXNRxHwhVsczk6gddmtUGnh+bp61hmN60k1Sjoq2hdHs?= =?iso-8859-1?q?zbwzuz4y5zCrBh2K8QW28W/6YrbC+TLd0IPEprwRAwcUWTZCuyB?= =?iso-8859-1?q?oZbZ8pGPZ6/EaPFP3BCaMqxlhaRIzf6oZkiQ8EBYAKlXeooGlCX?= =?iso-8859-1?q?xea4B5dZitBPmpduNd0mexw0C6UEB3sd1lnCvu697CbS6aNN/yG?= =?iso-8859-1?q?Tnmb+AtRLyyV+uDH9wQ9sXVRbN2eH+v5olFCEF2YZk05K/GLCCG?= =?iso-8859-1?q?O4o4jCIo2bvp6hojjJGn7xegTQZNAynWSyeWruEDs6mGDpuEovM?= =?iso-8859-1?q?8HVH3SltSvwTQMpbck79MyNw/frsacq3HYtsdJ3RCMT226pGrhL?= =?iso-8859-1?q?PcTB0nTaJk+5PlrfNoM+JV6kDSym2CzFhjrFU1183dX7nK6GOAB?= =?iso-8859-1?q?G3OIwHHF1hJc1WF6/XStFxsdIcvQ3D7Sa4MTxxZZqZbAHe0pscR?= =?iso-8859-1?q?UNY0D//4SohqZJzBZCgR5AE4TsyX9N41YOlBBPidSTr0eev5H/M?= =?iso-8859-1?q?ijO9sgU3R+jYvz36BvFKFsyJ6wIYVPvaOkX2E6H2T5ctxfYanL8?= =?iso-8859-1?q?8QGDwTxWCY8fu++EKlkBCHdhJcD0UGzIUwn88tXONO9SwFeC2EQ?= =?iso-8859-1?q?bfOKv+6hC6bYxAi2xFMr+Ccxfw3od0kfhBKOmEase9VPaiefBiJ?= =?iso-8859-1?q?OQguc4tBDdQG8xXYtT2xbRx+PoX5lGGVkXpFI=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09565527D6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(376002)(396003)(136003)(366004)(189003)(199004)(2906002)(99286004)(8936002)(105586002)(26005)(54906003)(3846002)(6116002)(106356001)(71190400001)(8676002)(97736004)(316002)(6506007)(6512007)(1730700003)(5640700003)(81156014)(71200400001)(102836004)(36756003)(256004)(386003)(6486002)(50226002)(81166006)(6436002)(6916009)(86362001)(1076003)(305945005)(478600001)(5660300002)(68736007)(44832011)(2616005)(486006)(11346002)(2501003)(53936002)(2351001)(66066001)(7736002)(4326008)(186003)(446003)(14454004)(76176011)(25786009)(52116002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2431; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /jM41XnytGkCHkwUBinNf2TVQEow1TmsoHXLtghh6EI9hU3ttzSvKt/lRmR2Gy5xyISJLb/we/q9sgnxS6U/oTYhSce0KUjg0W3Wb6eb+2CUyEQlSnF7WOKNI+bTI+b+OSr0sZDGBxELf3jAUdce4Dmq5cHNfCxUZf8L7h4K6qH/P1HdUAgSWkHdReBfM35W447F8bmdhDSMDAJRbWSMhXNONA/m+srFhnFxRJhXgspX0zUa1Ml5lbt1A6IKTiDcIKkGRWztTOCqmiJd7FuLmKNaqB/osOcfgYBdtVBb7ZV9xsIfMMNIS8s8G/7dcpSuVQgzC5EBEbCzlOHzWZbzvX1s/BCeLHPgOo2QrL/cXCMLthfegfZfYDeQuA72lemv1MWXj/VKy4HrmkJv2fGMQOf49MB60camHNQpeC6PPpY= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38919ddd-a2f7-48b1-88c5-08d698b7214c X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Feb 2019 11:16:01.4506 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2431 Subject: [dpdk-dev] [PATCH 4/6] net/dpaa2: add support for 16 Rx Queues per traffic class 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ashish Jain Adding support for 16 queues per TC per DPNI port which is required for LX2 platform. Signed-off-by: Ashish Jain --- drivers/net/dpaa2/dpaa2_ethdev.c | 6 ++++-- drivers/net/dpaa2/dpaa2_ethdev.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 0ab43cadf..f8c2983b9 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -266,6 +266,7 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev) struct dpaa2_dev_priv *priv = dev->data->dev_private; uint16_t dist_idx; uint32_t vq_id; + uint8_t num_rxqueue_per_tc; struct dpaa2_queue *mc_q, *mcq; uint32_t tot_queues; int i; @@ -273,6 +274,7 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); + num_rxqueue_per_tc = (priv->nb_rx_queues / priv->num_rx_tc); tot_queues = priv->nb_rx_queues + priv->nb_tx_queues; mc_q = rte_malloc(NULL, sizeof(struct dpaa2_queue) * tot_queues, RTE_CACHE_LINE_SIZE); @@ -311,8 +313,8 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev) vq_id = 0; for (dist_idx = 0; dist_idx < priv->nb_rx_queues; dist_idx++) { mcq = (struct dpaa2_queue *)priv->rx_vq[vq_id]; - mcq->tc_index = DPAA2_DEF_TC; - mcq->flow_id = dist_idx; + mcq->tc_index = dist_idx / num_rxqueue_per_tc; + mcq->flow_id = dist_idx % num_rxqueue_per_tc; vq_id++; } diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index 313cbe4bf..13259be7d 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -20,7 +20,7 @@ #define DPAA2_MAX_RX_PKT_LEN 10240 /*WRIOP support*/ #define MAX_TCS DPNI_MAX_TC -#define MAX_RX_QUEUES 16 +#define MAX_RX_QUEUES 128 #define MAX_TX_QUEUES 16 /*default tc to be used for ,congestion, distribution etc configuration. */