DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/librte_ether: error handling on MAC address replay
@ 2017-01-19 18:47 Steve Shin
  2017-01-19 19:35 ` Steve Shin (jonshin)
  2017-01-20 22:23 ` [dpdk-dev] [PATCH v2] ethdev: fix " Steve Shin
  0 siblings, 2 replies; 17+ messages in thread
From: Steve Shin @ 2017-01-19 18:47 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Steve Shin

This patch fixes a bug in replaying MAC address to the hardware
in rte_eth_dev_config_restore() routine.

Signed-off-by: Steve Shin <jonshin@cisco.com>
---
 lib/librte_ether/rte_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 4790faf..7e01f10 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -951,10 +951,12 @@ rte_eth_dev_config_restore(uint8_t port_id)
 			continue;
 
 		/* add address to the hardware */
-		if  (*dev->dev_ops->mac_addr_add &&
-			(dev->data->mac_pool_sel[i] & (1ULL << pool)))
-			(*dev->dev_ops->mac_addr_add)(dev, &addr, i, pool);
-		else {
+		if  (*dev->dev_ops->mac_addr_add) {
+			if (dev->data->mac_pool_sel[i] & (1ULL << pool))
+				(*dev->dev_ops->mac_addr_add)(dev, &addr, i, pool);
+			else
+				continue;
+		} else {
 			RTE_PMD_DEBUG_TRACE("port %d: MAC address array not supported\n",
 					port_id);
 			/* exit the loop but not return an error */
-- 
2.9.3

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

end of thread, other threads:[~2017-01-30  9:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 18:47 [dpdk-dev] [PATCH] lib/librte_ether: error handling on MAC address replay Steve Shin
2017-01-19 19:35 ` Steve Shin (jonshin)
2017-01-19 22:39   ` Igor Ryzhov
2017-01-20  2:30     ` Steve Shin (jonshin)
2017-01-20 12:17       ` Igor Ryzhov
2017-01-20 19:12         ` Steve Shin (jonshin)
2017-01-20 22:23 ` [dpdk-dev] [PATCH v2] ethdev: fix " Steve Shin
2017-01-23  8:50   ` Igor Ryzhov
2017-01-23 23:19     ` Steve Shin (jonshin)
2017-01-23 23:50   ` [dpdk-dev] [PATCH v3] " Steve Shin
2017-01-24  2:21     ` [dpdk-dev] [PATCH v4] " Steve Shin
2017-01-24 10:09       ` Igor Ryzhov
2017-01-24 13:21         ` Ferruh Yigit
2017-01-24 14:00           ` Igor Ryzhov
2017-01-25 10:25           ` Thomas Monjalon
2017-01-27 17:57       ` [dpdk-dev] [PATCH v5] " Steve Shin
2017-01-30  9:21         ` Thomas Monjalon

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).