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 586C9A0096 for ; Wed, 10 Apr 2019 18:44:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 473921B105; Wed, 10 Apr 2019 18:44:45 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 39DF91B128 for ; Wed, 10 Apr 2019 18:44:44 +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 A166C81235; Wed, 10 Apr 2019 16:44:43 +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 9B6265D961; Wed, 10 Apr 2019 16:44:42 +0000 (UTC) From: Kevin Traynor To: Hyong Youb Kim Cc: Chas Williams , dpdk stable Date: Wed, 10 Apr 2019 17:43:26 +0100 Message-Id: <20190410164411.10546-18-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.25]); Wed, 10 Apr 2019 16:44:43 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bonding: avoid warning for invalid port' 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 20ef2c48d54ec4c27e25c211f64220e3c0062eaf Mon Sep 17 00:00:00 2001 From: Hyong Youb Kim Date: Thu, 10 Jan 2019 02:22:34 -0800 Subject: [PATCH] net/bonding: avoid warning for invalid port [ upstream commit 90d2eb059e665738e5b775a7d0f164356acaac04 ] For active-backup, tlb, and alb mode, bond_ethdev_promiscuous_{enable,disable} tries to set promisc mode on the primary port, even when there are no slaves. It is harmless, as rte_eth_promiscuous_{enable,disable} does nothing if the port number is invalid. But, it does print a warning message. Here is an example from testpmd. testpmd> create bonded device 5 0 Created new bonded device net_bonding_testpmd_0 on (port 4). Invalid port_id=33 testpmd> set promisc 4 off Invalid port_id=33 33 in this case is RTE_MAX_ETHPORTS + 1, the invalid primary port number used within the bonding driver. This warning message is harmless but can be confusing to the user. So do not try to set promisc on a primary port when we know it does not exist (i.e. no slaves). Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Hyong Youb Kim Acked-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 46ad4fe47..b0d191d13 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2600,4 +2600,7 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_ALB: default: + /* Do not touch promisc when there cannot be primary ports */ + if (internals->slave_count == 0) + break; rte_eth_promiscuous_enable(internals->current_primary_port); } @@ -2628,4 +2631,7 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) case BONDING_MODE_ALB: default: + /* Do not touch promisc when there cannot be primary ports */ + if (internals->slave_count == 0) + break; rte_eth_promiscuous_disable(internals->current_primary_port); } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-04-10 14:06:09.433722305 +0100 +++ 0018-net-bonding-avoid-warning-for-invalid-port.patch 2019-04-10 14:06:07.832294976 +0100 @@ -1,8 +1,10 @@ -From 90d2eb059e665738e5b775a7d0f164356acaac04 Mon Sep 17 00:00:00 2001 +From 20ef2c48d54ec4c27e25c211f64220e3c0062eaf Mon Sep 17 00:00:00 2001 From: Hyong Youb Kim Date: Thu, 10 Jan 2019 02:22:34 -0800 Subject: [PATCH] net/bonding: avoid warning for invalid port +[ upstream commit 90d2eb059e665738e5b775a7d0f164356acaac04 ] + For active-backup, tlb, and alb mode, bond_ethdev_promiscuous_{enable,disable} tries to set promisc mode on the primary port, even when there are no slaves. It is harmless, as @@ -23,7 +25,6 @@ slaves). Fixes: 2efb58cbab6e ("bond: new link bonding library") -Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim Acked-by: Chas Williams @@ -32,7 +33,7 @@ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index c4a2b955c..f65db4410 100644 +index 46ad4fe47..b0d191d13 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2600,4 +2600,7 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev)