Commit d1c46ed8 authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Konrad Sztyber
Browse files

lib/rdma_provider: Add API to check if accel seq supported



verbs provider doesn't support accel sequence
mlx5_dv provider supports accel sequence if a module
which implements UMR is registered, i.e. accel_mlx5 driver
is registered

Signed-off-by: default avatarAlexey Marchuk <alexeymar@nvidia.com>
Change-Id: I59944aceb22661f9de3198ecd571b1a73af28584
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24701


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
parent a59d7e01
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -194,4 +194,6 @@ bool spdk_rdma_provider_qp_queue_recv_wrs(struct spdk_rdma_provider_qp *spdk_rdm
int spdk_rdma_provider_qp_flush_recv_wrs(struct spdk_rdma_provider_qp *spdk_rdma_qp,
		struct ibv_recv_wr **bad_wr);

bool spdk_rdma_provider_accel_sequence_supported(void);

#endif /* SPDK_RDMA_H */
+12 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include "spdk/dma.h"

#include "spdk_internal/rdma_provider.h"
#include "spdk_internal/mlx5.h"
#include "spdk/log.h"
#include "spdk/util.h"

@@ -140,6 +141,11 @@ spdk_rdma_provider_qp_create(struct rdma_cm_id *cm_id,
		return NULL;
	}
	if (qp_attr->domain_transfer) {
		if (!spdk_rdma_provider_accel_sequence_supported()) {
			SPDK_ERRLOG("Data transfer functionality is not supported\n");
			spdk_rdma_provider_qp_destroy(&mlx5_qp->common);
			return NULL;
		}
		spdk_memory_domain_set_data_transfer(mlx5_qp->common.domain, qp_attr->domain_transfer);
	}

@@ -332,3 +338,9 @@ spdk_rdma_provider_qp_flush_send_wrs(struct spdk_rdma_provider_qp *spdk_rdma_qp,

	return rc;
}

bool
spdk_rdma_provider_accel_sequence_supported(void)
{
	return spdk_mlx5_umr_implementer_is_registered();
}
+6 −0
Original line number Diff line number Diff line
@@ -181,3 +181,9 @@ spdk_rdma_provider_qp_flush_send_wrs(struct spdk_rdma_provider_qp *spdk_rdma_qp,

	return rc;
}

bool
spdk_rdma_provider_accel_sequence_supported(void)
{
	return false;
}
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
	spdk_rdma_provider_qp_flush_send_wrs;
	spdk_rdma_provider_qp_queue_recv_wrs;
	spdk_rdma_provider_qp_flush_recv_wrs;
	spdk_rdma_provider_accel_sequence_supported;

	local: *;
};
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ DEPDIRS-json := log util
DEPDIRS-rdma_utils := dma log util
DEPDIRS-rdma_provider := log util rdma_utils
ifeq ($(CONFIG_RDMA_PROV),mlx5_dv)
DEPDIRS-rdma_provider += dma
DEPDIRS-rdma_provider += dma mlx5
endif
DEPDIRS-reduce := log util
DEPDIRS-thread := log util trace
Loading