Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the frame of hns direct verbs, including hnsdv_is_supported(), hnsdv_create_qp() and hnsdv_query_device(). Signed-off-by: Junxian Huang <[email protected]>
- Loading branch information
Junxian Huang
authored and
Junxian Huang
committed
Mar 5, 2024
1 parent
2ecc81c
commit cf6d914
Showing
13 changed files
with
171 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
etc/libibverbs.d/ | ||
usr/lib/*/libefa.so.* | ||
usr/lib/*/libibverbs/lib*-rdmav*.so | ||
usr/lib/*/libhns.so.* | ||
usr/lib/*/libmana.so.* | ||
usr/lib/*/libmlx4.so.* | ||
usr/lib/*/libmlx5.so.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# libefa, libmana, libmlx4 and libmlx5 are ibverbs provider that provides more functions. | ||
ibverbs-providers: package-name-doesnt-match-sonames libefa1 libmana1 libmlx4-1 libmlx5-1 | ||
# libefa, libhns, libmana, libmlx4 and libmlx5 are ibverbs provider that provides more functions. | ||
ibverbs-providers: package-name-doesnt-match-sonames libefa1 libhns-1 libmana1 libmlx4-1 libmlx5-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
rdma_provider(hns | ||
rdma_shared_provider(hns libhns.map | ||
1 1.0.${PACKAGE_VERSION} | ||
hns_roce_u.c | ||
hns_roce_u_buf.c | ||
hns_roce_u_db.c | ||
hns_roce_u_hw_v2.c | ||
hns_roce_u_verbs.c | ||
) | ||
|
||
publish_headers(infiniband | ||
hnsdv.h | ||
) | ||
|
||
rdma_pkg_config("hns" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ | ||
/* | ||
* Copyright (c) 2024 Hisilicon Limited. | ||
*/ | ||
|
||
#ifndef __HNSDV_H__ | ||
#define __HNSDV_H__ | ||
|
||
#include <stdio.h> | ||
#include <stdbool.h> | ||
#include <sys/types.h> | ||
#include <infiniband/verbs.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
struct hnsdv_qp_init_attr { | ||
uint64_t comp_mask; | ||
}; | ||
|
||
struct hnsdv_context { | ||
uint64_t comp_mask; | ||
}; | ||
|
||
bool hnsdv_is_supported(struct ibv_device *device); | ||
int hnsdv_query_device(struct ibv_context *ctx_in, | ||
struct hnsdv_context *attrs_out); | ||
struct ibv_qp *hnsdv_create_qp(struct ibv_context *context, | ||
struct ibv_qp_init_attr_ex *qp_attr, | ||
struct hnsdv_qp_init_attr *hns_qp_attr); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __HNSDV_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* Export symbols should be added below according to | ||
Documentation/versioning.md document. */ | ||
HNS_1.0 { | ||
global: | ||
hnsdv_is_supported; | ||
hnsdv_create_qp; | ||
hnsdv_query_device; | ||
local: *; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters