From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 59514A0096 for ; Wed, 10 Apr 2019 18:44:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 261621B128; Wed, 10 Apr 2019 18:44:20 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8B46C1B105 for ; Wed, 10 Apr 2019 18:44:18 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F05EE916C4; Wed, 10 Apr 2019 16:44:17 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-94.ams2.redhat.com [10.36.117.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id E37D25D961; Wed, 10 Apr 2019 16:44:16 +0000 (UTC) From: Kevin Traynor To: Hari Kumar Vemula Cc: Chas Williams , dpdk stable Date: Wed, 10 Apr 2019 17:43:10 +0100 Message-Id: <20190410164411.10546-2-ktraynor@redhat.com> In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com> References: <20190410164411.10546-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 10 Apr 2019 16:44:18 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bonding: fix values of descriptor limits' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.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 04/16/19. 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. Thanks. Kevin Traynor --- >From 3428e21eb3dd7de09dd28e96269ae58c9222845c Mon Sep 17 00:00:00 2001 From: Hari Kumar Vemula Date: Tue, 5 Feb 2019 13:39:39 +0000 Subject: [PATCH] net/bonding: fix values of descriptor limits [ upstream commit 5be3b40fea60a70463bb55bae998349472c9e8da ] test_create_bonded_device is failing due to improper initialisation in bonded device configuration. Which leads to crash while setting up queues. The value of nb_rx_desc is checked if it is not in range of rx_desc_lim of bonded device which fails. This is due to "rx_desc_lim" is set to 0 as default value of bonded device during bond_alloc(). Hence nb_rx_desc (1024) is > 0 and test fails. Fix is to set the default values of rx_desc_lim of bonded device to appropriate value. Receive the values from slaves configuration like done for other existing slave configuration Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Hari Kumar Vemula Acked-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 7ed69b388..319215c0b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2229,4 +2229,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) uint16_t max_nb_rx_queues = UINT16_MAX; uint16_t max_nb_tx_queues = UINT16_MAX; + uint16_t max_rx_desc_lim = UINT16_MAX; + uint16_t max_tx_desc_lim = UINT16_MAX; dev_info->max_mac_addrs = BOND_MAX_MAC_ADDRS; @@ -2253,4 +2255,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) if (slave_info.max_tx_queues < max_nb_tx_queues) max_nb_tx_queues = slave_info.max_tx_queues; + + if (slave_info.rx_desc_lim.nb_max < max_rx_desc_lim) + max_rx_desc_lim = slave_info.rx_desc_lim.nb_max; + + if (slave_info.tx_desc_lim.nb_max < max_tx_desc_lim) + max_tx_desc_lim = slave_info.tx_desc_lim.nb_max; } } @@ -2264,8 +2272,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) sizeof(dev_info->default_txconf)); - memcpy(&dev_info->rx_desc_lim, &internals->rx_desc_lim, - sizeof(dev_info->rx_desc_lim)); - memcpy(&dev_info->tx_desc_lim, &internals->tx_desc_lim, - sizeof(dev_info->tx_desc_lim)); + dev_info->rx_desc_lim.nb_max = max_rx_desc_lim; + dev_info->tx_desc_lim.nb_max = max_tx_desc_lim; /** -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-10 14:06:08.171714346 +0100 +++ 0002-net-bonding-fix-values-of-descriptor-limits.patch 2019-04-10 14:06:07.751296830 +0100 @@ -1,8 +1,10 @@ -From 5be3b40fea60a70463bb55bae998349472c9e8da Mon Sep 17 00:00:00 2001 +From 3428e21eb3dd7de09dd28e96269ae58c9222845c Mon Sep 17 00:00:00 2001 From: Hari Kumar Vemula Date: Tue, 5 Feb 2019 13:39:39 +0000 Subject: [PATCH] net/bonding: fix values of descriptor limits +[ upstream commit 5be3b40fea60a70463bb55bae998349472c9e8da ] + test_create_bonded_device is failing due to improper initialisation in bonded device configuration. Which leads to crash while setting up queues. @@ -19,7 +21,6 @@ existing slave configuration Fixes: 2efb58cbab6e ("bond: new link bonding library") -Cc: stable@dpdk.org Signed-off-by: Hari Kumar Vemula Acked-by: Chas Williams @@ -28,7 +29,7 @@ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index 44deaf119..23cec2549 100644 +index 7ed69b388..319215c0b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2229,4 +2229,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)