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 264A1A09FF; Thu, 24 Dec 2020 13:35:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 803C6CA35; Thu, 24 Dec 2020 13:35:49 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 156F4CA2E for ; Thu, 24 Dec 2020 13:35:46 +0100 (CET) IronPort-SDR: GQod0PKtMFvCIUb9eN634JzFkepkPrtODOZyWQIR7TSmQtAz9XKsD3dY2L7icByNe3wLMSgyIe 3DF7lvcM3FTQ== X-IronPort-AV: E=McAfee;i="6000,8403,9844"; a="163863732" X-IronPort-AV: E=Sophos;i="5.78,444,1599548400"; d="scan'208";a="163863732" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2020 04:35:39 -0800 IronPort-SDR: T0khYfRy38qGG32WUmcoF3jZgErlF4lnmQECVbG8lGqTEZw5MQ9mrokD6SJTa89z8DD4kMnbEu uudcbWs/McUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,444,1599548400"; d="scan'208";a="383530758" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga007.jf.intel.com with ESMTP; 24 Dec 2020 04:35:38 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 24 Dec 2020 04:35:37 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) 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, 24 Dec 2020 04:35:37 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.170) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 24 Dec 2020 04:35:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jSMfu0w7jx6VjSd6vEU+J7idGZNOr5t7+LSFfIg09mEiwQOcZAvnEq6oHVglqBlT+LVESWV6cdr7TjgtsPJWRNJ9ktOowEsE0cnChdoukTpIMw4bmm8P2qk3SWgFAbhNa0MDNfV1aHp/s9tcc56/+ZrckpPDpzS3cgm7c4WsQ9Vhf/fB38e84wHCVgsO9pScbXPswA37SPHDJ459L8OiyCCncJOpsNtufTrNe5+b8iTZ50qkRKAN4KbsXrHAo/zAUuHCKZdxM67YZRTMN4BmU3DxTl20wf92C1T/JqDKVebSwSg0y5neep8szyGEW8l8bw0HkdxpomyHlSu89ym1gQ== 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=mr8QuBLyeB1IbUVM4Asb1y4+eaa+BB9qe6jf5Vw/9Tw=; b=lq5ARexeFZmZesbNc6CdyGTdU+9hzQ4NJiTzH4iGDy514hCSafjhq5O/d3Up8Ak2+55nMHHDkhVzBzO3NtyKUuP+X8/XxGIG9E7xA5dAGSWEYys8uSERmQdpVVxE2NdrUGXb+udEY00KT7C7WK9MHlZJZJOt15jm0tMwzBhmIyi8HYdkmRWSvURHdJQXaPtpZZ4h5w+4PpPjXDut3Joc3JqvnE0Dr911I4UjB8i5PokwATySUkoAvPuL0qCy0LFa9xPDSf/mdP1XYoPcLEL8Qqhl8ZTA3qLK0Tz74xAFWV8W2FNVkg19uwu/cWVwZgiTUYNTpHcWkz/iKgVcAAadpA== 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=mr8QuBLyeB1IbUVM4Asb1y4+eaa+BB9qe6jf5Vw/9Tw=; b=XwdjtvWdLhib2biPd4cgawYjwkZPr1xR2PLveZ3DkAlNIbmc2Y6p0pF/H08U0BmgMbWN9r0wN0zcRclJltV6Rx8VcCLChgC/LmxH3yS14QHb7FD4CDoT2n6Ltuar50hX3eaZjp0Qo4U/R/ZEghiqyslGwZGYimnNKzFeNCGFkck= Received: from MWHPR11MB1581.namprd11.prod.outlook.com (2603:10b6:301:d::9) by MWHPR11MB1375.namprd11.prod.outlook.com (2603:10b6:300:23::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Thu, 24 Dec 2020 12:35:31 +0000 Received: from MWHPR11MB1581.namprd11.prod.outlook.com ([fe80::556:15d2:6ce4:d49d]) by MWHPR11MB1581.namprd11.prod.outlook.com ([fe80::556:15d2:6ce4:d49d%2]) with mapi id 15.20.3700.026; Thu, 24 Dec 2020 12:35:31 +0000 From: "Varghese, Vipin" To: Hideyuki Yamashita CC: "Hunt, David" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 0/5] add apistats function Thread-Index: AQHWyhJ8lIglxJsHVEGEPq72qj9dcqnmuiCAgAHEIiCAHW3egIAAXuoQ Date: Thu, 24 Dec 2020 12:35:31 +0000 Message-ID: References: <2a9a170b-c351-e3f2-36b5-6db9d4c29da5@intel.com> <20201224154349.9D9A.17218CA3@ntt-tx.co.jp> In-Reply-To: <20201224154349.9D9A.17218CA3@ntt-tx.co.jp> 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.5.1.3 authentication-results: ntt-tx.co.jp; dkim=none (message not signed) header.d=none;ntt-tx.co.jp; dmarc=none action=none header.from=intel.com; x-originating-ip: [111.92.81.227] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 07b48c64-8942-4946-96ba-08d8a80866e1 x-ms-traffictypediagnostic: MWHPR11MB1375: 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:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sShmTl9FCXw0MGPWJJFqMqMi0yTUfLYAlQlMhwVSib+xKR9Qr6ol8oWaA0AJbpyoVEBKEoDSjN2w6Dxs89l8cdVzaNVoG5D6tlQHTKBq+l1N2MTtx9yb92+wCb2rrnkdFU+oiRbTn+DaFA3OaeJbTLWDE0ayImLCddmz0fhtENURCqEibeWqdQGdT0VDqMjiNJaabPqIvODACvcur/6GB2x9Qj7y1S3IKb/0n+r5Q/CJyi5sj1mGFO53fOw2v6fALUi70gjGWjjyF4yKC2hvfUkJb7PZw0vqWf1tBc2xDR1gxZKtULGSS6J7YJIDjygXi3o0EDKBFAJZnW3y0XOc+2SYWEVTYdGj/O/sBnOPSmW7muLLvRB5jzBcTSLbX80EeMKAj9XZKlmaPIjgFoXJyw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1581.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(346002)(39860400002)(366004)(396003)(9686003)(66446008)(186003)(52536014)(86362001)(71200400001)(8936002)(66556008)(66946007)(64756008)(76116006)(66476007)(5660300002)(8676002)(6916009)(4326008)(26005)(2906002)(33656002)(316002)(6506007)(7696005)(478600001)(55016002)(54906003)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?LzbYZy6G3JwEQ/BP85wiosPw5pEr7pOKeCzmmINlTmCnXK4+ka6AKMadbidI?= =?us-ascii?Q?esYUCchAr14pzg8AZcVBh4HrBNoqForabZZSCXWvLUOV1yi4rOpHryaSXmyp?= =?us-ascii?Q?Xg6Ftls3OJx4zH1Uwz0m5fL3Bz9OsOB5FVapC9xFvzEZ7ltf3Z45CzH2/8bA?= =?us-ascii?Q?pD7czoI/AFjzupfxJlkVauVDxWNWOQDFUGxAFotgG7p6vhAN9Ish8ZzmYZ1+?= =?us-ascii?Q?4FaBUQFxjgTYnG5gecexBqjKGhS2/TVEgcr5LnwH/cARkGtxW4Mt91625s4v?= =?us-ascii?Q?cvpbAsS6U0byW9qyPgsW2lBhUVoiQ5LvBtBOYR5SkZXwzhjl3tWa/gjEWVvw?= =?us-ascii?Q?1EeuXovT+H0T8UVOu1oca+n/h59WDgiPewAF1+NE/VFBHtaB7UyWYxlWDdf3?= =?us-ascii?Q?PfHxg7RbMuk7Rv1Qoxeo0R7RNgCB7movYDizzEJiibInBYbfe4F8Njs3bAM+?= =?us-ascii?Q?iUGCykTnIkLUzpErQ+aX+7/irrBrHRT+z0QL+ULELypsOKAhAvfkk8aTjrDZ?= =?us-ascii?Q?Ilge5FyMRD02YcBTXRQRDb/Xut49a5zKsqlFtun5I1bAUZGcxgMumFJXzYuC?= =?us-ascii?Q?48tkpSZlZZFQS5nSF+BhTXdRhnVX2G7b1Gpo9u94VCqgeyXzsikNxtHdji6O?= =?us-ascii?Q?79p/lXCOGmHS82m0zLQMY/beKRzo99tRq8eyrfZgs4m5tv09m40IYKRSCbUv?= =?us-ascii?Q?J4wwhbMX6pL2UcFOoq4wgvL9kC8PKywTu5FgHP/0dlJFOuUmN1merYQgn39m?= =?us-ascii?Q?WDDSXGzIJyBhUbEEF7P2v9tg1+Lj3ryHkJtsKutgQG1JQM6X9upGs+bSPnR4?= =?us-ascii?Q?9o2/bnZ8EwagZsEKc1/t4k9LS7byRfHm6WQB6qv/WGImRyNavSP29SGfG+Nl?= =?us-ascii?Q?pQD/9yynhmcO5geLipuNOEofQwekYZ+hXe2gC34Z+J8FVAQ3WJWC7TIDh7K/?= =?us-ascii?Q?SImKoEeU2AruCMI8WK0rLEimINDmIbGm52i5xZSnswo=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: MWHPR11MB1581.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 07b48c64-8942-4946-96ba-08d8a80866e1 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Dec 2020 12:35:31.0880 (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: DLk77xlJ7MgdaL/Z530V5xnBeryT81HfCnzYSQk8XtkVXBNnmqDPcXGAgeLIPxLwYERmkPFp2HU/cXIia1qvdwKlsm1lhJzDe1qzMCtBnaI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1375 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 0/5] add apistats function 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" snipped >=20 > Thanks for your comments. > I know you kindly provided many valuable comments though I reply the > following first because I think it is important that my idea/proposal is > acceptable or not first. >=20 > > Sharing an alternate approach, if RX-TX callbacks are enabled in DPDK (= which > is by default). One can register a callback handler to update counters wi= th the > following information as `port-queue pair, lcoreid, total rx burst reques= t, total > empty rx burst, 1-8 pks, 9-16 pkts, 16-32 pkts`. Callback handlers can be > selectively enabled or disabled too. > > > > Can you please help me understand how `rte_apistats` would be different= or > pros of having it as library (that needs to be added to linking and runni= ng in > case of using DPDK applications)? > You are correct. > Application can do that by using callback of rx_burst/tx_burst. > But needs to modify/add the code for RX/TX process logic. No the RX or TX application logic is not modified as the call back registra= tion is done once right after port_init. >=20 > Point of my patchset is couting is done by library so that APP only needs= to > "retrieve/read" those data if needed (especially for existing application= s). As mentioned in the other patchset the library function is enabled through = and not conditionally built. Any application which is built with this patch= set will be forced to invoke the calls. >=20 > I think it makes some developers happy becaseu it is relatively easy to m= easure > "how cpu core is bysy" easily. Not sure what do you mean, as there 2 factors which conflicts 1. there are existing uses cases and examples like power, metric, telemetry= all uses RX/TX callbacks which does the same. 2. The current logic only helps in RX/TX cores and not other cores. So in c= ase of pipeline model there are only a couple of RX or TX threads. > (I admit relatively rough measurement though. I think it is trade-off) >=20 > What do you think? If I consider RX calls there are 3 main metrics 1. How many times RX is invoked. 2. How many times RX returns with `0` packets 3. How many times RX returns with `> 0` packets. With these values in the current logic you are trying to deduct actual CPU = RX usage by `useful work =3D number of times `> 0` / total RX calls` As a end user I will always be happy to see telemetry data as `from time t1= to t2,=20 1. how many times per second on average RX calls were made. 2. how many times per second on average The calls returned packets in range= of 1-4, 5-8, 9-16, 17 and more ` Current logic is not trying to address this problem. With my current unders= tanding I am not convinced that one needs yet another library when the same= can be done either with `RX/TX callback` >=20 snipped