[dpdk-stable] patch 'net/bonding: fix check slaves link properties' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:18:27 CET 2017


Hi,

FYI, your patch has been queued to stable release 17.08.1

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/24/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 880edabf1d1ad1a1be33aac10aba2f0f97032647 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek at intel.com>
Date: Fri, 20 Oct 2017 17:49:26 +0200
Subject: [PATCH] net/bonding: fix check slaves link properties

[ upstream commit 6abd94d72ab5b6787391a823d246e0288bd3ace0 ]

Result of slaves link properties validation is not used when new slave
is added.

This patch uses the value of link_properties_valid() to determinate if
slave can be used in the bonding. If function fails, error is returned
preventing to add slave with invalid link properties.

Coverity issue: 158661
Fixes: deba8a2f8b0b ("net/bonding: fix link properties management")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek at intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index de1d9e0..ecda494 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -302,8 +302,13 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 		internals->tx_offload_capa &= dev_info.tx_offload_capa;
 		internals->flow_type_rss_offloads &= dev_info.flow_type_rss_offloads;
 
-		link_properties_valid(bonded_eth_dev,
-				&slave_eth_dev->data->dev_link);
+		if (link_properties_valid(bonded_eth_dev,
+				&slave_eth_dev->data->dev_link) != 0) {
+			RTE_BOND_LOG(ERR, "Invalid link properties for slave %d"
+					" in bonding mode %d", slave_port_id,
+					internals->mode);
+			return -1;
+		}
 
 		/* RETA size is GCD of all slaves RETA sizes, so, if all sizes will be
 		 * the power of 2, the lower one is GCD
-- 
2.7.4



More information about the stable mailing list