Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426763

Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb being alloc

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb being alloc
Date 2016-06-20 18:10 +0200
Message-ID <rM9VV-215-45@gated-at.bofh.it> (permalink)
References <rKbS9-6S6-7@gated-at.bofh.it> <rKgoN-1mz-1@gated-at.bofh.it> <rM1EZ-5bt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Yisen Zhuang <Yisen.zhuang@huawei.com>
Date: Mon, 20 Jun 2016 15:12:34 +0800

> 
> 
> 在 2016/6/15 18:30, Yisen Zhuang 写道:
>> 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@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.
>> 
>> 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.
>> 
> 
> Hi David,
> 
> What is the opinion about this issue? We need this patch to resolve the issue.

I guess this is fine if your chip behaves this way.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[patch net-next] net: hns: add skb_reset_mac_header() after skb being alloc Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-13 14:30 +0200
  Re: [patch net-next] net: hns: add skb_reset_mac_header() after  skb being alloc David Miller <davem@davemloft.net> - 2016-06-15 07:50 +0200
    Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb  being alloc Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-06-15 12:40 +0200
      Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb  being alloc Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-06-20 09:20 +0200
        Re: [patch net-next] net: hns: add skb_reset_mac_header() after  skb being alloc David Miller <davem@davemloft.net> - 2016-06-20 18:10 +0200

csiph-web