From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 3/5] app/testpmd: add missing transmit errors stats Date: Fri, 15 Feb 2019 20:38:59 +0100 Message-ID: <6177115.1iB7W0vHcD@xps> References: <1550158972-21895-1-git-send-email-david.marchand@redhat.com> <2601191342CEEE43887BDE71AB977258012413A4D8@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: David Marchand , "Richardson, Bruce" , "dev@dpdk.org" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , Maxime Coquelin , "Yigit, Ferruh" , Andrew Rybchenko , "Wiles, Keith" To: "Ananyev, Konstantin" Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 19AD71B4CF for ; Fri, 15 Feb 2019 20:39:07 +0100 (CET) In-Reply-To: <2601191342CEEE43887BDE71AB977258012413A4D8@irsmsx105.ger.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" 15/02/2019 19:42, Ananyev, Konstantin: > >>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand > >>> I am also for option 2 especially because of this. > >>> A driver that refuses a packet for reason X (which is a limitation, or an > >>> incorrect config or whatever that is not a transient condition) but gives > >>> it back to the application is a bad driver. > > >>Why? What.s wrong to leave it to the upper layer to decide what to > >>do with the packets that can't be sent (by one reason or another)? > > >How does the upper layer know if this is a transient state or something that can't be resolved? > > Via rte_errno, for example. rte_errno is not a result per packet. I think it is better to "eat" the packet as it is done for those transmitted to the HW.