From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhang, Qi Z" Subject: Re: [PATCH v2 09/32] rte: add APIs for VF stats get/reset 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon To: "Yigit, Ferruh" , "Lu, Wenzhuo" , "dev@dpdk.org" 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) In-Reply-To: <86fe08d5-6f14-8495-c26c-2f08a5468587@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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