From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E6C4B2EDA for ; Fri, 29 May 2015 20:17:42 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 29 May 2015 11:17:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,518,1427785200"; d="scan'208";a="717674054" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga001.fm.intel.com with ESMTP; 29 May 2015 11:17:41 -0700 Received: from orsmsx158.amr.corp.intel.com (10.22.240.20) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 29 May 2015 11:17:41 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by ORSMSX158.amr.corp.intel.com (10.22.240.20) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 29 May 2015 11:17:40 -0700 Received: from FMSMSX110.amr.corp.intel.com ([169.254.14.46]) by FMSMSX155.amr.corp.intel.com ([169.254.5.57]) with mapi id 14.03.0224.002; Fri, 29 May 2015 11:17:41 -0700 From: "Wang, Liang-min" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH 2/2] ethtool: add new library to provide ethtool-alike APIs Thread-Index: AQHQmhGHD2s+W9EXAkyQp42aXNBun52Th7aA//+18nA= Date: Fri, 29 May 2015 18:17:40 +0000 Message-ID: References: <1432905309-912-1-git-send-email-liang-min.wang@intel.com> <1432905309-912-3-git-send-email-liang-min.wang@intel.com> <20150529082219.57614c70@urahara> In-Reply-To: <20150529082219.57614c70@urahara> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , "bruce.richardson@intle.com" Subject: Re: [dpdk-dev] [PATCH 2/2] ethtool: add new library to provide ethtool-alike APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2015 18:17:43 -0000 >On Fri, 29 May 2015 09:15:09 -0400 >Liang-Min Larry Wang wrote: > >> + drvinfo->n_stats =3D sizeof(struct rte_eth_stats) / sizeof(uint64_t); > >+ drvinfo->testinfo_len =3D 0; > > >Providing a hook to access more functionality is good and compatiablity wi= th old API's is helpful. Too bad ethtool is kind of a clunky old inflexibl= e, 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. (I have a typo of David's email, and I corrected it in this email) This new library is designed to support ethtool alike interface, some of th= e implementation will be just a placeholder. The rte_ethtool_net_get_stats6= 4 is designed as a place holder to support net_device_ops::ndo_get_stats64.= For the legacy support, it is required to provide # of statistic parameter= s are supported, so caller can allocate right size of buffer to get statist= ic from device driver.