From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 2/2] ethtool: add new library to provide ethtool-alike APIs Date: Fri, 29 May 2015 08:22:19 -0700 Message-ID: <20150529082219.57614c70@urahara> References: <1432905309-912-1-git-send-email-liang-min.wang@intel.com> <1432905309-912-3-git-send-email-liang-min.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, aharton@cisco.com, bruce.richardson@intle.com To: Liang-Min Larry Wang Return-path: Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 965601396 for ; Fri, 29 May 2015 17:22:17 +0200 (CEST) Received: by pdea3 with SMTP id a3so55798028pde.2 for ; Fri, 29 May 2015 08:22:17 -0700 (PDT) In-Reply-To: <1432905309-912-3-git-send-email-liang-min.wang@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" On Fri, 29 May 2015 09:15:09 -0400 Liang-Min Larry Wang wrote: > + drvinfo->n_stats = sizeof(struct rte_eth_stats) / sizeof(uint64_t); > + drvinfo->testinfo_len = 0; Providing a hook to access more functionality is good and compatiablity with old API's is helpful. Too bad ethtool is kind of a clunky old inflexible, and easily broken with changes. But that is not your fault. Duplicating eth_stats in ethtool is not helpful. This is actively discouraged for Linux device drivers.