From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id 8F4572BE6 for ; Tue, 3 May 2016 15:40:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1561; q=dns/txt; s=iport; t=1462282822; x=1463492422; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=JjqT9qMtZ95vXY3cIO611zxWjKRe73K5K751w+JWPi0=; b=j24b0672w+g5VX2kLHLlXPUExweJkdqBHnqVGJ+ChMjAP2im8qG9FZMq CgxkoQ96CrwCNJTBugNn5wxO2MxnP8e4yskXM6IKF2TA3xY24EwQzKI9P rR+cmYItav4rdfoHgmFCLChhHmx9egLGL8kZ88mer5joF3vGqYszGSIn/ Q=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ABAgBWqShX/4MNJK1fgziBUAa3fYIPA?= =?us-ascii?q?Q2BdYYQAoFBOBQBAQEBAQEBZSeEQQEBAQQ6SwQCAQgRBAEBAR4JBzIUCQgCBAE?= =?us-ascii?q?SCIgiu3ABAQEBAQEBAQEBAQEBAQEBAQEBAQEVhiCETYQchXwFmBYBjhCPGY8xA?= =?us-ascii?q?R4BAUKCNoE1bIZ/Pn8BAQE?= X-IronPort-AV: E=Sophos;i="5.24,572,1454976000"; d="scan'208";a="103192015" Received: from alln-core-1.cisco.com ([173.36.13.131]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 May 2016 13:40:21 +0000 Received: from XCH-RCD-018.cisco.com (xch-rcd-018.cisco.com [173.37.102.28]) by alln-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id u43DeL0A014136 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 3 May 2016 13:40:21 GMT Received: from xch-rcd-016.cisco.com (173.37.102.26) by XCH-RCD-018.cisco.com (173.37.102.28) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Tue, 3 May 2016 08:40:20 -0500 Received: from xch-rcd-016.cisco.com ([173.37.102.26]) by XCH-RCD-016.cisco.com ([173.37.102.26]) with mapi id 15.00.1104.009; Tue, 3 May 2016 08:40:20 -0500 From: "David Harton (dharton)" To: Remy Horton , "dev@dpdk.org" , "Helin Zhang" Thread-Topic: [dpdk-dev] [RFC PATCH v1 2/3] drivers/net/ixgbe: change xstats to use integers Thread-Index: AQHRpTeBKR31YPZa70C472Ywvg/ZQZ+nJPZw Date: Tue, 3 May 2016 13:40:20 +0000 Message-ID: References: <1460731462-21229-1-git-send-email-remy.horton@intel.com> <1460731462-21229-3-git-send-email-remy.horton@intel.com> <34cbe07723f64e9f926666164d9d5319@XCH-RCD-016.cisco.com> <5728981D.2020003@intel.com> In-Reply-To: <5728981D.2020003@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.150.216.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH v1 2/3] drivers/net/ixgbe: change xstats to use integers 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: Tue, 03 May 2016 13:40:22 -0000 > -----Original Message----- > From: Remy Horton [mailto:remy.horton@intel.com] > Sent: Tuesday, May 03, 2016 8:23 AM > To: David Harton (dharton) ; dev@dpdk.org; Helin Zhang > > Subject: Re: [dpdk-dev] [RFC PATCH v1 2/3] drivers/net/ixgbe: change > xstats to use integers >=20 >=20 > On 29/04/2016 14:43, David Harton (dharton) wrote: > [..] > >> + /* RX Priority Stats */ > >> + for (stat =3D 0; stat < IXGBE_NB_RXQ_PRIO_STATS; stat++) { > >> + for (i =3D 0; i < 8; i++) { > > > > 8 seems magical. Is there a constant somewhere that can be used? >=20 > Not that I'm aware of. I've made it a #define as a small cleanup. >=20 >=20 > >> +static int ixgbevf_dev_xstats_names(__rte_unused struct rte_eth_dev > *dev, > >> + struct rte_eth_xstats_name *ptr_names, __rte_unused unsigned limit) > >> +{ > >> + unsigned i; > >> + > >> + if (limit < IXGBEVF_NB_XSTATS) > > > > Think this check has to be removed since rte_eth_xstats_count() calls > > with limit =3D=3D 0. >=20 > Well spotted. It should only error-out if ptr_names is non-NULL. >=20 > As an aside, I am wondering whether getting stats counts should itself be > a seperate driver hook. I personally think it would be cleaner. Bug, I can also see the argument o= f keeping the vector table smaller and would conceded to others that felt strongly ab= out it. I do really like having a separate external API to the user. A user should= explicitly ask for the count. Cheers, Dave >=20 >=20 > ..Remy