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 5998146212 for ; Thu, 13 Feb 2025 11:00:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34CC642EC0; Thu, 13 Feb 2025 11:00:23 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A65D240287 for ; Thu, 13 Feb 2025 11:00:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739440821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jvu/f3JAO+1ho/lttv00O6xPQY2XerJ9o49WjKnh5+A=; b=EPTynAtemiE2iHz/2Ei0Ma2LpK5vz14BNMBZxI5QYXnNIDhBcVLnEk0mM029YKR452NPbh 14h9Fiz5hf2iGyQCXb6n9qDMF3APvm0bMOoMapyo08a6WWdNA0lTyo89MMvyYlfWpTpZ2I 95pLSbe1APn+JV/yQ5PFuH5O4dLsOv4= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-549-wssxByf9OJmAVUhjEowWcA-1; Thu, 13 Feb 2025 05:00:19 -0500 X-MC-Unique: wssxByf9OJmAVUhjEowWcA-1 X-Mimecast-MFC-AGG-ID: wssxByf9OJmAVUhjEowWcA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AA39F19039CA; Thu, 13 Feb 2025 10:00:18 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 217F71800267; Thu, 13 Feb 2025 10:00:16 +0000 (UTC) From: Kevin Traynor To: Long Wu Cc: Chaoyong He , dpdk stable Subject: patch 'net/bonding: fix dedicated queue setup' has been queued to stable release 24.11.2 Date: Thu, 13 Feb 2025 09:57:41 +0000 Message-ID: <20250213095933.362078-14-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sVHu-Co703IxK9LjLGDJo1PNwww3sdL3P6W9DhZ9e7I_1739440818 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 24.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/17/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f47b48eff78e68d006a2db292c0293f93f8ba3e3 Thanks. Kevin --- >From f47b48eff78e68d006a2db292c0293f93f8ba3e3 Mon Sep 17 00:00:00 2001 From: Long Wu Date: Thu, 26 Dec 2024 09:26:18 +0800 Subject: [PATCH] net/bonding: fix dedicated queue setup [ upstream commit 4da0705bf896327af062212b5a1e6cb1f1366aa5 ] The bonding PMD hardcoded the value of dedicated hardware Rx/Tx queue size as (128/512). This will cause the bonding port start fail if some NIC requires more Rx/Tx descriptors than the hardcoded number. Therefore, use the minimum hardware queue size of the member port to initialize dedicated hardware Rx/Tx queue. If obtaining the minimum queue size failed, use the default queue size. Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control") Signed-off-by: Long Wu Reviewed-by: Chaoyong He --- drivers/net/bonding/rte_eth_bond_8023ad.h | 3 +++ drivers/net/bonding/rte_eth_bond_pmd.c | 25 ++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h index 5432eafcfe..f827229671 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.h +++ b/drivers/net/bonding/rte_eth_bond_8023ad.h @@ -36,4 +36,7 @@ extern "C" { #define MARKER_TLV_TYPE_RESP 0x02 +#define SLOW_TX_QUEUE_HW_DEFAULT_SIZE 512 +#define SLOW_RX_QUEUE_HW_DEFAULT_SIZE 512 + typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint16_t member_id, struct rte_mbuf *lacp_pkt); diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 91bf2c2345..9d72140b82 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1685,8 +1685,24 @@ member_configure_slow_queue(struct rte_eth_dev *bonding_eth_dev, if (internals->mode4.dedicated_queues.enabled == 1) { + struct rte_eth_dev_info member_info = {}; + uint16_t nb_rx_desc = SLOW_RX_QUEUE_HW_DEFAULT_SIZE; + uint16_t nb_tx_desc = SLOW_TX_QUEUE_HW_DEFAULT_SIZE; + + errval = rte_eth_dev_info_get(member_eth_dev->data->port_id, + &member_info); + if (errval != 0) { + RTE_BOND_LOG(ERR, + "rte_eth_dev_info_get: port=%d, err (%d)", + member_eth_dev->data->port_id, + errval); + return errval; + } + + if (member_info.rx_desc_lim.nb_min != 0) + nb_rx_desc = member_info.rx_desc_lim.nb_min; + /* Configure slow Rx queue */ - errval = rte_eth_rx_queue_setup(member_eth_dev->data->port_id, - internals->mode4.dedicated_queues.rx_qid, 128, + internals->mode4.dedicated_queues.rx_qid, nb_rx_desc, rte_eth_dev_socket_id(member_eth_dev->data->port_id), NULL, port->slow_pool); @@ -1700,6 +1716,9 @@ member_configure_slow_queue(struct rte_eth_dev *bonding_eth_dev, } + if (member_info.tx_desc_lim.nb_min != 0) + nb_tx_desc = member_info.tx_desc_lim.nb_min; + errval = rte_eth_tx_queue_setup(member_eth_dev->data->port_id, - internals->mode4.dedicated_queues.tx_qid, 512, + internals->mode4.dedicated_queues.tx_qid, nb_tx_desc, rte_eth_dev_socket_id(member_eth_dev->data->port_id), NULL); -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:36.098107725 +0000 +++ 0014-net-bonding-fix-dedicated-queue-setup.patch 2025-02-12 17:29:34.172944868 +0000 @@ -1 +1 @@ -From 4da0705bf896327af062212b5a1e6cb1f1366aa5 Mon Sep 17 00:00:00 2001 +From f47b48eff78e68d006a2db292c0293f93f8ba3e3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4da0705bf896327af062212b5a1e6cb1f1366aa5 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 395e41ff95..4c30bd40ee 100644 +index 5432eafcfe..f827229671 100644 @@ -38 +39 @@ -index f69496feec..467f7fe7ea 100644 +index 91bf2c2345..9d72140b82 100644