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 4129743CA5; Thu, 14 Mar 2024 12:43:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3504442EAD; Thu, 14 Mar 2024 12:43:23 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2061.outbound.protection.outlook.com [40.107.243.61]) by mails.dpdk.org (Postfix) with ESMTP id 8EE8D42E89 for ; Thu, 14 Mar 2024 12:43:14 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qjja3TLrB1Ozz/6WrsocOylTWcQSJwba7hXj6fYtiSCAKZUDm1U4pGcuhcrqODwSbhtV1NKLbZPxRbK6G7X/sTR0IvfyMlvWtNCvUSlaQcERs4cil7AniK5p3ZzUH2kCV9GylvsCLXzPkufwuodjFFi4E8SAHBRk3FxiTjEYD6jPoVNw+kTHQ19P9LOiHslcrhW2P+1hSS9JZ4HN9fB2eTCv+9567He24Izooob8igwzfVUhHj4evRj03RbOyp22IZ3JrCgDXi6LfhRU6d91pikK9/FZoI1mTNbunYEKWUSqmw84CKweg2ibFECY+zQg73Ap6RhLePCHeHhCvBxgyQ== 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=FdKGXJiOivlFr3NhoFBR5pHCyhXgSEK+PcNfy/1DxTCsLQ+O8IslhSvU7MtXHzArBGGfnAv40RetEUOFauzyvrayx/n23zj+rr1pr1mDdpmAncLapEMBbJCvK/NBXxdAh/xG7z94gWMhAStYxZGxVQiEeooayvkmrGvUkXVfIKSB8bpVhSB/eisuK0W+n5ArYHhuVkd3Tvm5gxC86cgQwa+1tG0ytBge4xQwRl2fTQCagnNSrp37kFBcBW6XRDPKqK9Z46aHehQtFIgQLe/CSR7ENQXmK77P+2Ml9JT61GioE3uP+Z20LmslJO8D6Qa5x2igk5Q+2mcfSL2zvj95mg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=AidvcTQuE/T6i8poly+HeH1rftly+rfeRIv15x8w4/EL7FdPogKiWBda5Gm4QJDA+Zn5V3LMjA6R6eF2q1Ch2UdNduyctxAKmLhfwpIuffqgwzw/GLxTCdd/vPI8+pY2vJ1PtCoSeHbyE8F9whej+q8s3DYUSiAqWH4ToxT/T3XXswZh9TD8Dw5khVp51+C2C96ZCFDD1EDXsgFN6uHVWvjnloz1P5AGzmX15FCLaOEnZBhL7NsPap0ynZXmnqnV3jiKrd4+d7ZnH7y2s5se4VsT2msXVEi+GXXvgnnLTByuxAot0lvqZxwVBnwy5jB1gDWZ4+92Vc4BDayrsHDGpw== Received: from CH2PR11CA0027.namprd11.prod.outlook.com (2603:10b6:610:54::37) by SA3PR12MB8021.namprd12.prod.outlook.com (2603:10b6:806:305::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21; Thu, 14 Mar 2024 11:43:11 +0000 Received: from CH3PEPF0000000C.namprd04.prod.outlook.com (2603:10b6:610:54:cafe::98) by CH2PR11CA0027.outlook.office365.com (2603:10b6:610:54::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.36 via Frontend Transport; Thu, 14 Mar 2024 11:43:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH3PEPF0000000C.mail.protection.outlook.com (10.167.244.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.12 via Frontend Transport; Thu, 14 Mar 2024 11:43:10 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 14 Mar 2024 04:42:59 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 14 Mar 2024 04:42:59 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12 via Frontend Transport; Thu, 14 Mar 2024 04:42:56 -0700 From: Itamar Gozlan To: , , , , , , , Dariusz Sosnowski , Ori Kam , Suanming Mou , Matan Azrad CC: , Subject: [PATCH 04/13] net/mlx5/hws: remove unused capabilities and fields Date: Thu, 14 Mar 2024 13:42:11 +0200 Message-ID: <20240314114220.203241-4-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240314114220.203241-1-igozlan@nvidia.com> References: <20240314114220.203241-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: CH3PEPF0000000C:EE_|SA3PR12MB8021:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c42c8dc-8b03-42d1-5f65-08dc441becf5 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; X-Microsoft-Antispam-Message-Info: akXHCfK2fZhieMSud2G9bPyI7akLZRbYCw+ifbMbAlhFjG1/euzMGalhnrcBJlBWd7iO/D8kcnPvnloi0KyyHX1Hqwu46XupfQ4pMEKL1AJwz4l/yysgEKNgZMb2cqEVfnyEfPAlt83QIfkdxrsPB6DY1Z7o3ibUPKvUWuk5QYQ+akrjTd20pFXIMQk7/G5NhbzmdPyz22oHwq7yDeRoBe+DwxXe0UPRoKU97xqU+SPfXNlt2+uJ/WcnQsnO4DK8pc1m1lKOLUysiTl43l9DErQZe0bzle4RA2WpK+581cK+92YeGVuf83It5LESYv1pLnbABiuGfdfkEByhLdWCQ7tkO2EGqbRs6GOc323tZOFdNpxrddYl1hKMlSUZDTh+ANsS7/CR9eU5DWYdw+YS9z6SGPW5+A1eSXzWUITcZFD7vC7WZkr/T8fvmTu8IZo7n17DSMRCc/QyglimzQ19fgAfLFT2In7D/7ClcaADUEXWi9LRkqHShfbJEGGrIEGUwMdcqMceVq8M76O5k7LboqNb1xvNJsQncoHpFf9XC33qlDyvqjRltEGK3i9ZCYdtCCxD34SpbbJU6lRCfCoUe3rhb5IU2Cj/JhtAiBAWFP4t4TQHZxn8mLpVMtkJCUJI2kBD60f127+VwI956DkpCAmcyU1VVi2Uo1vPlYIiQcCFEI1yC743PHowUzwUpYaPM2IfhApUs86eGfMHmWOakwOcX7gda5EWph9emqfIjsKX846dIF8ktjot4BgLNCXeWewA8mp96EyErjwaDi2e/Q== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2024 11:43:10.8514 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c42c8dc-8b03-42d1-5f65-08dc441becf5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF0000000C.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8021 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