From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-f67.google.com (mail-ua1-f67.google.com [209.85.222.67]) by dpdk.org (Postfix) with ESMTP id 8C50D1B456 for ; Thu, 14 Feb 2019 18:39:52 +0100 (CET) Received: by mail-ua1-f67.google.com with SMTP id z11so2290954uaa.10 for ; Thu, 14 Feb 2019 09:39:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a+23whz/GZ3mysEqR49neI6JSamUu1xV+q8WkXrBqhY=; b=s8ixfulgG1FsEokoi97WDud1feBuvFzkP4d9yMc+KrJH4MWC13ckfssJUlAMy93iOL w8yN86N2DWL+zFy6fAmrBXC/rtOo+9flCSVWDDaVNMaGdw3hUEoggnsEZw0GAxzlFz/U 1br4T5W10jUbXaQvjcSFFN2swkak2MC4ETEvVc+oeDbdovn2XVxN5ZAfMZamzu6i2BUw vxsrcw4DNGH2TP8GB5g8a2m86F1Qsc309sXxB3wQuCStXhbW8Ky6SX6JeZ/jMNysgr3l Os8o7bXZt9+2CckD6I2GMKfOeua0tovMPm3lMxFRbr//Ge/4Wnnw9ZXrP0986gQ+bZ0z erbA== X-Gm-Message-State: AHQUAubTdGcu9sVRSywb9ayTpkmBnUdGKcVW9qfLWY3o8GL/xGVgQpEo 5npap2uoip6OP8w+ADAfsQC8YonH6BwljnRETDPLpg== X-Google-Smtp-Source: AHgI3IbzuI/vmNJZ/UbXR2zG3YTSVBslcM1W40UCwrkYhsLHk+ERde5WX5ldyauc3xei6bcKyNWqXTPpokn46IrwG6w= X-Received: by 2002:ab0:298f:: with SMTP id u15mr2475919uap.49.1550165991820; Thu, 14 Feb 2019 09:39:51 -0800 (PST) MIME-Version: 1.0 References: <1550158972-21895-1-git-send-email-david.marchand@redhat.com> <1550158972-21895-4-git-send-email-david.marchand@redhat.com> <20190214163031.GA415768@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190214163031.GA415768@bricha3-MOBL.ger.corp.intel.com> From: David Marchand Date: Thu, 14 Feb 2019 18:39:40 +0100 Message-ID: To: Bruce Richardson Cc: dev@dpdk.org, Wenzhuo Lu , Jingjing Wu , bernard.iremonger@intel.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 3/5] app/testpmd: add missing transmit errors stats 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, 14 Feb 2019 17:39:52 -0000 On Thu, Feb 14, 2019 at 5:30 PM Bruce Richardson wrote: > On Thu, Feb 14, 2019 at 04:42:50PM +0100, David Marchand wrote: > > pmd can report transmit errors but those stats are not accounted here. > > > > Signed-off-by: David Marchand > > --- > > app/test-pmd/testpmd.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > > index 984155a..3acd97b 100644 > > --- a/app/test-pmd/testpmd.c > > +++ b/app/test-pmd/testpmd.c > > @@ -1838,6 +1838,7 @@ struct extmem_param { > > total_recv += stats.ipackets; > > total_xmit += stats.opackets; > > total_rx_dropped += stats.imissed; > > + port->tx_dropped += stats.oerrors; > > total_tx_dropped += port->tx_dropped; > > total_rx_nombuf += stats.rx_nombuf; > > > > > Without knowing as to whether the line is needed or not, the line itself > looks out of place. All other lines are assignments to local variables, > apart from this. Should a local variable be defined for consistency? > Indeed this looks wrong to add it to port->tx_dropped. It actually "works" since this part is called when stopping forwarding and port->tx_dropped gets reset later when starting forwarding again. I suppose I should move this to total_tx_dropped instead. Thanks Bruce. -- David Marchand