[dpdk-dev] [PATCH] net/tap: update tap index to unsgined
Wiles, Keith
keith.wiles at intel.com
Tue May 15 14:36:14 CEST 2018
> On May 12, 2018, at 1:30 AM, Vipin Varghese <vipin.varghese at intel.com> wrote:
>
> Updating the logic to reflect unsigned integer as index for TAP PMD.
>
> Signed-off-by: Vipin Varghese <vipin.varghese at intel.com>
> ---
> drivers/net/tap/rte_eth_tap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 48c61b3..db397d6 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -64,7 +64,7 @@ static const char *valid_arguments[] = {
> NULL
> };
>
> -static int tap_unit;
> +static unsigned int tap_unit;
> static unsigned int tun_unit;
>
> static int tap_type;
> @@ -1735,7 +1735,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);
>
> --
> 2.7.4
>
Acked by Keith Wiles<keith.wiles at intel.com>
Regards,
Keith
More information about the dev
mailing list