patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/tap: fix MAC addr when flower support is disabled
@ 2017-09-18 18:49 Ferruh Yigit
  0 siblings, 0 replies; only message in thread
From: Ferruh Yigit @ 2017-09-18 18:49 UTC (permalink / raw)
  To: Pascal Mazon; +Cc: stable, Keith Wiles, Ferruh Yigit, Vipin Varghese

From: Vipin Varghese <vipin.varghese@intel.com>

When flower_support disabled, API returns without setting MAC address,
this patch sets MAC address for that case.

Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
---

This patch is for 17.05 stable release. In master this issue already
solved because flower_support removed.
---
 drivers/net/tap/rte_eth_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index e44de027d..23b8671ad 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1196,8 +1196,11 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
 	}
 
 	tap_kernel_support(pmd);
-	if (!pmd->flower_support)
+	if (!pmd->flower_support) {
+		if (is_zero_ether_addr(&pmd->eth_addr))
+			eth_random_addr((uint8_t *)&pmd->eth_addr);
 		return 0;
+	}
 	LIST_INIT(&pmd->flows);
 	/*
 	 * If no netlink socket can be created, then it will fail when
-- 
2.13.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-18 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 18:49 [dpdk-stable] [PATCH] net/tap: fix MAC addr when flower support is disabled 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).