From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A8380D14C for ; Wed, 29 Mar 2017 11:37:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490780276; x=1522316276; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=iEUisJDPyGk3DTRx5WYUwYFGREVqHC6uoNEpRnZGZSc=; b=BiSiRACFRBlj3RylV029NlKyKPao9PbpYcNWw6jyelMYyt7qDNQF03Ox KM9p957S0L88cqpbYAzNHbIClfBl6Q==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2017 02:37:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,240,1486454400"; d="scan'208";a="71540576" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by orsmga004.jf.intel.com with ESMTP; 29 Mar 2017 02:37:54 -0700 Received: from pgsmsx101.gar.corp.intel.com ([169.254.1.119]) by PGSMSX103.gar.corp.intel.com ([169.254.2.72]) with mapi id 14.03.0248.002; Wed, 29 Mar 2017 17:37:52 +0800 From: "Dai, Wei" To: Thomas Monjalon , "Zhang, Helin" , "Ananyev, Konstantin" , "dev@dpdk.org" 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/EAgChmhACAEAFkAIAGXS4AgAG37nA= Date: Wed, 29 Mar 2017 09:37:52 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650A23164@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGIxMjIzMGYtMzJiOS00OTNhLThkMmMtYmQxMWU1ZWUyMTEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkdDNW1iaENkU29IY3Jsd1YwYzNsRTRIQ2FvMVhIcWltVDVrZU5VSWVlZTA9In0= 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:37:57 -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 m= essages. 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