[openib-general] [PATCH 7/9] kDAPL: convert the srq list to linux native

Tom Duffy Tom.Duffy at Sun.COM
Mon Jun 13 17:18:10 PDT 2005


Signed-off-by: Tom Duffy <tduffy at sun.com>

diff -Nurp -X /home/tduffy/dontdiff linux-kernel-ll7/dat-provider/dapl.h linux-kernel-ll8/dat-provider/dapl.h
--- linux-kernel-ll7/dat-provider/dapl.h	2005-06-13 16:36:22.902013000 -0700
+++ linux-kernel-ll8/dat-provider/dapl.h	2005-06-13 16:49:24.143015000 -0700
@@ -161,7 +161,7 @@ struct dapl_ia {
 	struct list_head evd_list;	/* EVD queue */
 	struct list_head psp_list;	/* PSP queue */
 	struct list_head rsp_list;	/* RSP queue */
-	struct dapl_llist_entry *srq_list_head;	/* SRQ queue */
+	struct list_head srq_list;	/* SRQ queue */
 };
 
 struct dapl_evd {
@@ -236,6 +236,7 @@ struct dapl_ep {
 struct dapl_srq {
 	struct dat_srq srq;
 	struct dapl_common common;
+	struct list_head list;
 	struct dat_srq_param param;
 	atomic_t srq_ref_count;
 	struct dapl_cookie_buffer recv_buffer;
diff -Nurp -X /home/tduffy/dontdiff linux-kernel-ll7/dat-provider/dapl_ia.c linux-kernel-ll8/dat-provider/dapl_ia.c
--- linux-kernel-ll7/dat-provider/dapl_ia.c	2005-06-13 16:46:18.755001000 -0700
+++ linux-kernel-ll8/dat-provider/dapl_ia.c	2005-06-13 16:50:30.624000000 -0700
@@ -70,6 +70,7 @@ struct dapl_ia *dapl_ia_alloc(struct dat
 	INIT_LIST_HEAD(&ia->evd_list);
 	INIT_LIST_HEAD(&ia->rsp_list);
 	INIT_LIST_HEAD(&ia->psp_list);
+	INIT_LIST_HEAD(&ia->srq_list);
 
 	dapl_hca_link_ia(hca, ia);
 
@@ -411,8 +412,7 @@ void dapl_ia_unlink_ep(struct dapl_ia *i
 void dapl_ia_link_srq(struct dapl_ia *ia, struct dapl_srq *srq)
 {
 	spin_lock_irqsave(&ia->common.lock, ia->common.flags);
-	dapl_llist_add_head(&ia->srq_list_head,
-			    &srq->common.ia_list_entry, srq);
+	list_add(&srq->list, &ia->srq_list);
 	spin_unlock_irqrestore(&ia->common.lock, ia->common.flags);
 }
 
@@ -422,8 +422,7 @@ void dapl_ia_link_srq(struct dapl_ia *ia
 void dapl_ia_unlink_srq(struct dapl_ia *ia, struct dapl_srq *srq)
 {
 	spin_lock_irqsave(&ia->common.lock, ia->common.flags);
-	dapl_llist_remove_entry(&ia->srq_list_head,
-				&srq->common.ia_list_entry);
+	list_del(&srq->list);
 	spin_unlock_irqrestore(&ia->common.lock, ia->common.flags);
 }
 




More information about the general mailing list