[dpdk-dev] net/tap: update tap index to unsgined
Checks
Commit Message
Updating the logic to reflect unsigned integer as index for TAP PMD.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
---
drivers/net/tap/rte_eth_tap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> On May 12, 2018, at 1:30 AM, Vipin Varghese <vipin.varghese@intel.com> wrote:
>
> Updating the logic to reflect unsigned integer as index for TAP PMD.
>
> Signed-off-by: Vipin Varghese <vipin.varghese@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@intel.com>
Regards,
Keith
On 5/15/2018 1:36 PM, Wiles, Keith wrote:
>
>
>> On May 12, 2018, at 1:30 AM, Vipin Varghese <vipin.varghese@intel.com> wrote:
>>
>> 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>
Repeating ack with "-" to help patchwork:
Acked-by: Keith Wiles <keith.wiles@intel.com>
Applied to dpdk-next-net/master, thanks.
@@ -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);