Subject: Re: [Patch net-next] veth: add netpoll support

From: Sergei Shtylyov <[email-masked]>
Date: Sat, 21 Jun 2014 00:15:46 +0400

Hello.

On 06/21/2014 12:07 AM, Neil Horman wrote:

>>> It is trivial to add netpoll support to veth, since
>>> it is not stacked device, we don't need to setup and cleanup
>>> netpoll.

>>> Reported-by: Stefan Priebe <[email-masked]>
>>> Cc: "David S. Miller" <[email-masked]>
>>> Cc: Neil Horman <[email-masked]>
>>> Signed-off-by: Cong Wang <[email-masked]>

>>> ---
>>> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
>>> index b4a10bc..03e781b 100644
>>> --- a/drivers/net/veth.c
>>> +++ b/drivers/net/veth.c
>>> @@ -248,6 +248,13 @@ static void veth_dev_free(struct net_device *dev)
>>>   	free_netdev(dev);
>>>   }
>>>
>>> +#ifdef CONFIG_NET_POLL_CONTROLLER
>>> +static void veth_poll_controller(struct net_device *dev)
>>> +{
>>> +	return;
>>
>>     Not needed.

> It is, a valid function poniter is how the stack determines if a given driver
> supports netpoll. See the tun_poll_controller for another example
> Neil

    I just said that *return* was not needed. :-)

>>
>>> +}
>>> +#endif	/* CONFIG_NET_POLL_CONTROLLER */
>>> +
>>>   static const struct net_device_ops veth_netdev_ops = {
>>>   	.ndo_init            = veth_dev_init,
>>>   	.ndo_open            = veth_open,

WBR, Sergei