These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / infiniband / core / mad_priv.h
index d1a0b0e..990698a 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/workqueue.h>
 #include <rdma/ib_mad.h>
 #include <rdma/ib_smi.h>
+#include <rdma/opa_smi.h>
 
 #define IB_MAD_QPS_CORE                2 /* Always QP0 and QP1 as a minimum */
 
@@ -56,7 +57,7 @@
 
 /* Registration table sizes */
 #define MAX_MGMT_CLASS         80
-#define MAX_MGMT_VERSION       8
+#define MAX_MGMT_VERSION       0x83
 #define MAX_MGMT_OUI           8
 #define MAX_MGMT_VENDOR_RANGE2 (IB_MGMT_CLASS_VENDOR_RANGE2_END - \
                                IB_MGMT_CLASS_VENDOR_RANGE2_START + 1)
@@ -75,12 +76,9 @@ struct ib_mad_private_header {
 
 struct ib_mad_private {
        struct ib_mad_private_header header;
+       size_t mad_size;
        struct ib_grh grh;
-       union {
-               struct ib_mad mad;
-               struct ib_rmpp_mad rmpp_mad;
-               struct ib_smp smp;
-       } mad;
+       u8 mad[0];
 } __attribute__ ((packed));
 
 struct ib_rmpp_segment {
@@ -125,7 +123,7 @@ struct ib_mad_send_wr_private {
        struct ib_mad_send_buf send_buf;
        u64 header_mapping;
        u64 payload_mapping;
-       struct ib_send_wr send_wr;
+       struct ib_ud_wr send_wr;
        struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG];
        __be64 tid;
        unsigned long timeout;
@@ -150,6 +148,7 @@ struct ib_mad_local_private {
        struct ib_mad_private *mad_priv;
        struct ib_mad_agent_private *recv_mad_agent;
        struct ib_mad_send_wr_private *mad_send_wr;
+       size_t return_wc_byte_len;
 };
 
 struct ib_mad_mgmt_method_table {
@@ -200,7 +199,6 @@ struct ib_mad_port_private {
        int port_num;
        struct ib_cq *cq;
        struct ib_pd *pd;
-       struct ib_mr *mr;
 
        spinlock_t reg_lock;
        struct ib_mad_mgmt_version_table version[MAX_MGMT_VERSION];
@@ -213,8 +211,8 @@ struct ib_mad_port_private {
 int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr);
 
 struct ib_mad_send_wr_private *
-ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv,
-                struct ib_mad_recv_wc *mad_recv_wc);
+ib_find_send_mad(const struct ib_mad_agent_private *mad_agent_priv,
+                const struct ib_mad_recv_wc *mad_recv_wc);
 
 void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
                             struct ib_mad_send_wc *mad_send_wc);