From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A22342B8C for ; Thu, 8 Dec 2016 04:24:12 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP; 07 Dec 2016 19:24:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,317,1477983600"; d="scan'208";a="38102571" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 07 Dec 2016 19:24:09 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 7 Dec 2016 19:24:02 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 7 Dec 2016 19:24:02 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.17]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.206]) with mapi id 14.03.0248.002; Thu, 8 Dec 2016 11:24:00 +0800 From: "Zhang, Qi Z" To: "Yigit, Ferruh" , "Lu, Wenzhuo" , "dev@dpdk.org" CC: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2 09/32] rte: add APIs for VF stats get/reset Thread-Index: AQHSUDqSXRF2r+Im8E6f4wiEd2shzKD7+58AgAFocVA= Date: Thu, 8 Dec 2016 03:23:59 +0000 Message-ID: <039ED4275CED7440929022BC67E706115067AC09@SHSMSX103.ccr.corp.intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1481081535-37448-1-git-send-email-wenzhuo.lu@intel.com> <1481081535-37448-10-git-send-email-wenzhuo.lu@intel.com> <86fe08d5-6f14-8495-c26c-2f08a5468587@intel.com> In-Reply-To: <86fe08d5-6f14-8495-c26c-2f08a5468587@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTcyNzY1NDYtZmQ4MC00MjI4LTk0MGYtOGJjOTI5YmRkNGYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJnNDEzemc1QzJ6eDYyVytnd2M0QytoNmNCVDNSTWVpbmtNUjRRekxRa0U9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 09/32] rte: add APIs for VF stats get/reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 03:24:13 -0000 Hi Ferruh: > -----Original Message----- > From: Yigit, Ferruh > Sent: Wednesday, December 7, 2016 9:52 PM > To: Lu, Wenzhuo ; dev@dpdk.org > Cc: Zhang, Qi Z ; Thomas Monjalon > > Subject: Re: [dpdk-dev] [PATCH v2 09/32] rte: add APIs for VF stats get/r= eset >=20 > On 12/7/2016 3:31 AM, Wenzhuo Lu wrote: > > This patch add below two APIs so that VF statistics can be get/clear > > from PF side. > > rte_eth_vf_stats_get. > > rte_eth_vf_stats_reset. >=20 > patch subject can have " ... from PF" both to be consistent with other pa= tches > and to clarify what it does: add APIS to get/reset VF stats from PF? >=20 > > > > Signed-off-by: Qi Zhang > > --- >=20 > <...> >=20 > > diff --git a/lib/librte_ether/rte_ethdev.h > > b/lib/librte_ether/rte_ethdev.h index 9678179..8b564ee 100644 > > --- a/lib/librte_ether/rte_ethdev.h > > +++ b/lib/librte_ether/rte_ethdev.h > > @@ -1271,6 +1271,15 @@ typedef int (*eth_set_vf_vlan_filter_t)(struct > rte_eth_dev *dev, > > uint8_t vlan_on); > > /**< @internal Set VF VLAN pool filter */ > > > > +typedef int (*eth_vf_stats_get)(struct rte_eth_dev *dev, > > + uint16_t vf, > > + struct rte_eth_stats *stats); > > +/**< @internal Get VF statistics */ > > + > > +typedef int (*eth_vf_stats_reset)(struct rte_eth_dev *dev, > > + uint16_t vf); > > +/**< @internal Clear VF statistics */ > > + > > typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev, > > uint16_t queue_idx, > > uint16_t tx_rate); > > @@ -1483,6 +1492,8 @@ struct eth_dev_ops { > > eth_set_vf_rx_t set_vf_rx; /**< enable/disable a VF > receive */ > > eth_set_vf_tx_t set_vf_tx; /**< enable/disable a VF > transmit */ > > eth_set_vf_vlan_filter_t set_vf_vlan_filter; /**< Set VF VLAN filt= er */ > > + eth_vf_stats_get vf_stats_get; /**< Get VF's statistics */ > > + eth_vf_stats_reset vf_stats_reset; /**< Reset VF's statistics= */ >=20 > Do we really want to add more ops to the eth_dev_ops? >=20 > Although vf_stats_get & vf_stats_reset sounds generic, why not implement > these first in PMD specific manner, and more PMDs implement these, move t= o > the generic eth_dev_ops layer? OK, will move to rte_pmd_i40 APIs. > CC: Thomas >=20 > <...> Thanks Qi