From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 803EF4241C; Thu, 19 Jan 2023 20:42:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 482BC42DA1; Thu, 19 Jan 2023 20:42:31 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 7BA9042DA3 for ; Thu, 19 Jan 2023 20:42:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674157349; x=1705693349; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=fXvtrPSomhCBFvh64l/rawjpCdCcGJKIsbNgg1t3bdc=; b=nHviaaIhSnsoubWrQkKbbXetUZ5BVh0cM2uGlipM90hSiVsiHWgYOFBB F5u7YvcY0/ZH9rPSksKdOEjaksmJLDJVCJzghj+nlO9HWTHjT+j85SuEG +c3UW1Coh6FO/wxGdLLvqHzDeFElY75Olcvof6cCeRjKOJRLwCG0UBnwB itTf61KCQRlkGvI/Wp+5nAVbsOghFfJLa9fqC78gvGnUOvwRm1e4QuB6s 0qamJyfBoCpIgCYWnmG19A6MujEAtW7Nk4Zc6ja+jNCPODYFM/Ne5KtYE DVGkd4rpgQK9Rq5Rddo4kdfe6B+cLeE+kakyCPDw1LiiuucPix3+58gaF Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="308979085" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="308979085" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 11:42:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="690755029" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="690755029" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga008.jf.intel.com with ESMTP; 19 Jan 2023 11:42:28 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 11:42:27 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 11:42:27 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 11:42:27 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) 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.2507.16; Thu, 19 Jan 2023 11:42:27 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AVHjG2hfjv91hsIMczWbL1MoUeuCdd8LSYevoQD+Ph7zabdAURG94B1PUlIVLWDh2xmQ6/8m3jsJOO8AWyGZ7KFhWmfSmT81ZPLWdJbn93lgBcVCkwVtaHeUyKV7wEZASzkT7c1Z1aPtQ70D44F/Gc7xmFSNaAVRT3bNs63yafDq2dc46YCNfolZzRYdw81/SkGQU1rCZPIyFm1H6mgjv2J0t5NkymKGpBL78Cg03EQ5F6zA+n8U5LNzCuVeT0OIZFXuAaOudokQoTr2T7WrM1fjtI+V8HT4oZ/sBUgOSb7XFeZtqmvd7+WuCJ0Xmj8gVt48EpMrGjzRxWG0SXUm4w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8uL9XCfRUNuRwf/oc9/rzFFi40esT5RSf6EC8YVHw+Y=; b=hOlTN/FG7V7NNz16Ui5XsVuCE85vVyhvPJIxJbd5vgh3/GW5eUB8ZlDEPvsVbMC6j5ZosxS9kbcBc+5BiVBcsjzG3xYA9K2YtbPHBxVNrzK9S8CMiIpx3t9b/5ozPmKzY1H+aiZVn40+a/2b7WBQLnjpdM5W9gmXmEYBA1jy7zrM2AR2fsU1nsZj5tsnEXA/ZepTmvu/DTs3lQP2oPN7RcBoZhXnWopPUBsA1RzxjL1nFG/o5YL/2T42vrXpwzlmxITjijMxOU0fvRzPYfR0x75k6I0EqGhHqwJvi3N26ImNFAPafZdy1TqSWYUU19T6VQAHajcuO/pmXinQT5rKUA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CY8PR11MB6842.namprd11.prod.outlook.com (2603:10b6:930:61::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Thu, 19 Jan 2023 19:42:26 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041%7]) with mapi id 15.20.6002.013; Thu, 19 Jan 2023 19:42:26 +0000 Message-ID: <6610a433-d3ee-8c73-67fd-0467c3b847fd@intel.com> Date: Thu, 19 Jan 2023 19:42:20 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v6 4/5] testpmd: report lcore usage Content-Language: en-US To: Robin Jarry , CC: Tyler Retzlaff , =?UTF-8?Q?Morten_Br=c3=b8rup?= , Konstantin Ananyev References: <20221123102612.1688865-1-rjarry@redhat.com> <20230119150656.418404-1-rjarry@redhat.com> <20230119150656.418404-5-rjarry@redhat.com> From: Kevin Laatz In-Reply-To: <20230119150656.418404-5-rjarry@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0050.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::19) To MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR11MB5872:EE_|CY8PR11MB6842:EE_ X-MS-Office365-Filtering-Correlation-Id: ce0ed9d5-07bb-4b1b-9492-08dafa554ac8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xG9L6vtj+eJ5jy0rVYKrMQRSuhuwWwfYypJzIVcDBVO8/nrPUZu6caCOu/WsCtlSbxva4BKMVUY8tZIabqPzFwBIokGD63FYdnoSEd8jMAyR5jo9q9kOGqLR3hu6//orl/6GsRiwi0egaMNv2rq42Rkcrr6i1bhqoAojoM8j0tq5vjiHF5YaV+xZZCAYBGMy8VvIJkCBLqTWMfyB65bOzA9Z8vDkk4bUwcpL3B1kdDX7zwBiZgdIVaBOX13c2eunEbWXYvKnuOGEb0DruyKzasqiyZeGPcOk7wDha3b+tvAk7BC9bByVqtmO11ZauHQ3E/s5qkmWdm9luWIMY5lWh51RWhzP2Fw9uy1fiHjxtfJrpBhomVHYtJm/FceKWNZEidZh9mvnaRzZEz0aFVNDpzvoxCOS6Bq9/sMKr2ykcgknX7SoZT8aRadTJZezG0EHOha/T9q/3mgIiVsDzrwLkH4HXjNFKSUzSDc/tmT0uZ1Zu2fPjfMultydS05L9M5hQ5epac7Ffa3meGehTwJdTXaj/LqybJMPN2RX7NuUnnXBOXM9RhSD1xR3sH3IaLyO3t3JgRfNuPnkhRf3POy1HHswKmF0WdL3UAzkrjZ98hkIR3xbEApMFHxASTB2MqL0E7X5bUk2YY5fZhXIIrhNol4ac+jqhuJCSnCkk6iGWUVDPMjmwxqCrCmrGsvOEXNvHIN84D5MMWOBajezrn6cl/EKD81yIPXw4u/MvbY2Hsi824tpRhxLt7ohzzkgMM1f4D7hHfeZ6Mp6J2CKumdvRw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5872.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(136003)(396003)(39860400002)(376002)(346002)(451199015)(6486002)(6666004)(31686004)(478600001)(6506007)(54906003)(53546011)(86362001)(316002)(8676002)(26005)(4326008)(38100700002)(82960400001)(66556008)(6512007)(66946007)(66476007)(186003)(31696002)(36756003)(2616005)(41300700001)(5660300002)(8936002)(44832011)(66574015)(83380400001)(2906002)(23180200003)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UHpKTG1ramdzYktGSlFJS2FQWWdYaHMyckZhdktBT3E2V205cnUwc0NtQWNP?= =?utf-8?B?c2t1MUNTbU9wYVN6SkhId1R2MFpEdG5TZDF6SUc0dEc2VFFkYUQ3SG5rNXJx?= =?utf-8?B?M1hBcDlzNm5WT2pPMzRXeHdSR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WhO?= =?utf-8?B?cHhkeWJNcXNMOHFlcDhseUJZbkJBQXZHdXJTcGVCNWpIV2F3NVpqZnFONVQw?= =?utf-8?B?SitRaG1ENEtHb3NKWGZsV3ZLbERMOGtZUlpkTTB3TjhPLzdtVit6L0hCWUFl?= =?utf-8?B?d1l0TXdHbXJ4Q2p3eEtKNjloUzg3TmVQVzB4Y3RGL3Faa1lPMEFXeTBaOGRH?= =?utf-8?Q?vjTBpYBKfC7GBiLyrglqULbKK?= X-MS-Exchange-CrossTenant-Network-Message-Id: ce0ed9d5-07bb-4b1b-9492-08dafa554ac8 X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 19:42:26.3606 (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: +R2dsrt7p525h4YYTvE0Pu2Ixz6SZMyA5irHvDbRhPvOVz92qxSdM6IxujWul+jzJhcSRNVdGNDe9S6fzz26rA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB6842 X-OriginatorOrg: intel.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 On 19/01/2023 15:06, Robin Jarry wrote: > Reuse the --record-core-cycles option to account for busy cycles. One > turn of packet_fwd_t is considered "busy" if there was at least one > received or transmitted packet. > > Add a new busy_cycles field in struct fwd_stream. Update get_end_cycles > to accept an additional argument for the number of processed packets. > Update fwd_stream.busy_cycles when the number of packets is greater than > zero. > > When --record-core-cycles is specified, register a callback with > rte_lcore_register_usage_cb(). In the callback, use the new lcore_id > field in struct fwd_lcore to identify the correct index in fwd_lcores > and return the sum of busy/total cycles of all fwd_streams. > > This makes the cycles counters available in rte_lcore_dump() and the > lcore telemetry API: > > testpmd> dump_lcores > lcore 3, socket 0, role RTE, cpuset 3 > lcore 4, socket 0, role RTE, cpuset 4, busy cycles 1228584096/9239923140 > lcore 5, socket 0, role RTE, cpuset 5, busy cycles 1255661768/9218141538 > > --> /eal/lcore/info,4 > { > "/eal/lcore/info": { > "lcore_id": 4, > "socket": 0, > "role": "RTE", > "cpuset": [ > 4 > ], > "busy_cycles": 10623340318, > "total_cycles": 55331167354 > } > } > > Signed-off-by: Robin Jarry > Acked-by: Morten Brørup > Acked-by: Konstantin Ananyev > --- > > Notes: > v5 -> v6: No change. > > app/test-pmd/5tswap.c | 5 +++-- > 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 | 39 ++++++++++++++++++++++++++++++++++- > app/test-pmd/testpmd.h | 14 +++++++++---- > app/test-pmd/txonly.c | 7 ++++--- > 13 files changed, 81 insertions(+), 27 deletions(-) > Reviewed-by: Kevin Laatz