DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/tap: add default name to tun
@ 2018-05-11  8:41 Vipin Varghese
  2018-05-11 15:24 ` Stephen Hemminger
  2018-05-12  6:21 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
  0 siblings, 2 replies; 6+ messages in thread
From: Vipin Varghese @ 2018-05-11  8:41 UTC (permalink / raw)
  To: ferruh.yigit, zhihong.wang, dev; +Cc: Vipin Varghese

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 <vipin.varghese@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-14 16:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11  8:41 [dpdk-dev] [PATCH] net/tap: add default name to tun Vipin Varghese
2018-05-11 15:24 ` Stephen Hemminger
2018-05-12  6:22   ` Varghese, Vipin
2018-05-12  6:21 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
2018-05-14 16:01   ` Ferruh Yigit
2018-05-14 16:12     ` 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).