From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 14E354C94 for ; Tue, 11 Sep 2018 03:53:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 18:53:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,358,1531810800"; d="scan'208";a="87656243" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 10 Sep 2018 18:52:04 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 10 Sep 2018 18:52:01 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.205]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.143]) with mapi id 14.03.0319.002; Tue, 11 Sep 2018 09:51:59 +0800 From: "Wang, Xiao W" To: Julien Meunier , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/fm10k: add imissed stats Thread-Index: AQHUSR4uh5xDdodVKkaWXBYu+40ZqaTqUXhA Date: Tue, 11 Sep 2018 01:51:59 +0000 Message-ID: References: <20180910155035.23638-1-julien.meunier@nokia.com> In-Reply-To: <20180910155035.23638-1-julien.meunier@nokia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmE0ODYxNmItNjM4Ny00NzE3LTlhMjMtNmU2ZjFhZWNlYTEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRGVwbGJrK1ZrdGJuRnozRnhJWVZucjZtTitKaGNia1ZwVDd4a1JTT0xrS21BZmJMbkd3dGJldlAyWEkyWTFBZyJ9 dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/fm10k: add imissed 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: Tue, 11 Sep 2018 01:53:53 -0000 Hi, -----Original Message----- From: Julien Meunier [mailto:julien.meunier@nokia.com]=20 Sent: Monday, September 10, 2018 11:51 PM To: Zhang, Qi Z ; Wang, Xiao W Cc: dev@dpdk.org Subject: [PATCH] net/fm10k: add imissed stats Add support of imissed and q_errors statistics, reported by PCIE_QPRDC register (see datasheet, section 11.27.2.60), which exposes the number of receive packets dropped for a queue. Signed-off-by: Julien Meunier --- drivers/net/fm10k/fm10k_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_eth= dev.c index 541a49b..a9af6c2 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1325,7 +1325,7 @@ fm10k_xstats_get(struct rte_eth_dev *dev, struct rte_= eth_xstat *xstats, static int fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { - uint64_t ipackets, opackets, ibytes, obytes; + uint64_t ipackets, opackets, ibytes, obytes, imissed; struct fm10k_hw *hw =3D FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct fm10k_hw_stats *hw_stats =3D @@ -1336,22 +1336,25 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct rte= _eth_stats *stats) =20 fm10k_update_hw_stats(hw, hw_stats); =20 - ipackets =3D opackets =3D ibytes =3D obytes =3D 0; + ipackets =3D opackets =3D ibytes =3D obytes =3D imissed =3D 0; for (i =3D 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) && (i < hw->mac.max_queues); ++i) { stats->q_ipackets[i] =3D hw_stats->q[i].rx_packets.count; stats->q_opackets[i] =3D hw_stats->q[i].tx_packets.count; stats->q_ibytes[i] =3D hw_stats->q[i].rx_bytes.count; stats->q_obytes[i] =3D hw_stats->q[i].tx_bytes.count; + stats->q_errors[i] =3D hw_stats->q[i].rx_drops.count; ipackets +=3D stats->q_ipackets[i]; opackets +=3D stats->q_opackets[i]; ibytes +=3D stats->q_ibytes[i]; obytes +=3D stats->q_obytes[i]; + imissed +=3D stats->q_errors[i]; } stats->ipackets =3D ipackets; stats->opackets =3D opackets; stats->ibytes =3D ibytes; stats->obytes =3D obytes; + stats->imissed =3D imissed; return 0; } Acked-by: Xiao Wang =20 --=20 2.10.2