Skip to content

Commit 6965317

Browse files
committed
libxscale: Add xscale needed kernel headers
This patch adds xscale needed kernel abi headers into the kernel-headers directory. Signed-off-by: Tian Xin <tianx@yunsilicon.com> Signed-off-by: Wei Honggang <weihg@yunsilicon.com> Signed-off-by: Zhao Qianwei <zhaoqw@yunsilicon.com> Signed-off-by: Li Qiang <liq@yunsilicon.com> Signed-off-by: Yan Lei <jacky@yunsilicon.com>
1 parent b47d112 commit 6965317

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

kernel-headers/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ publish_internal_headers(rdma
2626
rdma/rvt-abi.h
2727
rdma/siw-abi.h
2828
rdma/vmw_pvrdma-abi.h
29+
rdma/xsc-abi.h
2930
)
3031

3132
publish_internal_headers(rdma/hfi
@@ -80,6 +81,7 @@ rdma_kernel_provider_abi(
8081
rdma/rdma_user_rxe.h
8182
rdma/siw-abi.h
8283
rdma/vmw_pvrdma-abi.h
84+
rdma/xsc-abi.h
8385
)
8486

8587
publish_headers(infiniband

kernel-headers/rdma/ib_user_ioctl_verbs.h

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ enum rdma_driver_id {
255255
RDMA_DRIVER_SIW,
256256
RDMA_DRIVER_ERDMA,
257257
RDMA_DRIVER_MANA,
258+
RDMA_DRIVER_XSC,
258259
};
259260

260261
enum ib_uverbs_gid_type {

kernel-headers/rdma/xsc-abi.h

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Copyright (c) 2021 - 2022, Shanghai Yunsilicon Technology Co., Ltd.
4+
* All rights reserved.
5+
*/
6+
7+
#ifndef XSC_ABI_USER_H
8+
#define XSC_ABI_USER_H
9+
10+
#include <linux/types.h>
11+
#include <linux/if_ether.h> /* For ETH_ALEN. */
12+
#include <rdma/ib_user_ioctl_verbs.h>
13+
14+
/* Make sure that all structs defined in this file remain laid out so
15+
* that they pack the same way on 32-bit and 64-bit architectures (to
16+
* avoid incompatibility between 32-bit userspace and 64-bit kernels).
17+
* In particular do not use pointer types -- pass pointers in __u64
18+
* instead.
19+
*/
20+
21+
struct xsc_ib_alloc_ucontext_resp {
22+
__u32 qp_tab_size;
23+
__u32 cache_line_size;
24+
__u16 max_sq_desc_sz;
25+
__u16 max_rq_desc_sz;
26+
__u32 max_send_wr;
27+
__u32 max_recv_wr;
28+
__u16 num_ports;
29+
__u16 device_id;
30+
__aligned_u64 qpm_tx_db;
31+
__aligned_u64 qpm_rx_db;
32+
__aligned_u64 cqm_next_cid_reg;
33+
__aligned_u64 cqm_armdb;
34+
__u32 send_ds_num;
35+
__u32 recv_ds_num;
36+
__u32 resv;
37+
};
38+
39+
struct xsc_ib_create_qp {
40+
__aligned_u64 buf_addr;
41+
__aligned_u64 db_addr;
42+
__u32 sq_wqe_count;
43+
__u32 rq_wqe_count;
44+
__u32 rq_wqe_shift;
45+
__u32 flags;
46+
__u32 resv;
47+
};
48+
49+
struct xsc_ib_create_qp_resp {
50+
__u32 bfreg_index;
51+
__u32 resv;
52+
};
53+
54+
struct xsc_ib_create_cq {
55+
__aligned_u64 buf_addr;
56+
__u32 cqe_size;
57+
};
58+
59+
struct xsc_ib_create_cq_resp {
60+
__u32 cqn;
61+
__u32 reserved;
62+
};
63+
64+
struct xsc_ib_create_ah_resp {
65+
__u32 response_length;
66+
__u8 dmac[ETH_ALEN];
67+
__u8 reserved[6];
68+
};
69+
70+
struct xsc_ib_alloc_pd_resp {
71+
__u32 pdn;
72+
};
73+
74+
#endif /* XSC_ABI_USER_H */

libibverbs/verbs.h

+1
Original file line numberDiff line numberDiff line change
@@ -2277,6 +2277,7 @@ extern const struct verbs_device_ops verbs_provider_qedr;
22772277
extern const struct verbs_device_ops verbs_provider_rxe;
22782278
extern const struct verbs_device_ops verbs_provider_siw;
22792279
extern const struct verbs_device_ops verbs_provider_vmw_pvrdma;
2280+
extern const struct verbs_device_ops verbs_provider_xscale;
22802281
extern const struct verbs_device_ops verbs_provider_all;
22812282
extern const struct verbs_device_ops verbs_provider_none;
22822283
void ibv_static_providers(void *unused, ...);

0 commit comments

Comments
 (0)