[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57612E38.6020301@huawei.com>
Date: Wed, 15 Jun 2016 18:30:16 +0800
From: Yisen Zhuang <Yisen.zhuang@...wei.com>
To: David Miller <davem@...emloft.net>
CC: <arnd@...db.de>, <charles.chenxin@...wei.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linuxarm@...wei.com>
Subject: Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb
being alloc
Hi David,
Thanks for your suggestions.
Please see my comments below.
Thanks,
Yisen
在 2016/6/15 13:41, David Miller 写道:
> From: Yisen Zhuang <Yisen.Zhuang@...wei.com>
> Date: Mon, 13 Jun 2016 20:41:22 +0800
>
>> From: Kejian Yan <yankejian@...wei.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@...wei.com>
>> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@...wei.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.
If we use ping6 to test if it is connected to network, CPUs would send out the NS packets
and these packets will be looped back to CPUs. If driver does not drop these packets,
they will be sent to protocol stack and protocol stack consider that there is a device
with the same address and it is not available address. It will show us the log like
"connect: Cannot assign requested address". Then it can not connect to the network enviroment.
Thus, we drop these packets looped back in HNS 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.
Thanks for your suggestions. I will prepare a new patch to fix it.
>
> .
>
Powered by blists - more mailing lists