aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-04 20:10:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-04 20:10:31 -0400
commit0cda611386b2fcbf8bb32e9a5d82bfed4856fc36 (patch)
tree1647e00675ab924edfb22b69ea3872db091b8900 /include/rdma
parentfdf1f7ff1bd7f1c6d1d5dc2b29b6b11a4f722276 (diff)
parent7f1d25b47d919cef29388aff37e7b074e65bf512 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Pull base rdma updates from Doug Ledford: "Round one of 4.8 code: while this is mostly normal, there is a new driver in here (the driver was hosted outside the kernel for several years and is actually a fairly mature and well coded driver). It amounts to 13,000 of the 16,000 lines of added code in here. Summary: - Updates/fixes for iw_cxgb4 driver - Updates/fixes for mlx5 driver - Add flow steering and RSS API - Add hardware stats to mlx4 and mlx5 drivers - Add firmware version API for RDMA driver use - Add the rxe driver (this is a software RoCE driver that makes any Ethernet device a RoCE device) - Fixes for i40iw driver - Support for send only multicast joins in the cma layer - Other minor fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (72 commits) Soft RoCE driver IB/core: Support for CMA multicast join flags IB/sa: Add cached attribute containing SM information to SA port IB/uverbs: Fix race between uverbs_close and remove_one IB/mthca: Clean up error unwind flow in mthca_reset() IB/mthca: NULL arg to pci_dev_put is OK IB/hfi1: NULL arg to sc_return_credits is OK IB/mlx4: Add diagnostic hardware counters net/mlx4: Query performance and diagnostics counters net/mlx4: Add diagnostic counters capability bit Use smaller 512 byte messages for portmapper messages IB/ipoib: Report SG feature regardless of HW UD CSUM capability IB/mlx4: Don't use GFP_ATOMIC for CQ resize struct IB/hfi1: Disable by default IB/rdmavt: Disable by default IB/mlx5: Fix port counter ID association to QP offset IB/mlx5: Fix iteration overrun in GSI qps i40iw: Add NULL check for puda buffer i40iw: Change dup_ack_thresh to u8 i40iw: Remove unnecessary check for moving CQ head ...
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_sa.h13
-rw-r--r--include/rdma/ib_verbs.h102
-rw-r--r--include/rdma/rdma_cm.h4
3 files changed, 117 insertions, 2 deletions
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h
index 384041669489..5ee7aab95eb8 100644
--- a/include/rdma/ib_sa.h
+++ b/include/rdma/ib_sa.h
@@ -94,6 +94,19 @@ enum ib_sa_selector {
94 IB_SA_BEST = 3 94 IB_SA_BEST = 3
95}; 95};
96 96
97/*
98 * There are 4 types of join states:
99 * FullMember, NonMember, SendOnlyNonMember, SendOnlyFullMember.
100 * The order corresponds to JoinState bits in MCMemberRecord.
101 */
102enum ib_sa_mc_join_states {
103 FULLMEMBER_JOIN,
104 NONMEMBER_JOIN,
105 SENDONLY_NONMEBER_JOIN,
106 SENDONLY_FULLMEMBER_JOIN,
107 NUM_JOIN_MEMBERSHIP_TYPES,
108};
109
97#define IB_SA_CAP_MASK2_SENDONLY_FULL_MEM_SUPPORT BIT(12) 110#define IB_SA_CAP_MASK2_SENDONLY_FULL_MEM_SUPPORT BIT(12)
98 111
99/* 112/*
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index a8137dcf5a00..94a0bc5b5bdd 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -562,6 +562,7 @@ enum ib_event_type {
562 IB_EVENT_QP_LAST_WQE_REACHED, 562 IB_EVENT_QP_LAST_WQE_REACHED,
563 IB_EVENT_CLIENT_REREGISTER, 563 IB_EVENT_CLIENT_REREGISTER,
564 IB_EVENT_GID_CHANGE, 564 IB_EVENT_GID_CHANGE,
565 IB_EVENT_WQ_FATAL,
565}; 566};
566 567
567const char *__attribute_const__ ib_event_msg(enum ib_event_type event); 568const char *__attribute_const__ ib_event_msg(enum ib_event_type event);
@@ -572,6 +573,7 @@ struct ib_event {
572 struct ib_cq *cq; 573 struct ib_cq *cq;
573 struct ib_qp *qp; 574 struct ib_qp *qp;
574 struct ib_srq *srq; 575 struct ib_srq *srq;
576 struct ib_wq *wq;
575 u8 port_num; 577 u8 port_num;
576 } element; 578 } element;
577 enum ib_event_type event; 579 enum ib_event_type event;
@@ -1015,6 +1017,7 @@ struct ib_qp_init_attr {
1015 * Only needed for special QP types, or when using the RW API. 1017 * Only needed for special QP types, or when using the RW API.
1016 */ 1018 */
1017 u8 port_num; 1019 u8 port_num;
1020 struct ib_rwq_ind_table *rwq_ind_tbl;
1018}; 1021};
1019 1022
1020struct ib_qp_open_attr { 1023struct ib_qp_open_attr {
@@ -1323,6 +1326,8 @@ struct ib_ucontext {
1323 struct list_head ah_list; 1326 struct list_head ah_list;
1324 struct list_head xrcd_list; 1327 struct list_head xrcd_list;
1325 struct list_head rule_list; 1328 struct list_head rule_list;
1329 struct list_head wq_list;
1330 struct list_head rwq_ind_tbl_list;
1326 int closing; 1331 int closing;
1327 1332
1328 struct pid *tgid; 1333 struct pid *tgid;
@@ -1428,6 +1433,63 @@ struct ib_srq {
1428 } ext; 1433 } ext;
1429}; 1434};
1430 1435
1436enum ib_wq_type {
1437 IB_WQT_RQ
1438};
1439
1440enum ib_wq_state {
1441 IB_WQS_RESET,
1442 IB_WQS_RDY,
1443 IB_WQS_ERR
1444};
1445
1446struct ib_wq {
1447 struct ib_device *device;
1448 struct ib_uobject *uobject;
1449 void *wq_context;
1450 void (*event_handler)(struct ib_event *, void *);
1451 struct ib_pd *pd;
1452 struct ib_cq *cq;
1453 u32 wq_num;
1454 enum ib_wq_state state;
1455 enum ib_wq_type wq_type;
1456 atomic_t usecnt;
1457};
1458
1459struct ib_wq_init_attr {
1460 void *wq_context;
1461 enum ib_wq_type wq_type;
1462 u32 max_wr;
1463 u32 max_sge;
1464 struct ib_cq *cq;
1465 void (*event_handler)(struct ib_event *, void *);
1466};
1467
1468enum ib_wq_attr_mask {
1469 IB_WQ_STATE = 1 << 0,
1470 IB_WQ_CUR_STATE = 1 << 1,
1471};
1472
1473struct ib_wq_attr {
1474 enum ib_wq_state wq_state;
1475 enum ib_wq_state curr_wq_state;
1476};
1477
1478struct ib_rwq_ind_table {
1479 struct ib_device *device;
1480 struct ib_uobject *uobject;
1481 atomic_t usecnt;
1482 u32 ind_tbl_num;
1483 u32 log_ind_tbl_size;
1484 struct ib_wq **ind_tbl;
1485};
1486
1487struct ib_rwq_ind_table_init_attr {
1488 u32 log_ind_tbl_size;
1489 /* Each entry is a pointer to Receive Work Queue */
1490 struct ib_wq **ind_tbl;
1491};
1492
1431struct ib_qp { 1493struct ib_qp {
1432 struct ib_device *device; 1494 struct ib_device *device;
1433 struct ib_pd *pd; 1495 struct ib_pd *pd;
@@ -1450,6 +1512,7 @@ struct ib_qp {
1450 void *qp_context; 1512 void *qp_context;
1451 u32 qp_num; 1513 u32 qp_num;
1452 enum ib_qp_type qp_type; 1514 enum ib_qp_type qp_type;
1515 struct ib_rwq_ind_table *rwq_ind_tbl;
1453}; 1516};
1454 1517
1455struct ib_mr { 1518struct ib_mr {
@@ -1506,6 +1569,7 @@ enum ib_flow_spec_type {
1506 IB_FLOW_SPEC_IB = 0x22, 1569 IB_FLOW_SPEC_IB = 0x22,
1507 /* L3 header*/ 1570 /* L3 header*/
1508 IB_FLOW_SPEC_IPV4 = 0x30, 1571 IB_FLOW_SPEC_IPV4 = 0x30,
1572 IB_FLOW_SPEC_IPV6 = 0x31,
1509 /* L4 headers*/ 1573 /* L4 headers*/
1510 IB_FLOW_SPEC_TCP = 0x40, 1574 IB_FLOW_SPEC_TCP = 0x40,
1511 IB_FLOW_SPEC_UDP = 0x41 1575 IB_FLOW_SPEC_UDP = 0x41
@@ -1567,6 +1631,18 @@ struct ib_flow_spec_ipv4 {
1567 struct ib_flow_ipv4_filter mask; 1631 struct ib_flow_ipv4_filter mask;
1568}; 1632};
1569 1633
1634struct ib_flow_ipv6_filter {
1635 u8 src_ip[16];
1636 u8 dst_ip[16];
1637};
1638
1639struct ib_flow_spec_ipv6 {
1640 enum ib_flow_spec_type type;
1641 u16 size;
1642 struct ib_flow_ipv6_filter val;
1643 struct ib_flow_ipv6_filter mask;
1644};
1645
1570struct ib_flow_tcp_udp_filter { 1646struct ib_flow_tcp_udp_filter {
1571 __be16 dst_port; 1647 __be16 dst_port;
1572 __be16 src_port; 1648 __be16 src_port;
@@ -1588,6 +1664,7 @@ union ib_flow_spec {
1588 struct ib_flow_spec_ib ib; 1664 struct ib_flow_spec_ib ib;
1589 struct ib_flow_spec_ipv4 ipv4; 1665 struct ib_flow_spec_ipv4 ipv4;
1590 struct ib_flow_spec_tcp_udp tcp_udp; 1666 struct ib_flow_spec_tcp_udp tcp_udp;
1667 struct ib_flow_spec_ipv6 ipv6;
1591}; 1668};
1592 1669
1593struct ib_flow_attr { 1670struct ib_flow_attr {
@@ -1921,7 +1998,18 @@ struct ib_device {
1921 struct ifla_vf_stats *stats); 1998 struct ifla_vf_stats *stats);
1922 int (*set_vf_guid)(struct ib_device *device, int vf, u8 port, u64 guid, 1999 int (*set_vf_guid)(struct ib_device *device, int vf, u8 port, u64 guid,
1923 int type); 2000 int type);
1924 2001 struct ib_wq * (*create_wq)(struct ib_pd *pd,
2002 struct ib_wq_init_attr *init_attr,
2003 struct ib_udata *udata);
2004 int (*destroy_wq)(struct ib_wq *wq);
2005 int (*modify_wq)(struct ib_wq *wq,
2006 struct ib_wq_attr *attr,
2007 u32 wq_attr_mask,