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 A03915A8C for ; Thu, 9 Jul 2015 11:55:13 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 09 Jul 2015 02:55:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,439,1432623600"; d="scan'208";a="743568304" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga001.fm.intel.com with ESMTP; 09 Jul 2015 02:55:13 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.117]) by irsmsx105.ger.corp.intel.com ([169.254.7.245]) with mapi id 14.03.0224.002; Thu, 9 Jul 2015 10:55:11 +0100 From: "Kulasek, TomaszX" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v3 5/8] ring: queue stats mapping set dummy implementation Thread-Index: AQHQueradhq3DdJI7U6F2KA2x/N0VJ3S0IoA Date: Thu, 9 Jul 2015 09:55:10 +0000 Message-ID: <3042915272161B4EB253DA4D77EB373A019FD874@IRSMSX102.ger.corp.intel.com> References: <1434723200-7528-1-git-send-email-tomaszx.kulasek@intel.com> <1435589444-1988-1-git-send-email-tomaszx.kulasek@intel.com> <1435589444-1988-6-git-send-email-tomaszx.kulasek@intel.com> <12941587.YRQEe5TYyV@xps13> In-Reply-To: <12941587.YRQEe5TYyV@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v3 5/8] ring: queue stats mapping set dummy implementation 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: Thu, 09 Jul 2015 09:55:14 -0000 > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, July 9, 2015 03:58 > To: Kulasek, TomaszX > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3 5/8] ring: queue stats mapping set dumm= y > implementation >=20 > 2015-06-29 16:50, Tomasz Kulasek: > > Per queue statistics are already implemented for ring device, but with > > static mapping (stat_idx =3D=3D queue_id). > > > > This fix is required, if you want to use ring device in test > > application and is used only to point that per queue statistics are > > provided for this device. > > > > Signed-off-by: Tomasz Kulasek > [...] > > +static int > > +eth_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *dev, > > + __rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx, > > + __rte_unused uint8_t is_rx) > > +{ > > + /* Do nothing, just return ok */ > > + return 0; > > +} >=20 > I've just realized how this is broken. > Some Intel devices use a mapping to select hardware queues which will hav= e > some stats. But we may have stats per queues without requiring such > mapping. >=20 > I may miss something but I suggest these 3 actions: > - remove this patch > - replace checks on stats_mapping by an ethdev flag > - remove device-specific stats_mapping from ethdev For Niantic NICs all queues stats for port are mapped to stats_idx=3D0 by d= efault, and stats mapping is required to have per-queue statistics (even in= testpmd).=20 Anyway, this patch, for ring pmd, was intended more as a cleanup than featu= re and was inspired by implementation in virtio driver: virtio_ethdev.c: /* * It enables testpmd to collect per queue stats. */ static int virtio_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_de= v, __rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx, __rte_unused uint8_t is_rx) { return 0; } This patch can be safely removed, if you think such a cleanup is not requir= ed, or lack of this implementation should be common behavior for this case.= That will cause only few more warning messages, if you want to use ring pm= d as a slave in example application. Do you need v4?