From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) by dpdk.org (Postfix) with ESMTP id 0D2325A6A for ; Wed, 31 May 2017 20:42:41 +0200 (CEST) Received: by mail-qt0-f174.google.com with SMTP id v27so19378495qtg.2 for ; Wed, 31 May 2017 11:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QPwaWe4Ejina/iwM/KvqvMWMgaDZ/WHgILk831ACATE=; b=VEje1cs+H64RzHPbYsqI33d6CXOGwmblPM618sw57NvkEiOucHPO9tAZpLcSEPHVB2 zqu7CDuHw4anrJv9CxVOPyu23kHPruQM6NN0/g3glIFXSJEAvGkb3Wd7dYhhq/4tdscY LyBsZikKHZ0AKtsuuPB/SpJLPciLrdawDyuZ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QPwaWe4Ejina/iwM/KvqvMWMgaDZ/WHgILk831ACATE=; b=V6VQR/PdYiBniAibu7lmIw/hYSqDmdf7XH96QgRjjntmEQ+Gndj6231SHr+xfQ8Z+3 myVKknQsYbG7QMoKEFkq5So/bQ7O2wavRj6bmeFbGzmVEKlYM7/660fpPEDZivnvgM/b umPXPnfuLGyZ231WwQpaWKwX+FK3xVj+kODbyoD2UzEiiaJeVLxk7yvRvi68kWL3VgOr aoh8/f5U8YQ8s1UbFdxYpJgCvfLELp7SsgWDGei/4BImODaUakLESKS8TrIY1Fw5aMOh YuPvJXBblgMZHDUymq9bkKyxL5iv2UnSzV3FQE4H2UGJbVn9SYHWl+ax3rTzKG9ri/5g kT/Q== X-Gm-Message-State: AODbwcCAIHYKXqeWaw3uRuUY3+zhe8o3OpMoBsTEhwOr2rR/t4jOSlV2 LR6OsbpPv9rvTG6itCgX335VjtoL945a X-Received: by 10.200.52.85 with SMTP id v21mr32806359qtb.45.1496256159884; Wed, 31 May 2017 11:42:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.52.165 with HTTP; Wed, 31 May 2017 11:41:59 -0700 (PDT) In-Reply-To: <3474664.4106PkU1my@xps> References: <0936c7fb-e819-dcb4-1e09-d955f22cba97@intel.com> <3474664.4106PkU1my@xps> From: Ajit Khaparde Date: Wed, 31 May 2017 13:41:59 -0500 Message-ID: To: Thomas Monjalon Cc: Ferruh Yigit , dev@dpdk.org, Stephen Hurd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 18:42:42 -0000 On Wed, May 31, 2017 at 11:15 AM, Thomas Monjalon wrote: > 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: > > > > > > On 5/31/2017 3:12 AM, Ajit Khaparde wrote: > > > > > > > > On Mon, May 29, 2017 at 12:43 PM, Ferruh Yigit < > ferruh.yigit@intel.com > > > > >= > > > > 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, > count); > > > > > +} > > > > > > > > This function is not to get VF stats from PF. As far as I c= an > > > 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 pa= ckets > 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 > > > > > > 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? > > > > > > =E2=80=8BMay be we could. Do we have time for that?=E2=80=8B > > > > Agreed that this may require effort, but I believe we should not use PM= D > > specific APIs as much as possible, and stick to ethdev abstraction laye= r. > > > > PMD specific API kills the portability, and only should be used to > > benefit from features that are available only for that PMD. > > > > 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. > =E2=80=8BAnd I am already working on that.=E2=80=8B Thanks