From patchwork Mon Jul 1 18:12:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shani Peretz X-Patchwork-Id: 141996 X-Patchwork-Delegate: rasland@nvidia.com 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 A4CFA4553B; Mon, 1 Jul 2024 20:13:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91DD8427C8; Mon, 1 Jul 2024 20:13:27 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id 66E36427C0 for ; Mon, 1 Jul 2024 20:13:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YpajFe6NI1saPi1D96Sys7ldlDwykB+Sp5JI1RVTzlIrGn/PlLzLdes9MOGFVcDSfgE2w5oTZPbhUJ37ekgtwHi8mLKRABFDuy9M4uPHsp06zDUVegl+NAduV6H109ottaYyiNpNuf4ckfCKGN83WAciEDVfZYby+zPMXb41kHwEXyiDKMfp3fWdGbEX1wlfdhG34J+ii0MgYx9oy1fUt/DNcnaCrfxSIe50icY5mpSC8U1+ollW56ywDD7ORsm81Pm/EJj7A83zM+/AXiDBh35rzIxYdNQD/5vdRuHb5sg7wN15VwdAi34i8L7E0ZjlispU8q+li7RIqsdXYv/5/w== 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=q3rQku8nQMgCIeAwhMSsK/qc3XdWU88MCmrljCbRubE=; b=locMnNV/9Us6IC45pjUYHr/F8L/ET4UmEN6LShkyfgAVg5T1t85+X1FY0Affmx/wDDvFmIjf9lgJz/Gz+jB+a5LfkSwyimuVLfp5xxGKcWj1OzR/3Foctp+koE5942hJfuPAvCqwFGjDgZ3dx0qEm4DaFTorT2IoMoe25kqUpuDqa8B6K4uOeb9a7cXKnP/lbQmqPIu7L4CdRHzrzn5F2yqyTEpBA+pMJbx9L9TA7+r2SNkQx1qK0N63Z1NzFXIDacTeWvDB29/iGR7Xp08YiYO28dVB69Ey0HiCf0aSIeBFPxpD0P8yvC6U3P5hmj5Z5jgbpcjT3KlFW19rfxKazg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q3rQku8nQMgCIeAwhMSsK/qc3XdWU88MCmrljCbRubE=; b=BLDAZj2oodEaBn+6q5/7bju33sf7clOLlhnjCzT+ncqti5wyJA5qaexDCgpGpWE4tAceGbezC04KNIN3NAUCzD/fy+TyRDlUxDKBWzAC0HXNrdF8ZRGCAXHXMqijz/NVlq6EPBe4nHlohU9frQ4uxL6E9sEAX1s7BaGQbVB+gvS9zeP76GZl78+STbM9TDDngMVfRqT+foKGh/mShxCCcQnv3w5q+4/b69I1D24wayez9m3OK62kripOO/q2X8utR+GMh6txxn9qBAzABiRuTmz9uJ5DL5Es9D8JpDYsTq6BB2Lc06wJNTHhqkPe/H6qOim8vDBAOh3IhTN4KhW2lA== Received: from BYAPR05CA0013.namprd05.prod.outlook.com (2603:10b6:a03:c0::26) by MW4PR12MB7359.namprd12.prod.outlook.com (2603:10b6:303:222::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26; Mon, 1 Jul 2024 18:13:19 +0000 Received: from SJ5PEPF000001E9.namprd05.prod.outlook.com (2603:10b6:a03:c0:cafe::ea) by BYAPR05CA0013.outlook.office365.com (2603:10b6:a03:c0::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.21 via Frontend Transport; Mon, 1 Jul 2024 18:13:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by SJ5PEPF000001E9.mail.protection.outlook.com (10.167.242.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.18 via Frontend Transport; Mon, 1 Jul 2024 18:13:18 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 1 Jul 2024 11:13:07 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 1 Jul 2024 11:13:07 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Mon, 1 Jul 2024 11:13:04 -0700 From: Shani Peretz To: CC: , , , , Viacheslav Ovsiienko , "Bing Zhao" , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH 1/2] net/mlx5: add global hairpin out of buffer counter Date: Mon, 1 Jul 2024 21:12:44 +0300 Message-ID: <20240701181245.128810-2-shperetz@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240701181245.128810-1-shperetz@nvidia.com> References: <20240701181245.128810-1-shperetz@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001E9:EE_|MW4PR12MB7359:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ff5dee2-44c7-4adb-4956-08dc99f97c3a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: Rws6LSzCkH2YZ/2GQYqItKOcn2RSPq8e86eTpIvDTr1gub9WFucntGZSiwRewF99E2bebomJVp7H58gyhOkj3aRiVv7pcsn+Y4lVJcina+6uiblnzc7UddrDo1fU6V46H0CGtC2cKqsvDEpwNhUf+DroKVUKGJNOGLfCbdYwl+ljK5oyXFWdK0+iUzKkf7l623HgMv+loacxqcnea98Hd2Wuvj9TvF8/k42fK3YCKzI5MuOHIMR6+DvFDsy3+szMRYi0oLMwAJhL26bo/lFGZQu1g1oZ7u8n0C8hh3EJZFRyRwpAuyee63YYi2oMmJ5zRdwFksfocbs+QmhFhlakeXaAlXduuPhgeM2r/SZTieH7a/+nxHEdBcaoQOdLGkXQzLJoAYpKkNygEztmEd39Szjte60VbN6MSggaOwYKhRhIoipXpqWul7rMM3i4sk+xIdnNppRM168e2DyDowvFXo8WF2YmBO6r3824bXfilhCZZxr2FnqmGZG8Ds+fjkxFcaFUV7jt3xmE6esj55LADjXKieyVN8nkLm3RMxlRs5iVHphv1czHCBUHGIiahRaASM4qPXf6+EQlNQ0ZqSan/y0UQb2fa3Oio+3cGPULQkNQQWe+Jq9IjaMhQZ7hn5dvvsnR16Iy/lVJaBzR94J/LgiaUWvR0p8EKGJkKoqzdNU7Vk2DYwB4XPkpyXsDtklCa/a0NLEocIilYUURFMgoqreeI3+C2AwpisPXN7/AEqKHVtnkigMfy0RkxiS4RfJCxkEro9lKAzsQAKlFIpa3WRHyDvXpRfSDtAAoJ5DL9clv2J/0J1P7+P/gNG42uQcCew8Fx78rt6joTGyUtVMDDcqwYl4AWqWuOjSIn0o06H5X49CdU6FHR32SSFicMJ5ESQbtvur/Bzx9SfBDpl8X0BUZDASpGfLtmR613W59lDjz2T92cXlvdJB5Ix1eChP8a6d2URcYLGd/QadIQZt0ec+87/xuWDwsPgHQ9j3sHuf4pcui9HuFwRVFPZuNBaNuFlLqws6K1EKZaHe9AiCP/XfAYjkLijm7GnB+Q/spgLvDCBK8yMU2ffhgcE+P4XGUyBE/jSezD4znyxTFpq9vydQDEb5ms31G49hAoxjba+oeMM6fVey5AFWqWq0+j/rS9EGu7vkNnQuhkGmwi+NBlqOGMeiDasr1FmMtD9H2WctkuqIuXc+2wcizbzsmES4EU7n9n01MZEAMDunbXKBpFQVNghRliAxJqe6oPoqW0kV7O+xmAc2r9Y09YmYp67vky5JcHiOJ6UmQkCBFLN56dq2zCFPKTzwFdSOVeWVLhqwMnVNy15IkYdmoBRrFAEn+ec5WJZ8HkEnclIlHJBFf35Xann3RN96pFOQ/fpITO2AJ3uM/WearpwC02C054sVBnfzddqJqKt7MPn14QkYSyJl+5q6CAAVtOeLkR69RSU2ovvVs1KfYY90+BVbPSJZ7 X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 18:13:18.9712 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ff5dee2-44c7-4adb-4956-08dc99f97c3a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001E9.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7359 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 Exposing ethtool dev_internal_queue_oob counter which counts the number of hairpin dropped packets in xstats. Signed-off-by: Shani Peretz Acked-by: Dariusz Sosnowski --- doc/guides/rel_notes/release_24_07.rst | 1 + drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst index d4efb5be84..c3e4fa5038 100644 --- a/doc/guides/rel_notes/release_24_07.rst +++ b/doc/guides/rel_notes/release_24_07.rst @@ -98,6 +98,7 @@ New Features * Added match with external Tx queue. * Added match with E-Switch manager. * Added flow item and actions validation to async flow API. + * Added global out of buffer counter for hairpin queues. * **Updated TAP driver.** diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index 70bba6c8e0..7995ac6bbc 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -1420,6 +1420,10 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = { .ctr_name = "out_of_buffer", .dev = 1, }, + { + .dpdk_name = "dev_internal_queue_oob", + .ctr_name = "dev_internal_queue_oob", + }, { .dpdk_name = "tx_phy_packets", .ctr_name = "tx_packets_phy",