IB/mad: include GID/class when matching receives
[powerpc.git] / drivers / infiniband / core / mad_priv.h
index 568da10..6c9c133 100644 (file)
@@ -31,7 +31,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  *
- * $Id: mad_priv.h 2730 2005-06-28 16:43:03Z sean.hefty $
+ * $Id: mad_priv.h 5596 2006-03-03 01:00:07Z sean.hefty $
  */
 
 #ifndef __IB_MAD_PRIV_H__
@@ -40,8 +40,8 @@
 #include <linux/pci.h>
 #include <linux/kthread.h>
 #include <linux/workqueue.h>
-#include <ib_mad.h>
-#include <ib_smi.h>
+#include <rdma/ib_mad.h>
+#include <rdma/ib_smi.h>
 
 
 #define PFX "ib_mad: "
@@ -85,6 +85,12 @@ struct ib_mad_private {
        } mad;
 } __attribute__ ((packed));
 
+struct ib_rmpp_segment {
+       struct list_head list;
+       u32 num;
+       u8 data[0];
+};
+
 struct ib_mad_agent_private {
        struct list_head agent_list;
        struct ib_mad_agent agent;
@@ -118,10 +124,12 @@ struct ib_mad_send_wr_private {
        struct ib_mad_list_head mad_list;
        struct list_head agent_list;
        struct ib_mad_agent_private *mad_agent_priv;
+       struct ib_mad_send_buf send_buf;
+       DECLARE_PCI_UNMAP_ADDR(header_mapping)
+       DECLARE_PCI_UNMAP_ADDR(payload_mapping)
        struct ib_send_wr send_wr;
        struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG];
-       u64 wr_id;                      /* client WR ID */
-       u64 tid;
+       __be64 tid;
        unsigned long timeout;
        int retries;
        int retry;
@@ -129,11 +137,12 @@ struct ib_mad_send_wr_private {
        enum ib_wc_status status;
 
        /* RMPP control */
+       struct list_head rmpp_list;
+       struct ib_rmpp_segment *last_ack_seg;
+       struct ib_rmpp_segment *cur_seg;
        int last_ack;
        int seg_num;
        int newwin;
-       int total_seg;
-       int data_offset;
        int pad;
 };
 
@@ -141,10 +150,7 @@ struct ib_mad_local_private {
        struct list_head completion_list;
        struct ib_mad_private *mad_priv;
        struct ib_mad_agent_private *recv_mad_agent;
-       struct ib_send_wr send_wr;
-       struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG];
-       u64 wr_id;                      /* client WR ID */
-       u64 tid;
+       struct ib_mad_send_wr_private *mad_send_wr;
 };
 
 struct ib_mad_mgmt_method_table {
@@ -210,7 +216,8 @@ extern kmem_cache_t *ib_mad_cache;
 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, u64 tid);
+ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv,
+                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);