From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4FAF2A04C0; Thu, 17 Sep 2020 16:24:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D9801D66F; Thu, 17 Sep 2020 16:24:57 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 59ABE1D664 for ; Thu, 17 Sep 2020 16:24:55 +0200 (CEST) IronPort-SDR: Hm3UhPTrZZphgdbTdkXP89HrJUeRreXBAveZmgqQLgRDGRExLR3tVaK/LWvprbbq8R7ahOlYRZ 1uosAXnvQ8Vg== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="157106575" X-IronPort-AV: E=Sophos;i="5.76,437,1592895600"; d="scan'208";a="157106575" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 07:18:50 -0700 IronPort-SDR: G0O1VM9uUxP3GGGDq3enBx82DrULHzunyLzVaBGxIj4I0zRqHDtnXc5ZKgCgSHIvux/aT8W5sM K9sKrjYkQmSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,437,1592895600"; d="scan'208";a="302956252" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 17 Sep 2020 07:18:50 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 17 Sep 2020 07:18:49 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 17 Sep 2020 07:18:41 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 17 Sep 2020 07:18:41 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) 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.1713.5; Thu, 17 Sep 2020 07:18:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=axCDKG4R6kCXe8gC4E0H6Fyz58tI9GLMMayYnZFnFP7bSTLHN6BdxJnGkw8zZx0Z2jOgCEYvcrKaSCJfMYlWzx7dPAC8xQy/zOL2AKH2cSJ9+wkuYyHibzPKzyDao1z01cGQ6bmHIOiX/t8oRbXk6vRV7xAfZIvXC5N7i5cyJwCi4Oczyxk9VZrm8j2A0q645IxWoBJcqRVW9GXmw0GNhS1PAMvUB5JnksJ9L64UZ3WfyCjgzwa1+tyE+I3YPn3I0jlBZJlRlq9DKm9yux1f++6i+zLxd6X9Rj//sESQ0PjhEkND5mtBQX9v1+xFMsr9W+/DmjGSSC/MrdAP5mGTSg== 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-SenderADCheck; bh=S2649VvRe8hwP+T3Mte93jVFHk96p/V569L/3BJNW48=; b=CaK33/r8qmkYdLqSy4/L83W0fIzpk2QLVhvoNlD9fXsGWSrxa8o2yJEmW5KGfh9WtlnYLgdW3t9wXE0lsee+ausOL8c9bMdptXezGQYTrv4XUSJSDVnf/E9ZpUmewFfIIsqM9/hRoHjlMUi/6qyQ/+8svruy3bSp5/X07GoLTbfUAY3OzrEV0H39g/xKOfHmO0hEvoyvzS9kbSU8uBF6Hjc/zyJX1pvlBWvhMOpx+r78CUTcX0ivn3MOj086Oog3CrLWlKCz5cdR1VB6kiwrd9aaeM33Tsyjo/PJur2Q0vv46mYPciQvf5++HvIO6UfWeiRnGDYf3UHYZB+YrzHXWA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S2649VvRe8hwP+T3Mte93jVFHk96p/V569L/3BJNW48=; b=jKDsXEXCL/icizVWiDAKDwkVLdHnrQunKyjcagPWaAcj828Z3WWsh5ScdORICDxc7YEIoKzSgsPVBeYnTnqYYXgkNPRnnwxbjc2Rl06C7j8hC/Z+dL/aetjluGsynShl9WrRdvKPDL2n0SvgyjT0cz56h8tmWa1Cc6LUyibTwDE= Received: from MN2PR11MB4431.namprd11.prod.outlook.com (2603:10b6:208:18c::15) by MN2PR11MB4285.namprd11.prod.outlook.com (2603:10b6:208:191::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Thu, 17 Sep 2020 14:18:34 +0000 Received: from MN2PR11MB4431.namprd11.prod.outlook.com ([fe80::4cf6:9040:b290:30d8]) by MN2PR11MB4431.namprd11.prod.outlook.com ([fe80::4cf6:9040:b290:30d8%6]) with mapi id 15.20.3370.019; Thu, 17 Sep 2020 14:18:32 +0000 From: "Chen, Mike Ximing" To: "Power, Ciara" , Jerin Jacob CC: "dev@dpdk.org" , "Eads, Gage" , "Vedantham, Sundar" , "Richardson, Bruce" Thread-Topic: [PATCH] eventdev: support telemetry with xstats info Thread-Index: AQHWhuuM9tPpkB1mBkShf8WD8nWvkKlslU8AgABUWpA= Date: Thu, 17 Sep 2020 14:18:31 +0000 Message-ID: References: <20200909205447.29398-1-mike.ximing.chen@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [69.141.167.85] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ad5fd6d2-99bd-4e1b-4d32-08d85b148ed2 x-ms-traffictypediagnostic: MN2PR11MB4285: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2276; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2aDg8WLRfk9VvTAnOj4hGmrteRWsL6/LG0gk690I0M4S5EAKI4fYLsDxfQFNGoCQyWSMgqzFGSlCUSD+yDS7XQKyTb9BmuRDAYSI+3qaMa10pmYy4JL9OQz/SYtFAn816u1zT3N4UOSx1v2uvWQWLkFbMFOjkbCbRym0ywjOMuvKfy8HT/s8YDwRMkFewOA+90zutFtMB+988U9ZEIOcXFVxqbPnbgJSOOoPOCfose6pBxPiKCavcHHgMcyLONMEHqvQ95Y+AQySo+94caSE+m4ExLzpGKrgHckXGw40XLWWM/RJ6cN5g39tO8axMD5l0nlnNtIN9qotVZiSt6wGhw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4431.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(366004)(396003)(346002)(39860400002)(66476007)(54906003)(186003)(76116006)(71200400001)(66446008)(110136005)(26005)(55016002)(66946007)(66556008)(33656002)(83380400001)(107886003)(64756008)(2906002)(316002)(6506007)(9686003)(8676002)(7696005)(86362001)(4326008)(478600001)(5660300002)(53546011)(52536014)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: toQApyFWCLGADzJoKTh7ZkoJpy9CVhjnv8uC4W1elO2dTl8JG5Y150ALO+54c5JJ/GM96yx45mF+fmz3AEO1bfh5jbRsCzSY8mSmDsfmE3Fx/9IElCsNxBc81CbZfuFElX1OnqdsZQk2S+rgE3bZTIl2l4pfi3hg8vnJcUtf//i6UDqzG4HeO6IKSlwiNyPRLEYVO8wfUh1oBDzBzpge3MOc14nR1PGmYmiFKG9EiHGcMYJf4qA0zasQEyZiDa+7GwGZW4BduviQ6SIdCqrYHAyaizotrMb/mHmCRCIIIN5ZeYRzdZGLT1+gJQx8kN/jtZ512Hy4K1KMRzI7FMnGVwS775EeLjCtR3/PrGl26bOecJAyYV+2fAoBF5ynosrU7FUyjLgkNiG9Y/vB4fU19OzQ5KJ2TY/lR6f+sECDK9BHMUv4v6eCyOMyZeUNB/py3lTrawY5yunpt6I3FZz6pern3eia+9TFS6gRmEuEIyhZEVYsk+10WKuywK6c43Lo68g+ebMkJZ5FxmLhDHuvDi8MjgX7PJYK1Ai3J7RydmZKzQnN7522jRdshCuQPiqJu6mRMQqNZ69R1Rx6drlb9S2NRgNTww1T2mMuDjgSqbMfW2HWshO7oeztIyFFAtjsqyxbrR0pJ1g+MctD4Z8T8Q== 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: MN2PR11MB4431.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad5fd6d2-99bd-4e1b-4d32-08d85b148ed2 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2020 14:18:32.3267 (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: iBD9XzOgvZkp8pCIc7go77Ly7g/1fWrR1E3gYYV3JoIqq7KHQCzaNkWpco/AyGB0xii4NPNmMBMYgRW4xPGF7Ng9hanf0HHH6xfx5Vl89Aw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4285 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] eventdev: support telemetry with xstats info 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Ciara, Thanks for identifying the issue. For some reasons, the problem did not sho= w up in my previous tests with telemetry and eventdev. I will fix the bug = as we discussed and upload a v2 patch. Best Regards, Mike -----Original Message----- From: Power, Ciara =20 Sent: Thursday, September 17, 2020 5:05 AM To: Chen, Mike Ximing ; Jerin Jacob Cc: dev@dpdk.org; Eads, Gage ; Vedantham, Sundar ; Richardson, Bruce Subject: RE: [PATCH] eventdev: support telemetry with xstats info Hi Mike, See comment inline. Asides from that comment, overall the change looks good from a Telemetry us= age point of view, in my opinion. Thanks, Ciara >-----Original Message----- >From: Chen, Mike Ximing >Sent: Wednesday 9 September 2020 21:55 >To: Jerin Jacob >Cc: dev@dpdk.org; Eads, Gage ; Vedantham, Sundar=20 >; Power, Ciara ;=20 >Richardson, Bruce ; Chen, Mike Ximing=20 > >Subject: [PATCH] eventdev: support telemetry with xstats info > >The telemetry library is connected with eventdev xstats and port link=20 >info. The following new telemetry commands are added: > >/eventdev/dev_list >/eventdev/port_list,DevID >/eventdev/queue_list,DevID >/eventdev/dev_xstats,DevID >/eventdev/port_xstats,DevID,PortID >/eventdev/queue_xstats,DevID,PortID >/eventdev/queue_links,DevID,PortID > >queue_links command displays a list of queues linked with a specified=20 >eventdev port and a service priority associated with each link. > >Signed-off-by: Mike Ximing Chen >--- >Depends-on: patch-76075 ("lib/telemetry: fix passing full params string=20 >to >command") >--- > lib/librte_eventdev/meson.build | 1 + > lib/librte_eventdev/rte_eventdev.c | 304 +++++++++++++++++++++++++++++ > 2 files changed, 305 insertions(+) >+ >+static int >+handle_queue_links(const char *cmd __rte_unused, >+ const char *params, >+ struct rte_tel_data *d) >+{ >+ int i, ret, port_id =3D 0; >+ char *end_param; >+ uint8_t dev_id; >+ uint8_t queues[RTE_EVENT_MAX_QUEUES_PER_DEV]; >+ uint8_t priorities[RTE_EVENT_MAX_QUEUES_PER_DEV]; >+ const char *p_param; >+ >+ if (params =3D=3D NULL || strlen(params) =3D=3D 0 || !isdigit(*params)) >+ return -1; >+ >+ /* Get dev ID from parameter string */ >+ dev_id =3D strtoul(params, &end_param, 10); >+ RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); >+ >+ p_param =3D strtok(end_param, ","); >+ if (p_param =3D=3D NULL || strlen(p_param) =3D=3D 0 || !isdigit(*p_param= )) >+ return -1; >+ >+ port_id =3D strtoul(p_param, &end_param, 10); >+ p_param =3D strtok(NULL, "\0"); >+ if (*p_param !=3D '\0') >+ RTE_EDEV_LOG_DEBUG( >+ "Extra parameters passed to eventdev telemetry >command, ignoring"); The code above to parse the parameters doesn't look right to me - I think i= n the case of valid parameters being passed (e.g. "0,2"), there would be a = seg fault at this condition check on p_param.=20 This applies to the other handler functions here that follow similar steps = also. >+ >+ ret =3D rte_event_port_links_get(dev_id, port_id, queues, priorities); >+ if (ret < 0) >+ return -1; >+ >+ rte_tel_data_start_dict(d); >+ for (i =3D 0; i < ret; i++) { >+ char qid_name[32]; >+ >+ snprintf(qid_name, 31, "qid_%u", queues[i]); >+ rte_tel_data_add_dict_u64(d, qid_name, priorities[i]); >+ } >+ >+ return 0; >+}