From patchwork Thu Jan 26 15:20:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 122561 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 06A8B42493; Thu, 26 Jan 2023 16:20:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D73AC40223; Thu, 26 Jan 2023 16:20:52 +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 0B1E9400D7 for ; Thu, 26 Jan 2023 16:20:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674746451; 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; bh=3rIdIctvYC0Et1jZ2lQVvkzBclz4k/dDb0hI2Q6vGpU=; b=X8QMpYUOHGP0/C0+edk639sPdw8iSqoIF79Dpizw73nShWY6qFeYzPKPQXtYdZr3T7Lz5c 1uqyrgUsP3Ckzc3AxN/NWair3KhGivMnHK0souj4PS9PtBPllm22X3EQ0l35uVREfl4kbJ Fd6+2qTut8JDEy8C6TPzvxCytfj6FQw= 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-533-cB4JQBoTNqeTRTYNzxCwKQ-1; Thu, 26 Jan 2023 10:20:50 -0500 X-MC-Unique: cB4JQBoTNqeTRTYNzxCwKQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D0998858F0E for ; Thu, 26 Jan 2023 15:20:49 +0000 (UTC) Received: from ringo.redhat.com (unknown [10.39.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 310BD2026D4B; Thu, 26 Jan 2023 15:20:49 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Cc: Robin Jarry Subject: [PATCH v7 0/5] lcore telemetry improvements Date: Thu, 26 Jan 2023 16:20:40 +0100 Message-Id: <20230126152045.1036904-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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 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 Changes since v5: - Added/rephrased some inline comments to address reviews. - Added a new commit that adds the /eal/lcore/usage endpoint as suggested by Kevin and Morten. 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 | 227 ++++++++++++++++++-- lib/eal/include/rte_lcore.h | 35 +++ lib/eal/version.map | 3 + 19 files changed, 347 insertions(+), 45 deletions(-)