From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cao jin Date: Tue, 8 Nov 2016 14:07:58 +0800 Subject: [Intel-wired-lan] [PATCH] igb: drop field "tail" of struct igb_ring In-Reply-To: References: <1478522697-4773-1-git-send-email-caoj.fnst@cn.fujitsu.com> <58213D66.5090203@cn.fujitsu.com> Message-ID: <58216BBE.5000108@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On 11/08/2016 12:12 PM, Alexander Duyck wrote: > > > On Monday, November 7, 2016, Cao jin > wrote: > > > > We removed head because it isn't really accessed very often, it is only > really used for when the ring is configured. Tail is accessed every > time we add a descriptor to a ring. The pointer chasing from ring to > netdev to adapter to hw is expensive. That is one of the rasons why > we cache the pointer to the tail register. I see. I can submit the patch as you suggested. > > Signed-off-by: Cao jin > --- > drivers/net/ethernet/intel/igb/igb.h | 1 - > drivers/net/ethernet/intel/igb/igb_main.c | 16 > +++++++++------- > > hw->hw_addr could be alterred to NULL(in igb_rd32), this is why > writel oops the kernel, you give a fine solution. > > But from the oops message, we can find, register reading returns all > F's, I also have a question want to consult: when igb device is > reset, would reading register(no matter config space or non-PCIe > configuration registers) during reset returns all F's? (I guess this > is the core of my issue) > > > An all F's value means the read failed. The device is likely off of the > bus and the hw_addr may not have been repopulated after the reset. > > You might want to check the mailing list as I thought someone had > submitted a patch recently for one of the drivers to repopulate hw_addr > after a reset. > I guess you are saying this one: http://patchwork.ozlabs.org/patch/689592/ Seems they have a similar issue with me. -- Yours Sincerely, Cao jin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753286AbcKHGF1 (ORCPT ); Tue, 8 Nov 2016 01:05:27 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:55184 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752715AbcKHGFZ (ORCPT ); Tue, 8 Nov 2016 01:05:25 -0500 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="12768093" Subject: Re: [Intel-wired-lan] [PATCH] igb: drop field "tail" of struct igb_ring To: Alexander Duyck References: <1478522697-4773-1-git-send-email-caoj.fnst@cn.fujitsu.com> <58213D66.5090203@cn.fujitsu.com> CC: "linux-kernel@vger.kernel.org" , Netdev , =?UTF-8?B?SXp1bWksIFRha3Uv5rOJIOaLkw==?= , intel-wired-lan From: Cao jin Message-ID: <58216BBE.5000108@cn.fujitsu.com> Date: Tue, 8 Nov 2016 14:07:58 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.69] X-yoursite-MailScanner-ID: 89B3147A8673.A71C9 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/08/2016 12:12 PM, Alexander Duyck wrote: > > > On Monday, November 7, 2016, Cao jin > wrote: > > > > We removed head because it isn't really accessed very often, it is only > really used for when the ring is configured. Tail is accessed every > time we add a descriptor to a ring. The pointer chasing from ring to > netdev to adapter to hw is expensive. That is one of the rasons why > we cache the pointer to the tail register. I see. I can submit the patch as you suggested. > > Signed-off-by: Cao jin > --- > drivers/net/ethernet/intel/igb/igb.h | 1 - > drivers/net/ethernet/intel/igb/igb_main.c | 16 > +++++++++------- > > hw->hw_addr could be alterred to NULL(in igb_rd32), this is why > writel oops the kernel, you give a fine solution. > > But from the oops message, we can find, register reading returns all > F's, I also have a question want to consult: when igb device is > reset, would reading register(no matter config space or non-PCIe > configuration registers) during reset returns all F's? (I guess this > is the core of my issue) > > > An all F's value means the read failed. The device is likely off of the > bus and the hw_addr may not have been repopulated after the reset. > > You might want to check the mailing list as I thought someone had > submitted a patch recently for one of the drivers to repopulate hw_addr > after a reset. > I guess you are saying this one: http://patchwork.ozlabs.org/patch/689592/ Seems they have a similar issue with me. -- Yours Sincerely, Cao jin