diff options
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 61e1935c91b1..8d4a1c06f7e4 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/rwsem.h> | 48 | #include <linux/rwsem.h> |
49 | #include <linux/scatterlist.h> | 49 | #include <linux/scatterlist.h> |
50 | #include <linux/workqueue.h> | 50 | #include <linux/workqueue.h> |
51 | #include <uapi/linux/if_ether.h> | ||
51 | 52 | ||
52 | #include <linux/atomic.h> | 53 | #include <linux/atomic.h> |
53 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
@@ -69,12 +70,14 @@ enum rdma_node_type { | |||
69 | RDMA_NODE_IB_ROUTER, | 70 | RDMA_NODE_IB_ROUTER, |
70 | RDMA_NODE_RNIC, | 71 | RDMA_NODE_RNIC, |
71 | RDMA_NODE_USNIC, | 72 | RDMA_NODE_USNIC, |
73 | RDMA_NODE_USNIC_UDP, | ||
72 | }; | 74 | }; |
73 | 75 | ||
74 | enum rdma_transport_type { | 76 | enum rdma_transport_type { |
75 | RDMA_TRANSPORT_IB, | 77 | RDMA_TRANSPORT_IB, |
76 | RDMA_TRANSPORT_IWARP, | 78 | RDMA_TRANSPORT_IWARP, |
77 | RDMA_TRANSPORT_USNIC | 79 | RDMA_TRANSPORT_USNIC, |
80 | RDMA_TRANSPORT_USNIC_UDP | ||
78 | }; | 81 | }; |
79 | 82 | ||
80 | enum rdma_transport_type | 83 | enum rdma_transport_type |
@@ -472,6 +475,8 @@ struct ib_ah_attr { | |||
472 | u8 static_rate; | 475 | u8 static_rate; |
473 | u8 ah_flags; | 476 | u8 ah_flags; |
474 | u8 port_num; | 477 | u8 port_num; |
478 | u8 dmac[ETH_ALEN]; | ||
479 | u16 vlan_id; | ||
475 | }; | 480 | }; |
476 | 481 | ||
477 | enum ib_wc_status { | 482 | enum ib_wc_status { |
@@ -524,6 +529,8 @@ enum ib_wc_flags { | |||
524 | IB_WC_WITH_IMM = (1<<1), | 529 | IB_WC_WITH_IMM = (1<<1), |
525 | IB_WC_WITH_INVALIDATE = (1<<2), | 530 | IB_WC_WITH_INVALIDATE = (1<<2), |
526 | IB_WC_IP_CSUM_OK = (1<<3), | 531 | IB_WC_IP_CSUM_OK = (1<<3), |
532 | IB_WC_WITH_SMAC = (1<<4), | ||
533 | IB_WC_WITH_VLAN = (1<<5), | ||
527 | }; | 534 | }; |
528 | 535 | ||
529 | struct ib_wc { | 536 | struct ib_wc { |
@@ -544,6 +551,8 @@ struct ib_wc { | |||
544 | u8 sl; | 551 | u8 sl; |
545 | u8 dlid_path_bits; | 552 | u8 dlid_path_bits; |
546 | u8 port_num; /* valid only for DR SMPs on switches */ | 553 | u8 port_num; /* valid only for DR SMPs on switches */ |
554 | u8 smac[ETH_ALEN]; | ||
555 | u16 vlan_id; | ||
547 | }; | 556 | }; |
548 | 557 | ||
549 | enum ib_cq_notify_flags { | 558 | enum ib_cq_notify_flags { |
@@ -633,6 +642,7 @@ enum ib_qp_type { | |||
633 | enum ib_qp_create_flags { | 642 | enum ib_qp_create_flags { |
634 | IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0, | 643 | IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0, |
635 | IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1, | 644 | IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1, |
645 | IB_QP_CREATE_NETIF_QP = 1 << 5, | ||
636 | /* reserve bits 26-31 for low level drivers' internal use */ | 646 | /* reserve bits 26-31 for low level drivers' internal use */ |
637 | IB_QP_CREATE_RESERVED_START = 1 << 26, | 647 | IB_QP_CREATE_RESERVED_START = 1 << 26, |
638 | IB_QP_CREATE_RESERVED_END = 1 << 31, | 648 | IB_QP_CREATE_RESERVED_END = 1 << 31, |
@@ -721,7 +731,11 @@ enum ib_qp_attr_mask { | |||
721 | IB_QP_MAX_DEST_RD_ATOMIC = (1<<17), | 731 | IB_QP_MAX_DEST_RD_ATOMIC = (1<<17), |
722 | IB_QP_PATH_MIG_STATE = (1<<18), | 732 | IB_QP_PATH_MIG_STATE = (1<<18), |
723 | IB_QP_CAP = (1<<19), | 733 | IB_QP_CAP = (1<<19), |
724 | IB_QP_DEST_QPN = (1<<20) | 734 | IB_QP_DEST_QPN = (1<<20), |
735 | IB_QP_SMAC = (1<<21), | ||
736 | IB_QP_ALT_SMAC = (1<<22), | ||
737 | IB_QP_VID = (1<<23), | ||
738 | IB_QP_ALT_VID = (1<<24), | ||
725 | }; | 739 | }; |
726 | 740 | ||
727 | enum ib_qp_state { | 741 | enum ib_qp_state { |
@@ -771,6 +785,10 @@ struct ib_qp_attr { | |||
771 | u8 rnr_retry; | 785 | u8 rnr_retry; |
772 | u8 alt_port_num; | 786 | u8 alt_port_num; |
773 | u8 alt_timeout; | 787 | u8 alt_timeout; |
788 | u8 smac[ETH_ALEN]; | ||
789 | u8 alt_smac[ETH_ALEN]; | ||
790 | u16 vlan_id; | ||
791 | u16 alt_vlan_id; | ||
774 | }; | 792 | }; |
775 | 793 | ||
776 | enum ib_wr_opcode { | 794 | enum ib_wr_opcode { |
@@ -1099,13 +1117,14 @@ enum ib_flow_attr_type { | |||
1099 | enum ib_flow_spec_type { | 1117 | enum ib_flow_spec_type { |
1100 | /* L2 headers*/ | 1118 | /* L2 headers*/ |
1101 | IB_FLOW_SPEC_ETH = 0x20, | 1119 | IB_FLOW_SPEC_ETH = 0x20, |
1120 | IB_FLOW_SPEC_IB = 0x22, | ||
1102 | /* L3 header*/ | 1121 | /* L3 header*/ |
1103 | IB_FLOW_SPEC_IPV4 = 0x30, | 1122 | IB_FLOW_SPEC_IPV4 = 0x30, |
1104 | /* L4 headers*/ | 1123 | /* L4 headers*/ |
1105 | IB_FLOW_SPEC_TCP = 0x40, | 1124 | IB_FLOW_SPEC_TCP = 0x40, |
1106 | IB_FLOW_SPEC_UDP = 0x41 | 1125 | IB_FLOW_SPEC_UDP = 0x41 |
1107 | }; | 1126 | }; |
1108 | 1127 | #define IB_FLOW_SPEC_LAYER_MASK 0xF0 | |
1109 | #define IB_FLOW_SPEC_SUPPORT_LAYERS 4 | 1128 | #define IB_FLOW_SPEC_SUPPORT_LAYERS 4 |
1110 | 1129 | ||
1111 | /* Flow steering rule priority is set according to it's domain. | 1130 | /* Flow steering rule priority is set according to it's domain. |
@@ -1133,6 +1152,18 @@ struct ib_flow_spec_eth { | |||
1133 | struct ib_flow_eth_filter mask; | 1152 | struct ib_flow_eth_filter mask; |
1134 | }; | 1153 | }; |
1135 | 1154 | ||
1155 | struct ib_flow_ib_filter { | ||
1156 | __be16 dlid; | ||
1157 | __u8 sl; | ||
1158 | }; | ||
1159 | |||
1160 | struct ib_flow_spec_ib { | ||
1161 | enum ib_flow_spec_type type; | ||
1162 | u16 size; | ||
1163 | struct ib_flow_ib_filter val; | ||
1164 | struct ib_flow_ib_filter mask; | ||
1165 | }; | ||
1166 | |||
1136 | struct ib_flow_ipv4_filter { | 1167 | struct ib_flow_ipv4_filter { |
1137 | __be32 src_ip; | 1168 | __be32 src_ip; |
1138 | __be32 dst_ip; | 1169 | __be32 dst_ip; |
@@ -1163,6 +1194,7 @@ union ib_flow_spec { | |||
1163 | u16 size; | 1194 | u16 size; |
1164 | }; | 1195 | }; |
1165 | struct ib_flow_spec_eth eth; | 1196 | struct ib_flow_spec_eth eth; |
1197 | struct ib_flow_spec_ib ib; | ||
1166 | struct ib_flow_spec_ipv4 ipv4; | 1198 | struct ib_flow_spec_ipv4 ipv4; |
1167 | struct ib_flow_spec_tcp_udp tcp_udp; | 1199 | struct ib_flow_spec_tcp_udp tcp_udp; |
1168 | }; | 1200 | }; |
@@ -1488,6 +1520,7 @@ static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len | |||
1488 | * @next_state: Next QP state | 1520 | * @next_state: Next QP state |
1489 | * @type: QP type | 1521 | * @type: QP type |
1490 | * @mask: Mask of supplied QP attributes | 1522 | * @mask: Mask of supplied QP attributes |
1523 | * @ll : link layer of port | ||
1491 | * | 1524 | * |
1492 | * This function is a helper function that a low-level driver's | 1525 | * This function is a helper function that a low-level driver's |
1493 | * modify_qp method can use to validate the consumer's input. It | 1526 | * modify_qp method can use to validate the consumer's input. It |
@@ -1496,7 +1529,8 @@ static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len | |||
1496 | * and that the attribute mask supplied is allowed for the transition. | 1529 | * and that the attribute mask supplied is allowed for the transition. |
1497 | */ | 1530 | */ |
1498 | int ib_modify_qp_is_ok(enum ib_qp_state cur_state, enum ib_qp_state next_state, | 1531 | int ib_modify_qp_is_ok(enum ib_qp_state cur_state, enum ib_qp_state next_state, |
1499 | enum ib_qp_type type, enum ib_qp_attr_mask mask); | 1532 | enum ib_qp_type type, enum ib_qp_attr_mask mask, |
1533 | enum rdma_link_layer ll); | ||
1500 | 1534 | ||
1501 | int ib_register_event_handler (struct ib_event_handler *event_handler); | 1535 | int ib_register_event_handler (struct ib_event_handler *event_handler); |
1502 | int ib_unregister_event_handler(struct ib_event_handler *event_handler); | 1536 | int ib_unregister_event_handler(struct ib_event_handler *event_handler); |