mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 03:06:50 -04:00
net/mlx5e: SHAMPO: Remove redundant params
Two SHAMPO params are static and always the same, remove them from the global mlx5e_params struct. Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Mark Bloch <mbloch@nvidia.com> Link: https://patch.msgid.link/20250616141441.1243044-6-mbloch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
af4312c4c9
commit
16142defd3
@@ -278,10 +278,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 {
|
||||
|
||||
@@ -901,6 +901,7 @@ int mlx5e_build_rq_param(struct mlx5_core_dev *mdev,
|
||||
{
|
||||
void *rqc = param->rqc;
|
||||
void *wq = MLX5_ADDR_OF(rqc, rqc, wq);
|
||||
u32 lro_timeout;
|
||||
int ndsegs = 1;
|
||||
int err;
|
||||
|
||||
@@ -926,22 +927,25 @@ int mlx5e_build_rq_param(struct mlx5_core_dev *mdev,
|
||||
MLX5_SET(wq, wq, log_wqe_stride_size,
|
||||
log_wqe_stride_size - MLX5_MPWQE_LOG_STRIDE_SZ_BASE);
|
||||
MLX5_SET(wq, wq, log_wq_sz, mlx5e_mpwqe_get_log_rq_size(mdev, params, xsk));
|
||||
if (params->packet_merge.type == MLX5E_PACKET_MERGE_SHAMPO) {
|
||||
MLX5_SET(wq, wq, shampo_enable, true);
|
||||
MLX5_SET(wq, wq, log_reservation_size,
|
||||
mlx5e_shampo_get_log_rsrv_size(mdev, params));
|
||||
MLX5_SET(wq, wq,
|
||||
log_max_num_of_packets_per_reservation,
|
||||
mlx5e_shampo_get_log_pkt_per_rsrv(mdev, params));
|
||||
MLX5_SET(wq, wq, log_headers_entry_size,
|
||||
mlx5e_shampo_get_log_hd_entry_size(mdev, params));
|
||||
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_SET(rqc, rqc, shampo_no_match_alignment_granularity,
|
||||
params->packet_merge.shampo.alignment_granularity);
|
||||
}
|
||||
if (params->packet_merge.type != MLX5E_PACKET_MERGE_SHAMPO)
|
||||
break;
|
||||
|
||||
MLX5_SET(wq, wq, shampo_enable, true);
|
||||
MLX5_SET(wq, wq, log_reservation_size,
|
||||
mlx5e_shampo_get_log_rsrv_size(mdev, params));
|
||||
MLX5_SET(wq, wq,
|
||||
log_max_num_of_packets_per_reservation,
|
||||
mlx5e_shampo_get_log_pkt_per_rsrv(mdev, params));
|
||||
MLX5_SET(wq, wq, log_headers_entry_size,
|
||||
mlx5e_shampo_get_log_hd_entry_size(mdev, params));
|
||||
lro_timeout =
|
||||
mlx5e_choose_lro_timeout(mdev,
|
||||
MLX5E_DEFAULT_SHAMPO_TIMEOUT);
|
||||
MLX5_SET(rqc, rqc, reservation_timeout, lro_timeout);
|
||||
MLX5_SET(rqc, rqc, shampo_match_criteria_type,
|
||||
MLX5_RQC_SHAMPO_MATCH_CRITERIA_TYPE_EXTENDED);
|
||||
MLX5_SET(rqc, rqc, shampo_no_match_alignment_granularity,
|
||||
MLX5_RQC_SHAMPO_NO_MATCH_ALIGNMENT_GRANULARITY_STRIDE);
|
||||
break;
|
||||
}
|
||||
default: /* MLX5_WQ_TYPE_CYCLIC */
|
||||
|
||||
@@ -4040,10 +4040,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 {
|
||||
|
||||
Reference in New Issue
Block a user