From patchwork Thu Jan 16 21:55:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 13942356 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45BA72419F3 for ; Thu, 16 Jan 2025 21:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737064553; cv=none; b=L7ZcOaLf9F1h8KC/qQmufNdFrd5/Qo1BTeeis5n9//aIwvYVEhlqtaps7iP5RwV1q0pDWihe3hE5AtLMGY7JmwEcq6hVdISCQ5BJrMd7AFePs7Ryj0ojpXXvfNbILkwxCQJPjtpOKIvilqoF7il1vksyOTtfS/4D75Yr4hDqNhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737064553; c=relaxed/simple; bh=Wf5GnrHiQaqb1/kvJYQNOcQP9e+ej3XSCEPkodxKUIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KcztKEafXOG9ZjbHdqwJVb7M58xu5u8Rry21E5vc5q3QS15b+b9u7FCBTpOpDKoiFJ7NWoSSMPM3mtE5H0g5bhE4r4LJSBiDT400qq90xFZRIZU12VdjCouQTu9o3cFFbiKWL72yQtNe7/RZpaCj9ZhB3/cNoMCrMkWDc3LXHEs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KKeeXnER; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KKeeXnER" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A641C4CED6; Thu, 16 Jan 2025 21:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737064553; bh=Wf5GnrHiQaqb1/kvJYQNOcQP9e+ej3XSCEPkodxKUIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KKeeXnERn+bqD4mz7GXmX8P8skH66v9soU3u6XRDnshWxw2H/7no4peNZvf2hXwDC 0KnzaaLEewiowhnLGbwHMcuThZW8GwjRUsoG47P5q0GvwkH+Qw/T4OhRLTDZm0vnMz L3o6f3T32HjX1ktsLoah1Rv3zMhxfj2sLWLtiU5JVUCt+HtA0wfjitDeeFe0LjRkuL is4f3YyuhpwiRkgy3V193GJdmTlw79mV9sKU6pKgTxMCwQyLFPzQQtiupgdYhuYaRY N66CrRj50b639OwZE5983Hx7UZga9usgTEWC4n342IFb7aZ4Ct8rwZe2IAyw2iVXG6 jM6nMS9rS7rIA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Gal Pressman , Leon Romanovsky , Dragos Tatulea Subject: [net-next 03/11] net/mlx5e: SHAMPO: Remove redundant params Date: Thu, 16 Jan 2025 13:55:21 -0800 Message-ID: <20250116215530.158886-4-saeed@kernel.org> X-Mailer: git-send-email 2.48.0 In-Reply-To: <20250116215530.158886-1-saeed@kernel.org> References: <20250116215530.158886-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Saeed Mahameed Two SHAMPO params are static and always the same, remove them from the global mlx5e_params struct. Signed-off-by: Saeed Mahameed Reviewed-by: Dragos Tatulea Reviewed-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ---- drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 66c93816803e..18f8c00f4d7f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -274,10 +274,6 @@ enum packet_merge { struct mlx5e_packet_merge_param { enum packet_merge type; u32 timeout; - struct { - u8 match_criteria_type; - u8 alignment_granularity; - } shampo; }; struct mlx5e_params { diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c index 64b62ed17b07..377363eb1faa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c @@ -930,9 +930,9 @@ int mlx5e_build_rq_param(struct mlx5_core_dev *mdev, MLX5_SET(rqc, rqc, reservation_timeout, mlx5e_choose_lro_timeout(mdev, MLX5E_DEFAULT_SHAMPO_TIMEOUT)); MLX5_SET(rqc, rqc, shampo_match_criteria_type, - params->packet_merge.shampo.match_criteria_type); + MLX5_RQC_SHAMPO_MATCH_CRITERIA_TYPE_EXTENDED); MLX5_SET(rqc, rqc, shampo_no_match_alignment_granularity, - params->packet_merge.shampo.alignment_granularity); + MLX5_RQC_SHAMPO_NO_MATCH_ALIGNMENT_GRANULARITY_STRIDE); } break; } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index c687c926cba3..73947df91a33 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4047,10 +4047,6 @@ static int set_feature_hw_gro(struct net_device *netdev, bool enable) if (enable) { new_params.packet_merge.type = MLX5E_PACKET_MERGE_SHAMPO; - new_params.packet_merge.shampo.match_criteria_type = - MLX5_RQC_SHAMPO_MATCH_CRITERIA_TYPE_EXTENDED; - new_params.packet_merge.shampo.alignment_granularity = - MLX5_RQC_SHAMPO_NO_MATCH_ALIGNMENT_GRANULARITY_STRIDE; } else if (new_params.packet_merge.type == MLX5E_PACKET_MERGE_SHAMPO) { new_params.packet_merge.type = MLX5E_PACKET_MERGE_NONE; } else {