From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20096.outbound.protection.outlook.com [40.107.2.96]) by dpdk.org (Postfix) with ESMTP id 0191A7CBC for ; Thu, 20 Sep 2018 12:08:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h9a62+Byn7A+P9dG7JZK9QkpZsT5yjOhmpvz4fKU3Ww=; b=Gr1QRkaowfqlEymjp6Cqkd6dCsIZrAmrR8JPYP8AxRLUMBhHGzPENNKx/YylZZF3Rtuvk2CU/4y5NHqmKdOD0UzwEQGIn5kpdCX/sgGNjLUQn5O44V/5XrbaTGXgY86g6rbRCS6UT8z+KSUVD1JcRPPkhz5E0XBNtPJZCmZ7B5c= Received: from AM4PR07MB1585.eurprd07.prod.outlook.com (10.165.249.17) by AM4PR07MB3281.eurprd07.prod.outlook.com (10.171.189.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.15; Thu, 20 Sep 2018 10:08:49 +0000 Received: from AM4PR07MB1585.eurprd07.prod.outlook.com ([fe80::9e6:cea5:b2b5:10f1]) by AM4PR07MB1585.eurprd07.prod.outlook.com ([fe80::9e6:cea5:b2b5:10f1%3]) with mapi id 15.20.1164.014; Thu, 20 Sep 2018 10:08:49 +0000 From: "Meunier, Julien (Nokia - FR/Paris-Saclay)" To: "Wang, Xiao W" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/fm10k: add imissed stats Thread-Index: AQHUSXJNHvwsmTnOCEWmCMH8oniXZ6TqvV7ggA5BvdA= Date: Thu, 20 Sep 2018 10:08:48 +0000 Message-ID: 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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=julien.meunier@nokia.com; x-originating-ip: [135.245.212.192] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR07MB3281; 6:UI9abzfq9ESXmM7MVSNwQlfp4DI3W9RyIByZ9qPg3x6sM/0hmMS//X2yoIKZkOCggdwOYwuzIDmEsZaHdytTtRMouaF63xePRyLw8ETn1fBbjeq25W+qCjKOeRUBDht5yR5E3hl0FIc2WcC9VD7cr6llt+doaqI6IGfCHBCqTTyu9BBbJkG8QHnHsGTpD9yi/RXO/bAfPfzFYIEtpLI0AwzBwbp4HWdjfHfydV1K9jIhQTJ4k5ufbOmEVYhA5PaG7QXUrG0TqFzmJPHQYOtMz7aCfWunV18XQOr8tgWMH7zs5zbb1iFC2MakkI3EOc/H2hSQSdfqhgRO3FAsbRAWKvu0gxcxXfUnKG7IS1gD9v/bRDPqseMzHFFyWJ+h7AJa+jrX9jwn+OC1QNv1GWvaNfTKHaB0tM7psQFfjsUUrRaVTrbFGqRsaZnmpWBbQEHKl+ldTK2wGkCWznNGD1NgGw==; 5:d6f0k3ldFL4B5+i5TZD8Tat7mNt/dneZi7m/u34iBtAKYnnMrMrrFIKvsCODqF8BuNsQYUl+BNaKIa2Y2ARt7WMaQDsUEAjiJYQyeyHQUSK6dvXRcuZTMcZftQNCilZRgHE2KZ3e/kyx6I3zhYaikl4ZOlLKrUHb/kaD9wdQnSY=; 7:jUClLGw5v77bI6IsnzN57NoSw98aNmNun/aYOP49u1wGQohdTjedxu1EWfgDaD1VWz76mpGjJth6NfU4U9kJpmNgJZzlygXeqxrZ4U7EbDot8w8uvos86Fa1T3V29dEhMgn6rsgZcByrDO2ZQMvAaYnG2wmIGnaOnxxxskO65K0zMZZ/s6gyrTLzS+jh34Cp/dnJhS8ld6uhVR1ix2pGqPGfZVefWCJ/Goj/OPENXa4fZ6n6+RcrIDLztlEg3Wp3 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: a9731af7-11c5-4281-ef56-08d61ee10f3b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:AM4PR07MB3281; x-ms-traffictypediagnostic: AM4PR07MB3281: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(82608151540597)(109105607167333)(195916259791689)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231355)(11241501184)(806099)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699051); SRVR:AM4PR07MB3281; BCL:0; PCL:0; RULEID:; SRVR:AM4PR07MB3281; x-forefront-prvs: 0801F2E62B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(366004)(39860400002)(376002)(396003)(346002)(13464003)(189003)(199004)(51874003)(106356001)(25786009)(97736004)(6436002)(2906002)(4326008)(316002)(478600001)(8936002)(81166006)(81156014)(476003)(105586002)(2900100001)(6246003)(6116002)(110136005)(53546011)(66066001)(3846002)(6506007)(229853002)(186003)(33656002)(486006)(5250100002)(26005)(53936002)(102836004)(5660300001)(99286004)(7736002)(9686003)(14454004)(446003)(74316002)(68736007)(14444005)(55016002)(76176011)(256004)(8676002)(7696005)(86362001)(305945005)(11346002)(71190400001)(71200400001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR07MB3281; H:AM4PR07MB1585.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2USZSt+x8I68hsty/XFqihWoTwfxk84MDht/XWk5jmIBhiXd+GvqSi2tLdhLe1y8vcMx6aEaQ1OP2b1w2IiVo2vaqhJbcOSsSC1/AcLzg1SCqbzX6+d3PHJMmrinkx5AdAhsuh5JvxjhPZgpQjWEaKGULVJFvHtQjSRE09IhjELHYNMUadL5Dh8tCgvp5df4k/R+uDdKBpXsE4RRpn3/t2BsGvoAM3/71ndc7ypi/2AuNspeio0UF3o4ZBH0xPOthrIoq44mQmog8Wk+0Kzv0f5sLKtsghLGBB150qZMemltO/4FJkkHxS1McXYnTqAhYIOQ/Ol102MujEFYy3s1K9k8izJpZRdyqc86GzksWBLAZIZ3uAVjytJ1gPt1j8fP6ux5uTFoJKmmQm8nTExd6w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9731af7-11c5-4281-ef56-08d61ee10f3b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2018 10:08:49.0353 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB3281 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: Thu, 20 Sep 2018 10:08:50 -0000 Sorry the delay. False alert, I thought that imissed was counted also in ip= ackets, but it's not the case :) So you can integrate this patch. Thanks in advance ! -- Julien Meunier > -----Original Message----- > From: Meunier, Julien (Nokia - FR/Paris-Saclay) > Sent: Tuesday, September 11, 2018 10:22 AM > To: Wang, Xiao W ; Zhang, Qi Z > > Cc: dev@dpdk.org > Subject: RE: [PATCH] net/fm10k: add imissed stats >=20 > Hi, >=20 > Please, do not merge this patch. I need to check and readapt this patch. = A > version 2 will be sent later. >=20 > Thanks, >=20 > -- > Julien Meunier >=20 > > -----Original Message----- > > From: Wang, Xiao W > > Sent: Tuesday, September 11, 2018 3:52 AM > > To: Meunier, Julien (Nokia - FR/Paris-Saclay) > > ; Zhang, Qi Z > > Cc: dev@dpdk.org > > Subject: RE: [PATCH] net/fm10k: add imissed stats > > > > Hi, > > > > -----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 > > > > 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_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 > > *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) > > > > fm10k_update_hw_stats(hw, hw_stats); > > > > - 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 > > > > > > -- > > 2.10.2