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 7C0CA43FB4; Mon, 6 May 2024 13:45:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4CF6402EE; Mon, 6 May 2024 13:44:54 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2065.outbound.protection.outlook.com [40.107.93.65]) by mails.dpdk.org (Postfix) with ESMTP id 0E73B402EE for ; Mon, 6 May 2024 13:44:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nk/0xVekiJQ1ql5lIcROE1NYTwvbbU/etEH3bOAaWSV2/WxZzZ6gqzTwwSr0TYzwyvLj8xPwl7tS2Go7m+KTTTmmH4LuMZjLroJCTHf8XyerNtp44EWxOHYL+WYcgV254Mbvz7D0m+X6hyQ+CSouhZMFH5rNCM8SgGKL2nHyJ1J3xJkesHJqIqspVI3GQo391MZ/ziYThOarRHn1WvR++bYWi2LWxqgdOi4DTulshyXXgA952ATiFPmJcJ2oyY/4It9Dq35dH0GFrji1o/HAMqYjRij5wom2I/3mY/sapCuHAAYln2PKs7Bm8inws3Gh3LaWy6iDQkyuGvQyUvmrKg== 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=cuBzhutTkD9BFus82ufCUwEb6ahUTKmQ7XOjKwoEojg=; b=W5qCFOR3Qq5tgMEAHr0/IEsGwaZJ6uUUHwUtf33OdKSPbmkuDG5i5Y1jrEycnRE0YHB4Ab+Kn0FgnNgnICL0Z+7sOKYYLu2yCn97+MTsQZvtmOo5bkJPlyCMyfGS9dNMQfiA24460o9sfeZOnEMwMTLfwjPNZfUU2ARwczVXUfCD0ZSEh0gv7dhKfibX+HYUaQieUV19eKjeQGPe0dUs072A+C/mk9WE1BBuSDQsvrVwJ93ic+vwjsXnSiocbw1Vhd9CbBnYQ+2mlOUd+JQ1wnmWtdMLCdLekxcsJzngGw9ua33gdsbWxTtQrZ40eQEOZYlH7DpUSwH0wOtayPRx/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=monjalon.net 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=cuBzhutTkD9BFus82ufCUwEb6ahUTKmQ7XOjKwoEojg=; b=MT1Vm7/1KsRUbPKFaTkEnTUSbRCaSNIb6Ox241/EMD9AmGzEoxXeQbBFudh4ByniNJbzYpL1dPr+ogXlWgrr0g2WY9BTv/L5yZj08UuzbL1ZiU1F1bA+p/QW3kjrpNvxnmgV4arC/5eS5t8w2HVQr6mKcrK0Q0gLmlQiyE8dzxTfXF7YUT9/8OcnTkfKznrT2taYbjQXg9/qSa4h+B7m92MpshdgVEUhhSyDY+Q8ihVx9/IW1avg+i/cyjB4bp/OBwi+7j26BvHFBH9PsQc2jHNtdr7drE25xDRYtc6MymcuNqdLeQxW+sXVF7zZulLiJ2YPda8clIebNeacyZAAlg== Received: from PH8PR05CA0021.namprd05.prod.outlook.com (2603:10b6:510:2cc::9) by PH7PR12MB5856.namprd12.prod.outlook.com (2603:10b6:510:1d7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 11:44:49 +0000 Received: from CY4PEPF0000E9D7.namprd05.prod.outlook.com (2603:10b6:510:2cc:cafe::4e) by PH8PR05CA0021.outlook.office365.com (2603:10b6:510:2cc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42 via Frontend Transport; Mon, 6 May 2024 11:44:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CY4PEPF0000E9D7.mail.protection.outlook.com (10.167.241.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Mon, 6 May 2024 11:44:49 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 6 May 2024 04:44:40 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 6 May 2024 04:44:40 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.182) 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, 6 May 2024 04:44:37 -0700 From: Itamar Gozlan To: , , , , , , , Dariusz Sosnowski , Ori Kam , Matan Azrad CC: Subject: [v2 04/16] net/mlx5/hws: remove unused capabilities and fields Date: Mon, 6 May 2024 14:44:07 +0300 Message-ID: <20240506114419.966498-4-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240506114419.966498-1-igozlan@nvidia.com> References: <20240314114220.203241-1-igozlan@nvidia.com> <20240506114419.966498-1-igozlan@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D7:EE_|PH7PR12MB5856:EE_ X-MS-Office365-Filtering-Correlation-Id: 027e55ba-9a20-4a24-663e-08dc6dc1ef7e X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|376005|1800799015|82310400017|921011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?byB+tcmQJ2nTPK2rWDQxn8F5VgYNZqmfvo388bCgcZDV1XLDuDpPvBdnCLeF?= =?us-ascii?Q?TsUe+GqHCC9l0cum+k7FyrUtCQRg4fIYzO2b9iuamzvw/td5hD0HN5sdj2J8?= =?us-ascii?Q?pnf+60mmYjKHZl/p9nsfXMhCj4Df02yX6xVHAsgUckhbLe+DbCvt6c0vkZ7U?= =?us-ascii?Q?pi6JDQTwuVPuBY0bJIF5w+IZp/aZUtNvri98YUw4v1AmrHpWLrhwRApLt7uK?= =?us-ascii?Q?l0OdU1b7n0IAVL+NwKmRsaZywy47/i5TUdDxkI0NyMfc8oQLenhzPuSz553t?= =?us-ascii?Q?P70wtnLYo52S7UX9g+dMiZfVz15LTvtF40J6ECx2mFq24f4Ve4BNGPKkLstQ?= =?us-ascii?Q?C8Ngdv2HSQBJidxfN4atrdMXZOlRde2zi6ZQY1xqj4Ke9DUObwNT+L2UY304?= =?us-ascii?Q?2SXc5k5izPE153kSd3d5AgHKdErilc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0q96yYJJ53D0ntRuQwLdtxqT6GFY4YKSTX7W3sg0/JVm5+7Jr4HZmpg?= =?us-ascii?Q?X4FHHLM2tkc4RYkoHWR5QXTxwmLE?= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(1800799015)(82310400017)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 11:44:49.2828 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 027e55ba-9a20-4a24-663e-08dc6dc1ef7e 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.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D7.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5856 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 From: Yevgeny Kliteynik The following caps were never in use: - wire_regc - metadata_c - metadata_c_mask Also send ring's reg_addr field wasn't in use. Removing these caps and fields from structs and removing the code that queried them. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_cmd.c | 11 ++--------- drivers/net/mlx5/hws/mlx5dr_cmd.h | 3 --- drivers/net/mlx5/hws/mlx5dr_send.c | 1 - drivers/net/mlx5/hws/mlx5dr_send.h | 1 - 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c index 0e0cc479a6..666d678b42 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.c +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c @@ -1344,12 +1344,10 @@ int mlx5dr_cmd_query_caps(struct ibv_context *ctx, strlcpy(caps->fw_ver, attr_ex.orig_attr.fw_ver, sizeof(caps->fw_ver)); port_info = flow_hw_get_wire_port(ctx); - if (port_info) { - caps->wire_regc = port_info->regc_value; + if (port_info) caps->wire_regc_mask = port_info->regc_mask; - } else { + else DR_LOG(INFO, "Failed to query wire port regc value"); - } return ret; } @@ -1374,10 +1372,5 @@ int mlx5dr_cmd_query_ib_port(struct ibv_context *ctx, vport_caps->vport_num = port_info.vport_id; vport_caps->esw_owner_vhca_id = port_info.esw_owner_vhca_id; - if (port_info.query_flags & MLX5_PORT_QUERY_REG_C0) { - vport_caps->metadata_c = port_info.vport_meta_tag; - vport_caps->metadata_c_mask = port_info.vport_meta_mask; - } - return 0; } diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.h b/drivers/net/mlx5/hws/mlx5dr_cmd.h index 9d385fc57f..ea5d346d8e 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.h +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.h @@ -194,8 +194,6 @@ struct mlx5dr_cmd_query_ft_caps { struct mlx5dr_cmd_query_vport_caps { uint16_t vport_num; uint16_t esw_owner_vhca_id; - uint32_t metadata_c; - uint32_t metadata_c_mask; }; struct mlx5dr_cmd_generate_wqe_attr { @@ -207,7 +205,6 @@ struct mlx5dr_cmd_generate_wqe_attr { }; struct mlx5dr_cmd_query_caps { - uint32_t wire_regc; uint32_t wire_regc_mask; uint32_t flex_protocols; uint8_t wqe_based_update; diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c index f749401c6f..d58fdb108f 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.c +++ b/drivers/net/mlx5/hws/mlx5dr_send.c @@ -729,7 +729,6 @@ static int mlx5dr_send_ring_open_sq(struct mlx5dr_context *ctx, buf_sz = queue->num_entries * MAX_WQES_PER_RULE; sq_log_buf_sz = log2above(buf_sz); sq_buf_sz = 1 << (sq_log_buf_sz + log2above(MLX5_SEND_WQE_BB)); - sq->reg_addr = queue->uar->reg_addr; page_size = sysconf(_SC_PAGESIZE); buf_aligned = align(sq_buf_sz, page_size); diff --git a/drivers/net/mlx5/hws/mlx5dr_send.h b/drivers/net/mlx5/hws/mlx5dr_send.h index 0c89faa8a7..48593adbed 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.h +++ b/drivers/net/mlx5/hws/mlx5dr_send.h @@ -114,7 +114,6 @@ struct mlx5dr_send_ring_sq { char *buf; uint32_t sqn; __be32 *db; - void *reg_addr; uint16_t cur_post; uint16_t buf_mask; struct mlx5dr_send_ring_priv *wr_priv; -- 2.39.3