[openib-general] [PATCH] ib_mad: Use pointer to madhdr rather than mad in send WR ud structure

Hal Rosenstock halr at voltaire.com
Wed Oct 6 11:11:51 PDT 2004


ib_mad: Use pointer to madhdr rather than mad in send WR ud structure
We'll go the rest of the way on this when RMPP is implemented.

Index: access/ib_smi.c
===================================================================
--- access/ib_smi.c	(revision 942)
+++ access/ib_smi.c	(working copy)
@@ -361,7 +361,7 @@
                                                                                 
 	send_wr.wr.ud.ah = ah;
 	send_wr.wr.ud.remote_qkey = 0; /* for SMPs */
-	send_wr.wr.ud.mad = smp;
+	send_wr.wr.ud.mad_hdr = (struct ib_mad_hdr *)smp;
 	send_wr.wr_id = ++port_priv->wr_id;
 
 	pci_unmap_addr_set(smp, smi_send_wr->mapping, gather_list.addr);
Index: access/ib_mad.c
===================================================================
--- access/ib_mad.c	(revision 944)
+++ access/ib_mad.c	(working copy)
@@ -344,7 +344,7 @@
 			return -ENOMEM;	
 		}
 
-		mad_send_wr->tid = send_wr->wr.ud.mad->mad_hdr.tid;
+		mad_send_wr->tid = send_wr->wr.ud.mad_hdr->tid;
 		mad_send_wr->agent = mad_agent;
 		mad_send_wr->timeout_ms = cur_send_wr->wr.ud.timeout_ms;
 		if (mad_send_wr->timeout_ms)
Index: include/ib_verbs.h
===================================================================
--- include/ib_verbs.h	(revision 940)
+++ include/ib_verbs.h	(working copy)
@@ -539,7 +539,7 @@
 		} atomic;
 		struct {
 			struct  ib_ah *ah;
-			struct	ib_mad *mad;
+			struct	ib_mad_hdr *mad_hdr;
 			u32	remote_qpn;
 			u32	remote_qkey;
 			int	timeout_ms; /* valid for MADs only */






More information about the general mailing list