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 DF315A0543 for ; Sat, 5 Nov 2022 18:12:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D75E240151; Sat, 5 Nov 2022 18:12:42 +0100 (CET) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 4E29E400D5 for ; Sat, 5 Nov 2022 18:12:42 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id l14so10908522wrw.2 for ; Sat, 05 Nov 2022 10:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LUppUjwkRTpUm9wBALd3o5sf2BcwSAhLAa8bYrKCN7Q=; b=ITorTFTPE2znjlcW0wKfVIMkcEDxCo6y96duD/VN47XzhtX+yoegY+qqZxpIfOyRQ9 69g6TFcWntxG237xNfTtUmpnJ6G+4lO0Bls1AiLkhfm9gf0nw9BSRO0zTR1xHwY8u0Tq YgEGZ6ouoXKyK/u/+xmAY24DK3llkvDTooCGRtzxRjF0kiErX9PHW5/pM4MLBCu/S1VO MOqEt1MUO/pBIk3Ntokyl4qHJ6aEuYYscjYOy58JMvoh8mFwKr6vfZx37KRC9UG6usL1 HAVOFYGI37AA6B6PCRTgYwt1avBO4umKpTNqIgWkbL6Y3bm0I09ySz2Jkw4ale/9FVNY oBiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LUppUjwkRTpUm9wBALd3o5sf2BcwSAhLAa8bYrKCN7Q=; b=OhqiyOmF86GIgoIfgNMLGRLhvqFyNv0RajSowWhlplw/3P1/7y6lnF/VbWA/tG1oEU yWKBqAjx8w6SN2TMNMusZ3yJnP96tZbCg4xcjuMdpThy/wKSpA5/Yz1Bp8RwNQjifnGL FjY/D0ykQ1u0nBe5RVVbplVlLnqaXHY34oxxfXsLVntx7bv2c2yD8hA21Iwm3kySDe+A YQhZA4/ZmiuNlqnWXlFAv/oPwIh2GRvwg8lS6j/zvrizLvyi3ZcG565oKeUI8gQySM2y 6vDkcH2QWHglNuT7U4wkeVaYkqb3DglHjpS665gxga2+LB9QaYFRb3ruMPoABr1Bsfws yWFw== X-Gm-Message-State: ACrzQf3LMCi+btyMjs/mTkGV1LdbpqNHBtmHkqKVDgwaEXngOZq079XS T5AKbS7OIY3SD0jKlprXGGk2S/WfHJ4= X-Google-Smtp-Source: AMsMyM4me+k5XHJOEGaoIXXY9GDoRhATpbIxBu8cmT4Ihay0Uw9HnzCGFjoUQf91Y3Gy8bjX5BiKmQ== X-Received: by 2002:adf:a1d4:0:b0:236:9adf:a2e9 with SMTP id v20-20020adfa1d4000000b002369adfa2e9mr25302366wrv.463.1667668361997; Sat, 05 Nov 2022 10:12:41 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id bk28-20020a0560001d9c00b002365b759b65sm2603970wrb.86.2022.11.05.10.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 10:12:41 -0700 (PDT) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andrew Rybchenko , Chas Williams <3chas3@gmail.com>, dpdk stable Subject: patch 'net/bonding: fix descriptor limit reporting' has been queued to stable release 20.11.7 Date: Sat, 5 Nov 2022 17:11:15 +0000 Message-Id: <20221105171146.1520039-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221105171146.1520039-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-100-luca.boccassi@gmail.com> <20221105171146.1520039-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. 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/99f65e68d99e51dda5cc36ca10ee3ddd0f510090 Thanks. Luca Boccassi --- >From 99f65e68d99e51dda5cc36ca10ee3ddd0f510090 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Sun, 11 Sep 2022 15:19:01 +0300 Subject: [PATCH] net/bonding: fix descriptor limit reporting [ upstream commit d03c0e83cc0042dc35e37f984de15533b09e6ac9 ] Commit 5be3b40fea60 ("net/bonding: fix values of descriptor limits") breaks reporting of "nb_min" and "nb_align" values obtained from back-end devices' descriptor limits. This means that work done by eth_bond_slave_inherit_desc_lim_first() as well as eth_bond_slave_inherit_desc_lim_next() gets dismissed. Revert the offending commit and use proper workaround for the test case mentioned in the said commit. Meanwhile, the test case itself might be poorly constructed. It tries to run a bond with no back-end devices attached, but, according to [1] ("Requirements / Limitations"), at least one back-end device must be attached. [1] doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst Fixes: 5be3b40fea60 ("net/bonding: fix values of descriptor limits") Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Acked-by: Chas Williams <3chas3@gmail.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 8efd3a8a79..f426c66b69 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2186,8 +2186,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; @@ -2221,12 +2219,6 @@ 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; } } @@ -2238,8 +2230,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) memcpy(&dev_info->default_txconf, &internals->default_txconf, sizeof(dev_info->default_txconf)); - dev_info->rx_desc_lim.nb_max = max_rx_desc_lim; - dev_info->tx_desc_lim.nb_max = max_tx_desc_lim; + 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)); /** * If dedicated hw queues enabled for link bonding device in LACP mode @@ -3372,6 +3366,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) memset(&internals->rx_desc_lim, 0, sizeof(internals->rx_desc_lim)); memset(&internals->tx_desc_lim, 0, sizeof(internals->tx_desc_lim)); + /* + * Do not restrict descriptor counts until + * the first back-end device gets attached. + */ + internals->rx_desc_lim.nb_max = UINT16_MAX; + internals->tx_desc_lim.nb_max = UINT16_MAX; + memset(internals->active_slaves, 0, sizeof(internals->active_slaves)); memset(internals->slaves, 0, sizeof(internals->slaves)); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.084851799 +0000 +++ 0016-net-bonding-fix-descriptor-limit-reporting.patch 2022-11-05 17:11:08.622941525 +0000 @@ -1 +1 @@ -From d03c0e83cc0042dc35e37f984de15533b09e6ac9 Mon Sep 17 00:00:00 2001 +From 99f65e68d99e51dda5cc36ca10ee3ddd0f510090 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d03c0e83cc0042dc35e37f984de15533b09e6ac9 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index aee9e60d40..27005c747c 100644 +index 8efd3a8a79..f426c66b69 100644 @@ -36 +37 @@ -@@ -2205,8 +2205,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2186,8 +2186,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -45 +46 @@ -@@ -2240,12 +2238,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2221,12 +2219,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -58 +59 @@ -@@ -2257,8 +2249,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2238,8 +2230,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -71 +72 @@ -@@ -3393,6 +3387,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3372,6 +3366,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)