From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com [209.85.216.175]) by dpdk.org (Postfix) with ESMTP id E97092BA2 for ; Wed, 31 May 2017 04:13:19 +0200 (CEST) Received: by mail-qt0-f175.google.com with SMTP id t26so2397825qtg.0 for ; Tue, 30 May 2017 19:13:19 -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=nVAYfffnA8auxBf52QNUAUq79j1jr7pODYhkZ5XryEE=; b=LwL4rb4vVmkY1P/yP74jDpDEaxPsJGlyVu7HiLQUoK5/IHNYrNSvZxzlZ6g7avFlra U2jd77hMJL/76twKwd/MM6WyiS47/nqWVCvKX9YKfaJuwHSOpowXwTy5s8yvckw+tjax GGhEUglza1hJgqCgpqR9M/As1plDQByPnvSgc= 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=nVAYfffnA8auxBf52QNUAUq79j1jr7pODYhkZ5XryEE=; b=Z//7g1G5MsweTGmxDNdClrUBgag2sf2cXyTQOjPPovQqiM+UUchxX6cmRr5TfXHZke 3K/+wlsgIpoBULzMDNShyXlNHeUv4iqSHJMq6O3hvehMIctoetvofePYyD2xPfCsIv8O 3sgp9rYI3Jodai+YMPFIELCz+vGOqhnZnr9H+ccTl2s4FIcOOTluOATrG3Bl0TZeG9ab gOOz/iXSH+LlBpWp5LjIcxPpdcT32JzKF0+oF2KI5DqXY/ulSoCm029j9nmT/pyTCkvU /tdDCEp8S6ZH9iabGcNIFuUmj929YjLdVHWpqHNWqRuYE5SHefNDHlH17bCjBu3xwt3D NsoA== X-Gm-Message-State: AODbwcBAzUw1aMWndhyZnGxTaX9CuMWx0A06HTVV3/UujeYou3O+5LQ2 cF1iQMDsrYKrq/8RMp+LO5rHLMITwO86 X-Received: by 10.200.52.85 with SMTP id v21mr28197186qtb.45.1496196798976; Tue, 30 May 2017 19:13:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.52.165 with HTTP; Tue, 30 May 2017 19:12:38 -0700 (PDT) In-Reply-To: <3d568535-8eda-d79f-bbe5-43f9f1071184@intel.com> References: <20170526183941.80678-1-ajit.khaparde@broadcom.com> <20170526183941.80678-21-ajit.khaparde@broadcom.com> <3d568535-8eda-d79f-bbe5-43f9f1071184@intel.com> From: Ajit Khaparde Date: Tue, 30 May 2017 21:12:38 -0500 Message-ID: To: Ferruh Yigit Cc: 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 02:13:20 -0000 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, 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? =E2=80=8BYes. 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.=E2=80=8B