From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbcFTHNL (ORCPT ); Mon, 20 Jun 2016 03:13:11 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:24294 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbcFTHNG (ORCPT ); Mon, 20 Jun 2016 03:13:06 -0400 Subject: Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb being alloc To: David Miller References: <1465821682-223053-1-git-send-email-Yisen.Zhuang@huawei.com> <20160614.224134.743787632695474309.davem@davemloft.net> <57612E38.6020301@huawei.com> CC: , , , , From: Yisen Zhuang Message-ID: <57679762.4060608@huawei.com> Date: Mon, 20 Jun 2016 15:12:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <57612E38.6020301@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.74.157.38] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.57679776.002B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a6a8449cd25032f263d9ecdf6881fc71 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 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 >> Date: Mon, 13 Jun 2016 20:41:22 +0800 >> >>> From: Kejian Yan >>> >>> 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 >>> Signed-off-by: Yisen Zhuang >> >> 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. Hoping for your suggestions. Many thanks, Yisen >> >> 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. > >> >> . >> > > _______________________________________________ > linuxarm mailing list > linuxarm@huawei.com > http://rnd-openeuler.huawei.com/mailman/listinfo/linuxarm >