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 CBF58A00C4 for ; Fri, 18 Nov 2022 00:09:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A53344067B; Fri, 18 Nov 2022 00:09:03 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 3E3E54021F for ; Fri, 18 Nov 2022 00:09:03 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so2807900wmi.3 for ; Thu, 17 Nov 2022 15:09:03 -0800 (PST) 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=MWKtBbOvFZ/vZqGvyY0mNLiwd3h47b2cKhWV6e12Rvc=; b=VESzX3HrZ6DMsk03LxkngwsGriqJ4YLq/x1RTqGqBh58OoWnygnsSm/JdsAgWK3wXm uf3RafByr916ABqTTy9F/GVCOoUL8qrWV4Oss3L6Q26HAG2zyWXWDM2gpRhh25HTe2Lz /bqp+N4DvS1J9Bix2vhvTm7jpO6bokALhm+yoLFb5/ywxIDNB0VRr3TLQJdzs4rK+v8C hJf7jwNIUSLi42NO1aT5kEbWqwh6QJXUgn3alX/mjl6mP+Nju9q4lrlVl9ZOEjp097IH cHQrlBI2FWhhJ/dhqdi9RNBb0quK5+Yb2ZYhfdJUfttHRlH8nK+aSCeqJ7IXFtsmQ7Yw 2NXQ== 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=MWKtBbOvFZ/vZqGvyY0mNLiwd3h47b2cKhWV6e12Rvc=; b=WmkD4IU6p795AQz8tcu6E+YyesA7heJMfkFE2MWqc/lCmeNkqOimwDsW5RHG+/FaBS 54Yu/5Ugzj0QZ+cevHPx/5hOJ16V15HHLyZx8L36T4NqQelXKItxcLV12I3JxQGVcOf/ CeDSRZSikbu7Xy7DX1a+UTFtIcJM2/DkPakavT/BZNrhwdDXNp119qk3t5zK5gSrVdol BmkXomGOulIljnUHB7wnY1KM7OsOTaxKEweoWyQbTE04cxx25RlNj3JcH3EkWnL4kht8 tRb8fuzWWlsHXDm9+UQSpg80NnVE8PHSyZBxsArwnS8sgXE9u61DV2anqPK7bU5XMKWv af4w== X-Gm-Message-State: ANoB5pml06GFo7OXFhD38m/U59J31WaG4BMBDEyGkDDAs+fTQ/O7GPKQ TN4fevHKYxk3RkvKPptespM= X-Google-Smtp-Source: AA0mqf5obVgF6QfWLaBxCfhvtYYtWY8rKCh+7EhGLMSan4FIKfxk5eKzY6UqEka63W9Necb+iXXkPg== X-Received: by 2002:a1c:7501:0:b0:3cf:61a3:464e with SMTP id o1-20020a1c7501000000b003cf61a3464emr3147685wmc.111.1668726542663; Thu, 17 Nov 2022 15:09:02 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id t13-20020a05600c198d00b003cf75f56105sm3375420wmq.41.2022.11.17.15.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 15:09:01 -0800 (PST) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andrew Rybchenko , Min Hu , Weiyuan Li , dpdk stable Subject: patch 'net/bonding: set initial value of descriptor count alignment' has been queued to stable release 20.11.7 Date: Thu, 17 Nov 2022 23:08:25 +0000 Message-Id: <20221117230859.611465-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221105171146.1520039-47-luca.boccassi@gmail.com> References: <20221105171146.1520039-47-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/19/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/03170e37415b218d6c4e3d92d7d4bb84edb63b49 Thanks. Luca Boccassi --- >From 03170e37415b218d6c4e3d92d7d4bb84edb63b49 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Mon, 31 Oct 2022 16:17:44 +0300 Subject: [PATCH] net/bonding: set initial value of descriptor count alignment [ upstream commit 550e8d6d340f93882e4a1183314fd5f4a408595f ] The driver had once been broken by patch [1] looking to have a non-zero "nb_max" value in a use case not involving adding any back-end ports. That was addressed afterwards ([2]). But, as per report [3], similar test cases exist which attempt to setup Rx queues on a void bond before attaching any back-end ports. Rx queue setup, in turn, involves device info get API invocation, and one of the checks on received data causes an exception (division by zero). The "nb_align" value is indeed zero at that time, but, as explained in [2], such test cases are totally incorrect since a bond device must have at least one back-end port plugged before any ethdev APIs can be used. Once again, to avoid any problems with fixing the test cases, this patch adjusts the bond PMD itself to workaround the bug. [1] commit 5be3b40fea60 ("net/bonding: fix values of descriptor limits") [2] commit d03c0e83cc00 ("net/bonding: fix descriptor limit reporting") [3] https://bugs.dpdk.org/show_bug.cgi?id=1118 Bugzilla ID: 1118 Fixes: d03c0e83cc00 ("net/bonding: fix descriptor limit reporting") Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Acked-by: Min Hu (Connor) Tested-by: Weiyuan Li --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index d5dac1ef3e..d8172be041 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3375,6 +3375,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) */ internals->rx_desc_lim.nb_max = UINT16_MAX; internals->tx_desc_lim.nb_max = UINT16_MAX; + internals->rx_desc_lim.nb_align = 1; + internals->tx_desc_lim.nb_align = 1; 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-17 23:07:55.588100067 +0000 +++ 0001-net-bonding-set-initial-value-of-descriptor-count-al.patch 2022-11-17 23:07:55.400328295 +0000 @@ -1 +1 @@ -From 550e8d6d340f93882e4a1183314fd5f4a408595f Mon Sep 17 00:00:00 2001 +From 03170e37415b218d6c4e3d92d7d4bb84edb63b49 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 550e8d6d340f93882e4a1183314fd5f4a408595f ] + @@ -27 +28,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index bd25040851..e0da1fa7c9 100644 +index d5dac1ef3e..d8172be041 100644 @@ -41 +42 @@ -@@ -3431,6 +3431,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3375,6 +3375,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)