From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 1/2] ethdev: add return code to rte_eth_stats_reset() Date: Fri, 01 Sep 2017 00:16:57 +0200 Message-ID: <3262696.ZUUiVqul2m@xps> References: <20170807173914.36750-1-dharton@cisco.com> <20170810132952.26974-1-dharton@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, harry.van.haaren@intel.com, christian.ehrhardt@canonical.com To: David Harton Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 4D4235689 for ; Fri, 1 Sep 2017 00:16:59 +0200 (CEST) In-Reply-To: <20170810132952.26974-1-dharton@cisco.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" 10/08/2017 15:29, David Harton: > Some devices do not support reset of eth stats. An application may > need to know not to clear shadow stats if the device cannot. Yes, thanks for improving this old API. > rte_eth_stats_reset is updated to provide a return code to share > whether the device supports reset or not. You need to change also this line: typedef void (*eth_stats_reset_t)(struct rte_eth_dev *dev); And while at it, you could apply the same change to stats_get. A device can be in a state where it is impossible to read stats. The same kind of update could be needed for promiscuous and allmulticast functions but they are out of the scope of this patch.