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

Yongseok Koh yskoh at mellanox.com
Tue Jul 23 02:59:38 CEST 2019


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 <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 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 <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,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:


More information about the stable mailing list