diff options
Diffstat (limited to 'include/uapi/rdma/ib_user_verbs.h')
-rw-r--r-- | include/uapi/rdma/ib_user_verbs.h | 95 |
1 files changed, 53 insertions, 42 deletions
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index e3ddd86c90a6..cbfdd4ca9510 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
@@ -87,10 +87,11 @@ enum { | |||
87 | IB_USER_VERBS_CMD_CLOSE_XRCD, | 87 | IB_USER_VERBS_CMD_CLOSE_XRCD, |
88 | IB_USER_VERBS_CMD_CREATE_XSRQ, | 88 | IB_USER_VERBS_CMD_CREATE_XSRQ, |
89 | IB_USER_VERBS_CMD_OPEN_QP, | 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 | 92 | enum { |
93 | #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ | 93 | IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, |
94 | IB_USER_VERBS_EX_CMD_DESTROY_FLOW | ||
94 | }; | 95 | }; |
95 | 96 | ||
96 | /* | 97 | /* |
@@ -122,22 +123,24 @@ struct ib_uverbs_comp_event_desc { | |||
122 | * the rest of the command struct based on these value. | 123 | * the rest of the command struct based on these value. |
123 | */ | 124 | */ |
124 | 125 | ||
126 | #define IB_USER_VERBS_CMD_COMMAND_MASK 0xff | ||
127 | #define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u | ||
128 | #define IB_USER_VERBS_CMD_FLAGS_SHIFT 24 | ||
129 | |||
130 | #define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80 | ||
131 | |||
125 | struct ib_uverbs_cmd_hdr { | 132 | struct ib_uverbs_cmd_hdr { |
126 | __u32 command; | 133 | __u32 command; |
127 | __u16 in_words; | 134 | __u16 in_words; |
128 | __u16 out_words; | 135 | __u16 out_words; |
129 | }; | 136 | }; |
130 | 137 | ||
131 | #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING | 138 | struct ib_uverbs_ex_cmd_hdr { |
132 | struct ib_uverbs_cmd_hdr_ex { | 139 | __u64 response; |
133 | __u32 command; | ||
134 | __u16 in_words; | ||
135 | __u16 out_words; | ||
136 | __u16 provider_in_words; | 140 | __u16 provider_in_words; |
137 | __u16 provider_out_words; | 141 | __u16 provider_out_words; |
138 | __u32 cmd_hdr_reserved; | 142 | __u32 cmd_hdr_reserved; |
139 | }; | 143 | }; |
140 | #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ | ||
141 | 144 | ||
142 | struct ib_uverbs_get_context { | 145 | struct ib_uverbs_get_context { |
143 | __u64 response; | 146 | __u64 response; |
@@ -700,62 +703,71 @@ struct ib_uverbs_detach_mcast { | |||
700 | __u64 driver_data[0]; | 703 | __u64 driver_data[0]; |
701 | }; | 704 | }; |
702 | 705 | ||
703 | #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING | 706 | struct ib_uverbs_flow_spec_hdr { |
704 | struct ib_kern_eth_filter { | 707 | __u32 type; |
708 | __u16 size; | ||
709 | __u16 reserved; | ||
710 | /* followed by flow_spec */ | ||
711 | __u64 flow_spec_data[0]; | ||
712 | }; | ||
713 | |||
714 | struct ib_uverbs_flow_eth_filter { | ||
705 | __u8 dst_mac[6]; | 715 | __u8 dst_mac[6]; |
706 | __u8 src_mac[6]; | 716 | __u8 src_mac[6]; |
707 | __be16 ether_type; | 717 | __be16 ether_type; |
708 | __be16 vlan_tag; | 718 | __be16 vlan_tag; |
709 | }; | 719 | }; |
710 | 720 | ||
711 | struct ib_kern_spec_eth { | 721 | struct ib_uverbs_flow_spec_eth { |
712 | __u32 type; | 722 | union { |
713 | __u16 size; | 723 | struct ib_uverbs_flow_spec_hdr hdr; |
714 | __u16 reserved; | 724 | struct { |
715 | struct ib_kern_eth_filter val; | 725 | __u32 type; |
716 | struct ib_kern_eth_filter mask; | 726 | __u16 size; |
727 | __u16 reserved; | ||
728 | }; | ||
729 | }; | ||
730 | struct ib_uverbs_flow_eth_filter val; | ||
731 | struct ib_uverbs_flow_eth_filter mask; | ||
717 | }; | 732 | }; |
718 | 733 | ||
719 | struct ib_kern_ipv4_filter { | 734 | struct ib_uverbs_flow_ipv4_filter { |
720 | __be32 src_ip; | 735 | __be32 src_ip; |
721 | __be32 dst_ip; | 736 | __be32 dst_ip; |
722 | }; | 737 | }; |
723 | 738 | ||
724 | struct ib_kern_spec_ipv4 { | 739 | struct ib_uverbs_flow_spec_ipv4 { |
725 | __u32 type; | 740 | union { |
726 | __u16 size; | 741 | struct ib_uverbs_flow_spec_hdr hdr; |
727 | __u16 reserved; | 742 | struct { |
728 | struct ib_kern_ipv4_filter val; | 743 | __u32 type; |
729 | struct ib_kern_ipv4_filter mask; | 744 | __u16 size; |
745 | __u16 reserved; | ||
746 | }; | ||
747 | }; | ||
748 | struct ib_uverbs_flow_ipv4_filter val; | ||
749 | struct ib_uverbs_flow_ipv4_filter mask; | ||
730 | }; | 750 | }; |
731 | 751 | ||
732 | struct ib_kern_tcp_udp_filter { | 752 | struct ib_uverbs_flow_tcp_udp_filter { |
733 | __be16 dst_port; | 753 | __be16 dst_port; |
734 | __be16 src_port; | 754 | __be16 src_port; |
735 | }; | 755 | }; |
736 | 756 | ||
737 | struct ib_kern_spec_tcp_udp { | 757 | struct ib_uverbs_flow_spec_tcp_udp { |
738 | __u32 type; | ||
739 | __u16 size; | ||
740 | __u16 reserved; | ||
741 | struct ib_kern_tcp_udp_filter val; | ||
742 | struct ib_kern_tcp_udp_filter mask; | ||
743 | }; | ||
744 | |||
745 | struct ib_kern_spec { | ||
746 | union { | 758 | union { |
759 | struct ib_uverbs_flow_spec_hdr hdr; | ||
747 | struct { | 760 | struct { |
748 | __u32 type; | 761 | __u32 type; |
749 | __u16 size; | 762 | __u16 size; |
750 | __u16 reserved; | 763 | __u16 reserved; |
751 | }; | 764 | }; |
752 | struct ib_kern_spec_eth eth; | ||
753 | struct ib_kern_spec_ipv4 ipv4; | ||
754 | struct ib_kern_spec_tcp_udp tcp_udp; | ||
755 | }; | 765 | }; |
766 | struct ib_uverbs_flow_tcp_udp_filter val; | ||
767 | struct ib_uverbs_flow_tcp_udp_filter mask; | ||
756 | }; | 768 | }; |
757 | 769 | ||
758 | struct ib_kern_flow_attr { | 770 | struct ib_uverbs_flow_attr { |
759 | __u32 type; | 771 | __u32 type; |
760 | __u16 size; | 772 | __u16 size; |
761 | __u16 priority; | 773 | __u16 priority; |
@@ -767,13 +779,13 @@ struct ib_kern_flow_attr { | |||
767 | * struct ib_flow_spec_xxx | 779 | * struct ib_flow_spec_xxx |
768 | * struct ib_flow_spec_yyy | 780 | * struct ib_flow_spec_yyy |
769 | */ | 781 | */ |
782 | struct ib_uverbs_flow_spec_hdr flow_specs[0]; | ||
770 | }; | 783 | }; |
771 | 784 | ||
772 | struct ib_uverbs_create_flow { | 785 | struct ib_uverbs_create_flow { |
773 | __u32 comp_mask; | 786 | __u32 comp_mask; |
774 | __u64 response; | ||
775 | __u32 qp_handle; | 787 | __u32 qp_handle; |
776 | struct ib_kern_flow_attr flow_attr; | 788 | struct ib_uverbs_flow_attr flow_attr; |
777 | }; | 789 | }; |
778 | 790 | ||
779 | struct ib_uverbs_create_flow_resp { | 791 | struct ib_uverbs_create_flow_resp { |
@@ -785,7 +797,6 @@ struct ib_uverbs_destroy_flow { | |||
785 | __u32 comp_mask; | 797 | __u32 comp_mask; |
786 | __u32 flow_handle; | 798 | __u32 flow_handle; |
787 | }; | 799 | }; |
788 | #endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */ | ||
789 | 800 | ||
790 | struct ib_uverbs_create_srq { | 801 | struct ib_uverbs_create_srq { |
791 | __u64 response; | 802 | __u64 response; |