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 9A057A04B6; Thu, 17 Sep 2020 11:04:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FCDF1D5AE; Thu, 17 Sep 2020 11:04:48 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1AEB81D5A8 for ; Thu, 17 Sep 2020 11:04:45 +0200 (CEST) IronPort-SDR: NuDs7GVEvYPMRI/NSAHA816IxCwisoTfKCANH8rl4gXULg1DRmORaxYwfizU7c6ZpabAdSdGiV n8oKR7EwXvtg== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="147339867" X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="147339867" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 02:04:44 -0700 IronPort-SDR: DmZp8xY1Q+v4c4gNSy3FNZ8bR+z8KfIRZCRtwOJar5Q74BxE55aY48OpV5VG+q1UyGZr+Aazxx fDL519MBCbeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="483663598" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 17 Sep 2020 02:04:44 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 02:04:43 -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 02:04:43 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.56) 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 02:04:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BblwYxDiv+/FiWqnMvMWNbSbMggrWwodqnd0yGB0INZiniKlUUT1JGng4dhGMN36TnK3fYLTCX4u4aPd4HlKJU3Mm3sI07EoMMzk7dl5SGGWz50L5eq4xr5Oigxz6xVNQjbtPzrIkMWU7aZxzVGsoSKHjJBeanWmzW4gxzyjGwU5vOsGp+yLxLHRCq+9J578RN83wlpriiHuGLTL5DiqBtnYlwH6iTYqf9NPhnBL7C3TgaLqelWdTq/AVli2fGnxfOyAShzKJxQE80tIzP8l6eOtlvKRKykSB/7BhbJrWOhY6xWiHbT/J0iYmSR85o40Vpx1+Z2ABK8RQuKiQi6GiQ== 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=oVYAZTdXUgFoIYuZUcsW/FmJcJlxGtgt1wqFdjy/dT0=; b=TFVraGnHS1JelEkIkZkFzWic/Nczljs2vggv3UdarNbypzP3us10kWD/9EsrEXxMzYrI+kRdAIjKh1Gj80TwkWhNLZLoqrt0pU6OAib17veBSPEsj00TW94GLocSlLK7PBtZi4cs432jHf9AozsP7r9c2Nx9OrAf2PY/iJXjWW+6x3tyOGoMnWpRaF52wZO14MORdQh5EmVKRnS/IvVXB/OMGPoMLvLStvNAv4a9aTBh60jy6KscfJLgANLWm+6eGAj1i0zfcLveMlHUpSLimboLHbryDGXFbvpkjG8orStxONpBabZyraphQVXl2LSS1J+80QM7LtEL1MWDpW/XFQ== 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=oVYAZTdXUgFoIYuZUcsW/FmJcJlxGtgt1wqFdjy/dT0=; b=bxOIQ9HrZICLJqDKVenPVNd1mKMehHb6Cf8Xn6zl71S4yvBnfUxmuuJZOaBsev+9YHpmVU9sCXnscWjCMen2xqzeOaf4iIWKo+iVphOyVQWaRIJTEScP34Pk6mZPI1H8L8vJeVe/VmWaXDwi68hoQS9I3p/5q8O800HHM0WtdbA= Received: from DM6PR11MB2555.namprd11.prod.outlook.com (2603:10b6:5:c5::33) by DM5PR11MB0044.namprd11.prod.outlook.com (2603:10b6:4:64::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.17; Thu, 17 Sep 2020 09:04:40 +0000 Received: from DM6PR11MB2555.namprd11.prod.outlook.com ([fe80::59db:260c:93d9:2439]) by DM6PR11MB2555.namprd11.prod.outlook.com ([fe80::59db:260c:93d9:2439%5]) with mapi id 15.20.3370.019; Thu, 17 Sep 2020 09:04:40 +0000 From: "Power, Ciara" To: "Chen, Mike Ximing" , Jerin Jacob CC: "dev@dpdk.org" , "Eads, Gage" , "Vedantham, Sundar" , "Richardson, Bruce" Thread-Topic: [PATCH] eventdev: support telemetry with xstats info Thread-Index: AQHWhuuMnPRbb6s1mEiVBEquJfj5OalskudA Date: Thu, 17 Sep 2020 09:04:40 +0000 Message-ID: References: <20200909205447.29398-1-mike.ximing.chen@intel.com> In-Reply-To: <20200909205447.29398-1-mike.ximing.chen@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action 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: [78.18.45.201] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f9c381bc-2bf6-4241-d748-08d85ae8b614 x-ms-traffictypediagnostic: DM5PR11MB0044: 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:3383; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jQGgUgKBhSII8l22x47RiOakVL399e48sDj7AewSwF8QDBQr2fqadKJI3PMO7VDmiLkk0ASv6XoUVAlNn/JW1r3STR6Q4qHHIF1iVL/bIOBQ4OmzwLwsPidk8HtmR/VWjv+pAVgaarPpVU2KOXAbqVMhz513J5qK/H7QL2x7GabU1dnFg2km4JYh9FdWFgfkzUW+BzKHtCXjQaTNARH9NIj3GKH7FPOZFwdvRTKuUXTzY1ER9ksPL6/uxVF/zoUquAZ5vwW9Vor7lFh4zH+cZ99nKMAHhJEgK/81JispuGWU9jEUfMyBxw6SHzLe9+B8H3v5tBZ0l7/hJYPgfkx6TQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2555.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(366004)(396003)(39860400002)(83380400001)(478600001)(316002)(26005)(110136005)(6506007)(186003)(8676002)(2906002)(86362001)(8936002)(54906003)(33656002)(7696005)(4326008)(9686003)(55016002)(107886003)(5660300002)(66556008)(66946007)(52536014)(71200400001)(76116006)(66476007)(66446008)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: okDIHZhKvNUOM51xbhmREQTl3Zl/NGOl0AE+Z2uUDuAaQ0QlJRyF0vb67LFSN1ZpZ84CClRhcdLICxHxmqcxeAZ/gGnR+g/jM+UJGWkIgGTyIK2GFwcUfVt1+nbPGVy9OhFTsnaJjj4K6cWUdBTAXdBPrZ6n4U9qiwy/OM1D35rWjf5SXm8vQ3qf7USZB4F1FZTHXylGPGBTJYZIlWATU5v8qlwvFa8DWHQidHkgt0YBegebH3AuQh+huJWMMeXVWhPyV1c1mEIr+xLt6RoghDha3mdvVsrXJGe4UhtEhh6d5jLiGJekgpvqgHTq6pRa947KwTwakgQO7LaGTHXyOsjIsFo+WgGb79Rrfw1Sx1xccFn4TIAxB4oi6PKco1ybyZ/6x4A3Bsd/ir2x0iGrQCSm2uS/q5ZQ/eDLnurm20lEya0sP03EYFPlcG8hrO4YSD8QhbvVlNHrjWAJCCjgs+Duq2wMW0FWqpSi/rIwWLIfpm7dyMPPxgOGUChP4B24DdkudukhTLCr0l9puBqnXoPAFZ/Da/GpqqOLIT/JjC2JBmONKucXbz5ojVt/IYiKp7G8hityn2wWxUyQJSNeIUJbpSQKmpfbJefWq4Pbx1qgmGezj3ZomYQ0OAk9vYJm/UR1GvPO/oedT2kFvejUCQ== 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: DM6PR11MB2555.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9c381bc-2bf6-4241-d748-08d85ae8b614 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2020 09:04:40.4977 (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: o+hJA6chu8WjQIdh5VYCfNytSfdOyUhsBN9K2HmaZHCqB7xOWpKCMHnGCnmXYMHxKGj/4FwRQXi2pQjxTVN5Ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0044 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 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 >; Power, Ciara ; >Richardson, Bruce ; Chen, Mike Ximing > >Subject: [PATCH] eventdev: support telemetry with xstats info > >The telemetry library is connected with eventdev xstats and port link 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 >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 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; >+}