IB/mlx5: Expose dynamic mmap allocation
This patch exposes the option to dynamic allocates a UAR, this functionality will be used in downstream patch in this series as part of QP creation. Specifically, the user space driver asks for a UAR allocation in a given page index, upon success this UAR and its bfregs can be used as part of QP creation by the user space driver. To enable allocating more than 256 UARs the page index is encoded in an extra one byte just after the command byte. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Bu işleme şunda yer alıyor:

işlemeyi yapan:
Jason Gunthorpe

ebeveyn
31a78a5a79
işleme
4ed131d0bb
@@ -77,6 +77,7 @@ enum mlx5_ib_mmap_cmd {
|
||||
MLX5_IB_MMAP_NC_PAGE = 3,
|
||||
/* 5 is chosen in order to be compatible with old versions of libmlx5 */
|
||||
MLX5_IB_MMAP_CORE_CLOCK = 5,
|
||||
MLX5_IB_MMAP_ALLOC_WC = 6,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -112,6 +113,10 @@ enum {
|
||||
MLX5_TM_MAX_SGE = 1,
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_IB_INVALID_UAR_INDEX = BIT(31),
|
||||
};
|
||||
|
||||
struct mlx5_ib_vma_private_data {
|
||||
struct list_head list;
|
||||
struct vm_area_struct *vma;
|
||||
@@ -1021,6 +1026,9 @@ void mlx5_ib_gsi_pkey_change(struct mlx5_ib_gsi_qp *gsi);
|
||||
|
||||
int mlx5_ib_generate_wc(struct ib_cq *ibcq, struct ib_wc *wc);
|
||||
|
||||
void mlx5_ib_free_bfreg(struct mlx5_ib_dev *dev, struct mlx5_bfreg_info *bfregi,
|
||||
int bfregn);
|
||||
|
||||
static inline void init_query_mad(struct ib_smp *mad)
|
||||
{
|
||||
mad->base_version = 1;
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle