History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma updates from Jason Gunthorpe: "Usual size of updates, a new driver, and most of the bulk focusing on rxe: - Usual typos, style, and language updates - Driver updates for mlx5, irdma, siw, rts, srp, hfi1, hns, erdma, mlx4, srp - Lots of RXE updates: * Improve reply error handling for bad MR operations * Code tidying * Debug printing uses common loggers * Remove half implemented RD related stuff * Support IBA's recently defined Atomic Write and Flush operations - erdma support for atomic operations - New driver 'mana' for Ethernet HW available in Azure VMs. This driver only supports DPDK" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (122 commits) IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces RDMA: Add missed netdev_put() for the netdevice_tracker RDMA/rxe: Enable RDMA FLUSH capability for rxe device RDMA/cm: Make QP FLUSHABLE for supported device RDMA/rxe: Implement flush completion RDMA/rxe: Implement flush execution in responder side RDMA/rxe: Implement RC RDMA FLUSH service in requester side RDMA/rxe: Extend rxe packet format to support flush RDMA/rxe: Allow registering persistent flag for pmem MR only RDMA/rxe: Extend rxe user ABI to support flush RDMA: Extend RDMA kernel verbs ABI to support flush RDMA: Extend RDMA user ABI to support flush RDMA/rxe: Fix incorrect responder length checking RDMA/rxe: Fix oops with zero length reads RDMA/mlx5: Remove not-used IB_FLOW_SPEC_IB define RDMA/hns: Fix XRC caps on HIP08 RDMA/hns: Fix error code of CMD RDMA/hns: Fix page size cap from firmware RDMA/hns: Fix PBL page MTR find RDMA/hns: Fix AH attr queried by query_qp ...

Linus Torvalds committed 3 years ago

Commit ab425fe2 parents 08cdc21 dbc94a099 files · +3621 −897Browse files

Showing the changes to include/uapi (5 of 99 files). Show all

Unified · Split

5 files
  1. include/uapi/rdma/hns-abi.h +15 −0
  2. include/uapi/rdma/ib_user_ioctl_verbs.h +3 −0
  3. include/uapi/rdma/ib_user_verbs.h +21 −0
  4. include/uapi/rdma/mana-abi.h +66 −0
  5. include/uapi/rdma/rdma_user_rxe.h +8 −0
include/uapi/rdma/hns-abi.h+15−0
@@ -85,11 +85,26 @@ struct hns_roce_ib_create_qp_resp { · 84 unmodified lines
8585 __aligned_u64 dwqe_mmap_key;
8686 };
8787
88+enum {
89+ HNS_ROCE_EXSGE_FLAGS = 1 << 0,
90+};
91+
92+enum {
93+ HNS_ROCE_RSP_EXSGE_FLAGS = 1 << 0,
94+};
95+
8896 struct hns_roce_ib_alloc_ucontext_resp {
8997 __u32 qp_tab_size;
9098 __u32 cqe_size;
9199 __u32 srq_tab_size;
92100 __u32 reserved;
101+ __u32 config;
102+ __u32 max_inline_data;
103+};
104+
105+struct hns_roce_ib_alloc_ucontext {
106+ __u32 config;
107+ __u32 reserved;
93108 };
94109
95110 struct hns_roce_ib_alloc_pd_resp {
include/uapi/rdma/ib_user_ioctl_verbs.h+3−0
@@ -57,6 +57,8 @@ enum ib_uverbs_access_flags { · 56 unmodified lines
5757 IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5,
5858 IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6,
5959 IB_UVERBS_ACCESS_HUGETLB = 1 << 7,
60+ IB_UVERBS_ACCESS_FLUSH_GLOBAL = 1 << 8,
61+ IB_UVERBS_ACCESS_FLUSH_PERSISTENT = 1 << 9,
6062
6163 IB_UVERBS_ACCESS_RELAXED_ORDERING = IB_UVERBS_ACCESS_OPTIONAL_FIRST,
6264 IB_UVERBS_ACCESS_OPTIONAL_RANGE =
@@ -251,6 +253,7 @@ enum rdma_driver_id { · 188 unmodified lines
251253 RDMA_DRIVER_EFA,
252254 RDMA_DRIVER_SIW,
253255 RDMA_DRIVER_ERDMA,
256+ RDMA_DRIVER_MANA,
254257 };
255258
256259 enum ib_uverbs_gid_type {
include/uapi/rdma/ib_user_verbs.h+21−0
@@ -105,6 +105,18 @@ enum { · 104 unmodified lines
105105 IB_USER_VERBS_EX_CMD_MODIFY_CQ
106106 };
107107
108+/* see IBA A19.4.1.1 Placement Types */
109+enum ib_placement_type {
110+ IB_FLUSH_GLOBAL = 1U << 0,
111+ IB_FLUSH_PERSISTENT = 1U << 1,
112+};
113+
114+/* see IBA A19.4.1.2 Selectivity Level */
115+enum ib_selectivity_level {
116+ IB_FLUSH_RANGE = 0,
117+ IB_FLUSH_MR,
118+};
119+
108120 /*
109121 * Make sure that all structs defined in this file remain laid out so
110122 * that they pack the same way on 32-bit and 64-bit architectures (to
@@ -466,6 +478,8 @@ enum ib_uverbs_wc_opcode { · 355 unmodified lines
466478 IB_UVERBS_WC_BIND_MW = 5,
467479 IB_UVERBS_WC_LOCAL_INV = 6,
468480 IB_UVERBS_WC_TSO = 7,
481+ IB_UVERBS_WC_FLUSH = 8,
482+ IB_UVERBS_WC_ATOMIC_WRITE = 9,
469483 };
470484
471485 struct ib_uverbs_wc {
@@ -784,6 +798,8 @@ enum ib_uverbs_wr_opcode { · 312 unmodified lines
784798 IB_UVERBS_WR_RDMA_READ_WITH_INV = 11,
785799 IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12,
786800 IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13,
801+ IB_UVERBS_WR_FLUSH = 14,
802+ IB_UVERBS_WR_ATOMIC_WRITE = 15,
787803 /* Review enum ib_wr_opcode before modifying this */
788804 };
789805
@@ -1331,6 +1347,11 @@ enum ib_uverbs_device_cap_flags { · 541 unmodified lines
13311347 /* Deprecated. Please use IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS. */
13321348 IB_UVERBS_DEVICE_RAW_SCATTER_FCS = 1ULL << 34,
13331349 IB_UVERBS_DEVICE_PCI_WRITE_END_PADDING = 1ULL << 36,
1350+ /* Flush placement types */
1351+ IB_UVERBS_DEVICE_FLUSH_GLOBAL = 1ULL << 38,
1352+ IB_UVERBS_DEVICE_FLUSH_PERSISTENT = 1ULL << 39,
1353+ /* Atomic write attributes */
1354+ IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40,
13341355 };
13351356
13361357 enum ib_uverbs_raw_packet_caps {
include/uapi/rdma/mana-abi.h+66−0
@@ -0,0 +1,66 @@
1+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
2+/*
3+ * Copyright (c) 2022, Microsoft Corporation. All rights reserved.
4+ */
5+
6+#ifndef MANA_ABI_USER_H
7+#define MANA_ABI_USER_H
8+
9+#include <linux/types.h>
10+#include <rdma/ib_user_ioctl_verbs.h>
11+
12+/*
13+ * Increment this value if any changes that break userspace ABI
14+ * compatibility are made.
15+ */
16+
17+#define MANA_IB_UVERBS_ABI_VERSION 1
18+
19+struct mana_ib_create_cq {
20+ __aligned_u64 buf_addr;
21+};
22+
23+struct mana_ib_create_qp {
24+ __aligned_u64 sq_buf_addr;
25+ __u32 sq_buf_size;
26+ __u32 port;
27+};
28+
29+struct mana_ib_create_qp_resp {
30+ __u32 sqid;
31+ __u32 cqid;
32+ __u32 tx_vp_offset;
33+ __u32 reserved;
34+};
35+
36+struct mana_ib_create_wq {
37+ __aligned_u64 wq_buf_addr;
38+ __u32 wq_buf_size;
39+ __u32 reserved;
40+};
41+
42+/* RX Hash function flags */
43+enum mana_ib_rx_hash_function_flags {
44+ MANA_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
45+};
46+
47+struct mana_ib_create_qp_rss {
48+ __aligned_u64 rx_hash_fields_mask;
49+ __u8 rx_hash_function;
50+ __u8 reserved[7];
51+ __u32 rx_hash_key_len;
52+ __u8 rx_hash_key[40];
53+ __u32 port;
54+};
55+
56+struct rss_resp_entry {
57+ __u32 cqid;
58+ __u32 wqid;
59+};
60+
61+struct mana_ib_create_qp_rss_resp {
62+ __aligned_u64 num_entries;
63+ struct rss_resp_entry entries[64];
64+};
65+
66+#endif
include/uapi/rdma/rdma_user_rxe.h+8−0
@@ -82,6 +82,13 @@ struct rxe_send_wr { · 81 unmodified lines
8282 __u32 invalidate_rkey;
8383 } ex;
8484 union {
85+ struct {
86+ __aligned_u64 remote_addr;
87+ __u32 length;
88+ __u32 rkey;
89+ __u8 type;
90+ __u8 level;
91+ } flush;
8592 struct {
8693 __aligned_u64 remote_addr;
8794 __u32 rkey;
@@ -146,6 +153,7 @@ struct rxe_dma_info { · 58 unmodified lines
146153 __u32 reserved;
147154 union {
148155 __DECLARE_FLEX_ARRAY(__u8, inline_data);
156+ __DECLARE_FLEX_ARRAY(__u8, atomic_wr);
149157 __DECLARE_FLEX_ARRAY(struct rxe_sge, sge);
150158 };
151159 };