Subject: Re: [PATCH net-next v3] Add support of Cavium Liquidio ethernet adapters

From: Stephen Hemminger <[email-masked]>
Date: Thu, 18 Dec 2014 23:26:38 -0800

On Thu, 18 Dec 2014 19:25:19 -0800
Raghu Vatsavayi <[email-masked]> wrote:

> +/**
> + * \brief Alloc net device
> + * @param size Size to allocate
> + * @param nq how many queues
> + * @returns pointer to net device structure
> + */
> +static inline struct net_device *liquidio_alloc_netdev(int size, int nq)
> +{
> +	if (nq > 1)
> +		return alloc_netdev_mq(size, "lio%d", NET_NAME_UNKNOWN,
> +				       ether_setup, nq);
> +	else
> +		return alloc_netdev(size, "lio%d", NET_NAME_UNKNOWN,
> +				    ether_setup);
> +}

There is no need for the (nq > 1) test, just do:
> +		return alloc_netdev_mq(size, "lio%d", NET_NAME_UNKNOWN,
> +				       ether_setup, nq);

Also, why does this device not have standard ethernet naming?