All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: roy.qing.li@gmail.com, netdev@vger.kernel.org
Cc: amwang@redhat.com, nhorman@tuxdriver.com
Subject: Re: [PATCH] netpoll: send arp reply on master device immediately
Date: Mon, 17 Mar 2014 16:41:18 +0400	[thread overview]
Message-ID: <5326ED6E.9030001@cogentembedded.com> (raw)
In-Reply-To: <1395042106-25179-1-git-send-email-roy.qing.li@gmail.com>

Hello.

On 17-03-2014 11:41, roy.qing.li@gmail.com wrote:

> From: Li RongQing <roy.qing.li@gmail.com>

> 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 <roy.qing.li@gmail.com>
> Cc: WANG Cong <amwang@redhat.com>
> Cc: Neil Horman <nhorman@tuxdriver.com>
> ---
>   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

  parent reply	other threads:[~2014-03-17 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  7:41 [PATCH] netpoll: send arp reply on master device immediately roy.qing.li
2014-03-17 11:11 ` Neil Horman
2014-03-17 12:41 ` Sergei Shtylyov [this message]
2014-03-18  0:04   ` Li RongQing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5326ED6E.9030001@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=amwang@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=roy.qing.li@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.