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 22FA8A0557 for ; Wed, 16 Nov 2022 11:40:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EA6240F18; Wed, 16 Nov 2022 11:40:24 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 1DBF240F18 for ; Wed, 16 Nov 2022 11:40:23 +0100 (CET) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (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-0.canonical.com (Postfix) with ESMTPS id B3E493F118 for ; Wed, 16 Nov 2022 10:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668595221; bh=j6EW0ma1Co2dPIvhKNvdqwA8tcJzekuwEERMUD9GlqY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rzTvltF5eMyqI0K6zQDtvCWYDVStC9mjMkPz7+frJjkKpDyCAMXX1deDgMjbYmz/j ufL81ZIFU7fWShBUOF1os63IDR9hnasIRiQfdgpJ+Vu+AVO0cgduHRcVq8VzYVBjGW HquqNRaksL8tQXE8FPaiZAq12mM7FkzX9ffxryTub+pX9+yul8B2OJ8y92QSSM5Llw 7soZJ4o09CRUkzdMAVqjqcSkh/0Vi3/tP3uD+mOPI/EjpG/HpKD+IloxbUpBxNq/5V mfJquYfVqFeBC9oZlQD6MAOTqOdjhxnk/fYoO/VZ7Edhbc/PfZgwLd59eCZNYVQfoh Wew5STihxCNyg== Received: by mail-wm1-f72.google.com with SMTP id h188-20020a1c21c5000000b003cfe4cc64eeso983636wmh.6 for ; Wed, 16 Nov 2022 02:40:21 -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:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j6EW0ma1Co2dPIvhKNvdqwA8tcJzekuwEERMUD9GlqY=; b=xCLxEC04o1iI4q+KryvN/QFLPt+No1Yrep0eh96S+ECeZP2buRq5qILqdYZXRWsm7K Fr0craymbPl1amGv+7ZJoaCsMLttaBTip9k4NO5XKGhSFSZaPNPma81M0bCHoWC3Y+VI a/N7sTZ5OpgLJcFeLtlPC3EQ3fmd9ZDO79CBWO2gA375357VhsI9nz3GgVqpGuKbdH4z +Dflqp5dCoGfvayjLUhGuWITc4PfU6n9Fj9fqTjj6uCdGIjSAvxmAt4JhmgGJHYW/gei bD0AZnCSKY7u+o8iguk7BZ7ZM4mp1jKvRDl+AyEb4omX/Cybx92TFNYSCaoQvrZDoqKX USXQ== X-Gm-Message-State: ANoB5pkjs4XMyc7eVJnR8WsSknKUV4+ggakO0F+0oDFz/CAC5p34shuM 3GqixWiDgCrhZuQGqovVJ7Bm0+m2y946YIi/b4MNbADl/ctSHW/I6Wxyf3Sq4O3WXe61a9czL+Q V+stTniYW5zDHwiOCSUOPaDBl X-Received: by 2002:adf:ebcd:0:b0:241:ac5d:a859 with SMTP id v13-20020adfebcd000000b00241ac5da859mr260498wrn.299.1668595220945; Wed, 16 Nov 2022 02:40:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5dnBct4//zYQip5+363PVjK9jjTvzp1Y1VGImMqyK+Ysf7HX/F1RiTta61piu0u9ME93/WoA== X-Received: by 2002:adf:ebcd:0:b0:241:ac5d:a859 with SMTP id v13-20020adfebcd000000b00241ac5da859mr260486wrn.299.1668595220707; Wed, 16 Nov 2022 02:40:20 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39e5:dd00:975:f38b:96af:696f]) by smtp.gmail.com with ESMTPSA id u7-20020adff887000000b0023538fb27c1sm14662469wrp.85.2022.11.16.02.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 02:40:20 -0800 (PST) From: christian.ehrhardt@canonical.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 19.11.14 Date: Wed, 16 Nov 2022 11:39:56 +0100 Message-Id: <20221116104012.2975036-1-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 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/23/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/011fd38782d66715153eb1e6220b6597aa79254e Thanks. Christian Ehrhardt --- >From 011fd38782d66715153eb1e6220b6597aa79254e 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 7e79bac42e..c555d4640e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3332,6 +3332,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.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-16 11:36:50.479327603 +0100 +++ 0001-net-bonding-set-initial-value-of-descriptor-count-al.patch 2022-11-16 11:36:50.388775301 +0100 @@ -1 +1 @@ -From 550e8d6d340f93882e4a1183314fd5f4a408595f Mon Sep 17 00:00:00 2001 +From 011fd38782d66715153eb1e6220b6597aa79254e 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 7e79bac42e..c555d4640e 100644 @@ -41 +42 @@ -@@ -3431,6 +3431,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3332,6 +3332,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)