From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id CA5537CC7 for ; Wed, 31 May 2017 18:15:13 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 793AA20B75; Wed, 31 May 2017 12:15:13 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 31 May 2017 12:15:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=//WQsuUtL/76ECh +eMp9B1/BVc8VICngwZj4KsBd8WY=; b=PXW/F2AE12NZu6ki5vJN0spcwhF70lW 23NZSdtWACC92rEGFjPlH9g4mk1pwBFtjU4fgOSrqFxazjc8QXqJ6+i/O87WbqRw tFXRhcyuY83uIdXe4IxZFQ+SLewOqBkYvrbMpKER9x1e46TUiRUsAgXveSlkWAS9 PEuY3vJ+iXGo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=//WQsuUtL/76ECh+eMp9B1/BVc8VICngwZj4KsBd8WY=; b=h8H+D6oF fkpizbHHmuSK13uc7s/aQVROovbq+byWM8ntTiqMPVAvfHQ7Lp4s33K7fnRDl+j5 d3R6SQ8F3m9NX2fNS3o9VxyNV9I2Yz3FpfAA2Gs8c3A+dfLQbnCdYFiCYo8de0H2 CX10IRgCj1PAGmol+msyZECksRbTIVyLGOKQaFY1LALWE+wlTz0m8q14CWmvSvuZ +7gZSj77LQvLrfvrGeuAGnbsbdY8S5PEkthaUwb6LdZptw5mbgU47rub7W+NzLkz RvroezVwWRKEcqz1Tkem93n2wUumo9wQulIVe0fqcP3GZ8TBH2ruhB4bd73C2gyW jXw2VAUK2owFqw== X-ME-Sender: X-Sasl-enc: SxMxEzcUxOnRrHhBAtOXRkbsDpT3TCFh8Zok2/I/Tx2F 1496247313 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1D49C241E0; Wed, 31 May 2017 12:15:13 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: Ajit Khaparde , dev@dpdk.org, Stephen Hurd Date: Wed, 31 May 2017 18:15:12 +0200 Message-ID: <3474664.4106PkU1my@xps> In-Reply-To: <0936c7fb-e819-dcb4-1e09-d955f22cba97@intel.com> References: <0936c7fb-e819-dcb4-1e09-d955f22cba97@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 16:15:14 -0000 31/05/2017 16:46, Ferruh Yigit: > On 5/31/2017 3:27 PM, Ajit Khaparde wrote: > > On Wed, May 31, 2017 at 4:57 AM, Ferruh Yigit > >wrote: > >=20 > > 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 =3D &rte_eth_devices[port]; > > > > + rte_eth_dev_info_get(port, &dev_info); > > > > + bp =3D (struct bnxt *)dev->data->dev_private; > > > > + > > > > + return bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, coun= t); > > > > +} > > > > > > 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? > > > > > > > > > =E2=80=8BYes. That is right. It returns a count of number of pack= ets 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.=E2=80=8B > >=20 > > I see, this is implemented because there is no place in basic stats= to > > put tx_drop_pkts. > >=20 > > Can xstats be used to get this value? Can new .xstats_get_by_id help > > here? > >=20 > > =E2=80=8BMay be we could. Do we have time for that?=E2=80=8B >=20 > Agreed that this may require effort, but I believe we should not use PMD > specific APIs as much as possible, and stick to ethdev abstraction layer. >=20 > PMD specific API kills the portability, and only should be used to > benefit from features that are available only for that PMD. >=20 > This was my concern to start implementing more thing in PMD layer, like > getting tx_drop stats.. Yes I agree the specific statistics should be added in xstats.