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 C280FA0544 for ; Fri, 11 Nov 2022 12:41:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BED1140141; Fri, 11 Nov 2022 12:41:30 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 5047F40141 for ; Fri, 11 Nov 2022 12:41:29 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 0C9873F0A2 for ; Fri, 11 Nov 2022 11:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166888; bh=O/Ckt2zVXOHXMgZWUrFyoK5XmgUdQgGoziOXy2kv0CY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dLUNVBvp0fK4ryk2x7eS8JTtKuOhnbIwJ1mA95JlHxRVr3HCnHW7FlkBPBD1fEudq xqIGCzKDYAuc1BnPzpKloqPhFl3d6rzLTY7MHV149JlwOtJHaotFTGkGBpvtPnbZCY C30ENGKlAEyzIg81X94O0YLC1Oao2W9r1Oo3zfs+CpojjDOCRHBQOS7f9dS8LSWZbX tngfDxGJaixgWM9pxYyvLHS5a+RZc33DZrnFMDeYJsff8acA7dA+IBVYdGoGDKFoBc xRIMJEmZSpgEEnHqQSPpWo27CHjf5lxRDRXnVp1dbz+S0OzM9qca1DgZenSV+CRVIS ktg5QS03iXocA== Received: by mail-ed1-f69.google.com with SMTP id dz9-20020a0564021d4900b0045d9a3aded4so3514442edb.22 for ; Fri, 11 Nov 2022 03:41:28 -0800 (PST) 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=O/Ckt2zVXOHXMgZWUrFyoK5XmgUdQgGoziOXy2kv0CY=; b=e0rPPpQWaF2EAyCnVDnGGelWe6WeoUYKFZCwJi4JpsIXc6FaqHGQk4JBYFz4nuERMG Ii8Sw/3H0ljlZqENFAzO6lgf7nkW80zw9o/5FMqH45C5/v22miNannx/inwoXENTVnx4 h3AS/TzSN1IPsrH94CWRkhUFQiwBwu3u4W3Tm3lGdDRPNAGpmFLsBctUwnY58EaXgrQU sPzPB+6qlKT4yPPy3IcbCNz55iByNW0/62/PqS9ney4Cn34Rte6g339cwzY9GMmTQqZv Vac9KzUcJhVAV+Ihv/1a3RwGuJLanLIT9t3qCEwnITO3r1Eum9Cm09HD1odEYexWibYk IZhw== X-Gm-Message-State: ANoB5pnMyB1FQHJbm2jGTPcsol+weqz28WAPw8foH5f7/MkK0kj2viCR xpASDvwIFsmxUgmk96bOyedzlMTkXq5c2yIygbwlRd1oZIkStF9xZXUZlnKEgC0WPbCtQT3J6XM zv+MOT8SAv97FuRKIjSdo33Y/ X-Received: by 2002:a05:6402:2b88:b0:461:b825:d7cb with SMTP id fj8-20020a0564022b8800b00461b825d7cbmr1089875edb.167.1668166887795; Fri, 11 Nov 2022 03:41:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf7xHxl24yA2HfyHUdbpb+ASLdA49fW5191sqRgsWwfN7kailroOW6cgjYL6UYW/GiUMRFAU4Q== X-Received: by 2002:a05:6402:2b88:b0:461:b825:d7cb with SMTP id fj8-20020a0564022b8800b00461b825d7cbmr1089866edb.167.1668166887591; Fri, 11 Nov 2022 03:41:27 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id vu6-20020a170907a64600b007ae10525550sm790919ejc.47.2022.11.11.03.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:41:27 -0800 (PST) From: christian.ehrhardt@canonical.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 19.11.14 Date: Fri, 11 Nov 2022 12:38:58 +0100 Message-Id: <20221111113904.1549618-41-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.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 19.11.14 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/18/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/a0df41ef1bcdfe3a9b42b693ee1f42dfe5d7fb07 Thanks. Christian Ehrhardt --- >From a0df41ef1bcdfe3a9b42b693ee1f42dfe5d7fb07 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 c900eb1f4b..4a0f6e1b8d 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2144,8 +2144,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; @@ -2179,12 +2177,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; } } @@ -2196,8 +2188,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 @@ -3329,6 +3323,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.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:06.211114888 +0100 +++ 0041-net-bonding-fix-descriptor-limit-reporting.patch 2022-11-11 12:35:04.801192217 +0100 @@ -1 +1 @@ -From d03c0e83cc0042dc35e37f984de15533b09e6ac9 Mon Sep 17 00:00:00 2001 +From a0df41ef1bcdfe3a9b42b693ee1f42dfe5d7fb07 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 c900eb1f4b..4a0f6e1b8d 100644 @@ -36 +37 @@ -@@ -2205,8 +2205,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2144,8 +2144,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) +@@ -2179,12 +2177,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) +@@ -2196,8 +2188,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) +@@ -3329,6 +3323,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)