From: Vipin Varghese Date: Sat, 12 May 2018 06:30:12 +0000 (+0530) Subject: net/tap: update tap index to unsigned X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=403232b81753cb712e82b7385228020f03757aa4;p=dpdk.git net/tap: update tap index to unsigned Updating the logic to reflect unsigned integer as index for TAP PMD. Signed-off-by: Vipin Varghese Acked-by: Keith Wiles --- diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 5531fe9d99..df396bfdee 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -65,7 +65,7 @@ static const char *valid_arguments[] = { NULL }; -static int tap_unit; +static unsigned int tap_unit; static unsigned int tun_unit; static char tuntap_name[8]; @@ -1764,7 +1764,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev) } speed = ETH_SPEED_NUM_10G; - snprintf(tap_name, sizeof(tap_name), "%s%d", + snprintf(tap_name, sizeof(tap_name), "%s%u", DEFAULT_TAP_NAME, tap_unit++); memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);