From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 05C0810E74 for ; Thu, 30 Mar 2017 12:47:06 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 30 Mar 2017 03:47:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,246,1486454400"; d="scan'208";a="839996452" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by FMSMGA003.fm.intel.com with ESMTP; 30 Mar 2017 03:47:04 -0700 Received: from pgsmsx101.gar.corp.intel.com ([169.254.1.119]) by KMSMSX153.gar.corp.intel.com ([172.21.73.88]) with mapi id 14.03.0248.002; Thu, 30 Mar 2017 18:46:44 +0800 From: "Dai, Wei" To: Olivier Matz CC: Thomas Monjalon , "Zhang, Helin" , "Ananyev, Konstantin" , "dev@dpdk.org" , Guo Fengtian , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset Thread-Index: AQHSbCz8L5tq8aowTkuBCuBqF2BFfaFbo9wAgAVGI7CAAATYQIAKm/EAgChmhACAEAFkAIAGXS4AgAGnjmD//5LYAIABj6Bw Date: Thu, 30 Mar 2017 10:46:45 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650A239EC@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> <49759EB36A64CF4892C1AFEC9231E8D650A23126@PGSMSX101.gar.corp.intel.com> <20170329120808.0907926a@platinum> In-Reply-To: <20170329120808.0907926a@platinum> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTc1MjZiYmYtMWI3MS00NzIwLWIxZDUtZGY3MWUxMzhlZjIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiI2Z21IanBvQkxFeGEzN1VIS0tEQVpBUnFXSHVjYngzOEFnUEs0RmdSbVJ3PSJ9 x-ctpclassification: CTP_PUBLIC x-originating-ip: [172.30.20.205] 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: Thu, 30 Mar 2017 10:47:08 -0000 HI, Olivier >=20 > Hi Wei, >=20 > On Wed, 29 Mar 2017 09:22:55 +0000, "Dai, Wei" wrote: > > First of all, I don't agree the method in this patch because the > > register can also rewind to 0 in normal mode except reset/PF down. > > > > In the function void ixgbe_down(struct ixgbe_adapter *adapter) of > > ixgbe_main.c in the ixgbe kernel PF driver (version 5.0.4), the PF in k= ernel > 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 interru= pt > routine. > > And ixgbevf_dev_interrupt_handler( ) will call ixgbevf_mbx_process( ) t= o > process mailbox message from PF. > > > > So it is in ixgbevf_mbx_process( ) where the SW stats registers of VF c= an be > fixed. > > There is more than one line to send ping message to VF in kernel PF drv= ier > codes. >=20 > Thank you for the explanation. >=20 > Just to be sure I correctly understand: > 1- the ping message is properly sent by ixgbe pf linux driver Yes, I think so. > 2- the ping message is not yet sent by ixgbe pf dpdk driver I have not find any codes in DPDK PF to send them. > 3- the ping message is properly received by ixgbe vf dpdk driver, but > it is not used yet to stop wrong stats accumulation Yes, need register some callback function on to handle it. >=20 > > I am studying it to make it clear how to identify the ping message due = to PF > down. >=20 > Are you saying that you are currently working on a fix for 2 and 3 (that = would be > great!) or are you expecting that I work on it? In any case, I can help, = at least > to test the patches. I am working on it now. Need check both ixgbe kernel driver and DPDK driver= and also need look up some pages in datasheet including 82599, X540 and X550. So it is not an easy task. By the way, not only statistics function but also other configurations shou= ld be=20 restored. Anyway, I always appreciate your help. Of course, you can help me test my u= pcoming patches. Thanks=20 -Wei >=20 >=20 > > So can we defer this patch first. > > And another patch in above way should be submitted. >=20 >=20 > I'm of course ok to defer the initial patch, I agree it's more a workarou= nd than a > proper solution. I was stuck because I did not know how the VF is notifie= d by > the PF when it is reset. >=20 >=20 > Thanks > Olivier