From patchwork Thu Feb 2 13:43:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 122956 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D09241BAE; Thu, 2 Feb 2023 14:44:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 075F342FCE; Thu, 2 Feb 2023 14:44:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3650E42D32 for ; Thu, 2 Feb 2023 14:43:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675345438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=63TQd2BdA6uFFIzpdOO2gvzhk5ywb7u2niUgIxLaRuU=; b=CXJFntPbGy/BMctUatAGH5zOAalPWXTFxZk08+gHgQnOyX9ccPwmVRZSKPvn1THZKcu0jQ MnzMsuBgyrtoO3s9swtHaBbrUQCukxwzwnF4xPRaI+qubB+ZfNnI6VJ6RaT/P3sVcczkKA sjK+7U9slIOb5TZl3OJWNduSYm4Ex7c= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-Q7smF_QyPK6naIszUT0x7Q-1; Thu, 02 Feb 2023 08:43:57 -0500 X-MC-Unique: Q7smF_QyPK6naIszUT0x7Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1BC1685A588 for ; Thu, 2 Feb 2023 13:43:57 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F062404CD80; Thu, 2 Feb 2023 13:43:56 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Cc: Robin Jarry Subject: [PATCH v8 0/5] lcore telemetry improvements Date: Thu, 2 Feb 2023 14:43:23 +0100 Message-Id: <20230202134329.539625-1-rjarry@redhat.com> In-Reply-To: <20221123102612.1688865-1-rjarry@redhat.com> References: <20221123102612.1688865-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.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 This is a follow up on previous work by Kevin Laatz: http://patches.dpdk.org/project/dpdk/list/?series=24658&state=* This series is aimed at allowing DPDK applications to expose their CPU usage stats in the DPDK telemetry under /eal/lcore/info. This is a much more basic and naive approach which leaves the cpu cycles accounting completely up to the application. For reference, I have implemented a draft patch in OvS to use rte_lcore_register_usage_cb() and report the already available busy cycles information. https://github.com/rjarry/ovs/commit/643e672fe388e348ea7ccbbda6f5a87a066fd919 Changes since v7: - Made /eal/lcore/info lcore_id argument parsing more robust. Changes since v6: - Added release notes entry - Moved lcore role enum to name conversion in a function for reuse - Moved rte_lcore_register_usage_cb in a 23.03 block of eal/version.map - Style & indentation fixes - Use asprintf to format busy/total cycles in lcore_dump_cb Robin Jarry (5): eal: add lcore info in telemetry eal: report applications lcore usage app/testpmd: add dump command for lcores app/testpmd: report lcore usage eal: add lcore usage telemetry endpoint app/test-pmd/5tswap.c | 5 +- app/test-pmd/cmdline.c | 3 + app/test-pmd/csumonly.c | 6 +- app/test-pmd/flowgen.c | 2 +- app/test-pmd/icmpecho.c | 6 +- app/test-pmd/iofwd.c | 5 +- app/test-pmd/macfwd.c | 5 +- app/test-pmd/macswap.c | 5 +- app/test-pmd/noisy_vnf.c | 4 + app/test-pmd/rxonly.c | 5 +- app/test-pmd/shared_rxq_fwd.c | 5 +- app/test-pmd/testpmd.c | 40 +++- app/test-pmd/testpmd.h | 14 +- app/test-pmd/txonly.c | 7 +- doc/guides/rel_notes/release_23_03.rst | 8 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 7 + lib/eal/common/eal_common_lcore.c | 231 ++++++++++++++++++-- lib/eal/include/rte_lcore.h | 35 +++ lib/eal/version.map | 1 + 19 files changed, 349 insertions(+), 45 deletions(-)