Subject: Re: [PATCH] netpoll: send arp reply on master device immediately

From: Sergei Shtylyov <[email-masked]>
Date: Mon, 17 Mar 2014 16:41:18 +0400

Hello.

On 17-03-2014 11:41, [email-masked] wrote:

> From: Li RongQing <[email-masked]>

> 1. the arp queue has been moved from slave device to master, so the
> master device netpoll_info should be as input of service_arp_queue()
> 2. not need to check if ni is NULL or not, since it has been used before.

> Signed-off-by: Li RongQing <[email-masked]>
> Cc: WANG Cong <[email-masked]>
> Cc: Neil Horman <[email-masked]>
> ---
>   net/core/netpoll.c |   26 ++++++++++++--------------
>   1 file changed, 12 insertions(+), 14 deletions(-)

> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index a664f78..dd0a796 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -229,21 +229,19 @@ static void netpoll_poll_dev(struct net_device *dev)
>   	up(&ni->dev_lock);
>
>   	if (dev->flags & IFF_SLAVE) {
[...]
> +		struct net_device *bond_dev;
> +		struct sk_buff *skb;
> +		struct netpoll_info *bond_ni;
>
> -	service_neigh_queue(ni);
> +		bond_dev = netdev_master_upper_dev_get_rcu(dev);
> +		bond_ni = rcu_dereference_bh(bond_dev->npinfo);
> +		while ((skb = skb_dequeue(&ni->neigh_tx))) {
> +			skb->dev = bond_dev;
> +			skb_queue_tail(&bond_ni->neigh_tx, skb);
> +		}
> +		service_neigh_queue(bond_ni);
> +	} else
> +		service_neigh_queue(ni);

     The *else* branch should also have {}, according to 
Documentation/CodingStyle.

WBR, Sergei