From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3183E4A63 for ; Wed, 29 Mar 2017 11:23:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490779381; x=1522315381; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=aVBQHyHXL+M7qOZ1sla/KT4EaJMr+OfZ0Vp2mj7pbuA=; b=YkkzM/NC7qFK7UkizABx2UyK+OK0cMZh04XXYFWyV/l3GhAaT0D/FBlc Iq4UDTMQXh7bW4cl3MF0qzyI9IYxbA==; Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2017 02:22:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,240,1486454400"; d="scan'208";a="1148297894" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by fmsmga002.fm.intel.com with ESMTP; 29 Mar 2017 02:22:57 -0700 Received: from pgsmsx101.gar.corp.intel.com ([169.254.1.119]) by PGSMSX105.gar.corp.intel.com ([169.254.4.67]) with mapi id 14.03.0248.002; Wed, 29 Mar 2017 17:22:56 +0800 From: "Dai, Wei" To: Thomas Monjalon , "Zhang, Helin" , "Ananyev, Konstantin" CC: "dev@dpdk.org" , Olivier Matz , "Guo Fengtian" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset Thread-Index: AQHSbCz8L5tq8aowTkuBCuBqF2BFfaFbo9wAgAVGI7CAAATYQIAKm/EAgChmhACAEAFkAIAGXS4AgAGnjmA= Date: Wed, 29 Mar 2017 09:22:55 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650A23126@PGSMSX101.gar.corp.intel.com> References: <1484154254-31387-1-git-send-email-olivier.matz@6wind.com> <20170314104640.32b06adb@platinum> <20170324151148.5c3d9f9d@platinum> <1981763.1ss0qQn5ig@xps13> In-Reply-To: <1981763.1ss0qQn5ig@xps13> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODNmZGE0YzYtNzAyZi00ZmVhLThlZDQtZDBmMzI1Y2Q1MmU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkVTV1F3YVNaVUozTFM4alFQOEdZalFMR1k5Ykg5RmtlQjh1bEQ4b0RCSUE9In0= x-ctpclassification: CTP_IC x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 09:23:01 -0000 First of all, I don't agree the method in this patch because the register c= an also rewind to 0 in normal mode except reset/PF down. In the function void ixgbe_down(struct ixgbe_adapter *adapter) of ixgbe_mai= n.c in the ixgbe kernel PF driver (version 5.0.4), the PF in kernel driver will ping all the active vfs to let them know PF is= going down by mailbox messages. On other side, ixgbe VF in DPDK PMD will handle the ping mailbox message in= ixgbevf_dev_interrupt_handler( ) which is registered interrupt routine.=20 And ixgbevf_dev_interrupt_handler( ) will call ixgbevf_mbx_process( ) to pr= ocess mailbox message from PF. So it is in ixgbevf_mbx_process( ) where the SW stats registers of VF can b= e fixed. There is more than one line to send ping message to VF in kernel PF drvier = codes. I am studying it to make it clear how to identify the ping message due to P= F down. So can we defer this patch first. And another patch in above way should be submitted. Thanks > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, March 28, 2017 11:23 PM > To: Zhang, Helin ; Ananyev, Konstantin > > Cc: dev@dpdk.org; Olivier Matz ; Dai, Wei > ; Guo Fengtian ; Yigit, Ferruh > > Subject: Re: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF = reset >=20 > Please ixgbe maintainers, what can be done for this fix? >=20 > 2017-03-24 15:11, Olivier Matz: > > Hi, > > > > (remove stable@dpdk.org) > > > > On Tue, 14 Mar 2017 10:46:40 +0100, Olivier Matz > wrote: > > > Hi Wei, > > > > > > On Thu, 16 Feb 2017 17:49:22 +0100, Olivier Matz > wrote: > > > > Hi Wei, > > > > > > > > On Thu, 9 Feb 2017 14:50:05 +0000, "Dai, Wei" > wrote: > > > > > > -----Original Message----- > > > > > > From: Dai, Wei > > > > > > Sent: Thursday, February 9, 2017 10:38 PM > > > > > > To: 'Olivier Matz' ; dev@dpdk.org; > > > > > > Zhang, Helin ; Ananyev, Konstantin > > > > > > > > > > > > Cc: Guo Fengtian ; stable@dpdk.org > > > > > > Subject: RE: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update > > > > > > after a PF reset > > > > > > > > > > > > The stats register can rewind to zero when the port is running > > > > > > for a long period. So I am afraid that this check is not always= correct. > > > > > > Why not introduce a variable to directly indicate whether the > > > > > > resulted stats should be updated or not. > > > > > > > > > > Another way is to clear > > > > > hw_stats->last_vfgprc/last_vfgorc/last_vfgptc/last_vfmprc at the > > > > > same time PF is set down. > > > > > > > > > > > > > Can we know easily in VF if the PF was set down? > > > > > > Any guideline for this? Or is it something we cannot fix? > > > > > > > Is any maintainer available to help to fix that? > > > > Unfortunately I don't have enough knowledge on this driver to do the > > fix by myself. It would be helpful to have some guidelines by a > > maintainer so I can understand what is the proper way to fix the issue. > > > > Thanks, > > Olivier >=20