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 A3E79A0507; Fri, 1 Apr 2022 13:00:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49C7C42911; Fri, 1 Apr 2022 13:00:39 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 653734067E for ; Fri, 1 Apr 2022 13:00:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648810838; x=1680346838; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=UFesY3Zi5Jp5qfXLL1/kPP1XbbdTy+Waw/TfheqWhZ4=; b=Yl3zlgsGZ/rYi6fu8GxVNGDY2NGfPUJuR8gIA8+qJMQf9LnPWhPrYXZl FFYuCfugHMcm+oR1rYGzlS3syx6C1CRDSZbUUMi0KXI6tSHcV51ZHbL1L VS0UMcc4z/RVxDIOikmkYmNpfD60qyJfU5K29rUfTrMnRc1kZA39OalKY bw3KI1/v19YA5U51gnt3TlJiTJgKc6AQ/KtYFU5uprjrUQ+aiqKBOrE5Q zjbcGAlC6RHBZJFBg6+SA8O04zu5vqrKWT09pIOl4C2APm/7SuBZ0bHu1 WO6fv2hVkEwXQYnkpFgIIqrgY6BoKZIOIKFPHivBX+ZrtgM6CJ+JdU+4c g==; X-IronPort-AV: E=McAfee;i="6200,9189,10303"; a="240041986" X-IronPort-AV: E=Sophos;i="5.90,227,1643702400"; d="scan'208";a="240041986" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 04:00:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,227,1643702400"; d="scan'208";a="655629324" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2022 04:00:36 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 1 Apr 2022 04:00:36 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 1 Apr 2022 04:00:36 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 1 Apr 2022 04:00:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oF8015C68TiSay3kp9s5PwAWT2c82mmU6/zC1poSLv62945YmbzVGuoC2yxsSxGgD+RXEFEdj/Rca4/xlRkibEcK3b/BRFxr79hsxnvR35ySOFgZwfrebHSopaLMcLb+Rq7Lx7mRh8h5haShpUxbKbDccyU/R1t3qvpBk/4YX/rk5SF7KGYEfb82dnuhSVLxKGUSIOJY75xnrp+iRNFAb8iHhrDTlsRWmAuC92EKFt6wIlA210tEn8llbdR8JgseHsEAn17kKe6/lqF4/4FWQGCMxz4CKKaY52Oa7swU6gdaLAGa/dqsaLnKpFFTX8knf3q0SHGLePJP9V2JhpyqJg== 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=GAAloMtYSykBlosMRoDHBITIei1k6nP3nk9tyZ/J0To=; b=niVbZUc1a5ftgx9U5tdbed4Nr4KTqWQ1TMlb0slXP/R6bvIwF7C5ADGg5JHmg5UX2N7WgQvOj7jtWbGrTmEawW6WyyQtfX72X0RGeKJcvCPbg+e7/hlZumTkxFATA8LVXnNUPHx9/T2e4KZGHshugAeqH3Z4RQBHy7JWvNcWVbHDv/JTFvizlZK651257qJvu8OjE9Ldxy1fJSve3ofDcm0FrBBhE4tWFZEvjYiibqpMF9P3FkYAuf6Q4GpXn2zahchNlyoeQ8h4U703PRmiP7v5OP/rqErHyxSTybn+eVaMcWmy73JgVCIp/94yrnfD01M6PodU35wbD6HdY3/kzQ== 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 PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) by DM6PR11MB4121.namprd11.prod.outlook.com (2603:10b6:5:199::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.21; Fri, 1 Apr 2022 11:00:28 +0000 Received: from PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::e09a:7dd2:8941:9139]) by PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::e09a:7dd2:8941:9139%5]) with mapi id 15.20.5123.025; Fri, 1 Apr 2022 11:00:28 +0000 From: "Walsh, Conor" To: "Richardson, Bruce" , "Morrissey, Sean" CC: Chengwen Feng , "Laatz, Kevin" , "dev@dpdk.org" , "Pai G, Sunil" Subject: RE: [PATCH v3] dmadev: add telemetry support Thread-Topic: [PATCH v3] dmadev: add telemetry support Thread-Index: AQHYRbKvlO4tzQsV10O8M6ZYpD/+tKza4SwAgAACD6A= Date: Fri, 1 Apr 2022 11:00:28 +0000 Message-ID: References: <20220331183946.2203233-1-sean.morrissey@intel.com> <20220401102402.2249057-1-sean.morrissey@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3177a25f-0dda-44e2-3c23-08da13ced54b x-ms-traffictypediagnostic: DM6PR11MB4121:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QFWkeBzdqYCdNQYAXFRmn+uukRe4bZoNCXHd9SA6imnxHw3ah5pRZPHA5Hd277epqbW2n3O2MqtZCDGzgRmSVsVKUUvRTacRh8419Z/zxybCg2L/JPBBVNzN+cUPyzx01W9k+aPwr9GArYm4auMAFs92AwsHBMvPL3MNMBfvPHJm74V4MgNvFXA5hNbVGyuoKDNrl4QuFlerFJjslMojJozNnp70loI3WsU0naWR8NRGrFUNVXiaTlGtVFnZbYcPmqg/pqfNmuQY/rAveoqCGv5hV/f/C5SXKRTBZ1frDSAYM+dnEMtDIjK2Erg0UwnjlDKXCjzdsOzsNotOwGNfUD7moBrRSdLQSrd/Um/mBRy4u83ZRI4D1SS2VJ3V67bhY0C7n7WTHUxhzOIBFaplU3RWVL4nR94HO7Y0ECf5zMErs/mrxG8ZFBvcuddDw5io4cqlkXDu5gQvFaJbpUUSIdmPm3KeNejcy/n7JJIiSzcyx8cDkrOKTo+zwLPMSCpbmo0x4nRoDK5vjt4fGupSDMeYGXmDyZqqqqYlVMFwdfNtkZsFui/bc9qvmCoXMAQRWEQE66nZeimAK3rCiPDjnOvtvVdNSomolESRfk3297V7LHkipcERhkWhHQ9Hx0o5YNq1A+wXzZsBZgFOx9Vlsk6RPiSFOt9QrAoQWPpQfhf82iWnoSwyXk2ka/Yc77umI3S3wglD/EHHC8BFti5jfw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5207.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6506007)(7696005)(83380400001)(53546011)(8936002)(52536014)(5660300002)(122000001)(38100700002)(82960400001)(508600001)(54906003)(186003)(33656002)(55016003)(38070700005)(86362001)(110136005)(316002)(9686003)(107886003)(2906002)(26005)(71200400001)(6636002)(66476007)(66446008)(76116006)(66946007)(8676002)(4326008)(64756008)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PEOijc7jYRPjo948Xl/pqf7yTrDiopsAPR0vDZs/GoVts/EVur6boDEMFfUB?= =?us-ascii?Q?DcZRNzqWKQRKr/+uoFQC00V4CyeSmUqtb/hl4SplLE9Oq1jz+H/445XCz7Rr?= =?us-ascii?Q?GCOZ3i9BiGhxaZO2c250ZDytyyKdW9ePyAC+mkQ/Rq4Cs8xyyyTjQAcQE3OP?= =?us-ascii?Q?BP+fDiYI0XG72ZYJHXbNjOQtcL6PQNaLuiYcmKs8t8Lkvz0RisexKLdD0jMZ?= =?us-ascii?Q?kdiyrTv9YZnJcs3rtFYHE6fVIe3N4hk+FERuPKZVoJHrzgwIgfeqI7K1vUOK?= =?us-ascii?Q?0nM7Ue71sXx753leN7S7npnt2Edy5ftuA0dsBofMTh5oCCohCFQE7igLMC3I?= =?us-ascii?Q?jV+4pxdn/mfJUrc3bLPBSihTWWiPdZoclTVSBLxuy0aQCMxt6vspn58yOrhL?= =?us-ascii?Q?I/wM9q3gUfZJc3vo0j3VvCnb4BBQ632aI9SuVVMbthyDrrcYB3kH8OEd4IMJ?= =?us-ascii?Q?103+pnqetxLfsGKjvjda2qkWjjPHL70C99SwrBi92rAQ1PBVOsSvcwW8H+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ecCTZHF8zUR/dN+HSFzBjMNp89?= =?us-ascii?Q?/VFkkiHpebcJ9irEeu5UGN8jlSzTDu19vZE3Sjl3cbtsNtqiia5erXfPOqzC?= =?us-ascii?Q?HoUpkl65jNyg5FprXeU7jhSP/Wxjc3UTIpAcMJsj4mJ651v2yzDfumBhaRU1?= =?us-ascii?Q?qX0lHqXWphAuxP00Upoqykhwwrlr32QCDTYGHMFHgx0s93zP/n1M8n4v5BnR?= =?us-ascii?Q?IbQlgwh205++Qbn4jsmZpbHHWDAyNtKFbXss0vh6T6FmWsFveRp488JGcz6P?= =?us-ascii?Q?lPuAVKHmVsPHo7b8slXe6HsFbDDhzNmdEw9pNXpZd0BhztUjcEXPCxS399mp?= =?us-ascii?Q?WjFRag04EA=3D=3D?= 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: PH0PR11MB5207.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3177a25f-0dda-44e2-3c23-08da13ced54b X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2022 11:00:28.8233 (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: wWMRrT/Pb6GCiaVRoqdvWPIb7EwJzA0EWB3om99WMy+zv7s/pcSluvxzOHcKIudwXBG6M/E3GoraLYBviYewYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4121 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 > From: Bruce Richardson > Sent: Friday 1 April 2022 11:50 > To: Morrissey, Sean > Cc: Chengwen Feng ; Laatz, Kevin > ; dev@dpdk.org; Pai G, Sunil > > Subject: Re: [PATCH v3] dmadev: add telemetry support >=20 > On Fri, Apr 01, 2022 at 10:24:02AM +0000, Sean Morrissey wrote: > > Telemetry commands are now registered through the dmadev library > > for the gathering of DSA stats. The corresponding callback > > functions for listing dmadevs and providing info and stats for a > > specific dmadev are implemented in the dmadev library. > > > > An example usage can be seen below: > > > > Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2 > > {"version": "DPDK 22.03.0-rc2", "pid": 2956551, "max_output_len": 16384= } > > Connected to application: "dpdk-dma" > > --> / > > {"/": ["/", "/dmadev/info", "/dmadev/list", "/dmadev/stats", ...]} > > --> /dmadev/list > > {"/dmadev/list": [0, 1]} > > --> /dmadev/info,0 > > {"/dmadev/info": {"name": "0000:00:01.0", "nb_vchans": 1, "numa_node": > 0, > > "max_vchans": 1, "max_desc": 4096, "min_desc": 32, "max_sges": 0, > > "capabilities": {"fill": 1, "sva": 0, "silent": 0, ...}}} > > --> /dmadev/stats,0,0 > > {"/dmadev/stats": {"submitted": 0, "completed": 0, "errors": 0}} > > > > Signed-off-by: Sean Morrissey > > Tested-by: Sunil Pai G >=20 > Reviewed-by: Bruce Richardson Hi Sean, I'd agree with Bruce's comment below about trying to keep the names the sam= e. Looks good to me though and I've tested it with IOAT and dmafwd. Thanks, Reviewed-by: Conor Walsh >=20 > One comment inline below, which I'd like feedback from others on. > > --- > > V3: > > * update docs with correct examples > > * code cleanup and added comments > >=20 > > + > > +#define ADD_CAPA(c, s) rte_tel_data_add_dict_int(dma_caps, #c, > !!(dev_capa & RTE_DMA_CAPA_ ## s)) > > + > > +static int > > +dmadev_handle_dev_info(const char *cmd __rte_unused, > > + const char *params, struct rte_tel_data *d) > > +{ > > + struct rte_dma_info dma_info; > > + struct rte_tel_data *dma_caps; > > > + dma_caps =3D rte_tel_data_alloc(); > > + if (!dma_caps) > > + return -ENOMEM; > > + > > + rte_tel_data_start_dict(dma_caps); > > + ADD_CAPA(fill, OPS_FILL); > > + ADD_CAPA(sva, SVA); > > + ADD_CAPA(silent, SILENT); > > + ADD_CAPA(copy, OPS_COPY); > > + ADD_CAPA(mem2mem, MEM_TO_MEM); >=20 > I'm not 100% sure about this approach of having slightly different names > compared to the flags, just to have things in lower-case. Looking to have > some more input here - I'd tend to have the capabilities in upper case to > avoid duplicating parameters, but I'm not massively concerned either way. >=20 > > + ADD_CAPA(mem2dev, MEM_TO_DEV); > > + ADD_CAPA(dev2mem, DEV_TO_MEM); > > + ADD_CAPA(dev2dev, DEV_TO_DEV); > > + ADD_CAPA(copy_sg, OPS_COPY_SG); > > + ADD_CAPA(handles_errors, HANDLES_ERRORS); > > + rte_tel_data_add_dict_container(d, "capabilities", dma_caps, 0); > > + > > + return 0; > > +}