From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BF2C4589E; Fri, 30 Aug 2024 04:30:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6107A42E51; Fri, 30 Aug 2024 04:30:32 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2103.outbound.protection.outlook.com [40.107.220.103]) by mails.dpdk.org (Postfix) with ESMTP id 145FA402A5 for ; Fri, 30 Aug 2024 04:30:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gdy72auWmKAevaloHcOihUZixtjt2kbCnyYXDtHdqMArpEoenqc2JdZ0LUg3tpbpaHC9yLhA8EnIZIvZ53OYS4zF/ndeuVQgzzmwC90e40TsL117hR1uUEnG7jCEl0I/lfF71AIKycHcWSkHD1GZHz5uTfLhSTvft8aOt6Du4SB6G9i2A+04jWlZBEDaKdsGat81PgQQ+tlzCfIk1x7sKlLFOldLeCj6ktCn1uGNE60CVOaEvpiWiH51ksnYkbQdRql92H24KHTXAGa2pXSIvCkLf5YPTwRCYYpYchwFMrZXC5zsr4/qpsiDzJiiAbFoSc2AQc2bQcjDyyOXZZq0aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jadyoH3AivfWscdcYmbGHG22dwBvUJcjtqqzk3LWT+U=; b=m9nm+vIMU8KmlOkOccUZl6Al/kEXBF3PPUHOTTXlTURxoQn9bxo17R/oEJYd+99EJn9BdS19nwccADcg9hd3j4r9mBcgPKXvoq8Y3a8LKGp8moPt02ugB/RviyHjDQOj0D1LNJ41Ja6x+gilcJEbDmUYpRQzhmJJAlQ7mMC5JDObSFP0pO2R3ZQWqyMvmfXTVJLaa7BRERO5RIvA5cQ54AJi4xiWs9bFeRXZ49cBU4g7k5mRMZntUUAc3fKZO+i7Z4GzwekEVYwr0AU9K4JDQQlt4cJqRHitTojt1Q5hhBGn/EhC2eZ136UFop/ICg7vHFFM/rxYiNK/H14zZ1TscQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jadyoH3AivfWscdcYmbGHG22dwBvUJcjtqqzk3LWT+U=; b=VA8gF0L8kcvkcYXuduKTwI0aSi8TzGWHWMyBUQEP4t9//hYjgJbgW0RYy07FvccambYD+lL3X2iQn2NWOb1/Un4HT+GDFIKf0I2pYp5RLtyiqao1npjdScRsO7vMhyhfrSmOg/ce4Bx+wYb0gmz/PObSVKt+rPYxXXWEe98JV1I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by LV3PR13MB6456.namprd13.prod.outlook.com (2603:10b6:408:19a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.19; Fri, 30 Aug 2024 02:30:27 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7897.021; Fri, 30 Aug 2024 02:30:27 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He , Peng Zhang Subject: [PATCH 2/3] net/nfp: increase representor port rxq number Date: Fri, 30 Aug 2024 10:30:01 +0800 Message-Id: <20240830023002.2364238-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240830023002.2364238-1-chaoyong.he@corigine.com> References: <20240830023002.2364238-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: CY5P221CA0160.NAMP221.PROD.OUTLOOK.COM (2603:10b6:930:6a::12) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|LV3PR13MB6456:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cf84607-52a3-46fa-b75a-08dcc89bb593 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?RVthqcwu6oBxgIYUoCGniAiwKNcFGTi7sQbEyNsn7Ld87Qe4N6vqLwKoiYb/?= =?us-ascii?Q?JOmudVRbACGTNKbMQu6jvCAFNccfnqPsZZDvf+AWZVN7kxCjJJPekVwXQbyK?= =?us-ascii?Q?/dN4bbhok1VRIXr7mM2zXuAHGtvrCgHmnU4ozf5TMOvZqlEyCaZmGC1cnuaX?= =?us-ascii?Q?HliMLnqcDFpHnkq0vOQ0ijTyKYwpNuGWgWguu52lfVFUXKgeL73nhWmGJSXe?= =?us-ascii?Q?WUAWC3ELQ7hbypyphi6kDYbBpAIYUPkYa1CLD1kJRuHA0419CWGX53Z9ITeJ?= =?us-ascii?Q?W+HHPlh5796LlbjIFbgeLrdXGih9q2JzDMoamgMlBhPAk51shRtYVAbIxm66?= =?us-ascii?Q?xFQWzWiF3cLEvv4yoP8BKG0Cx3GTo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C8WA+mQrXmclFgsjWwarX6iXhofLKTcsWjdlz3g1EZN9cnwVrT?= =?us-ascii?Q?bqE+Nr/mPlUYJnNF0SUDs7o5o3wt2Ems1k05NQQF9EOSXZoMd1B/XhqZ4xPQ?= =?us-ascii?Q?shseGEuzZ4ofnhSNMKaC2YjLdhHddMP4/DxGK7KcALnme1NGYg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?P0tp127nb4AjKDrTnDL8DmfFuKbB8K+FoWkchYcQv5CbBao2XSN1pgUSnIKE?= =?us-ascii?Q?3Tn1Ej9m3lnkTya5MJ26z6ZJtezzp9tZRAz2kzMmJQ3DVN6gpPTnL6RBkPp8?= =?us-ascii?Q?YTSynn717QIn0TQq52XT1yeCJBvOHutQTJIxE7lanjY3YVOUf5iCEjDOsr83?= =?us-ascii?Q?3uPSx3Yk1Ar8IQ9KDYl3yncRpShM86usmgNnnZWitJsRoMkJJf1Wu10//mdx?= =?us-ascii?Q?6CiV8r7t+RVsK7MM7nFGzJXlcuEWwJplN/9ftdp+avd80nuODL/asGZdqbbw?= =?us-ascii?Q?lgQmzasgK1SLdUxsgOoL7R7OxJaUKEay/2KzocNcQyoLoZY8H13uU4KIaIIr?= =?us-ascii?Q?i/VsbVvdc8Kf8xQlROp5q00cuuJICS8uL6ZwituXXPEAcCcV3/9MceX963PU?= =?us-ascii?Q?04NtFWApGds+NMXa05dIEw14xMhmMh0XaMJTi0mTFs+kPqI01pVXQ5QTzQP0?= =?us-ascii?Q?gC93immHv6mdQryvlkepcdX/HhBuUbe1GJzW1U/iQ3+39SBAVxDWeV8d5fw+?= =?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g9XCk0bHQk4Mk0V5GPqqsD9OustxCv4bR?= =?us-ascii?Q?MSecHFF1NldMlcJvxWlYK9WuK7p1a8I77t9bg1NWv2abmyScGtzedJ32Tj0c?= =?us-ascii?Q?x17InGeXeFK2iuxxiS30ySNvslk6/1l0tVN80uOmBNA0pVzWSvcWriWxncWd?= =?us-ascii?Q?louQjQURkXOnZfbHsNtvXyuSIGQja+2W1mQZ2Yc4LZeiTqi1AizYCGvZugwn?= =?us-ascii?Q?iA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cf84607-52a3-46fa-b75a-08dcc89bb593 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 02:30:27.4797 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JJREBU8xdU8xWOU53USojqb3qsXqH/P5Q6AOfL6CJEj3/6sBe1VA2dZUJrUMy49vwCCe93cZm4VT0/Wu096djHBdrPYGcL17zMJiIY9lJ/M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR13MB6456 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Long Wu This commit supports configuring multiple Rx queues for flower representor port. Signed-off-by: Long Wu Reviewed-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower.c | 8 ++-- drivers/net/nfp/flower/nfp_flower.h | 2 +- .../net/nfp/flower/nfp_flower_representor.c | 40 +++++++++++++------ .../net/nfp/flower/nfp_flower_representor.h | 2 +- drivers/net/nfp/nfp_rxtx.c | 4 +- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index fa272790bc..8d781658ea 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -126,24 +126,24 @@ nfp_flower_get_repr(struct nfp_net_hw_priv *hw_priv, } bool -nfp_flower_pf_dispatch_pkts(struct nfp_net_hw_priv *hw_priv, +nfp_flower_pf_dispatch_pkts(struct nfp_net_rxq *rxq, struct rte_mbuf *mbuf, uint32_t port_id) { struct nfp_flower_representor *repr; - repr = nfp_flower_get_repr(hw_priv, port_id); + repr = nfp_flower_get_repr(rxq->hw_priv, port_id); if (repr == NULL) { PMD_RX_LOG(ERR, "Can not get repr for port %u", port_id); return false; } - if (repr->ring == NULL) { + if (repr->ring == NULL || repr->ring[rxq->qidx] == NULL) { PMD_RX_LOG(ERR, "No ring available for repr_port %s", repr->name); return false; } - if (rte_ring_enqueue(repr->ring, (void *)mbuf) != 0) + if (rte_ring_enqueue(repr->ring[rxq->qidx], (void *)mbuf) != 0) return false; return true; diff --git a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h index b0d8fb0ed4..1dc868fb68 100644 --- a/drivers/net/nfp/flower/nfp_flower.h +++ b/drivers/net/nfp/flower/nfp_flower.h @@ -110,7 +110,7 @@ nfp_flower_support_decap_v2(const struct nfp_app_fw_flower *app_fw_flower) int nfp_init_app_fw_flower(struct nfp_net_hw_priv *hw_priv); void nfp_uninit_app_fw_flower(struct nfp_net_hw_priv *hw_priv); int nfp_secondary_init_app_fw_flower(struct nfp_net_hw_priv *hw_priv); -bool nfp_flower_pf_dispatch_pkts(struct nfp_net_hw_priv *hw_priv, +bool nfp_flower_pf_dispatch_pkts(struct nfp_net_rxq *rxq, struct rte_mbuf *mbuf, uint32_t port_id); uint16_t nfp_flower_pf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index 130795357d..96433b9f87 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -138,13 +138,14 @@ nfp_flower_repr_dev_stop(struct rte_eth_dev *dev) static int nfp_flower_repr_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, - __rte_unused uint16_t nb_rx_desc, + uint16_t nb_rx_desc, unsigned int socket_id, __rte_unused const struct rte_eth_rxconf *rx_conf, __rte_unused struct rte_mempool *mb_pool) { struct nfp_net_rxq *rxq; struct nfp_net_hw *pf_hw; + char ring_name[RTE_RING_NAMESIZE]; struct nfp_flower_representor *repr; repr = dev->data->dev_private; @@ -156,6 +157,15 @@ nfp_flower_repr_rx_queue_setup(struct rte_eth_dev *dev, if (rxq == NULL) return -ENOMEM; + snprintf(ring_name, sizeof(ring_name), "%s-%s-%u", repr->name, "Rx", rx_queue_id); + repr->ring[rx_queue_id] = rte_ring_create(ring_name, nb_rx_desc, + rte_socket_id(), 0); + if (repr->ring[rx_queue_id] == NULL) { + PMD_DRV_LOG(ERR, "rte_ring_create failed for rx queue %u", rx_queue_id); + rte_free(rxq); + return -ENOMEM; + } + rxq->hw = pf_hw; rxq->qidx = rx_queue_id; rxq->port_id = dev->data->port_id; @@ -249,18 +259,18 @@ nfp_flower_repr_rx_burst(void *rx_queue, dev = &rte_eth_devices[rxq->port_id]; repr = dev->data->dev_private; - if (unlikely(repr->ring == NULL)) { + if (unlikely(repr->ring == NULL) || + unlikely(repr->ring[rxq->qidx] == NULL)) { PMD_RX_LOG(ERR, "representor %s has no ring configured!", repr->name); return 0; } - total_dequeue = rte_ring_dequeue_burst(repr->ring, (void *)rx_pkts, - nb_pkts, &available); + total_dequeue = rte_ring_dequeue_burst(repr->ring[rxq->qidx], + (void *)rx_pkts, nb_pkts, &available); if (total_dequeue != 0) { - PMD_RX_LOG(DEBUG, "Representor Rx burst for %s, port_id: %#x, " - "received: %u, available: %u", repr->name, - repr->port_id, total_dequeue, available); + PMD_RX_LOG(DEBUG, "Port: %#x, queue: %hu received: %u, available: %u", + repr->port_id, rxq->qidx, total_dequeue, available); data_len = 0; for (i = 0; i < total_dequeue; i++) @@ -328,12 +338,16 @@ static void nfp_flower_repr_free_queue(struct rte_eth_dev *eth_dev) { uint16_t i; + struct nfp_flower_representor *repr; for (i = 0; i < eth_dev->data->nb_tx_queues; i++) rte_free(eth_dev->data->tx_queues[i]); - for (i = 0; i < eth_dev->data->nb_rx_queues; i++) + for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { + repr = eth_dev->data->dev_private; + rte_ring_free(repr->ring[i]); rte_free(eth_dev->data->rx_queues[i]); + } } static void @@ -378,7 +392,7 @@ nfp_flower_repr_uninit(struct rte_eth_dev *eth_dev) repr = eth_dev->data->dev_private; rte_free(repr->repr_xstats_base); - rte_ring_free(repr->ring); + rte_free(repr->ring); if (repr->repr_type == NFP_REPR_TYPE_PHYS_PORT) { index = NFP_FLOWER_CMSG_PORT_PHYS_PORT_NUM(repr->port_id); @@ -627,9 +641,11 @@ nfp_flower_repr_init(struct rte_eth_dev *eth_dev, */ snprintf(ring_name, sizeof(ring_name), "%s_%s", init_repr_data->name, "ring"); numa_node = rte_socket_id(); - repr->ring = rte_ring_create(ring_name, 256, numa_node, RING_F_SC_DEQ); + repr->ring = rte_zmalloc_socket(ring_name, + sizeof(struct rte_ring *) * app_fw_flower->pf_hw->max_rx_queues, + RTE_CACHE_LINE_SIZE, numa_node); if (repr->ring == NULL) { - PMD_DRV_LOG(ERR, "rte_ring_create failed for %s", ring_name); + PMD_DRV_LOG(ERR, "Ring create failed for %s", ring_name); return -ENOMEM; } @@ -704,7 +720,7 @@ nfp_flower_repr_init(struct rte_eth_dev *eth_dev, mac_cleanup: rte_free(eth_dev->data->mac_addrs); ring_cleanup: - rte_ring_free(repr->ring); + rte_free(repr->ring); return ret; } diff --git a/drivers/net/nfp/flower/nfp_flower_representor.h b/drivers/net/nfp/flower/nfp_flower_representor.h index c068c4462c..70ca7b97db 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.h +++ b/drivers/net/nfp/flower/nfp_flower_representor.h @@ -17,7 +17,7 @@ struct nfp_flower_representor { char name[RTE_ETH_NAME_MAX_LEN]; struct rte_ether_addr mac_addr; struct nfp_app_fw_flower *app_fw_flower; - struct rte_ring *ring; + struct rte_ring **ring; struct rte_eth_link link; struct rte_eth_stats repr_stats; diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index da41a0e663..05218537f7 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -419,7 +419,6 @@ nfp_net_recv_pkts(void *rx_queue, struct nfp_net_dp_buf *rxb; struct nfp_net_rx_desc *rxds; uint16_t avail_multiplexed = 0; - struct nfp_net_hw_priv *hw_priv; rxq = rx_queue; if (unlikely(rxq == NULL)) { @@ -432,7 +431,6 @@ nfp_net_recv_pkts(void *rx_queue, } hw = rxq->hw; - hw_priv = rxq->hw_priv; while (avail + avail_multiplexed < nb_pkts) { rxb = &rxq->rxbufs[rxq->rd_p]; @@ -523,7 +521,7 @@ nfp_net_recv_pkts(void *rx_queue, if (((meta.flags >> NFP_NET_META_PORTID) & 0x1) == 0) { rx_pkts[avail++] = mb; - } else if (nfp_flower_pf_dispatch_pkts(hw_priv, mb, meta.port_id)) { + } else if (nfp_flower_pf_dispatch_pkts(rxq, mb, meta.port_id)) { avail_multiplexed++; } else { rte_pktmbuf_free(mb); -- 2.39.1