From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DBDFD1041 for ; Fri, 21 Sep 2018 16:23:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2018 07:23:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,285,1534834800"; d="scan'208";a="85469446" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 21 Sep 2018 07:23:19 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 21 Sep 2018 07:23:12 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 21 Sep 2018 07:23:11 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.27]) with mapi id 14.03.0319.002; Fri, 21 Sep 2018 22:23:09 +0800 From: "Zhang, Qi Z" To: "Wang, Xiao W" , Julien Meunier CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/fm10k: add imissed stats Thread-Index: AQHUSR4uFfzKKi0F1UOcY+6kWwJ/oKTpy7SAgBEOstA= Date: Fri, 21 Sep 2018 14:23:09 +0000 Message-ID: <039ED4275CED7440929022BC67E706115329F8FE@SHSMSX103.ccr.corp.intel.com> References: <20180910155035.23638-1-julien.meunier@nokia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmE0ODYxNmItNjM4Ny00NzE3LTlhMjMtNmU2ZjFhZWNlYTEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRGVwbGJrK1ZrdGJuRnozRnhJWVZucjZtTitKaGNia1ZwVDd4a1JTT0xrS21BZmJMbkd3dGJldlAyWEkyWTFBZyJ9 x-ctpclassification: CTP_NT 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: Fri, 21 Sep 2018 14:23:33 -0000 > -----Original Message----- > From: Wang, Xiao W > Sent: Tuesday, September 11, 2018 9:52 AM > To: Julien Meunier ; Zhang, Qi Z > > Cc: dev@dpdk.org > Subject: RE: [PATCH] net/fm10k: add imissed stats >=20 > Hi, >=20 > -----Original Message----- > From: Julien Meunier [mailto:julien.meunier@nokia.com] > 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 >=20 > 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. >=20 > Signed-off-by: Julien Meunier > --- > drivers/net/fm10k/fm10k_ethdev.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > b/drivers/net/fm10k/fm10k_ethdev.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 *d= ev, > 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; > } >=20 > Acked-by: Xiao Wang Applied to dpdk-next-net-intel. Thanks Qi >=20 >=20 > -- > 2.10.2