]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5e: Expose and rename xsk channel parameter function
authorDragos Tatulea <dtatulea@nvidia.com>
Mon, 23 Feb 2026 20:41:44 +0000 (22:41 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 26 Feb 2026 09:54:23 +0000 (10:54 +0100)
mlx5e_build_xsk_cparam() is meant to be the alternative
to mlx5e_build_channel_param(). It calculates only the parameters
that it requires using the previously configured mlx5e_xsk_param.

Move this function to params.c to be alongside
mlx5e_build_channel_param() and give it a similar name.

Expose the function as it will be needed by upcoming changes.

This patch has no functional changes.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260223204155.1783580-5-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c
drivers/net/ethernet/mellanox/mlx5/core/en/params.h
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c

index be1aa37531deb64c76ec551253d835174d431dcc..4d51fad7d9ebcc47582c821cbe24b8a499e138ff 100644 (file)
@@ -1272,3 +1272,12 @@ int mlx5e_build_channel_param(struct mlx5_core_dev *mdev,
 
        return 0;
 }
+
+void mlx5e_build_xsk_channel_param(struct mlx5_core_dev *mdev,
+                                  struct mlx5e_params *params,
+                                  struct mlx5e_xsk_param *xsk,
+                                  struct mlx5e_channel_param *cparam)
+{
+       mlx5e_build_rq_param(mdev, params, xsk, &cparam->rq);
+       mlx5e_build_xdpsq_param(mdev, params, &cparam->xdp_sq);
+}
index 00617c65fe3cd5e12b017ff6a5386e6cf678996f..26680985ee39e7ed606a32ea70d0f6e1de4915ab 100644 (file)
@@ -138,6 +138,11 @@ int mlx5e_build_channel_param(struct mlx5_core_dev *mdev,
                              struct mlx5e_params *params,
                              struct mlx5e_channel_param *cparam);
 
+void mlx5e_build_xsk_channel_param(struct mlx5_core_dev *mdev,
+                                  struct mlx5e_params *params,
+                                  struct mlx5e_xsk_param *xsk,
+                                  struct mlx5e_channel_param *cparam);
+
 u16 mlx5e_calc_sq_stop_room(struct mlx5_core_dev *mdev, struct mlx5e_params *params);
 int mlx5e_validate_params(struct mlx5_core_dev *mdev, struct mlx5e_params *params);
 bool mlx5e_verify_params_rx_mpwqe_strides(struct mlx5_core_dev *mdev,
index 50c14ad29ed65e44c0969dc8ca17ad319b21a06c..e3b7e79863ae55111117c8b2b0868aa987895c14 100644 (file)
@@ -48,15 +48,6 @@ bool mlx5e_validate_xsk_param(struct mlx5e_params *params,
        }
 }
 
-static void mlx5e_build_xsk_cparam(struct mlx5_core_dev *mdev,
-                                  struct mlx5e_params *params,
-                                  struct mlx5e_xsk_param *xsk,
-                                  struct mlx5e_channel_param *cparam)
-{
-       mlx5e_build_rq_param(mdev, params, xsk, &cparam->rq);
-       mlx5e_build_xdpsq_param(mdev, params, &cparam->xdp_sq);
-}
-
 static int mlx5e_init_xsk_rq(struct mlx5e_channel *c,
                             struct mlx5e_params *params,
                             struct xsk_buff_pool *pool,
@@ -130,7 +121,7 @@ int mlx5e_open_xsk(struct mlx5e_priv *priv, struct mlx5e_params *params,
        if (!cparam)
                return -ENOMEM;
 
-       mlx5e_build_xsk_cparam(priv->mdev, params, xsk, cparam);
+       mlx5e_build_xsk_channel_param(priv->mdev, params, xsk, cparam);
 
        err = mlx5e_open_cq(c->mdev, params->rx_cq_moderation, &cparam->rq.cqp, &ccp,
                            &c->xskrq.cq);