1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright 2020 Mellanox Technologies, Ltd 3 */ 4 5 #ifndef RTE_PMD_MLX5_COMMON_DEVX_H_ 6 #define RTE_PMD_MLX5_COMMON_DEVX_H_ 7 8 #include "mlx5_devx_cmds.h" 9 10 /* DevX Completion Queue structure. */ 11 struct mlx5_devx_cq { 12 struct mlx5_devx_obj *cq; /* The CQ DevX object. */ 13 void *umem_obj; /* The CQ umem object. */ 14 union { 15 volatile void *umem_buf; 16 volatile struct mlx5_cqe *cqes; /* The CQ ring buffer. */ 17 }; 18 volatile uint32_t *db_rec; /* The CQ doorbell record. */ 19 }; 20 21 /* mlx5_common_devx.c */ 22 23 __rte_internal 24 void mlx5_devx_cq_destroy(struct mlx5_devx_cq *cq); 25 26 __rte_internal 27 int mlx5_devx_cq_create(void *ctx, struct mlx5_devx_cq *cq_obj, 28 uint16_t log_desc_n, struct mlx5_devx_cq_attr *attr, 29 int socket); 30 31 #endif /* RTE_PMD_MLX5_COMMON_DEVX_H_ */ 32