From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 563571BD5E for ; Fri, 11 May 2018 10:41:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 01:41:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,387,1520924400"; d="scan'208";a="227670613" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga006.fm.intel.com with ESMTP; 11 May 2018 01:41:55 -0700 From: Vipin Varghese To: ferruh.yigit@intel.com, zhihong.wang@intel.com, dev@dpdk.org Cc: Vipin Varghese Date: Fri, 11 May 2018 14:11:59 +0530 Message-Id: <1526028119-142177-1-git-send-email-vipin.varghese@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/tap: add default name to tun X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2018 08:41:58 -0000 The change adds default name to reflect TUN PMD instance. if option name is not passed, the default dtun is taken. Signed-off-by: Vipin Varghese --- drivers/net/tap/rte_eth_tap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 172a7ba..fa59a76 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1665,6 +1665,9 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev) params = rte_vdev_device_args(dev); memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN); + snprintf(tun_name, sizeof(tun_name), "%s%d", + DEFAULT_TUN_NAME, tun_unit++); + if (params && (params[0] != '\0')) { TAP_LOG(DEBUG, "parameters (%s)", params); -- 2.7.4