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 E30C15424 for ; Wed, 31 May 2017 11:57:08 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2017 02:57:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,422,1491289200"; d="scan'208";a="93186025" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.81]) ([10.237.220.81]) by orsmga004.jf.intel.com with ESMTP; 31 May 2017 02:57:05 -0700 To: Ajit Khaparde Cc: dev@dpdk.org, Stephen Hurd References: <20170526183941.80678-1-ajit.khaparde@broadcom.com> <20170526183941.80678-21-ajit.khaparde@broadcom.com> <3d568535-8eda-d79f-bbe5-43f9f1071184@intel.com> From: Ferruh Yigit Message-ID: <759bde90-b1e2-1a69-f98e-a02e164608c8@intel.com> Date: Wed, 31 May 2017 10:57:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 20/25] bnxt: add support to get and clear VF specific stats 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: Wed, 31 May 2017 09:57:09 -0000 On 5/31/2017 3:12 AM, Ajit Khaparde wrote: > > On Mon, May 29, 2017 at 12:43 PM, Ferruh Yigit > wrote: > > > +int rte_pmd_bnxt_get_tx_drop_count(uint8_t port, uint64_t *count) > > +{ > > + struct rte_eth_dev *dev; > > + struct rte_eth_dev_info dev_info; > > + struct bnxt *bp; > > + > > + dev = &rte_eth_devices[port]; > > + rte_eth_dev_info_get(port, &dev_info); > > + bp = (struct bnxt *)dev->data->dev_private; > > + > > + return bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, count); > > +} > > This function is not to get VF stats from PF. As far as I can see this > just gets queue stats, does this really needs to be PMD specific API, > isn't this something generic? > > > ​Yes. That is right. It returns a count of number of packets which were > not transmitted > because it did not pass the MAC/VLAN spoof check. > It does not > necessarily mean "failure to transmit" and so I don't think it is right > to map it to oerrors. > So in the current form I don't see a way to make a generic function out > of it.​ I see, this is implemented because there is no place in basic stats to put tx_drop_pkts. Can xstats be used to get this value? Can new .xstats_get_by_id help here?