From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f68.google.com (mail-vs1-f68.google.com [209.85.217.68]) by dpdk.org (Postfix) with ESMTP id 82D3E1B47B for ; Thu, 14 Feb 2019 19:51:14 +0100 (CET) Received: by mail-vs1-f68.google.com with SMTP id u13so3321838vsk.0 for ; Thu, 14 Feb 2019 10:51:14 -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=KMi0sCD4ALNo93PfL0L4PGt8e+SA6XIRsYagrkkLU8I=; b=JOVfpIw19VMPdt20j9aCLLvAQkRy6rlZi/WcLhNP//hK+XTqvWndgFzd+RJAiiBFtJ s1MvuVGoMS2ArNl6BpObp8773znebF/McMtzR0iL5xzDVFDOm/MoPMVxsNnzcbu+WX+K jzwQMa40WB26nyG++NZ7aZUj41lDOpZJXJ09k+C3m+jnHVXoCh7+w+AYly+QWQ5kyXtU j1HlXh+9r2otKRamZs5U6CjYLde9+QqaYtRrSqhPaw6K/eRHYq/mwILGu3rhdpATgTB4 V9dzHzvaNLOB1wjznb1LiZLEl9dvhaonyX6qNz4vfA75JsSBzDshEQfbFCRYRaA5uAoA mOJg== X-Gm-Message-State: AHQUAua6DmplnZPDeHLPKCJmcxRUHgwTKs5vfIJAHRvKM68lwUbT69xE yLDP8NfcrJSgAr7lpb+zCWTVq2LY0Cr7GWCYwp7F+A== X-Google-Smtp-Source: AHgI3Ib3xHMEL2+xmX9NqLOrmkv2o6UfKV9vhGo0664G5lz9DI6UT817jdqq9bioyAxMD+Th29i2jEckJt3X6UX6GjY= X-Received: by 2002:a67:fe0d:: with SMTP id l13mr2782802vsr.39.1550170273920; Thu, 14 Feb 2019 10:51:13 -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: From: David Marchand Date: Thu, 14 Feb 2019 19:51:02 +0100 Message-ID: To: Bruce Richardson Cc: dev@dpdk.org, Wenzhuo Lu , Jingjing Wu , bernard.iremonger@intel.com, Maxime Coquelin 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 18:51:14 -0000 On Thu, Feb 14, 2019 at 6:39 PM David Marchand wrote: > On Thu, Feb 14, 2019 at 5:30 PM Bruce Richardson < > bruce.richardson@intel.com> 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? >> > > Thinking again about this oerrors stats... We had a discussion with Maxime, last week. So I want to make sure that what we both agreed makes sense :-) What is the purpose of oerrors ? Since the drivers (via rte_eth_tx_burst return value) report the numbers of packets successfully transmitted, the application can try to retransmit the packets that did not make it and counts this. If the driver counts such "missed" packets, then it does the job the application will do anyway (wasting some cycles). But what is more a problem is that the application does not know if the packets in oerrors are its own retries or problems that the driver can not detect (hw problems) but the hw can. So the best option is that oerrors does not report the packets the driver refuses (and I can see some drivers that do not comply to this) but only "external" errors from the driver pov. Back to my patch here, if we agree on this definition of oerrors, I can not add it to total_tx_dropped, but I suppose I can add some "TX HW errors: " and "Total TX HW errors: " logs so that we are aware that something went bad "further" than the driver. Let's sleep on it :-) -- David Marchand