From patchwork Fri May 11 08:41:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 39823 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D25B51BD9C; Fri, 11 May 2018 10:41:59 +0200 (CEST) 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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);