aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHadar Hen Zion <hadarh@mellanox.com>2013-08-14 06:58:30 -0400
committerRoland Dreier <roland@purestorage.com>2013-08-28 12:53:14 -0400
commit436f2ad05a0b65b1467ddf51bc68171c381bf844 (patch)
treea013d7f58085a5a89b237172354e011206107eae /include
parent400dbc96583ff3b8ad4c09bd7e9dcd35a6215922 (diff)
IB/core: Export ib_create/destroy_flow through uverbs
Implement ib_uverbs_create_flow() and ib_uverbs_destroy_flow() to support flow steering for user space applications. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/ib_verbs.h1
-rw-r--r--include/uapi/rdma/ib_user_verbs.h89
2 files changed, 89 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 6f874b00491a..274205d4df97 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -954,6 +954,7 @@ struct ib_ucontext {
954 struct list_head srq_list; 954 struct list_head srq_list;
955 struct list_head ah_list; 955 struct list_head ah_list;
956 struct list_head xrcd_list; 956 struct list_head xrcd_list;
957 struct list_head rule_list;
957 int closing; 958 int closing;
958}; 959};
959 960
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index 61535aa0a62e..0b233c56b0e4 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -86,7 +86,9 @@ enum {
86 IB_USER_VERBS_CMD_OPEN_XRCD, 86 IB_USER_VERBS_CMD_OPEN_XRCD,
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 IB_USER_VERBS_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
91 IB_USER_VERBS_CMD_DESTROY_FLOW
90}; 92};
91 93
92/* 94/*
@@ -694,6 +696,91 @@ struct ib_uverbs_detach_mcast {
694 __u64 driver_data[0]; 696 __u64 driver_data[0];
695}; 697};
696 698
699struct ib_kern_eth_filter {
700 __u8 dst_mac[6];
701 __u8 src_mac[6];
702 __be16 ether_type;
703 __be16 vlan_tag;
704};
705
706struct ib_kern_spec_eth {
707 __u32 type;
708 __u16 size;
709 __u16 reserved;
710 struct ib_kern_eth_filter val;
711 struct ib_kern_eth_filter mask;
712};
713
714struct ib_kern_ipv4_filter {
715 __be32 src_ip;
716 __be32 dst_ip;
717};
718
719struct ib_kern_spec_ipv4 {
720 __u32 type;
721 __u16 size;
722 __u16 reserved;
723 struct ib_kern_ipv4_filter val;
724 struct ib_kern_ipv4_filter mask;
725};
726
727struct ib_kern_tcp_udp_filter {
728 __be16 dst_port;
729 __be16 src_port;
730};
731
732struct ib_kern_spec_tcp_udp {
733 __u32 type;
734 __u16 size;
735 __u16 reserved;
736 struct ib_kern_tcp_udp_filter val;
737 struct ib_kern_tcp_udp_filter mask;
738};
739
740struct ib_kern_spec {
741 union {
742 struct {
743 __u32 type;
744 __u16 size;
745 __u16 reserved;
746 };
747 struct ib_kern_spec_eth eth;
748 struct ib_kern_spec_ipv4 ipv4;
749 struct ib_kern_spec_tcp_udp tcp_udp;
750 };
751};
752
753struct ib_kern_flow_attr {
754 __u32 type;
755 __u16 size;
756 __u16 priority;
757 __u8 num_of_specs;
758 __u8 reserved[2];
759 __u8 port;
760 __u32 flags;
761 /* Following are the optional layers according to user request
762 * struct ib_flow_spec_xxx
763 * struct ib_flow_spec_yyy
764 */
765};
766
767struct ib_uverbs_create_flow {
768 __u32 comp_mask;
769 __u64 response;
770 __u32 qp_handle;
771 struct ib_kern_flow_attr flow_attr;
772};
773
774struct ib_uverbs_create_flow_resp {
775 __u32 comp_mask;
776 __u32 flow_handle;
777};
778
779struct ib_uverbs_destroy_flow {
780 __u32 comp_mask;
781 __u32 flow_handle;
782};
783
697struct ib_uverbs_create_srq { 784struct ib_uverbs_create_srq {
698 __u64 response; 785 __u64 response;
699 __u64 user_handle; 786 __u64 user_handle;