From: Feng Gao <gfree.wind@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
Patrick McHardy <kaber@trash.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Feng Gao <gfree.wind@gmail.com>
Subject: Re: [PATCH net-next 1/1] driver: macvlan: Remove duplicated IFF_UP condition check in macvlan_forward_source
Date: Mon, 21 Nov 2016 08:52:45 +0800 [thread overview]
Message-ID: <CA+6hz4pFLqs_BgUvkbf3B5dG3yR=8QTLgVZjyTm2oaaPN=QOZg@mail.gmail.com> (raw)
In-Reply-To: <1479687998-456-1-git-send-email-fgao@ikuai8.com>
On Mon, Nov 21, 2016 at 8:26 AM, <fgao@ikuai8.com> wrote:
> From: Gao Feng <gfree.wind@gmail.com>
>
> The function macvlan_forward_source_one has already checked the flag
> IFF_UP, so needn't check it outside in macvlan_forward_source too.
>
> Signed-off-by: Gao Feng <gfree.wind@gmail.com>
> ---
> v2: Remove the IFF_UP check in macvlan_forward_source instead of macvlan_forward_source_one
> v1: Initial patch
>
> drivers/net/macvlan.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
> index 13b7e0b..7ddfd2c 100644
> --- a/drivers/net/macvlan.c
> +++ b/drivers/net/macvlan.c
> @@ -400,8 +400,7 @@ static void macvlan_forward_source(struct sk_buff *skb,
>
> hlist_for_each_entry_rcu(entry, h, hlist) {
> if (ether_addr_equal_64bits(entry->addr, addr))
> - if (entry->vlan->dev->flags & IFF_UP)
> - macvlan_forward_source_one(skb, entry->vlan);
> + macvlan_forward_source_one(skb, entry->vlan);
> }
> }
>
> --
> 1.9.1
>
>
Sorry, I forget add the "v2" in the title.
Regards
Feng
next prev parent reply other threads:[~2016-11-21 0:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 0:26 [PATCH net-next 1/1] driver: macvlan: Remove duplicated IFF_UP condition check in macvlan_forward_source fgao
2016-11-21 0:52 ` Feng Gao [this message]
2016-11-21 16:59 ` David Miller
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='CA+6hz4pFLqs_BgUvkbf3B5dG3yR=8QTLgVZjyTm2oaaPN=QOZg@mail.gmail.com' \
--to=gfree.wind@gmail.com \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/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.