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