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 A1282A0507; Fri, 1 Apr 2022 14:59:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DAF842911; Fri, 1 Apr 2022 14:59:04 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id C85CD4067E for ; Fri, 1 Apr 2022 14:59:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648817942; x=1680353942; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=bUtQJV9UbR1ZlN4YxBefDcGyvnIdYBOmYIUWjua5wmQ=; b=VwV0wwVuRz35KJ9wKQifGW3jhBRHgdC83OqO3xx4VQBXhvtkNkav1xLe SWA/3tjWTS6L6NCjzxSvvTSKMSz/Z7bCWdxJdv6DCzbteaI9qYpKnuyoA ppsSRnnZDmXX5SNDRQRcfAF/cEuNMUfSBt4CMtr6fnIN6Q+huUmwigQh4 65D20x4CBp4fCEm6OKHATCmSCC7xV3z3Oeywl+jkA6tY5pFswB2YBv2K5 lHq4+AlkiQ9iIp6OVegIDvFGv2S/HmhpbxarNLHkC3bpNGz1f9GT3Ey3f y4nTeEgEQ4ELiVf4DbNGXzKDtAj54oTJ0OSh0rCIatbx1SpGDEsb2DSnj A==; X-IronPort-AV: E=McAfee;i="6200,9189,10303"; a="258962676" X-IronPort-AV: E=Sophos;i="5.90,227,1643702400"; d="scan'208";a="258962676" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 05:59:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,227,1643702400"; d="scan'208";a="586844949" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga001.jf.intel.com with ESMTP; 01 Apr 2022 05:59:00 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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 05:58:59 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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 via Frontend Transport; Fri, 1 Apr 2022 05:58:59 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (192.55.55.70) 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 05:58:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oB23A6S1lZY63SbFQk41kn/F9OmzLBAVTQDXN/XBZP0Ep2HwE8NyylRD6pqef//x9laVlP8glPKJsvNEVapVH12/Y+UA/7yA3fg6r2xBj5IKY7h7byeHZpuWNzjS2B5jfExXKalUPw6kby71Cz22EedN0TuLrwB8sbFBt0s5vzIvKCphZwkea0rBAzlvdP5RMGQzCj7CNJvwmsDTgK+kIZ3GcC8SoP2cae9wU/gThQH8n2e/bNhaDpDUOVXTVhIWkJKj+fF4rQUYnkmdWwMC9sy5V+vpyAsVDr1eit1/XJdI9Vh4dOuTxLwjyVHSGH5BoBvvljeyMwwIK0W5Gr+ocQ== 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=qHbTFR4LF+xr3IDK4RlS21Jchoomx+eTQlLkVENA5QY=; b=Ehe7XXOyHbjwcb8dxgmWQijUe4vU97Ha00F//MOrTyfcMEPpF9jwN+z8wQ5IGaLVYbOY3RFNsm1GJ6q7Z4+zD3zVq1q546cQ0oCsAK3OIsxq1r83SDAyI4bwkkfNMtdqjSY2IFz/Qd3PiWGkXdV3K8ABNqBJy9nGuci1DqIbbMJfOg1CeFzf50radcC9T7m6SPCaDtqKgJBkn/EkQWHjtYPAEBMVgeg3hOrWG50qGY+Dr1f8v3LK8itxzphqL6F6IRa8JN34cGwzkxn4QuPNmkak7eWgBFMK0aYleVUnHCku09wj9Ggr7PiaooekEFv6uu/PGY8v4AUhKG3DOFPOFQ== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5660.namprd11.prod.outlook.com (2603:10b6:510:d5::6) by DS7PR11MB5992.namprd11.prod.outlook.com (2603:10b6:8:73::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.22; Fri, 1 Apr 2022 12:58:56 +0000 Received: from PH0PR11MB5660.namprd11.prod.outlook.com ([fe80::b893:7968:e5e2:f27c]) by PH0PR11MB5660.namprd11.prod.outlook.com ([fe80::b893:7968:e5e2:f27c%8]) with mapi id 15.20.5123.025; Fri, 1 Apr 2022 12:58:55 +0000 Message-ID: <5cf8942c-dd0e-187f-59b9-f1e1821d285a@intel.com> Date: Fri, 1 Apr 2022 13:58:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v3] dmadev: add telemetry support Content-Language: en-US To: "Walsh, Conor" , "Richardson, Bruce" CC: Chengwen Feng , "Laatz, Kevin" , "dev@dpdk.org" , "Pai G, Sunil" References: <20220331183946.2203233-1-sean.morrissey@intel.com> <20220401102402.2249057-1-sean.morrissey@intel.com> From: "Morrissey, Sean" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB9PR05CA0013.eurprd05.prod.outlook.com (2603:10a6:10:1da::18) To PH0PR11MB5660.namprd11.prod.outlook.com (2603:10b6:510:d5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f6cce08-746f-42bb-2c33-08da13df6135 X-MS-TrafficTypeDiagnostic: DS7PR11MB5992: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: pV5PfBTKEX1eAg+90sQGsEQy3VfZwywxMo89R/In7wUE4jp6o9j5EWG4JKmsFG8FhtHAl3Hj5is/kReMa6KuRqndQJslEu1PvegRXtxtdmWYYcOYbDea8tbdhxvBNr4iw4jED5OGci4cRxN17WyiwpA8kl5Cntq9FVWD6rge0e3X5BdPnyoHUuDA/XuP7F2iYZLAfhS8YOGGgyE0RNQYHZToPO47km2VF128kwoCdI99EaMJ0gqqTGnEVWDDfJVraoJ4Nwn611fVbzxFrtC3lCk6CjjmJe5RbkOzHGSrIAOaBhhBdK4pJ5hhAOs1rBmY2RezGtwrpDjlOdlBXGikeNsktYJmoyyB0PnBPFa7I/1PtiIbC/zsU6xag7qMHflRDjO87wsp+c8hZ5y/hSAkzypVaVhUcFTsAVutMgMm+zjNAZelpP3ZkwaavpExpJnVLZB56gxXJunqIH/O079Kz7deq4QlY1OW3qwTSxIAbocUGQWdRQGbshg/mXswSbrPNE/r/WLtCJxcS67PInMiSuC4OHWvdGC4sXeBFBz1l5J18n8C0Ot4Dq5CCM9dxWUn2O02kethSb2kcYOGcoNIXqCdtIFwGraryQfsuL7oPbnZEvYeOugmY6JTJ/ghXoidBFqu0fv+dD7jfMPxrYHqrcA5EqUbTdp88ga6Qs6yv9y5+UumLvKLiNVAuDVHU9JSFHmreqKfAvitVatzUiN3MReXvC/IifNyLeUgdfbTPvg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5660.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(54906003)(31686004)(186003)(107886003)(316002)(26005)(8936002)(36756003)(6666004)(38100700002)(6486002)(110136005)(31696002)(6512007)(83380400001)(5660300002)(2616005)(6636002)(86362001)(66946007)(82960400001)(66476007)(508600001)(2906002)(66556008)(8676002)(6506007)(53546011)(4326008)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YWhsMzJlZEdYMTFkbkpZbkJNaXFjdlB6aXpFdGJ6OGEzMW5VOWZtQXVWcGx6?= =?utf-8?B?T0dsbVZKYkxob3llMlZ1N2lTcG5wWnRPU08vUkMwWkRHRHVpdE0zQm1jYXpO?= =?utf-8?B?enRSR3Rta283amkyaTZlSWU3VEZMMWhIUEpCczVZd2FEQ08xYno4MXZnT3dS?= =?utf-8?B?czdwNFgrbURZbURVTHFEbG9yRnFjSTdPSHpLR3lSdUlwVEJvNytsNk9wWTh4?= =?utf-8?B?YVpkVlpUb1gzWlJ5RDhpUVVQYTBQb0VyQ2loMjhnK2tDUlNpa1IxL01UdGtv?= =?utf-8?B?UDFOaXJ1bW1uS09kQ0xwd05HOFo2WlYzcHhlN2dCSE0vYkJvTGQzV3MvQXVY?= =?utf-8?B?VnptTG5hV0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VHdTlJ?= =?utf-8?B?R0Iwb2Y4b3Zid21pTmsxc0pGY3Bac1dKZGFmK0x1UnRCNWJBZGlMRk0xckxD?= =?utf-8?B?d0IrbnNld1ZzUTBLRVBERWZaWmxOdDFHdU1BbzFLVFkyMlFnUHhTenBnbnE1?= =?utf-8?B?ZXpuNXIvOG1kM1M0YVU4elo4THdxRE1pOFZpZ3laK0ZhT2k3amZHcWxyNE5k?= =?utf-8?Q?YVP6kro9e41oLWzQ=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0f6cce08-746f-42bb-2c33-08da13df6135 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5660.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2022 12:58:55.8511 (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: DOFo8Y7o1UvZQE+CxH3jzngEEQ+0Z0mzjoEFz9RKNqa54U0xB8vT9hgzqmOZLwN9LjnbwX9Qcc92hwJxcp0qXvcQbOM3BZzvR661OLaIP14= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB5992 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 On 01/04/2022 12:00, Walsh, Conor wrote: >> 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 >> >> 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 >> Reviewed-by: Bruce Richardson > Hi Sean, > > I'd agree with Bruce's comment below about trying to keep the names the same. > Looks good to me though and I've tested it with IOAT and dmafwd. > > Thanks, > Reviewed-by: Conor Walsh > >> One comment inline below, which I'd like feedback from others on. >>> --- >>> V3: >>> * update docs with correct examples >>> * code cleanup and added comments >> >> >>> + >>> +#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 = 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); >> 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. Hi all, If that is the preferred approach then I will send another version. I got the lower case names from the capa_names struct in the dma_capability_name() function and these naming conventions are also used in the logs i.e. "Device %d don't support mem2mem transfer". For this reason, I thought this was the preferred approach to naming the capabilities, however I will keep the names consistent with the flags as suggested. >>> + 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; >>> +}