diff --git a/pyverbs/providers/mlx5/libmlx5.pxd b/pyverbs/providers/mlx5/libmlx5.pxd index 7bcca0ef4..3d5312553 100644 --- a/pyverbs/providers/mlx5/libmlx5.pxd +++ b/pyverbs/providers/mlx5/libmlx5.pxd @@ -44,6 +44,13 @@ cdef extern from 'infiniband/mlx5dv.h': uint8_t log_max_num_deks uint32_t flags + cdef struct mlx5dv_ooo_recv_wrs_caps: + uint32_t max_rc + uint32_t max_xrc + uint32_t max_dct + uint32_t max_ud + uint32_t max_uc + cdef struct mlx5dv_context: unsigned char version unsigned long flags @@ -62,6 +69,7 @@ cdef extern from 'infiniband/mlx5dv.h': size_t max_wr_memcpy_length uint64_t max_dc_rd_atom uint64_t max_dc_init_rd_atom + mlx5dv_ooo_recv_wrs_caps ooo_recv_wrs_caps cdef struct mlx5dv_dci_streams: diff --git a/pyverbs/providers/mlx5/mlx5_enums.pxd b/pyverbs/providers/mlx5/mlx5_enums.pxd index 39996cede..2bd057cd0 100644 --- a/pyverbs/providers/mlx5/mlx5_enums.pxd +++ b/pyverbs/providers/mlx5/mlx5_enums.pxd @@ -49,6 +49,7 @@ cdef extern from 'infiniband/mlx5dv.h': MLX5DV_CONTEXT_MASK_WR_MEMCPY_LENGTH = 1 << 12 MLX5DV_CONTEXT_MASK_CRYPTO_OFFLOAD = 1 << 13 MLX5DV_CONTEXT_MASK_MAX_DC_RD_ATOM = 1 << 14 + MLX5DV_CONTEXT_MASK_OOO_RECV_WRS = 1 << 16 cpdef enum mlx5dv_context_flags: MLX5DV_CONTEXT_FLAGS_CQE_V1 = 1 << 0 @@ -101,6 +102,7 @@ cdef extern from 'infiniband/mlx5dv.h': MLX5DV_QP_CREATE_ALLOW_SCATTER_TO_CQE = 1 << 4 MLX5DV_QP_CREATE_PACKET_BASED_CREDIT_MODE = 1 << 5 MLX5DV_QP_CREATE_SIG_PIPELINING = 1 << 6 + MLX5DV_QP_CREATE_OOO_DP = 1 << 7 cpdef enum mlx5dv_dc_type: MLX5DV_DCTYPE_DCT = 1 diff --git a/pyverbs/providers/mlx5/mlx5dv.pyx b/pyverbs/providers/mlx5/mlx5dv.pyx index b244dd23b..b889c9eed 100644 --- a/pyverbs/providers/mlx5/mlx5dv.pyx +++ b/pyverbs/providers/mlx5/mlx5dv.pyx @@ -313,7 +313,8 @@ cdef class Mlx5Context(Context): dve.MLX5DV_CONTEXT_MASK_DCI_STREAMS |\ dve.MLX5DV_CONTEXT_MASK_WR_MEMCPY_LENGTH |\ dve.MLX5DV_CONTEXT_MASK_CRYPTO_OFFLOAD |\ - dve.MLX5DV_CONTEXT_MASK_MAX_DC_RD_ATOM + dve.MLX5DV_CONTEXT_MASK_MAX_DC_RD_ATOM |\ + dve.MLX5DV_CONTEXT_MASK_OOO_RECV_WRS else: dv_attr.comp_mask = comp_mask rc = dv.mlx5dv_query_device(self.context, &dv_attr.dv) @@ -543,6 +544,10 @@ cdef class Mlx5DVContext(PyverbsObject): def max_dc_init_rd_atom(self): return self.dv.max_dc_init_rd_atom + @property + def ooo_recv_wrs_caps(self): + return self.dv.ooo_recv_wrs_caps + def __str__(self): print_format = '{:20}: {:<20}\n' ident_format = ' {:20}: {:<20}\n' diff --git a/pyverbs/srq.pyx b/pyverbs/srq.pyx index 968c0b45f..e0098e7d0 100644 --- a/pyverbs/srq.pyx +++ b/pyverbs/srq.pyx @@ -250,7 +250,7 @@ cdef class SRQ(PyverbsCM): self.qps = weakref.WeakSet() if isinstance(creator, PD): self._create_srq(creator, attr) - elif type(creator) == Context: + elif isinstance(creator, Context): self._create_srq_ex(creator, attr) else: raise PyverbsRDMAError('Srq needs either Context or PD for creation')