From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94838A046B for ; Tue, 23 Jul 2019 03:01:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 84A921B998; Tue, 23 Jul 2019 03:01:40 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id AEFB91BECB for ; Tue, 23 Jul 2019 03:01:39 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 23 Jul 2019 04:01:36 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6N11Hev026580; Tue, 23 Jul 2019 04:01:34 +0300 From: Yongseok Koh To: Hyong Youb Kim Cc: Chas Williams , dpdk stable Date: Mon, 22 Jul 2019 17:59:38 -0700 Message-Id: <20190723010115.6446-11-yskoh@mellanox.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190723010115.6446-1-yskoh@mellanox.com> References: <20190723010115.6446-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bonding: avoid warning for invalid port' has been queued to LTS release 17.11.7 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 17.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 07/27/19. So please shout if anyone has objection. 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. Yongseok --- >From ccdf6b9290398cf02f391f8e3f183acc031f8a0e 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 44cf61b861..5ea1bf99ac 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2466,6 +2466,9 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_TLB: 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); } } @@ -2494,6 +2497,9 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) case BONDING_MODE_TLB: 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.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-07-22 17:55:07.121807551 -0700 +++ 0011-net-bonding-avoid-warning-for-invalid-port.patch 2019-07-22 17:55:05.798468000 -0700 @@ -1,8 +1,10 @@ -From 90d2eb059e665738e5b775a7d0f164356acaac04 Mon Sep 17 00:00:00 2001 +From ccdf6b9290398cf02f391f8e3f183acc031f8a0e 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,10 +33,10 @@ 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 c4a2b955cf..f65db4410e 100644 +index 44cf61b861..5ea1bf99ac 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c -@@ -2599,6 +2599,9 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) +@@ -2466,6 +2466,9 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_TLB: case BONDING_MODE_ALB: default: @@ -45,7 +46,7 @@ rte_eth_promiscuous_enable(internals->current_primary_port); } } -@@ -2627,6 +2630,9 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) +@@ -2494,6 +2497,9 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) case BONDING_MODE_TLB: case BONDING_MODE_ALB: default: