patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/bonding: check return value
@ 2018-02-01 17:21 Radu Nicolau
  2018-02-05 16:01 ` [dpdk-stable] [PATCH v2] " Radu Nicolau
  2018-02-05 16:05 ` [dpdk-stable] [PATCH] " Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Radu Nicolau @ 2018-02-01 17:21 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, declan.doherty, deepak.k.jain, Radu Nicolau, stable

Coverity issue: 260405
Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@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 149e9e1..4b5e188 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -259,8 +259,13 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 	if (internals->slave_count < 1) {
 		/* if MAC is not user defined then use MAC of first slave add to
 		 * bonded device */
-		if (!internals->user_defined_mac)
-			mac_address_set(bonded_eth_dev, slave_eth_dev->data->mac_addrs);
+		if (!internals->user_defined_mac) {
+			if (mac_address_set(bonded_eth_dev,
+					    slave_eth_dev->data->mac_addrs) {
+				RTE_BOND_LOG(ERR, "Failed to set MAC address");
+				return -1;
+			}
+		}
 
 		/* Inherit eth dev link properties from first slave */
 		link_properties_set(bonded_eth_dev,
-- 
2.7.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-stable] [PATCH v2] net/bonding: check return value
  2018-02-01 17:21 [dpdk-stable] [PATCH] net/bonding: check return value Radu Nicolau
@ 2018-02-05 16:01 ` Radu Nicolau
  2018-02-05 16:05 ` [dpdk-stable] [PATCH] " Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Radu Nicolau @ 2018-02-05 16:01 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, declan.doherty, deepak.k.jain, Radu Nicolau, stable

Coverity issue: 260405
Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: fixed build issue

 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 149e9e1..f854b73 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -259,8 +259,13 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 	if (internals->slave_count < 1) {
 		/* if MAC is not user defined then use MAC of first slave add to
 		 * bonded device */
-		if (!internals->user_defined_mac)
-			mac_address_set(bonded_eth_dev, slave_eth_dev->data->mac_addrs);
+		if (!internals->user_defined_mac) {
+			if (mac_address_set(bonded_eth_dev,
+					    slave_eth_dev->data->mac_addrs)) {
+				RTE_BOND_LOG(ERR, "Failed to set MAC address");
+				return -1;
+			}
+		}
 
 		/* Inherit eth dev link properties from first slave */
 		link_properties_set(bonded_eth_dev,
-- 
2.7.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/bonding: check return value
  2018-02-01 17:21 [dpdk-stable] [PATCH] net/bonding: check return value Radu Nicolau
  2018-02-05 16:01 ` [dpdk-stable] [PATCH v2] " Radu Nicolau
@ 2018-02-05 16:05 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-02-05 16:05 UTC (permalink / raw)
  To: Radu Nicolau, dev; +Cc: declan.doherty, deepak.k.jain, stable

On 2/1/2018 5:21 PM, Radu Nicolau wrote:
> Coverity issue: 260405
> Fixes: 2efb58cbab6e ("bond: new link bonding library")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

Applied to dpdk-next-net/master, thanks.

(Missing parenthesis added while applying.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-05 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-01 17:21 [dpdk-stable] [PATCH] net/bonding: check return value Radu Nicolau
2018-02-05 16:01 ` [dpdk-stable] [PATCH v2] " Radu Nicolau
2018-02-05 16:05 ` [dpdk-stable] [PATCH] " Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).