net/tap: update tap index to unsigned
authorVipin Varghese <vipin.varghese@intel.com>
Sat, 12 May 2018 06:30:12 +0000 (12:00 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 14 Jun 2018 17:27:50 +0000 (19:27 +0200)
Updating the logic to reflect unsigned integer as index for TAP PMD.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c

index 5531fe9..df396bf 100644 (file)
@@ -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);