From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 92D71A0542; Sun, 9 Oct 2022 11:15:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BC314114E; Sun, 9 Oct 2022 11:15:10 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 7F8D741141 for ; Sun, 9 Oct 2022 11:15:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665306908; x=1696842908; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=84aPDxZO74CbwHLfa/a6/YAu0+pxi1KfxFca/WS99xU=; b=GMUtHtENqYZ3+1p6/8dJnfjVtI9EaEDqtJ4Swx1KJQfJ8XR5i3FgLZUy 3vdkPZPBO7+henagzsJcHgpvsshPY6XyRCofhHZ8DNLYKvMYcfTu9cP/P 58DsxhCLl15qvwc9OhAjnC3A+wBVZJqoWZe8HlUHdkI8leRe5QV7SNqPX v+fO2DqBekLZNpE31fB4UM0y15bZyF18XVyA+r9nECJZSvb1i+yW4bbc/ rnR3ORkRmtbUrvQigGExnefZhMQB0HG8QqP63fga579ci1Sgq9TFHsorU MuOH88i207CnaOFMnEMF3HyGC6aoPW5Tf12AQl/otZs6SBxK1kWVRjwBn Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="330499139" X-IronPort-AV: E=Sophos;i="5.95,171,1661842800"; d="scan'208";a="330499139" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2022 02:15:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="954585057" X-IronPort-AV: E=Sophos;i="5.95,171,1661842800"; d="scan'208";a="954585057" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 09 Oct 2022 02:15:06 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 9 Oct 2022 02:15:06 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Sun, 9 Oct 2022 02:15:06 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Sun, 9 Oct 2022 02:15:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jD9GMXn1PNN/4J8XvUl7RqXrrHfcb1pbEAbpsQfGPZpvSxXiZRAbX1nZHbG7XR3VN2HuU5vXKBVksQQ15k8V9bw1Tw75xNpxg4zNWWMwxMlLucKON/bDkFvf8YcxpgTWII8fiFUf6hjGzdnfww+IQYiSqKG4jKbJmotuTQzvzhGrBdW8C1mm0JR1NmKVkiXPw8rkn+u1pKPQV2crxv55v7O2byg6TJ8ilUNPK3LI/7FibMQCUbJpi8+H0DLfAPfOHwxRy8kf7oFmSYn4m5Jw5bAVpDlevYcsWT2NmeP1/w5H0i7/i91jS5CzzMt/prJoMv+VX8BrKiBgp9cO9GthVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bnr+ZgjkJaoEmbgA96fbeFh8GcmzSH2B1fJIku7P39Y=; b=BtRRxBFN0NHY3OfuM9GNIK8TLNY1UqvHDdzccNlRwv+bzGEaJZsN+eOS2hgWPWCp+kMklJ/IwHdq6C5XgXK1pOw8RM8SxTCgc87bEZDiDo8qOat5JxunlSwLdWIim8IZclT63uyQvfZzg2LXcms15ABlZy2IbxO/EW+5E64/Zw6i+v2zxa5Y4h4PoOuL139lSGKVLcR7NTF8gYVOkhCAH1GniRFrtt24OVnmf6KyieAxeHtxmjb2Zc26C/cULt8QdIOxyDqubZLHR2C2UGiyYFCEhzWN7h5lvbMadKCMMfuRXv5jz4iau4f8R0KQ52s1sBNMYH5DrZK5DY3fIqAJ7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB3723.namprd11.prod.outlook.com (2603:10b6:5:13f::25) by MW3PR11MB4652.namprd11.prod.outlook.com (2603:10b6:303:5a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Sun, 9 Oct 2022 09:15:04 +0000 Received: from DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::126d:f905:c1d6:dcb9]) by DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::126d:f905:c1d6:dcb9%5]) with mapi id 15.20.5676.032; Sun, 9 Oct 2022 09:15:04 +0000 From: "Guo, Junfeng" To: Ferruh Yigit , "Zhang, Qi Z" , "Wu, Jingjing" CC: "ferruh.yigit@xilinx.com" , "dev@dpdk.org" , "Li, Xiaoyun" , "awogbemila@google.com" , "Richardson, Bruce" , "Lin, Xueqin" Subject: RE: [PATCH v4 9/9] net/gve: add support for stats Thread-Topic: [PATCH v4 9/9] net/gve: add support for stats Thread-Index: AQHY0kOMr6crD1ndhUWIQXKAVq+z+q4BeowAgAQqtKA= Date: Sun, 9 Oct 2022 09:15:04 +0000 Message-ID: References: <20220923093829.3019525-2-junfeng.guo@intel.com> <20220927073255.1803892-1-junfeng.guo@intel.com> <20220927073255.1803892-10-junfeng.guo@intel.com> <673129b9-55e9-5ea2-f3b1-002ad8587ab3@amd.com> In-Reply-To: <673129b9-55e9-5ea2-f3b1-002ad8587ab3@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB3723:EE_|MW3PR11MB4652:EE_ x-ms-office365-filtering-correlation-id: d17a8ded-ee7b-4b03-f6dd-08daa9d6c070 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: icvAEFfRpMk1vLSGuoWHJMrII4P+gGVQr7JlqSFP2A2jHaKlfz642izbEs1NAvjUXSmXpxKp/U/qQ4yXZ0OIu4khYz4ecEU5BJLE7LhJmpmSUm+OJrNn7dqz8Lq610HqZVGYJHqgcX64UUCNrcLuyfxECy2MiCOlSqr+nRDRfjoFKiYCHD9DYLaYWg4715GUlpJbQTpBvMMs9TZYx5mZI+0meDlnZxfPJ6B+ZUzihEz2QUmpw+V8cxYiz/kxIVxJpM7q1HI+JQYrrBD/xLTE6xGTUSeBFjNvY0HJNmHO4zilmYG7t6NXptcjfSULcyUvP6DMoMFUeZBGukFN0HkvLI6NFfF5koYlgWAjGX/p+cla36nSPx18NS9cshXUNM+SUwPBxJUdOgDviVp4jC61DPibjB8S3eg7uGCJdZjmn+pWv8WiqNt5wrfGw+MoKe5VoMLg+ZiYCLyt6TenpPbcX0OboEHRR5b54PLv0Gr5Dk68smrZDcNWSno64P3NdKV3wgDAbXte33QLZVJS+5Oy+A5Qm1lGHUyl08syNpYbM/9AGJZrTfEqKBnF3Jn7V/FXny3YpQuLxoJljJdFyvmn5BUvZb4UbP1CdLnS1Sn8dxMPj0IT/my/SXZLS0UTME1wodyblY+ExT50n9sngVvPk9nM9oov1h8mYu1Z66/yVFfI3UEdvhrAjAUYHr4/Q9Qprsn1Ar78Z2mOF0Tz2j7eLJWf+J+Mm/1Bdohgta/WyyOE+tlm2L2jrThmRqjO3sKW0bBe6pld9rsvOHD4pDjQEVM9GPW1RV/vNxSExLvkY2Q= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3723.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(39860400002)(346002)(376002)(366004)(136003)(451199015)(53546011)(6506007)(9686003)(26005)(966005)(478600001)(7696005)(107886003)(83380400001)(186003)(5660300002)(2906002)(55016003)(316002)(110136005)(54906003)(6636002)(71200400001)(8676002)(8936002)(41300700001)(52536014)(4326008)(66946007)(66476007)(76116006)(66556008)(64756008)(66446008)(38070700005)(86362001)(33656002)(122000001)(38100700002)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Sg/rst9R9IZeDFyEvSNONc8Pk/fF2dl2fOL8jLn9vofkjXa/TyKPVYR0rqz9?= =?us-ascii?Q?W1aCanNakEzgB/F/NbXkY/zTnxlOIrqfNmKDSfHuyMnYpZTOhzvXcYfhuBiM?= =?us-ascii?Q?agc4oE9emUCXHY/KCv/gRC828ryfvvdQrWS59r09Uhr9G6Y2VC9vT3Be9F26?= =?us-ascii?Q?ETqn1PgBcKZrdEaPb5aRRhmKkk0sFD6jyVH5fx7Kgen1CPkVJ5XTc6Xejvmo?= =?us-ascii?Q?L9HvOwkiHTk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z8U2b2V/nJv1QN0e?= =?us-ascii?Q?ulIRHXPeCfm5ivtSKIodtvllNMEY+pkFslv8ER2qlncNJjEz+29bpvgSaMYK?= =?us-ascii?Q?tnPr3Oq13VnqrkYupv/erHL0k+VkoexAuwJj2yEBg1TYCK+c9YwzATxDAw25?= =?us-ascii?Q?INvDrzNsm/7m6qDdfCGAX3Gg96c0yUntwujQjLcFupe9E281Kq/PgrAYy+jx?= =?us-ascii?Q?Xc/qSlwVh+WthaG4XtDKpz0f6TlKJofYNiNJ2gKX38ap/ekFHoZDvvcSaSbB?= =?us-ascii?Q?x46u63JSl0e+vyJ+v2nUJpjojovrV/xEzjZDGr0QN/cK4gqfzD0h59QBVGY/?= =?us-ascii?Q?NFyN/VDlztf8VjZuEPvdt1k0jZIDpgLwSf2tCQUY/WbOZw7KmQq4dpofeHXH?= =?us-ascii?Q?j4NHPGYXK99hLOqG8m2coP9cHNyOViiAkYjXibEnkm1cQXdMTFFSY72uSoOC?= =?us-ascii?Q?HqvifSzhxbyfbCQVMP8fvkouwNKhkZN/MaqmN9v0?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3723.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d17a8ded-ee7b-4b03-f6dd-08daa9d6c070 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2022 09:15:04.2289 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: iAoE3YD3WdTjTbWmxXJN89GHoZ9vGZlrHAsYKiH8SfsbEb9h6vBGVtcCKij/PMZH623GwNqeOmy0nkzr61BjUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4652 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Ferruh Yigit > Sent: Thursday, October 6, 2022 22:26 > To: Guo, Junfeng ; Zhang, Qi Z > ; Wu, Jingjing > Cc: ferruh.yigit@xilinx.com; dev@dpdk.org; Li, Xiaoyun > ; awogbemila@google.com; Richardson, Bruce > ; Lin, Xueqin > Subject: Re: [PATCH v4 9/9] net/gve: add support for stats >=20 > On 9/27/2022 8:32 AM, Junfeng Guo wrote: >=20 > > > > Update stats add support of dev_ops stats_get/reset. > > > > Signed-off-by: Xiaoyun Li > > Signed-off-by: Junfeng Guo > > --- > > doc/guides/nics/features/gve.ini | 2 + > > drivers/net/gve/gve_ethdev.c | 71 > ++++++++++++++++++++++++++++++++ > > drivers/net/gve/gve_ethdev.h | 11 +++++ > > drivers/net/gve/gve_rx.c | 15 ++++++- > > drivers/net/gve/gve_tx.c | 13 ++++++ > > 5 files changed, 110 insertions(+), 2 deletions(-) > > > > diff --git a/doc/guides/nics/features/gve.ini > b/doc/guides/nics/features/gve.ini > > index cdc46b08a3..180408aa80 100644 > > --- a/doc/guides/nics/features/gve.ini > > +++ b/doc/guides/nics/features/gve.ini > > @@ -10,6 +10,8 @@ MTU update =3D Y > > TSO =3D Y > > RSS hash =3D Y > > L4 checksum offload =3D Y > > +Basic stats =3D Y > > +Stats per queue =3D Y >=20 > "stats per queue" is something else, agree that it is bad naming, please > check features.rst file. Sure, will check the features file and update accordingly. Thanks! >=20 > > Linux =3D Y > > x86-32 =3D Y > > x86-64 =3D Y > > diff --git a/drivers/net/gve/gve_ethdev.c > b/drivers/net/gve/gve_ethdev.c > > index b9b8e51b02..cd474b8128 100644 > > --- a/drivers/net/gve/gve_ethdev.c > > +++ b/drivers/net/gve/gve_ethdev.c > > @@ -328,6 +328,75 @@ gve_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info) > > return 0; > > } > > > > +static int > > +gve_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats= ) > > +{ > > + uint16_t i; > > + > > + for (i =3D 0; i < dev->data->nb_tx_queues; i++) { > > + struct gve_tx_queue *txq =3D dev->data->tx_queues[i]; > > + if (txq =3D=3D NULL) > > + continue; > > + > > + stats->opackets +=3D txq->packets; > > + stats->obytes +=3D txq->bytes; > > + stats->oerrors +=3D txq->errors; > > + > > + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > > + stats->q_opackets[i] =3D txq->packets; > > + stats->q_obytes[i] =3D txq->bytes; >=20 > Queue stats update is moved to xstat [1], we are waiting existing PMDs > to adopt it but for new drivers it is better to implement new method. >=20 > Can you please either drop queue stats completely, or implement it via > xstats? >=20 > [1] > https://elixir.bootlin.com/dpdk/v22.07/source/doc/guides/rel_notes/dep > recation.rst#L118 Sure, thanks for reminding this! Seems that it would be better to drop the stats feature at this point since= lack of time and bandwidth... But we can still measure the performance via other tools like TRex. And we can plan the implementation of the new method in=20 the coming release. Thanks!