Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Pull infiniband bugfix from Roland Dreier:
"Disable not-quite-ready userspace ABI for IB flow steering"

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/core: Temporarily disable create_flow/destroy_flow uverbs

+31
+11
drivers/infiniband/Kconfig
··· 31 31 libibverbs, libibcm and a hardware driver library from 32 32 <http://www.openfabrics.org/git/>. 33 33 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 + 34 45 config INFINIBAND_USER_MEM 35 46 bool 36 47 depends on INFINIBAND_USER_ACCESS != n
+2
drivers/infiniband/core/uverbs.h
··· 217 217 IB_UVERBS_DECLARE_CMD(create_xsrq); 218 218 IB_UVERBS_DECLARE_CMD(open_xrcd); 219 219 IB_UVERBS_DECLARE_CMD(close_xrcd); 220 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 220 221 IB_UVERBS_DECLARE_CMD(create_flow); 221 222 IB_UVERBS_DECLARE_CMD(destroy_flow); 223 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 222 224 223 225 #endif /* UVERBS_H */
+4
drivers/infiniband/core/uverbs_cmd.c
··· 54 54 static struct uverbs_lock_class ah_lock_class = { .name = "AH-uobj" }; 55 55 static struct uverbs_lock_class srq_lock_class = { .name = "SRQ-uobj" }; 56 56 static struct uverbs_lock_class xrcd_lock_class = { .name = "XRCD-uobj" }; 57 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 57 58 static struct uverbs_lock_class rule_lock_class = { .name = "RULE-uobj" }; 59 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 58 60 59 61 #define INIT_UDATA(udata, ibuf, obuf, ilen, olen) \ 60 62 do { \ ··· 2601 2599 return ret ? ret : in_len; 2602 2600 } 2603 2601 2602 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 2604 2603 static int kern_spec_to_ib_spec(struct ib_kern_spec *kern_spec, 2605 2604 union ib_flow_spec *ib_spec) 2606 2605 { ··· 2827 2824 2828 2825 return ret ? ret : in_len; 2829 2826 } 2827 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 2830 2828 2831 2829 static int __uverbs_create_xsrq(struct ib_uverbs_file *file, 2832 2830 struct ib_uverbs_create_xsrq *cmd,
+6
drivers/infiniband/core/uverbs_main.c
··· 115 115 [IB_USER_VERBS_CMD_CLOSE_XRCD] = ib_uverbs_close_xrcd, 116 116 [IB_USER_VERBS_CMD_CREATE_XSRQ] = ib_uverbs_create_xsrq, 117 117 [IB_USER_VERBS_CMD_OPEN_QP] = ib_uverbs_open_qp, 118 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 118 119 [IB_USER_VERBS_CMD_CREATE_FLOW] = ib_uverbs_create_flow, 119 120 [IB_USER_VERBS_CMD_DESTROY_FLOW] = ib_uverbs_destroy_flow 121 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 120 122 }; 121 123 122 124 static void ib_uverbs_add_one(struct ib_device *device); ··· 607 605 if (!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command))) 608 606 return -ENOSYS; 609 607 608 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 610 609 if (hdr.command >= IB_USER_VERBS_CMD_THRESHOLD) { 611 610 struct ib_uverbs_cmd_hdr_ex hdr_ex; 612 611 ··· 624 621 (hdr_ex.out_words + 625 622 hdr_ex.provider_out_words) * 4); 626 623 } else { 624 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 627 625 if (hdr.in_words * 4 != count) 628 626 return -EINVAL; 629 627 ··· 632 628 buf + sizeof(hdr), 633 629 hdr.in_words * 4, 634 630 hdr.out_words * 4); 631 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 635 632 } 633 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 636 634 } 637 635 638 636 static int ib_uverbs_mmap(struct file *filp, struct vm_area_struct *vma)
+2
drivers/infiniband/hw/mlx4/main.c
··· 1691 1691 ibdev->ib_dev.create_flow = mlx4_ib_create_flow; 1692 1692 ibdev->ib_dev.destroy_flow = mlx4_ib_destroy_flow; 1693 1693 1694 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 1694 1695 ibdev->ib_dev.uverbs_cmd_mask |= 1695 1696 (1ull << IB_USER_VERBS_CMD_CREATE_FLOW) | 1696 1697 (1ull << IB_USER_VERBS_CMD_DESTROY_FLOW); 1698 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 1697 1699 } 1698 1700 1699 1701 mlx4_ib_alloc_eqs(dev, ibdev);
+6
include/uapi/rdma/ib_user_verbs.h
··· 87 87 IB_USER_VERBS_CMD_CLOSE_XRCD, 88 88 IB_USER_VERBS_CMD_CREATE_XSRQ, 89 89 IB_USER_VERBS_CMD_OPEN_QP, 90 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 90 91 IB_USER_VERBS_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, 91 92 IB_USER_VERBS_CMD_DESTROY_FLOW 93 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 92 94 }; 93 95 94 96 /* ··· 128 126 __u16 out_words; 129 127 }; 130 128 129 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 131 130 struct ib_uverbs_cmd_hdr_ex { 132 131 __u32 command; 133 132 __u16 in_words; ··· 137 134 __u16 provider_out_words; 138 135 __u32 cmd_hdr_reserved; 139 136 }; 137 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 140 138 141 139 struct ib_uverbs_get_context { 142 140 __u64 response; ··· 700 696 __u64 driver_data[0]; 701 697 }; 702 698 699 + #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 703 700 struct ib_kern_eth_filter { 704 701 __u8 dst_mac[6]; 705 702 __u8 src_mac[6]; ··· 785 780 __u32 comp_mask; 786 781 __u32 flow_handle; 787 782 }; 783 + #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ 788 784 789 785 struct ib_uverbs_create_srq { 790 786 __u64 response;