Currently MR operations are Verbs based. This commit updates MR
operations prototypes such that DevX MR operations callbacks can be used
as well. Rename 'struct mlx5_verbs_ops' as 'struct mlx5_mr_ops' and
move it to shared file mlx5.h.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
mlx5_os_set_reg_mr_cb(mlx5_reg_mr_t *reg_mr_cb,
mlx5_dereg_mr_t *dereg_mr_cb)
{
- *reg_mr_cb = mlx5_verbs_ops.reg_mr;
- *dereg_mr_cb = mlx5_verbs_ops.dereg_mr;
+ *reg_mr_cb = mlx5_mr_verbs_ops.reg_mr;
+ *dereg_mr_cb = mlx5_mr_verbs_ops.dereg_mr;
}
/**
}
/* verbs operations. */
-const struct mlx5_verbs_ops mlx5_verbs_ops = {
+const struct mlx5_mr_ops mlx5_mr_verbs_ops = {
.reg_mr = mlx5_reg_mr,
.dereg_mr = mlx5_dereg_mr,
};
#include "mlx5.h"
-struct mlx5_verbs_ops {
- mlx5_reg_mr_t reg_mr;
- mlx5_dereg_mr_t dereg_mr;
-};
-
int mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx);
void mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj);
/* Verbs ops struct */
-extern const struct mlx5_verbs_ops mlx5_verbs_ops;
+extern const struct mlx5_mr_ops mlx5_mr_verbs_ops;
extern struct mlx5_obj_ops ibv_obj_ops;
-
#endif /* RTE_PMD_MLX5_VERBS_H_ */
#define MLX5_RSS_HASH_FIELDS_LEN RTE_DIM(mlx5_rss_hash_fields)
+/* MR operations structure. */
+struct mlx5_mr_ops {
+ mlx5_reg_mr_t reg_mr;
+ mlx5_dereg_mr_t dereg_mr;
+};
+
struct mlx5_priv {
struct rte_eth_dev_data *dev_data; /* Pointer to device data. */
struct mlx5_dev_ctx_shared *sh; /* Shared device context. */