mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Yisen.Zhuang@huawei.com
Cc: arnd@arndb.de, charles.chenxin@huawei.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb being alloc
Date: Tue, 14 Jun 2016 22:41:34 -0700 (PDT)	[thread overview]
Message-ID: <20160614.224134.743787632695474309.davem@davemloft.net> (raw)
In-Reply-To: <1465821682-223053-1-git-send-email-Yisen.Zhuang@huawei.com>

From: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Date: Mon, 13 Jun 2016 20:41:22 +0800

> From: Kejian Yan <yankejian@huawei.com>
> 
> HNS receives a packet without doing anything, but it should call
> skb_reset_mac_header() to initialize the header before using
> eth_hdr().
> 
> Fixes: 0d6b425a3773c3445b0f51b2f333821beaacb619
> Signed-off-by: Kejian Yan <yankejian@huawei.com>
> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>

Well, this patch made me look at this function.

You really shouldn't be filtering packets looped back, that is
the stack's job.  It shouldn't be happening in the driver.

And once you remove that code, this patch here is no longer
necessary.

Second of all, unless you card supports every protocol that
exists in the past, present, and _future_ you cannot set
skb->ip_summed to CHECKSUM_UNNECSSARY unconditionally like
that.

You can only set that for protocols your chip actually supports.

  reply	other threads:[~2016-06-15  5:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 12:41 Yisen Zhuang
2016-06-15  5:41 ` David Miller [this message]
2016-06-15 10:30   ` Yisen Zhuang
2016-06-20  7:12     ` Yisen Zhuang
2016-06-20 16:04       ` 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=20160614.224134.743787632695474309.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Yisen.Zhuang@huawei.com \
    --cc=arnd@arndb.de \
    --cc=charles.chenxin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®