From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH] net/ixgbevf: fix stats update after a PF reset Date: Wed, 29 Mar 2017 12:08:08 +0200 Message-ID: <20170329120808.0907926a@platinum> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Thomas Monjalon , "Zhang, Helin" , "Ananyev, Konstantin" , "dev@dpdk.org" , "Guo Fengtian" , "Yigit, Ferruh" To: "Dai, Wei" Return-path: Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by dpdk.org (Postfix) with ESMTP id 590ED37B4 for ; Wed, 29 Mar 2017 12:08:11 +0200 (CEST) Received: by mail-wr0-f179.google.com with SMTP id k6so1184808wre.2 for ; Wed, 29 Mar 2017 03:08:11 -0700 (PDT) In-Reply-To: <49759EB36A64CF4892C1AFEC9231E8D650A23126@PGSMSX101.gar.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Wei, 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 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. > And ixgbevf_dev_interrupt_handler( ) will call ixgbevf_mbx_process( ) to process mailbox message from PF. > > So it is in ixgbevf_mbx_process( ) where the SW stats registers of VF can be fixed. > There is more than one line to send ping message to VF in kernel PF drvier codes. Thank you for the explanation. Just to be sure I correctly understand: 1- the ping message is properly sent by ixgbe pf linux driver 2- the ping message is not yet sent by ixgbe pf dpdk driver 3- the ping message is properly received by ixgbe vf dpdk driver, but it is not used yet to stop wrong stats accumulation > I am studying it to make it clear how to identify the ping message due to PF down. 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. > So can we defer this patch first. > And another patch in above way should be submitted. I'm of course ok to defer the initial patch, I agree it's more a workaround than a proper solution. I was stuck because I did not know how the VF is notified by the PF when it is reset. Thanks Olivier