From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 355F5325A for ; Mon, 18 Sep 2017 20:49:46 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 18 Sep 2017 11:49:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,414,1500966000"; d="scan'208";a="129911161" Received: from silpixa00372839.ir.intel.com (HELO silpixa00372839.ger.corp.intel.com) ([10.237.222.154]) by orsmga004.jf.intel.com with ESMTP; 18 Sep 2017 11:49:43 -0700 From: Ferruh Yigit To: Pascal Mazon Cc: stable@dpdk.org, Keith Wiles , Ferruh Yigit , Vipin Varghese Date: Mon, 18 Sep 2017 19:49:36 +0100 Message-Id: <20170918184936.44331-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.13.5 Subject: [dpdk-stable] [PATCH] net/tap: fix MAC addr when flower support is disabled X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 18:49:46 -0000 From: Vipin Varghese 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 --- 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