[dpdk-stable] patch 'net/bonding: avoid warning for invalid port' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed Apr 10 18:43:26 CEST 2019


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 <hyonkim at cisco.com>
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 <hyonkim at cisco.com>
Acked-by: Chas Williams <chas3 at att.com>
---
 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 <hyonkim at cisco.com>
 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 at dpdk.org
 
 Signed-off-by: Hyong Youb Kim <hyonkim at cisco.com>
 Acked-by: Chas Williams <chas3 at att.com>
@@ -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)


More information about the stable mailing list