patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Pascal Mazon <pascal.mazon@6wind.com>
Cc: stable@dpdk.org, Keith Wiles <keith.wiles@intel.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Vipin Varghese <vipin.varghese@intel.com>
Subject: [dpdk-stable] [PATCH] net/tap: fix MAC addr when flower support is disabled
Date: Mon, 18 Sep 2017 19:49:36 +0100	[thread overview]
Message-ID: <20170918184936.44331-1-ferruh.yigit@intel.com> (raw)

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

                 reply	other threads:[~2017-09-18 18:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918184936.44331-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=keith.wiles@intel.com \
    --cc=pascal.mazon@6wind.com \
    --cc=stable@dpdk.org \
    --cc=vipin.varghese@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).