History

IB/core: Temporarily disable create_flow/destroy_flow uverbs

The create_flow/destroy_flow uverbs and the associated extensions to the user-kernel verbs ABI are under review and are too experimental to freeze at this point. So userspace is not exposed to experimental features and an uinstable ABI, temporarily disable this for v3.12 (with a Kconfig option behind staging to reenable it if desired). The feature will be enabled after proper cleanup for v3.13. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Link: http://marc.info/?i=cover.1381351016.git.ydroneaud@opteya.com Link: http://marc.info/?i=cover.1381177342.git.ydroneaud@opteya.com [ Add a Kconfig option to reenable these verbs. - Roland ]

Yann Droneaud committed 13 years ago

Commit 7afbddf1 parent 31d141e6 files · +31 −0Browse files

Unified · Split

6 files
  1. drivers/infiniband/Kconfig +11 −0
  2. drivers/infiniband/core/uverbs.h +2 −0
  3. drivers/infiniband/core/uverbs_cmd.c +4 −0
  4. drivers/infiniband/core/uverbs_main.c +6 −0
  5. drivers/infiniband/hw/mlx4/main.c +2 −0
  6. include/uapi/rdma/ib_user_verbs.h +6 −0
drivers/infiniband/Kconfig+11−0
@@ -31,6 +31,17 @@ config INFINIBAND_USER_ACCESS · 30 unmodified lines
3131 libibverbs, libibcm and a hardware driver library from
3232 <http://www.openfabrics.org/git/>.
3333
34+config INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
35+ bool "Experimental and unstable ABI for userspace access to flow steering verbs"
36+ depends on INFINIBAND_USER_ACCESS
37+ depends on STAGING
38+ ---help---
39+ The final ABI for userspace access to flow steering verbs
40+ has not been defined. To use the current ABI, *WHICH WILL
41+ CHANGE IN THE FUTURE*, say Y here.
42+
43+ If unsure, say N.
44+
3445 config INFINIBAND_USER_MEM
3546 bool
3647 depends on INFINIBAND_USER_ACCESS != n
drivers/infiniband/core/uverbs.h+2−0
@@ -217,7 +217,9 @@ IB_UVERBS_DECLARE_CMD(destroy_srq); · 216 unmodified lines
217217 IB_UVERBS_DECLARE_CMD(create_xsrq);
218218 IB_UVERBS_DECLARE_CMD(open_xrcd);
219219 IB_UVERBS_DECLARE_CMD(close_xrcd);
220+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
220221 IB_UVERBS_DECLARE_CMD(create_flow);
221222 IB_UVERBS_DECLARE_CMD(destroy_flow);
223+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
222224
223225 #endif /* UVERBS_H */
drivers/infiniband/core/uverbs_cmd.c+4−0
@@ -54,7 +54,9 @@ static struct uverbs_lock_class qp_lock_class = { .name = "QP-uobj" }; · 53 unmodified lines
5454 static struct uverbs_lock_class ah_lock_class = { .name = "AH-uobj" };
5555 static struct uverbs_lock_class srq_lock_class = { .name = "SRQ-uobj" };
5656 static struct uverbs_lock_class xrcd_lock_class = { .name = "XRCD-uobj" };
57+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
5758 static struct uverbs_lock_class rule_lock_class = { .name = "RULE-uobj" };
59+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
5860
5961 #define INIT_UDATA(udata, ibuf, obuf, ilen, olen) \
6062 do { \
@@ -2599,6 +2601,7 @@ out_put: · 2538 unmodified lines
25992601 return ret ? ret : in_len;
26002602 }
26012603
2604+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
26022605 static int kern_spec_to_ib_spec(struct ib_kern_spec *kern_spec,
26032606 union ib_flow_spec *ib_spec)
26042607 {
@@ -2824,6 +2827,7 @@ ssize_t ib_uverbs_destroy_flow(struct ib_uverbs_file *file, · 219 unmodified lines
28242827
28252828 return ret ? ret : in_len;
28262829 }
2830+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
28272831
28282832 static int __uverbs_create_xsrq(struct ib_uverbs_file *file,
28292833 struct ib_uverbs_create_xsrq *cmd,
drivers/infiniband/core/uverbs_main.c+6−0
@@ -115,8 +115,10 @@ static ssize_t (*uverbs_cmd_table[])(struct ib_uverbs_file *file, · 114 unmodified lines
115115 [IB_USER_VERBS_CMD_CLOSE_XRCD] = ib_uverbs_close_xrcd,
116116 [IB_USER_VERBS_CMD_CREATE_XSRQ] = ib_uverbs_create_xsrq,
117117 [IB_USER_VERBS_CMD_OPEN_QP] = ib_uverbs_open_qp,
118+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
118119 [IB_USER_VERBS_CMD_CREATE_FLOW] = ib_uverbs_create_flow,
119120 [IB_USER_VERBS_CMD_DESTROY_FLOW] = ib_uverbs_destroy_flow
121+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
120122 };
121123
122124 static void ib_uverbs_add_one(struct ib_device *device);
@@ -605,6 +607,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, · 482 unmodified lines
605607 if (!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command)))
606608 return -ENOSYS;
607609
610+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
608611 if (hdr.command >= IB_USER_VERBS_CMD_THRESHOLD) {
609612 struct ib_uverbs_cmd_hdr_ex hdr_ex;
610613
@@ -621,6 +624,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, · 10 unmodified lines
621624 (hdr_ex.out_words +
622625 hdr_ex.provider_out_words) * 4);
623626 } else {
627+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
624628 if (hdr.in_words * 4 != count)
625629 return -EINVAL;
626630
@@ -628,7 +632,9 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, · 1 unmodified line
628632 buf + sizeof(hdr),
629633 hdr.in_words * 4,
630634 hdr.out_words * 4);
635+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
631636 }
637+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
632638 }
633639
634640 static int ib_uverbs_mmap(struct file *filp, struct vm_area_struct *vma)
drivers/infiniband/hw/mlx4/main.c+2−0
@@ -1691,9 +1691,11 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) · 1690 unmodified lines
16911691 ibdev->ib_dev.create_flow = mlx4_ib_create_flow;
16921692 ibdev->ib_dev.destroy_flow = mlx4_ib_destroy_flow;
16931693
1694+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
16941695 ibdev->ib_dev.uverbs_cmd_mask |=
16951696 (1ull << IB_USER_VERBS_CMD_CREATE_FLOW) |
16961697 (1ull << IB_USER_VERBS_CMD_DESTROY_FLOW);
1698+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
16971699 }
16981700
16991701 mlx4_ib_alloc_eqs(dev, ibdev);
include/uapi/rdma/ib_user_verbs.h+6−0
@@ -87,8 +87,10 @@ enum { · 86 unmodified lines
8787 IB_USER_VERBS_CMD_CLOSE_XRCD,
8888 IB_USER_VERBS_CMD_CREATE_XSRQ,
8989 IB_USER_VERBS_CMD_OPEN_QP,
90+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
9091 IB_USER_VERBS_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
9192 IB_USER_VERBS_CMD_DESTROY_FLOW
93+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
9294 };
9395
9496 /*
@@ -126,6 +128,7 @@ struct ib_uverbs_cmd_hdr { · 31 unmodified lines
126128 __u16 out_words;
127129 };
128130
131+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
129132 struct ib_uverbs_cmd_hdr_ex {
130133 __u32 command;
131134 __u16 in_words;
@@ -134,6 +137,7 @@ struct ib_uverbs_cmd_hdr_ex { · 2 unmodified lines
134137 __u16 provider_out_words;
135138 __u32 cmd_hdr_reserved;
136139 };
140+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
137141
138142 struct ib_uverbs_get_context {
139143 __u64 response;
@@ -696,6 +700,7 @@ struct ib_uverbs_detach_mcast { · 556 unmodified lines
696700 __u64 driver_data[0];
697701 };
698702
703+#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
699704 struct ib_kern_eth_filter {
700705 __u8 dst_mac[6];
701706 __u8 src_mac[6];
@@ -780,6 +785,7 @@ struct ib_uverbs_destroy_flow { · 78 unmodified lines
780785 __u32 comp_mask;
781786 __u32 flow_handle;
782787 };
788+#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
783789
784790 struct ib_uverbs_create_srq {
785791 __u64 response;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t