From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: rte_ether: Driver-specific stats getting overwritten Date: Thu, 14 Jul 2016 15:37:28 +0200 Message-ID: <1954062.51W9tGj6hj@xps13> References: <1195a38d-8615-03d2-22eb-04f6b071d38b@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Remy Horton Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 594A639EA for ; Thu, 14 Jul 2016 15:37:30 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id f126so67069053wma.1 for ; Thu, 14 Jul 2016 06:37:30 -0700 (PDT) In-Reply-To: <1195a38d-8615-03d2-22eb-04f6b071d38b@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-14 14:29, Remy Horton: > 'noon, > > In rte_eth_stats_get() after doing the driver callout to populate struct > rte_eth_stats, the rx_nombuf member is overwritten with > dev->data->rx_mbuf_alloc_failed even though some drivers will have > filled rx_nombuf with a value from elsewhere. This makes assignment of > rx_nombuf from within the driver callout redundant. Is this intentional? Yes it is strange and has always been like that. Why not moving the assignment before calling the driver callback?