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>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
};
static int tap_unit;
-static int tun_unit;
+static unsigned int tun_unit;
static int tap_type;
static char tuntap_name[8];
params = rte_vdev_device_args(dev);
memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);
+ snprintf(tun_name, sizeof(tun_name), "%s%u",
+ DEFAULT_TUN_NAME, tun_unit++);
+
if (params && (params[0] != '\0')) {
TAP_LOG(DEBUG, "parameters (%s)", params);