From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) by dpdk.org (Postfix) with ESMTP id 154DC29CB for ; Fri, 15 Feb 2019 16:05:11 +0100 (CET) Received: by mail-vs1-f45.google.com with SMTP id e16so5952605vsq.6 for ; Fri, 15 Feb 2019 07:05:10 -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=gq5yAZVsPnWaUksoq0ZPsljBD6O9CLga9YNaIZVY8pQ=; b=H5hqCsbRA42SWCY50jTSh9P/qn1YECWemXXerCgXwgDCv34gHdplItoecUxyGdzDS7 uuH0n7TcPSBEcji5R9oH2bPJUh3XWrftEMQwCs1WdZmwsHfOC3Pbtr6W6WSoXDST5/Rg D1nfUeRJPdM9Rid8KcAPyTzJIcvfZ5vzR8OpQ92RHMPq5vVd4nTmEISx/QnsFIVXT2lU plkMQIHx3n4DBtOCKvZvDAPj6TuvBcMhBr4hyNcF0ZGPkzEiKaiFYTGGr8/xWWnMWIsT v1BzsZ/hwXrjw9Lmo0/VdiTbSSQYOnIagQkEjtZhU6heXQMeT+n8cWiIdLFIje6+HqLO j9QA== X-Gm-Message-State: AHQUAua0ZpPlnq6mhzFCbR3O5zmznx9DLu/SoGJwMymCttxNjKzaYYZF m6OFcXk5ssS7rSmOIOs2Xrao999SrjHPnvTEfuh+8w== X-Google-Smtp-Source: AHgI3Ib8Deq8/MSus53YeINznijGn1ywdhvdxP2dhsHNEzZnK2RejOvVbX1Ic3QOOjnBYRucNXQUkFnHMUF9JKMD10g= X-Received: by 2002:a67:fe0d:: with SMTP id l13mr5212376vsr.39.1550243110263; Fri, 15 Feb 2019 07:05:10 -0800 (PST) MIME-Version: 1.0 References: <1550158972-21895-1-git-send-email-david.marchand@redhat.com> <4891070.GnHtSQePbW@xps> <20190215140526.GB790616@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190215140526.GB790616@bricha3-MOBL.ger.corp.intel.com> From: David Marchand Date: Fri, 15 Feb 2019 16:04:58 +0100 Message-ID: To: Bruce Richardson Cc: Thomas Monjalon , dev@dpdk.org, Wenzhuo Lu , Jingjing Wu , bernard.iremonger@intel.com, Maxime Coquelin , "Yigit, Ferruh" , Andrew Rybchenko 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: Fri, 15 Feb 2019 15:05:11 -0000 On Fri, Feb 15, 2019 at 3:05 PM Bruce Richardson wrote: > On Fri, Feb 15, 2019 at 10:33:47AM +0100, David Marchand wrote: > > On Fri, Feb 15, 2019 at 9:58 AM Thomas Monjalon > > <[1]thomas@monjalon.net> wrote: > > > > 14/02/2019 19:51, David Marchand: > > > 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. > > I can see the benefit of having driver errors in the stats, > > so it is generically stored for later analysis or print. > > It could be managed at ethdev level instead of the application > > doing the computation. > > What about splitting the Tx errors in 2 fields? oerrors / ofull ? > > Who said it's awful? sorry Bruce for anticipating ;) > > > > Summary, correct me if we are not aligned :-) > > - ofull (maybe ofifoerrors?) is actually a count of SW failed > transmits > > - it would be handled in rte_eth_tx_burst() itself in a generic way > > - the drivers do not need to track such SW failed transmits > > - oerrors only counts packets HW failed transmits, dropped out of the > > driver tx_pkt_burst() knowledge > > - the application does not have to track SW failed transmits since the > > stats is in ethdev > > It sounds good to me, this means an ethdev abi breakage. > > Hang on, why do we need ethdev to track this at all, given that it's > trivial for apps to track this themselves. Would we not be better just to > add this tracking into testpmd and leave ethdev and drivers alone? Perhaps > I'm missing something? > This was my first intention but Thomas hopped in ;-) testpmd does it already via the fs->fwd_dropped stats and ovs has its tx_dropped stat. The problem is that all drivers have different approach about this. Some drivers only count real hw errors in oerrors. But others count the packets it can't send in oerrors (+ there are some cases that seem buggy to me where the driver will always refuse the mbufs for reason X and the application can retry indefinitely to send...). -- David Marchand