Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: wangyunjian <wangyunjian@huawei.com>
Cc: <netdev@vger.kernel.org>, <xudingke@huawei.com>,
	<bridge@lists.linux-foundation.org>,
	Nkolay Aleksandrov <nikolay@cumulusnetworks.com>,
	Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: Re: [PATCH net v3] net: bridge: Fix ethernet header pointer before check skb forwardable
Date: Wed, 16 Jan 2019 09:33:12 -0800	[thread overview]
Message-ID: <20190116093312.5274776e@shemminger-XPS-13-9360> (raw)
In-Reply-To: <1547643861-15340-1-git-send-email-wangyunjian@huawei.com>

On Wed, 16 Jan 2019 21:04:21 +0800
wangyunjian <wangyunjian@huawei.com> wrote:

>  		if (unlikely(netpoll_tx_running(to->br->dev))) {
> +			skb_push(skb, ETH_HLEN);
>  			if (!is_skb_forwardable(skb->dev, skb)) {
>  				kfree_skb(skb);
>  			} else {
> -				skb_push(skb, ETH_HLEN);
>  				br_netpoll_send_skb(to, skb);
>  			}
>  			return;

The patch looks correct.

On minor style issue is that after moving skb_push out of the if statement,
both branches of the statement now contain a single line and therefore
the brackets are no longer necessary.  Suprised that checkpatch did
not complain about this.


  reply	other threads:[~2019-01-16 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 13:04 [PATCH net v3] net: bridge: Fix ethernet header pointer before check skb forwardable wangyunjian
2019-01-16 17:33 ` Stephen Hemminger [this message]
2019-01-17  1:40   ` wangyunjian

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=20190116093312.5274776e@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox