net/mlx5: prepare MR prototypes for DevX
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>
This commit is contained in:
parent
1969ee4244
commit
db12615b42
@ -2478,8 +2478,8 @@ void
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,7 +62,7 @@ mlx5_dereg_mr(struct mlx5_pmd_mr *pmd_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,
|
||||
};
|
||||
|
@ -7,16 +7,10 @@
|
||||
|
||||
#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_ */
|
||||
|
@ -917,6 +917,12 @@ struct mlx5_obj_ops {
|
||||
|
||||
#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. */
|
||||
|
Loading…
Reference in New Issue
Block a user