[openib-general] [DAPL] missing files in dapl_gamma_3.0

2005-02-17 Thread Masanori ITOH

Hi James, Eitan,

I found 'DAPL Gamma 3.0' at the DAPL sourceforge page.
After trying to build that with VERBS=openib_gen_one option, 
especially kDAPL portion, now I think that at lest two files 'dapl_srv.c'
and 'dapl_srv.h' are missing. I checked also IBGD-1.6.1 package but couldn't
find them.
Where can I get them?

Eitan,
I couldn't find kDAPL/gen1 stack among IBGD-1.6.1 which is now available
at http://www.mellanox.com.
Is there more updated IBGD than 1.6.1?

Thanks in advance,
Masanori
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH]IPOIB: adding spin_lock in path_free()

2005-02-17 Thread Shirley Ma

Please review this patch.


diff -urN infiniband/ulp/ipoib/ipoib_main.c
infiniband-path/ulp/ipoib/ipoib_main.c
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-17
17:24:56.0 +
+++ infiniband-path/ulp/ipoib/ipoib_main.c        2005-02-18
01:29:52.0 +
@@ -215,15 +215,17 @@
         return 0;
 }
 
-static void __path_free(struct net_device *dev, struct ipoib_path *path)
+static void path_free(struct net_device *dev, struct ipoib_path *path)
 {
         struct ipoib_dev_priv *priv = netdev_priv(dev);
         struct ipoib_neigh *neigh, *tn;
         struct sk_buff *skb;
+        unsigned long flags;
 
         while ((skb = __skb_dequeue(&path->queue)))
                 dev_kfree_skb_irq(skb);
 
+        spin_lock_irqsave(&priv->lock,
flags);
         list_for_each_entry_safe(neigh, tn,
&path->neigh_list, list) {
                 if
(neigh->ah)
                  
      ipoib_put_ah(neigh->ah);
@@ -231,13 +233,16 @@
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
         }
+        spin_unlock_irqrestore(&priv->lock,
flags);
 
         if (path->ah)
                 ipoib_put_ah(path->ah);
 
+        spin_lock_irqsave(&priv->lock,
flags);
         rb_erase(&path->rb_node, &priv->path_tree);
         list_del(&path->list);
         kfree(path);
+        spin_unlock_irqrestore(&priv->lock,
flags);
 }
 
 void ipoib_flush_paths(struct net_device *dev)
@@ -256,7 +261,7 @@
                 if
(path->query)
                  
      ib_sa_cancel_query(path->query_id, path->query);
                 wait_for_completion(&path->done);
-                __path_free(dev,
path);
+                path_free(dev,
path);
         }
 }
 
@@ -496,8 +501,11 @@
                  
      skb_push(skb, sizeof *phdr);
                  
      __skb_queue_tail(&path->queue, skb);
 
-                
       if (path_rec_start(dev, path))
-                
               __path_free(dev,
path);
+                
       if (path_rec_start(dev, path)) {
+                
               spin_unlock(&priv->lock);
+                
               path_free(dev,
path);
+                
               return;
+                
       }
                 }
else {
                  
      ++priv->stats.tx_dropped;
                  
      dev_kfree_skb_any(skb);




Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638



infiniband-path-free.patch
Description: Binary data
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

[openib-general] [PATCH]IPOIB: delete neigh from the list before kfree(neigh)

2005-02-17 Thread Shirley Ma

This patch sets caller's ah to NULL
when calling ipoib_put_ah(), and deletes neigh from the list before kfree(neigh).

Please review this patch.


diff -urN infiniband/ulp/ipoib/ipoib_main.c
infiniband-ah/ulp/ipoib/ipoib_main.c
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-17
17:24:56.0 +
+++ infiniband-ah/ulp/ipoib/ipoib_main.c        2005-02-18
01:15:44.0 +
@@ -225,16 +225,20 @@
                 dev_kfree_skb_irq(skb);
 
         list_for_each_entry_safe(neigh, tn,
&path->neigh_list, list) {
-                if
(neigh->ah)
+                if
(neigh->ah) {
                  
      ipoib_put_ah(neigh->ah);
+                
       neigh->bh = NULL;
+                }
+                list_del(&neigh->list);
                 *to_ipoib_neigh(neigh->neighbour)
= NULL;
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
         }
 
-        if (path->ah)
+        if (path->ah) {
                 ipoib_put_ah(path->ah);
-
+                path->ah
= NULL;
+        }
         rb_erase(&path->rb_node, &priv->path_tree);
         list_del(&path->list);
         kfree(path);
diff -urN infiniband/ulp/ipoib/ipoib_multicast.c infiniband-ah/ulp/ipoib/ipoib_multicast.c
--- infiniband/ulp/ipoib/ipoib_multicast.c        2005-02-17
17:24:56.0 +
+++ infiniband-ah/ulp/ipoib/ipoib_multicast.c        2005-02-18
00:36:56.0 +
@@ -101,7 +101,11 @@
         spin_lock_irqsave(&priv->lock,
flags);
 
         list_for_each_entry_safe(neigh, tmp,
&mcast->neigh_list, list) {
-                ipoib_put_ah(neigh->ah);
+                if
(neigh->ah) {
+                
       ipoib_put_ah(neigh->ah);
+                
       neigh->bh = NULL;
+                }
+                list_del(&neigh->list);
                 *to_ipoib_neigh(neigh->neighbour)
= NULL;
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
@@ -109,8 +113,10 @@
 
         spin_unlock_irqrestore(&priv->lock,
flags);
 
-        if (mcast->ah)
+        if (mcast->ah) {
                 ipoib_put_ah(mcast->ah);
+                mcast->ah
= NULL;
+        }
 
         while (!skb_queue_empty(&mcast->pkt_queue))
{
                 struct
sk_buff *skb = skb_dequeue(&mcast->pkt_queue);





Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638

infiniband-ah.patch
Description: Binary data
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

[openib-general] [PATCH] IPOIB: initialization patch in ipoib

2005-02-17 Thread Shirley Ma

Here is the patch for :

1. initialize path->ah = NULL
2. move neigh->neighbour->ops
before kfree(neigh)
3. set neighbour->ops->destructor
to NULL while kfree(neigh)


diff -urN infiniband/ulp/ipoib/ipoib_main.c
infiniband-patch/ulp/ipoib/ipoib_main.c
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-17
17:24:56.0 +
+++ infiniband-patch/ulp/ipoib/ipoib_main.c        2005-02-18
00:52:22.0 +
@@ -348,6 +348,7 @@
 
         path->dev = dev;
         path->pathrec.dlid = 0;
+        path->ah = NULL;
 
         skb_queue_head_init(&path->queue);
 
@@ -450,8 +451,8 @@
 err:
         *to_ipoib_neigh(skb->dst->neighbour)
= NULL;
         list_del(&neigh->list);
-        kfree(neigh);
         neigh->neighbour->ops->destructor
= NULL;
+        kfree(neigh);
 
         ++priv->stats.tx_dropped;
         dev_kfree_skb_any(skb);
@@ -673,6 +674,7 @@
                  
      ipoib_put_ah(neigh->ah);
                 list_del(&neigh->list);
                 *to_ipoib_neigh(n)
= NULL;
+                n->ops->destructor
= NULL;
                 kfree(neigh);
         }
 



Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638



infiniband-patch.1
Description: Binary data
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

[openib-general] [PATCH] [CM] add stale connection test to active side

2005-02-17 Thread Sean Hefty
This patch adds testing for a stale connection on the active side of
the connection protocol.  It also fixes a bug where a duplicate REP
would have been dropped, rather than forcing a resend of the RTU.

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>


Index: infiniband/core/cm.c
===
--- infiniband/core/cm.c(revision 1818)
+++ infiniband/core/cm.c(working copy)
@@ -1302,6 +1302,27 @@ static void cm_format_rep_event(struct c
work->cm_event.private_data = &rep_msg->private_data;
 }
 
+static void cm_dup_rep_handler(struct cm_rep_msg *rep_msg)
+{
+   struct cm_id_private *cm_id_priv;
+   enum ib_cm_state state;
+   unsigned long flags;
+
+   cm_id_priv = cm_acquire_id(rep_msg->remote_comm_id,
+  rep_msg->local_comm_id);
+   if (!cm_id_priv)
+   return;
+
+   spin_lock_irqsave(&cm_id_priv->lock, flags);
+   state = cm_id_priv->id.state;
+   spin_unlock_irqrestore(&cm_id_priv->lock, flags);
+   
+   /* RTU's received in an invalid state will be dropped. */
+   if (state == IB_CM_ESTABLISHED)
+   cm_resend_rtu(cm_id_priv);
+   cm_deref_id(cm_id_priv);
+}
+
 static int cm_rep_handler(struct cm_work *work)
 {
struct cm_id_private *cm_id_priv;
@@ -1313,8 +1334,10 @@ static int cm_rep_handler(struct cm_work
 
rep_msg = (struct cm_rep_msg *)work->mad_recv_wc->recv_buf.mad;
cm_id_priv = cm_acquire_id(rep_msg->remote_comm_id, 0);
-   if (!cm_id_priv)
+   if (!cm_id_priv) {
+   cm_dup_rep_handler(rep_msg);
return -EINVAL;
+   }
 
timewait_info = cm_create_timewait_info(cm_id_priv->id.local_id,
rep_msg->local_comm_id,
@@ -1324,6 +1347,22 @@ static int cm_rep_handler(struct cm_work
ret = PTR_ERR(timewait_info);
goto error1;
}
+   spin_lock_irqsave(&cm.lock, flags);
+   /* Check for duplicate REP. */
+   if (cm_insert_remote_id(timewait_info)) {
+   spin_unlock_irqrestore(&cm.lock, flags);
+   ret = -EINVAL;
+   goto error2;
+   }
+   /* Check for a stale connection. */
+   if (cm_insert_remote_qpn(timewait_info)) {
+   spin_unlock_irqrestore(&cm.lock, flags);
+   /* todo: reject as stale */
+   ret = -EINVAL;
+   goto error2;
+   }
+   spin_unlock_irqrestore(&cm.lock, flags);
+
cm_format_rep_event(work);
 
spin_lock_irqsave(&cm_id_priv->lock, flags);
@@ -1331,11 +1370,6 @@ static int cm_rep_handler(struct cm_work
case IB_CM_REQ_SENT:
case IB_CM_MRA_REQ_RCVD:
break;
-   case IB_CM_ESTABLISHED:
-   spin_unlock_irqrestore(&cm_id_priv->lock, flags);
-   cm_resend_rtu(cm_id_priv);
-   ret = -EINVAL;
-   goto error2;
default:
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
ret = -EINVAL;
@@ -1365,6 +1399,7 @@ static int cm_rep_handler(struct cm_work
cm_deref_id(cm_id_priv);
return 0;
 error2:
+   cm_cleanup_timewait(timewait_info);
kfree(timewait_info);
 error1:
cm_deref_id(cm_id_priv);
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] Re: RFC on SDP checkin

2005-02-17 Thread Libor Michalek
On Thu, Feb 17, 2005 at 04:03:59PM +0200, Michael S. Tsirkin wrote:
> Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > Possible Issues
> >   
> > [...] 
> > 
> >   - Memory locking for AIO requires a call to do_mlock() which is not a
> > kernel exported function, the method for calling the function is not
> > standard.
> 
> Libor, in my eyes this is the biggest issue with this gen2 sdp code.
> In short, I dont think using do_mlock is a good idea.

  I do agree that this is one of the more, if not most, problematic area
of the code, and I like your alternative suggestion below.

> Even if do_mlock *would* be exported, using this call to
> do user page locking has other limitations:
> 
> - number of locked pages is very restricted, if its not,
>   user can easily DOS the box

  I don't think the allowed locked number of pages is an issue, it is
controlled by the user and administrator, which prevents a DOS.

> - fork() is broken in many ways

  Agreed.

> - user is forbidden from doing mlock/munlock

  If either SDP or the userspace code needed to use mlock/munlock we
would really need to add reference counting to the mlocking of VMAs,
this is something that would need ot be pushed upstream. It is a
problem that the user could step on the locking that's going on
behind the scenes.

> I would like to suggest, once again, that the standard get_user_pages
> call is used, instead. It is true that virtual mappings may change,
> but it is easy to check that once the transaction is complete,
> and perform copy if this happends.
> 
> Mellanox implemented and benchmarked this on Gen1 with good results.
> 
> If you are interested, I may post the design document for how this
> works for us, or I can try and find some time to build a patch.
> However, the second option wont happend till the end of
> the month, and the patch is likely to be quite big.

  Yes, this approach was mentioned to me by both Dror and Tziporet,
at the developers workshop, and it does make sense. It does seem
that this would be a better approach then using do_mlock. I would
think that the patch would be isolated entirely to sdp_iocb.[ch]
aside from changing some function names. First we need to get FMR
support in mthca so we can get a baseline with existing code and
something to test against.


-Libor



___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] Re: SDP_CONN_LOCK

2005-02-17 Thread Grant Grundler
On Thu, Feb 17, 2005 at 04:24:13PM -0800, Libor Michalek wrote:
>   OK. I had used macros since in the fast path the functions wouldn't
> get called, but since it sounds like it makes things less readable I
> should be able to quickly try out replacing the macros with functions,
> and see what if any effect it has on performance.

Well, see how big the function is and how often it gets called.
One can define it as a static inline function if it doesn't
bloat the binary too much. Calls to "leaf" functions can
be pretty light weight.

FWIW, I think of static inline functions as "macros with typechecking".
Ie they can be defined in .h files instead of .c files.

grant
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [PATCH]deadlock problem in ipoib

2005-02-17 Thread Shirley Ma

Sorry, made a mistake in the previous
patch. Here is the right one.


diff -urN infiniband/ulp/ipoib/ipoib_main.c
infiniband-lock/ulp/ipoib/ipoib_main.c
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-17
17:24:56.0 +
+++ infiniband-lock/ulp/ipoib/ipoib_main.c        2005-02-18
00:20:10.0 +
@@ -220,18 +220,23 @@
         struct ipoib_dev_priv *priv = netdev_priv(dev);
         struct ipoib_neigh *neigh, *tn;
         struct sk_buff *skb;
+        LIST_HEAD(ah_list);
+        struct ipoib_ah *ah, *tah;
 
         while ((skb = __skb_dequeue(&path->queue)))
                 dev_kfree_skb_irq(skb);
 
         list_for_each_entry_safe(neigh, tn,
&path->neigh_list, list) {
                 if
(neigh->ah)
-                
       ipoib_put_ah(neigh->ah);
+                
       list_add_tail(&neigh->ah->list,
&ah_list);
                 *to_ipoib_neigh(neigh->neighbour)
= NULL;
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
         }
 
+        list_for_each_entry_safe(ah, tah,
&ah_list, list)
+                ipoib_put_ah(ah);
+
         if (path->ah)
                 ipoib_put_ah(path->ah);
 
@@ -660,6 +665,7 @@
         struct ipoib_neigh *neigh = *to_ipoib_neigh(n);
         struct ipoib_dev_priv *priv = netdev_priv(n->dev);
         unsigned long flags;
+        struct
ipoib_ah *ah = NULL;
 
         ipoib_dbg(priv,
                  
"neigh_destructor for %06x " IPOIB_GID_FMT "\n",
@@ -670,13 +676,16 @@
 
         if (neigh) {
                 if
(neigh->ah)
-                
       ipoib_put_ah(neigh->ah);
+                
       ah = neigh->ah;
                 list_del(&neigh->list);
                 *to_ipoib_neigh(n)
= NULL;
                 kfree(neigh);
         }
 
         spin_unlock_irqrestore(&priv->lock,
flags);
+        
+        if (ah)
+                ipoib_put_ah(ah);
 }
 
 static int ipoib_neigh_setup(struct neighbour *neigh)
diff -urN infiniband/ulp/ipoib/ipoib_multicast.c infiniband-lock/ulp/ipoib/ipoib_multicast.c
--- infiniband/ulp/ipoib/ipoib_multicast.c        2005-02-17
17:24:56.0 +
+++ infiniband-lock/ulp/ipoib/ipoib_multicast.c        2005-02-18
00:20:34.0 +
@@ -93,6 +93,8 @@
         struct ipoib_dev_priv *priv = netdev_priv(dev);
         struct ipoib_neigh *neigh, *tmp;
         unsigned long flags;
+        LIST_HEAD(ah_list);
+        struct ipoib_ah *ah, *tah;
 
         ipoib_dbg_mcast(netdev_priv(dev),
                  
      "deleting multicast group " IPOIB_GID_FMT
"\n",
@@ -101,7 +103,8 @@
         spin_lock_irqsave(&priv->lock,
flags);
 
         list_for_each_entry_safe(neigh, tmp,
&mcast->neigh_list, list) {
-        
       ipoib_put_ah(neigh->ah);
+                if
(neigh->ah)
+                
       list_add_tail(&neigh->ah->list,
&ah_list);
                 *to_ipoib_neigh(neigh->neighbour)
= NULL;
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
@@ -109,6 +112,9 @@
 
         spin_unlock_irqrestore(&priv->lock,
flags);
 
+        list_for_each_entry_safe(ah, tah,
&ah_list, list)
+                ipoib_put_ah(ah);
+
         if (mcast->ah)
                 ipoib_put_ah(mcast->ah);
 





Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638



infiniband-lock.patch
Description: Binary data
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Re: [openib-general] Re: SDP_CONN_LOCK

2005-02-17 Thread Libor Michalek
On Thu, Feb 17, 2005 at 03:49:31PM -0800, Sean Hefty wrote:
> Michael S. Tsirkin wrote:
> > Quoting r. Roland Dreier <[EMAIL PROTECTED]>:
> >>
> >>BTW, since mthca currently calls completion handlers directly from
> >>interrupt context (rather than BH/tasklet context), it might be worth
> >>renaming all the SDP locking macros so they're not confusingly named
> >>with _BH suffixes.
> > 
> > I think it would be much nicer to reduce the number of macros used.
> 
> I'd have to agree with this.  The SDP locking macros are fairly complex 
> and hide a lot of functionality.  E.g. SDP_CONN_RELOCK results in 
> polling/rearming the CQ, same with SDP_CONN_UNLOCK.  Maybe that's just 
> a naming issue though.
> 
> I think these would probably be better off as just function calls, 
> rather than macros.  SDP_CONN_LOCK calls sdp_conn_internal_lock(), and 
> that appears to be the only place that the function is called. 
> Similarly, SDP_CONN_UNLOCK calls sdp_conn_internal_unlock().  It seems 
> that you could just merge the macros into the function calls.

  OK. I had used macros since in the fast path the functions wouldn't
get called, but since it sounds like it makes things less readable I
should be able to quickly try out replacing the macros with functions,
and see what if any effect it has on performance.

  And here I would have thought SDP_CONN_HOLD as a macro would have
bugged people more. :)

-Libor
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Libor Michalek
On Fri, Feb 18, 2005 at 01:25:39AM +0200, Michael S. Tsirkin wrote:
> Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > On Fri, Feb 18, 2005 at 12:13:30AM +0200, Michael S. Tsirkin wrote:
> > > Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > > > On Thu, Feb 17, 2005 at 11:29:37PM +0200, Michael S. Tsirkin wrote:
> > > > > Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > > > > > On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> > > > > > > Hi, Libor!
> > > > > > > Could you please explain what are the SDP_CONN_LOCK
> > > > > > > and friends doing in SDP?
> > > > > > > 
> > > > > > > It seems they just implement exclusive access to socket,
> > > > > > > but if so, why is a simple semaphore or mutex not used?
> > > > > > 
> > > > > >   They do implement exclusive access to the socket, but they 
> > > > > > implement
> > > > > > exclusive access from both process and irq context, which is why a
> > > > > > semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is 
> > > > > > used
> > > > > > to lock the connection, look in sdp_cq_event_handler() for it's use,
> > > > > > and in process context SDP_CONN_LOCK is used.
> > > > > 
> > > > > I dont really understand how it works.
> > > > > When an interrupt arrives while users != 0, it seems you are
> > > > > calling scheduler().
> > > > > What is sdp_conn_internal_lock doing? I understand it is to be called
> > > > > from interrupt context, but how can it call scheduler() then?
> > > > 
> > > >   SDP_CONN_LOCK and SDP_CONN_UNLOCK are never called from interrupt
> > > > context, only from process context. The spinlock conn->lock.slock
> > > > is called in interrupt context and process context before the 'users'
> > > > variable is changed or read. If users != 0, then the connection is in
> > > > use by process context. If the connection is in use then another lock
> > > > request in process context will sleep until users == 0, if the 
> > > > connection
> > > > is in use then a lock request in interrupt context will mark the
> > > > connection as having had an event and return. When a process context
> > > > lock holder releases the lock, it checks if there has been an interrupt
> > > > event, which it then processes by draining and arming the CQ, and it
> > > > wakes any process context waiting for the lock.
> > > 
> > > Cant all this be done by a semaphore in process context, and 
> > > down_trylock in interrupt context?
> > > The "connection has an event" bit could be protected by a spinlock.
> > 
> >   The CQ draining happens inside of the spinlock. If the CQ drain
> > happened in process context inside of a semaphore, then there is
> > a race condition for the interrupt between checking the semaphore
> > and setting the spinlock protected "connection event bit". The
> > CQ drain and the "event bit" have to happen under the same lock
> > to avoid the race. 
> > 
> >   If you move the CQ drain and the "event bit" into the same spinlock
> > where do you put the semaphore? In process context the spin would
> > need to be inside the semaphore lock, but in interrupt context the
> > semaphore down_trylock and up are inside the spinlock. Now there would
> > be a race between spin_unlock() followed by up() in process context
> > and spin_lock() followed by down_trylock() in interrupt context.
> > 
> >spin_unlock()
> >   spin_lock()
> >   down_trylock()
> >up()
> 
> Since CQ drain is protected by spinlock - move it outside the semaphore?
> 
> process:
> 
> down
> stuff
> up
> 
> lock
> check bit and arm
> drain
> unlock

  The problem with this ordering is that 'drain' in the spinlock is actually
doing the same things as 'stuff' inside the semaphore, both are modifying
connection structures, like queues and counters, and so if two processes
are contending for the locks, then they're going to be stepping on the
connection:

   process 1: process two

   down
   stuff
   up
  down
   lock
   check bit and arm
   drain
 stuffstuff
   unlock up

> Anyway, this flow is just an optimisation - so I wander how much does 
> it help, actually.

  No, it's not just an optimization. The drain in process context is a
optimization, but having a lock protecting in both contexts is necessary.

  Without the drain in process context you would need to handle the actual
CQ event, but if the connection is locked in process context, what do
you do with the event? You either wait for the lock to be released, or
you process it to a point, and then queue it for further handling once
the lock is released. Waiting for a lock release is not practical, and 
processing to a point is what we are currently doing, just we are
processing it the bare minimum, and leaving the rest for process
context.

  Setting the event bit and processing of the CQ in process context was
actually a big simplification which not surprisingly performed much
better as well.

> My

Re: [openib-general] Re: SDP_CONN_LOCK

2005-02-17 Thread Sean Hefty
Michael S. Tsirkin wrote:
Quoting r. Roland Dreier <[EMAIL PROTECTED]>:
Subject: Re: SDP_CONN_LOCK
BTW, since mthca currently calls completion handlers directly from
interrupt context (rather than BH/tasklet context), it might be worth
renaming all the SDP locking macros so they're not confusingly named
with _BH suffixes.
- R.

I think it would be much nicer to reduce the number of macros used.
I'd have to agree with this.  The SDP locking macros are fairly complex 
and hide a lot of functionality.  E.g. SDP_CONN_RELOCK results in 
polling/rearming the CQ, same with SDP_CONN_UNLOCK.  Maybe that's just 
a naming issue though.

I think these would probably be better off as just function calls, 
rather than macros.  SDP_CONN_LOCK calls sdp_conn_internal_lock(), and 
that appears to be the only place that the function is called. 
Similarly, SDP_CONN_UNLOCK calls sdp_conn_internal_unlock().  It seems 
that you could just merge the macros into the function calls.

Unfortunately, I don't really have the time at the moment to help do 
any of this cleanup.

- Sean
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] Re: SDP_CONN_LOCK

2005-02-17 Thread Michael S. Tsirkin
Quoting r. Roland Dreier <[EMAIL PROTECTED]>:
> Subject: Re: SDP_CONN_LOCK
> 
> BTW, since mthca currently calls completion handlers directly from
> interrupt context (rather than BH/tasklet context), it might be worth
> renaming all the SDP locking macros so they're not confusingly named
> with _BH suffixes.
> 
>  - R.

I think it would be much nicer to reduce the number of macros used.

-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Michael S. Tsirkin
Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> Subject: Re: [openib-general] SDP_CONN_LOCK
> 
> On Fri, Feb 18, 2005 at 12:13:30AM +0200, Michael S. Tsirkin wrote:
> > Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > > On Thu, Feb 17, 2005 at 11:29:37PM +0200, Michael S. Tsirkin wrote:
> > > > Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > > > > On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> > > > > > Hi, Libor!
> > > > > > Could you please explain what are the SDP_CONN_LOCK
> > > > > > and friends doing in SDP?
> > > > > > 
> > > > > > It seems they just implement exclusive access to socket,
> > > > > > but if so, why is a simple semaphore or mutex not used?
> > > > > 
> > > > >   They do implement exclusive access to the socket, but they implement
> > > > > exclusive access from both process and irq context, which is why a
> > > > > semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is used
> > > > > to lock the connection, look in sdp_cq_event_handler() for it's use,
> > > > > and in process context SDP_CONN_LOCK is used.
> > > > 
> > > > I dont really understand how it works.
> > > > When an interrupt arrives while users != 0, it seems you are
> > > > calling scheduler().
> > > > What is sdp_conn_internal_lock doing? I understand it is to be called
> > > > from interrupt context, but how can it call scheduler() then?
> > > 
> > >   SDP_CONN_LOCK and SDP_CONN_UNLOCK are never called from interrupt
> > > context, only from process context. The spinlock conn->lock.slock
> > > is called in interrupt context and process context before the 'users'
> > > variable is changed or read. If users != 0, then the connection is in
> > > use by process context. If the connection is in use then another lock
> > > request in process context will sleep until users == 0, if the connection
> > > is in use then a lock request in interrupt context will mark the
> > > connection as having had an event and return. When a process context
> > > lock holder releases the lock, it checks if there has been an interrupt
> > > event, which it then processes by draining and arming the CQ, and it
> > > wakes any process context waiting for the lock.
> > 
> > Cant all this be done by a semaphore in process context, and 
> > down_trylock in interrupt context?
> > The "connection has an event" bit could be protected by a spinlock.
> 
>   The CQ draining happens inside of the spinlock. If the CQ drain
> happened in process context inside of a semaphore, then there is
> a race condition for the interrupt between checking the semaphore
> and setting the spinlock protected "connection event bit". The
> CQ drain and the "event bit" have to happen under the same lock
> to avoid the race. 
> 
>   If you move the CQ drain and the "event bit" into the same spinlock
> where do you put the semaphore? In process context the spin would
> need to be inside the semaphore lock, but in interrupt context the
> semaphore down_trylock and up are inside the spinlock. Now there would
> be a race between spin_unlock() followed by up() in process context
> and spin_lock() followed by down_trylock() in interrupt context.
> 
>spin_unlock()
>   spin_lock()
>   down_trylock()
>up()
> 
> 
> -Libor
> 

Since CQ drain is protected by spinlock - move it outside the semaphore?

process:

down
stuff
up

lock
check bit and arm
drain
unlock

interrupt:

lock
down_trylock
set bit
up
unlock

Anyway, this flow is just an optimisation - so I wander how much does it help,
actually. My understanding this is a backport from gen1, but what was
a useful optimisation for gen1 may not be for gen2.
gen2 event flow is much faster than gen1 - it is possible
all the extra locking and complications are not worth it with mthca.
I know this is what my attempts to switch to polling in ip over ib show.

-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Libor Michalek
On Fri, Feb 18, 2005 at 12:13:30AM +0200, Michael S. Tsirkin wrote:
> Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > On Thu, Feb 17, 2005 at 11:29:37PM +0200, Michael S. Tsirkin wrote:
> > > Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > > > On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> > > > > Hi, Libor!
> > > > > Could you please explain what are the SDP_CONN_LOCK
> > > > > and friends doing in SDP?
> > > > > 
> > > > > It seems they just implement exclusive access to socket,
> > > > > but if so, why is a simple semaphore or mutex not used?
> > > > 
> > > >   They do implement exclusive access to the socket, but they implement
> > > > exclusive access from both process and irq context, which is why a
> > > > semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is used
> > > > to lock the connection, look in sdp_cq_event_handler() for it's use,
> > > > and in process context SDP_CONN_LOCK is used.
> > > 
> > > I dont really understand how it works.
> > > When an interrupt arrives while users != 0, it seems you are
> > > calling scheduler().
> > > What is sdp_conn_internal_lock doing? I understand it is to be called
> > > from interrupt context, but how can it call scheduler() then?
> > 
> >   SDP_CONN_LOCK and SDP_CONN_UNLOCK are never called from interrupt
> > context, only from process context. The spinlock conn->lock.slock
> > is called in interrupt context and process context before the 'users'
> > variable is changed or read. If users != 0, then the connection is in
> > use by process context. If the connection is in use then another lock
> > request in process context will sleep until users == 0, if the connection
> > is in use then a lock request in interrupt context will mark the
> > connection as having had an event and return. When a process context
> > lock holder releases the lock, it checks if there has been an interrupt
> > event, which it then processes by draining and arming the CQ, and it
> > wakes any process context waiting for the lock.
> 
> Cant all this be done by a semaphore in process context, and 
> down_trylock in interrupt context?
> The "connection has an event" bit could be protected by a spinlock.

  The CQ draining happens inside of the spinlock. If the CQ drain
happened in process context inside of a semaphore, then there is
a race condition for the interrupt between checking the semaphore
and setting the spinlock protected "connection event bit". The
CQ drain and the "event bit" have to happen under the same lock
to avoid the race. 

  If you move the CQ drain and the "event bit" into the same spinlock
where do you put the semaphore? In process context the spin would
need to be inside the semaphore lock, but in interrupt context the
semaphore down_trylock and up are inside the spinlock. Now there would
be a race between spin_unlock() followed by up() in process context
and spin_lock() followed by down_trylock() in interrupt context.

   spin_unlock()
  spin_lock()
  down_trylock()
   up()


-Libor


___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][33/33] Fix comment style in sdp_write.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_write.c 2005-02-15 16:33:46.194005000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_write.c  2005-02-17 11:57:50.886008000 
-0800
@@ -1,35 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_write.c 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* RDMA read QP Event Handler*/
-/*   */
-/* - */
-/* = */
-/*..sdp_event_write -- RDMA write event handler. */
+/*
+ * RDMA read QP Event Handler
+ */
+
+/*
+ * sdp_event_write - RDMA write event handler
+ */
 int sdp_event_write(struct sdp_opt *conn, struct ib_wc *comp)
 {
struct sdpc_iocb *iocb;

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][32/33] Fix comment style in sdp_wall.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_wall.c  2005-02-10 18:42:56.553008000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_wall.c   2005-02-17 11:56:59.912002000 
-0800
@@ -1,35 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_wall.c 488 2004-07-16 23:40:31Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* SDP protocol (public functions)   */
-/*   */
-/* - */
-/* = */
-/*..sdp_wall_send_reject -- callback to reject an active open */
+/*
+ * SDP protocol (public functions)
+ */
+
+/*
+ * sdp_wall_send_reject - callback to reject an active open
+ */
 int sdp_wall_send_reject(struct sdp_opt *conn)
 {
int result;
@@ -51,8 +62,9 @@ int sdp_wall_send_reject(struct sdp_opt 
return 0;
 } /* sdp_wall_send_reject */
 
-/* = */
-/*..sdp_wall_send_close -- callback to accept an active close */
+/*
+ * sdp_wall_send_close - callback to accept an active close
+ */
 int sdp_wall_send_close(struct sdp_opt *conn)
 {
struct sdpc_buff *buff;
@@ -134,8 +146,9 @@ error:
return result;
 } /* sdp_wall_send_close */
 
-/* = */
-/*..sdp_wall_send_closing -- callback to confirm a passive close */
+/*
+ * sdp_wall_send_closing - callback to confirm a passive close
+ */
 int sdp_wall_send_closing(struct sdp_opt *conn)
 {
int result;
@@ -191,8 +204,9 @@ error:
return result;
 } /* sdp_wall_send_closing */
 
-/* = */
-/*..sdp_wall_send_abort -- callback to accept an active abort */
+/*
+ * sdp_wall_send_abort - callback to accept an active abort
+ */
 int sdp_wall_send_abort(struct sdp_opt *conn)
 {
int result = 0;
@@ -305,14 +319,13 @@ error:
return 0;
 } /* sdp_wall_send_abort */
 
-/* - */
-/*   */
-/* SDP INET (public functions)   */
-/*   

[openib-general] [PATCH][SDP][31/33] Fix comment style in sdp_sock.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_sock.h  2005-02-11 17:28:16.827018000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_sock.h   2005-02-17 11:53:24.583003000 
-0800
@@ -1,28 +1,40 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_sock.h 140 2004-05-11 00:30:52Z libor $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_SOCK_H
 #define _SDP_SOCK_H
+
 /*
  * SDP socket protocol/address family for socket() function. For all other
  * functions (e.g bind, connect, etc.) Either AF_INET or AF_INET_SDP can
@@ -31,13 +43,16 @@
 #define AF_INET_SDP  27
 #define PF_INET_SDP  AF_INET_SDP
 #define AF_INET_STR "AF_INET_SDP" /* SDP enabled environment variable */
+
 /*
  * Socket option level for SDP specific parameters.
  */
 #define SOL_SDP   1025
-/*  */
-/* Socket options which are SDP specific.   */
-/*  */
+
+/*
+ * Socket options which are SDP specific
+ */
+
 /*
  * zero copy transfer thresholds. ({get,set}sockopt parameter optval is of
  * type 'int')
@@ -45,6 +60,7 @@
 #define SDP_ZCOPY_THRSH_SRC  257 /* Threshold for AIO write advertisments */
 #define SDP_ZCOPY_THRSH_SNK  258 /* Threshold for AIO read advertisments */
 #define SDP_ZCOPY_THRSH  256 /* Convenience for read and write */
+
 /*
  * Default values for SDP specific socket options. (for reference)
  */

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][30/33] Fix comment style in sdp_sent.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_sent.c  2005-02-15 16:33:46.247005000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_sent.c   2005-02-17 11:52:21.451002000 
-0800
@@ -1,35 +1,43 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_sent.c 836 2004-09-14 20:50:32Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* Specific MID handler functions. (SEND)*/
-/*   */
-/* - */
-/* = */
-/*.._sdp_sent_disconnect --  */
+/*
+ * Specific MID handler functions. (SEND)
+ */
+
 static int _sdp_sent_disconnect(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
int result;
@@ -115,8 +123,6 @@ error:
return result;
 } /* _sdp_sent_disconnect */
 
-/* = */
-/*.._sdp_sent_abort --  */
 static int _sdp_sent_abort(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
int result;
@@ -139,8 +145,6 @@ static int _sdp_sent_abort(struct sdp_op
return result;
 } /* _sdp_sent_abort */
 
-/* = */
-/*.._sdp_sent_send_sm --  */
 static int _sdp_sent_send_sm(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
SDP_CHECK_NULL(conn, -EINVAL);
@@ -149,8 +153,6 @@ static int _sdp_sent_send_sm(struct sdp_
return 0;
 } /* _sdp_sent_send_sm */
 
-/* = */
-/*.._sdp_sent_rdma_wr --  */
 static int _sdp_sent_rdma_wr(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct msg_hdr_rwch *rwch;
@@ -166,8 +168,6 @@ static int _sdp_sent_rdma_wr(struct sdp_
return 0;
 } /* _sdp_sent_rdma_wr */
 
-/* = */
-/*.._sdp_sent_rdma_rd --  */
 static int _sdp_sent_rdma_rd(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct msg_hdr_rrch *rrch;
@@ -183,8 +183,6 @@ static int _sdp_sent_rdma_rd(struct sdp_
return 0;
 } /* _sdp_sent_rdma_rd */
 
-/* = */
-/*.._sdp_sent_mode_change --  */
 static int _sdp_sent_mode_change(struct sdp_opt *conn, struc

[openib-general] [PATCH][SDP][29/33] Fix comment style in sdp_send.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_send.c  2005-02-14 13:58:45.860001000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_send.c   2005-02-17 11:38:10.806001000 
-0800
@@ -1,35 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_send.c 836 2004-09-14 20:50:32Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/*  COMMON functions */
-/*   */
-/* - */
-/* = */
-/*.._sdp_send_buff_post -- Post a buffer send on a SDP connection. */
+/*
+ * COMMON functions
+ */
+
+/*
+ * _sdp_send_buff_post - Post a buffer send on a SDP connection
+ */
 static int _sdp_send_buff_post(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct ib_send_wr send_param = { NULL };
@@ -187,14 +198,13 @@ done:
return result;
 } /* _sdp_send_buff_post */
 
-/* - */
-/*   */
-/*  DATA functions   */
-/*   */
-/* - */
+/*
+ * DATA functions
+ */
 
-/* = */
-/*.._sdp_send_data_buff_post -- Post data for buffered transmission */
+/*
+ * _sdp_send_data_buff_post - Post data for buffered transmission
+ */
 static int _sdp_send_data_buff_post(struct sdp_opt *conn,
struct sdpc_buff *buff)
 {
@@ -317,8 +327,9 @@ error:
return result;
 } /* _sdp_send_data_buff_post */
 
-/* = */
-/*.._sdp_send_data_buff_snk -- Post data for buffered transmission */
+/*
+ * _sdp_send_data_buff_snk - Post data for buffered transmission
+ */
 static int _sdp_send_data_buff_snk(struct sdp_opt *conn,
   struct sdpc_buff *buff)
 {
@@ -467,8 +478,9 @@ error:
return result;
 } /* _sdp_send_data_buff_snk */
 
-/* = */
-/*.._sdp_sen

[openib-general] [PATCH][SDP][28/33] Fix comment style in sdp_recv.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_recv.c  2005-02-14 13:58:45.877005000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_recv.c   2005-02-17 12:03:28.285005000 
-0800
@@ -1,34 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
+#include "sdp_main.h"
 
-  $Id: sdp_recv.c 836 2004-09-14 20:50:32Z roland $
-*/
+/*
+ * Receive posting function(s)
+ */
 
-#include "sdp_main.h"
-/* - */
-/*   */
-/* Receive posting function(s)   */
-/*   */
-/* - */
-/* = */
-/*.._sdp_post_recv_buff -- post a single buffers for data recv */
+/*
+ * _sdp_post_recv_buff - post a single buffers for data recv
+ */
 static int _sdp_post_recv_buff(struct sdp_opt *conn)
 {
struct ib_recv_wr receive_param = { NULL };
@@ -104,8 +116,9 @@ error:
return result;
 } /* _sdp_post_recv_buff */
 
-/* = */
-/*.._sdp_post_rdma_buff -- post a single buffers for rdma read on a conn */
+/*
+ * _sdp_post_rdma_buff - post a single buffers for rdma read on a conn
+ */
 static int _sdp_post_rdma_buff(struct sdp_opt *conn)
 {
struct ib_send_wr send_param = { NULL };
@@ -233,8 +246,9 @@ done:
return result;
 } /* _sdp_post_rdma_buff */
 
-/* = */
-/*.._sdp_post_rdma_iocb_src -- post a iocb for rdma read on a conn */
+/*
+ * _sdp_post_rdma_iocb_src - post a iocb for rdma read on a conn
+ */
 static int _sdp_post_rdma_iocb_src(struct sdp_opt *conn)
 {
struct ib_send_wr send_param = { NULL };
@@ -388,8 +402,9 @@ done:
return result;
 } /* _sdp_post_rdma_iocb_src */
 
-/* = */
-/*.._sdp_post_rdma_iocb_snk -- post a iocb for rdma read on a conn */
+/*
+ * _sdp_post_rdma_iocb_snk - post a iocb for rdma read on a conn
+ */
 static int _sdp_post_rdma_iocb_snk(struct sdp_opt *conn)
 {
struct sdpc_iocb *iocb;
@@ -497,8 +512,9 @@ error:
return result;
 } /* _sdp_post_rdma_iocb_snk */
 
-/* = */
-/*.._sdp_post_rdma -- post a rdma based requ

[openib-general] [PATCH][SDP][27/33] Fix comment style in sdp_read.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_read.c  2005-02-15 16:33:46.22000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_read.c   2005-02-17 11:30:04.047019000 
-0800
@@ -1,36 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_read.c 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* RDMA read processing functions*/
-/*   */
-/* - */
+/*
+ * RDMA read processing functions
+ */
 
-/* = */
-/*.._sdp_event_read_advt -- RDMA read event handler for source advertisments. 
*/
+/*
+ * _sdp_event_read_advt - RDMA read event handler for source advertisments
+ */
 static int _sdp_event_read_advt(struct sdp_opt *conn, struct ib_wc *comp)
 {
struct sdpc_advt *advt;
@@ -98,13 +108,13 @@ error:
return result;
 } /* _sdp_event_read_advt */
 
-/* - */
-/*   */
-/* RDMA read QP Event Handler*/
-/*   */
-/* - */
-/* = */
-/*..sdp_event_read -- RDMA read event handler. */
+/*
+ * RDMA read QP Event Handler
+ */
+
+/*
+ * sdp_event_read - RDMA read event handler
+ */
 int sdp_event_read(struct sdp_opt *conn, struct ib_wc *comp)
 {
struct sdpc_iocb *iocb;

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Michael S. Tsirkin

Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> Subject: Re: [openib-general] SDP_CONN_LOCK
> 
> On Thu, Feb 17, 2005 at 11:29:37PM +0200, Michael S. Tsirkin wrote:
> > Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > > Subject: Re: [openib-general] SDP_CONN_LOCK
> > > 
> > > On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> > > > Hi, Libor!
> > > > Could you please explain what are the SDP_CONN_LOCK
> > > > and friends doing in SDP?
> > > > 
> > > > It seems they just implement exclusive access to socket,
> > > > but if so, why is a simple semaphore or mutex not used?
> > > 
> > >   They do implement exclusive access to the socket, but they implement
> > > exclusive access from both process and irq context, which is why a
> > > semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is used
> > > to lock the connection, look in sdp_cq_event_handler() for it's use,
> > > and in process context SDP_CONN_LOCK is used.
> > 
> > I dont really understand how it works.
> > When an interrupt arrives while users != 0, it seems you are
> > calling scheduler().
> > What is sdp_conn_internal_lock doing? I understand it is to be called
> > from interrupt context, but how can it call scheduler() then?
> 
>   SDP_CONN_LOCK and SDP_CONN_UNLOCK are never called from interrupt
> context, only from process context. The spinlock conn->lock.slock
> is called in interrupt context and process context before the 'users'
> variable is changed or read. If users != 0, then the connection is in
> use by process context. If the connection is in use then another lock
> request in process context will sleep until users == 0, if the connection
> is in use then a lock request in interrupt context will mark the
> connection as having had an event and return. When a process context
> lock holder releases the lock, it checks if there has been an interrupt
> event, which it then processes by draining and arming the CQ, and it
> wakes any process context waiting for the lock.
> 
> 
> -Libor
> 

Cant all this be done by a semaphore in process context, and 
down_trylock in interrupt context?
The "connection has an event" bit could be protected by a spinlock.

-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][26/33] Fix comment style in sdp_rcvd.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_rcvd.c  2005-02-15 16:33:46.210001000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_rcvd.c   2005-02-17 11:26:31.11000 
-0800
@@ -1,35 +1,43 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_rcvd.c 836 2004-09-14 20:50:32Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* Specific MID handler functions. (RECV)*/
-/*   */
-/* - */
-/* = */
-/*.._sdp_rcvd_disconnect --  */
+/*
+ * Specific MID handler functions. (RECV)
+ */
+
 static int _sdp_rcvd_disconnect(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
int result = 0;
@@ -119,8 +127,6 @@ error:
return result;
 } /* _sdp_rcvd_disconnect */
 
-/* = */
-/*.._sdp_rcvd_abort --  */
 static int _sdp_rcvd_abort(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
int result = 0;
@@ -158,8 +164,6 @@ static int _sdp_rcvd_abort(struct sdp_op
return result;
 } /* _sdp_rcvd_abort */
 
-/* = */
-/*.._sdp_rcvd_send_sm --  */
 static int _sdp_rcvd_send_sm(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct sdpc_iocb *iocb;
@@ -206,8 +210,6 @@ static int _sdp_rcvd_send_sm(struct sdp_
return 0;
 } /* _sdp_rcvd_send_sm */
 
-/* = */
-/*.._sdp_rcvd_rdma_wr --  */
 static int _sdp_rcvd_rdma_wr(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct msg_hdr_rwch *rwch;
@@ -275,8 +277,6 @@ error:
return result;
 } /* _sdp_rcvd_rdma_wr */
 
-/* = */
-/*.._sdp_rcvd_rdma_rd --  */
 static int _sdp_rcvd_rdma_rd(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct msg_hdr_rrch *rrch;
@@ -367,8 +367,6 @@ error:
return result;
 } /* _sdp_rcvd_rdma_rd */
 
-/* = */
-/*.._sdp_rcvd_mode_change --  */
 static int _sdp_rcvd_mode_change(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
struct msg_hdr_mch *mch;
@@

[openib-general] [PATCH][SDP][25/33] Fix comment style in sdp_queue.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_queue.h 2005-02-10 18:42:56.256023000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_queue.h  2005-02-17 11:22:36.106017000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_queue.h 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_QUEUE_H
 #define _SDP_QUEUE_H
@@ -34,9 +45,9 @@ enum sdp_desc_type {
SDP_DESC_TYPE_NONE
 };
 
-/* --- */
-/* SDP generic queue for multiple object types.*/
-/* --- */
+/*
+ * SDP generic queue for multiple object types
+ */
 
 struct sdpc_desc {
struct sdpc_desc   *next;  /* next structure in table */
@@ -45,6 +56,7 @@ struct sdpc_desc {
struct sdpc_desc_q *table; /* table to which this object belongs */
int (*release)(struct sdpc_desc *element); /* release the object */
 }; /* struct sdpc_desc */
+
 /*
  * table for holding SDP advertisments.
  */
@@ -53,21 +65,22 @@ struct sdpc_desc_q {
int size;   /* current number of advertisments in table */
u16 count[SDP_DESC_TYPE_NONE]; /* object specific counter */
 }; /* struct sdpc_desc_q */
-/* --- */
-/* */
-/* SDP generic queue inline functions. */
-/* */
-/* --- */
 
-/* = */
-/*..__sdp_desc_q_size - return the number of elements in the table */
+/*
+ * SDP generic queue inline functions
+ */
+
+/*
+ * __sdp_desc_q_size - return the number of elements in the table
+ */
 static __inline__ int __sdp_desc_q_size(struct sdpc_desc_q *table)
 {
return table->size;
 } /* __sdp_desc_q_size */
 
-/* = */
-/*..__sdp_desc_q_member - return non-zero if element is in a table */
+/*
+ * __sdp_desc_q_member - return non-zero if element is in a table
+ */
 static __inline__ int __sdp_desc_q_member(struct sdpc_desc *element)
 {
return ((NULL == element->table) ? 0 : 1);

___
openib-general mailing list
openib-general@openib.org
http://openib.or

[openib-general] [PATCH][SDP][24/33] Fix comment style in sdp_queue.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_queue.c 2005-02-10 18:42:57.12000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_queue.c  2005-02-17 11:21:40.495015000 
-0800
@@ -1,37 +1,48 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_queue.c 620 2004-08-10 03:46:43Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
 static kmem_cache_t *__sdp_desc_table = NULL;
 
-/* - */
-/*   */
-/* module specific functions */
-/*   */
-/* - */
-/* = */
-/*.._sdp_desc_q_get - Get an element from a specific table */
+/*
+ * module specific functions
+ */
+
+/*
+ * _sdp_desc_q_get - Get an element from a specific table
+ */
 static struct sdpc_desc *_sdp_desc_q_get(struct sdpc_desc_q *table,
 int fifo)
 {
@@ -76,8 +87,9 @@ static struct sdpc_desc *_sdp_desc_q_get
return element;
 } /* _sdp_desc_q_get */
 
-/* = */
-/*.._sdp_desc_q_put - Place an element into a specific table */
+/*
+ * _sdp_desc_q_put - Place an element into a specific table
+ */
 static __inline__ int _sdp_desc_q_put(struct sdpc_desc_q *table,
  struct sdpc_desc *element, 
  int fifo)
@@ -120,13 +132,13 @@ static __inline__ int _sdp_desc_q_put(st
return 0;
 } /* _sdp_desc_q_put */
 
-/* - */
-/*   */
-/* public advertisment object functions for FIFO object table*/
-/*   */
-/* - */
-/* = */
-/*..sdp_desc_q_remove - remove a specific element from a table */
+/*
+ * public advertisment object functions for FIFO object table
+ */
+
+/*
+ * sdp_desc_q_remove - remove a specific element from a table
+ */
 int sdp_desc_q_remove(struct sdpc_desc *element)
 {
struct sdpc_desc_q *table;
@@ -168,8 +180,9 @@ int sdp_desc_q_remove

[openib-general] [PATCH][SDP][23/33] Fix comment style in sdp_proto.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_proto.h 2005-02-10 18:42:56.417024000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_proto.h  2005-02-17 11:17:48.805008000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_proto.h 994 2004-10-14 05:38:39Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_PROTO_H
 #define _SDP_PROTO_H
@@ -34,9 +45,9 @@
 #include "sdp_iocb.h"
 #include "sdp_queue.h"
 
-/* - */
-/* Buffer managment  */
-/* - */
+/*
+ * Buffer managment
+ */
 struct sdpc_buff *sdp_buff_pool_get(void);
 
 int sdp_buff_pool_put(struct sdpc_buff *buff);
@@ -115,9 +126,9 @@ int sdp_proc_dump_buff_pool(char *buffer
off_t start_index,
long *end_index);
 
-/* - */
-/* Wall between userspace protocol and SDP protocol proper   */
-/* - */
+/*
+ * Wall between userspace protocol and SDP protocol proper
+ */
 int sdp_wall_send_reject(struct sdp_opt *conn);
 
 int sdp_wall_send_close(struct sdp_opt *conn);
@@ -143,9 +154,10 @@ int sdp_wall_recv_drop(struct sdp_opt *c
 int sdp_wall_abort(struct sdp_opt *conn);
 
 int sdp_recv_buff(struct sdp_opt *conn, struct sdpc_buff *buff);
-/* - */
-/* Zcopy advertisment managment  */
-/* - */
+
+/*
+ * Zcopy advertisment managment
+ */
 int sdp_main_advt_init(void);
 
 int sdp_main_advt_cleanup(void);
@@ -167,9 +179,10 @@ struct sdpc_advt *sdp_advt_q_get(struct 
 struct sdpc_advt *sdp_advt_q_look(struct sdpc_advt_q *table);
 
 int sdp_advt_q_put(struct sdpc_advt_q *table, struct sdpc_advt *advt);
-/* - */
-/* Zcopy IOCB managment  */
-/* - */
+
+/*
+ * Zcopy IOCB managment
+ */
 int sdp_main_iocb_init(void);
 
 int sdp_main_iocb_cleanup(void);
@@ -213,9 +226,10 @@ int sdp_iocb_complete(struct sdpc_iocb *
 int sdp_iocb_lock(struct sdpc_iocb *iocb);
 
 int sdp_iocb_unlock(struct sdpc_iocb *iocb);
-/* --

[openib-general] [PATCH][SDP][22/33] Fix comment style in sdp_proc.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_proc.h  2005-02-10 18:42:56.751003000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_proc.h   2005-02-17 11:13:23.59802 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_proc.h 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_PROC_H
 #define _SDP_PROC_H
@@ -27,9 +38,11 @@
 #include 
 
 #define SDP_PROC_DIR_NAME "sdp"
-/* - */
-/* file and directory entries*/
-/* - */
+
+/*
+ * file and directory entries
+ */
+
 /*
  * proc filesystem framework table/file entries
  */
@@ -55,4 +68,3 @@ struct sdpc_proc_ent {
 }; /* struct sdpc_proc_ent */
 
 #endif /* _SDP_PROC_H */
-

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][21/33] Fix comment style in sdp_proc.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_proc.c  2005-02-14 11:13:15.600961000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_proc.c   2005-02-17 11:12:47.182006000 
-0800
@@ -1,38 +1,49 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_proc.c 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
 static const char _dir_name_root[] = SDP_PROC_DIR_NAME;
 static struct proc_dir_entry *_dir_root = NULL;
 
-/* --- */
-/* */
-/* Generic static functions used by read/write functions   */
-/* */
-/* --- */
-/* = */
-/*.._sdp_proc_read_parse -- read function for the injection table */
+/*
+ * Generic static functions used by read/write functions
+ */
+
+/*
+ * _sdp_proc_read_parse - read function for the injection table
+ */
 static int _sdp_proc_read_parse(char *page,
char **start, 
off_t offset,
@@ -69,11 +80,10 @@ static int _sdp_proc_read_parse(char *pa
return size;
 } /* _sdp_proc_read_parse */
 
-/* --- */
-/* */
-/* Static read/write functions for each proc/framework directory entry */
-/* */
-/* --- */
+/*
+ * Static read/write functions for each proc/framework directory entry
+ */
+
 /*
  * Initialization structure, each table in the gateway framework directory
  * (anything that is not a module) should create an entry and define read
@@ -118,14 +128,13 @@ static struct sdpc_proc_ent _file_entry_
   },
 } ;
 
-/* --- */
-/* */
-/* SDP module public functions.*/
-/* */
-/* --- */
+/*
+ * SDP module public functions.
+ */
 
-/* = */
-/*..sdp_ma

[openib-general] [PATCH][SDP][20/33] Fix comment style in sdp_post.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_post.c  2005-02-10 18:42:57.157027000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_post.c   2005-02-17 11:11:01.646018000 
-0800
@@ -1,30 +1,42 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_post.c 649 2004-08-13 22:41:04Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* = */
-/*..sdp_cm_listen_start --  start listening on all possible socket ports */
+/*
+ * sdp_cm_listen_start - start listening on all possible socket ports
+ */
 int sdp_cm_listen_start(struct sdev_root *dev_root)
 {
int result = 0;
@@ -64,8 +76,9 @@ int sdp_cm_listen_start(struct sdev_root
return result;
 } /* sdp_cm_listen_start */
 
-/* = */
-/*..sdp_cm_listen_stop --  stop listening on all possible socket ports */
+/*
+ * sdp_cm_listen_stop - stop listening on all possible socket ports
+ */
 int sdp_cm_listen_stop(struct sdev_root *dev_root)
 {
int result = 0;
@@ -87,8 +100,9 @@ int sdp_cm_listen_stop(struct sdev_root 
return result;
 } /* sdp_cm_listen_stop */
 
-/* = */
-/*.._sdp_cm_disconnect -- initiate a disconnect request using the CM */
+/*
+ * _sdp_cm_disconnect - initiate a disconnect request using the CM
+ */
 static void _sdp_cm_disconnect(void *arg)
 {
struct sdp_opt *conn = (struct sdp_opt *)arg;
@@ -115,8 +129,9 @@ static void _sdp_cm_disconnect(void *arg
return;
 } /* _sdp_cm_disconnect */
 
-/* = */
-/*.._sdp_cm_reject -- initiate a reject request using the CM */
+/*
+ * _sdp_cm_reject - initiate a reject request using the CM
+ */
 static void _sdp_cm_reject(void *arg)
 {
struct sdp_opt *conn = (struct sdp_opt *)arg;
@@ -144,8 +159,9 @@ static void _sdp_cm_reject(void *arg)
return;
 } /* _sdp_cm_reject */
 
-/* = */
-/*.._sdp_cm_confirm -- initiate a confirm request using the CM */
+/*
+ * _sdp_cm_confirm - initiate a confirm request using the CM
+ */
 static void _sdp_cm_confirm(void *arg)
 {
struct sdp_opt *conn = (struct sdp_opt *)arg;
@@ -171,8 +187,9 @@ static void _sdp_cm_confirm(void *arg)
return;
 } /* _sdp_cm_confirm */
 
-/* = */
-/*.._sdp_cm_failed -- initi

[openib-general] [PATCH][SDP][19/33] Fix comment style in sdp_pass.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_pass.c  2005-02-15 16:33:46.238009000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_pass.c   2005-02-17 11:08:43.171002000 
-0800
@@ -1,30 +1,42 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_post.c 649 2004-08-13 22:41:04Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* = */
-/*.._sdp_cm_accept -- respond to a connection attempt with an ack */
+/*
+ * _sdp_cm_accept - respond to a connection attempt with an ack
+ */
 static int _sdp_cm_accept(struct sdp_opt *conn)
 {
struct ib_cm_rep_param param;
@@ -176,8 +188,9 @@ error:
return result;
 } /* _sdp_cm_accept */
 
-/* = */
-/*.._sdp_cm_listen_lookup -- match a listener with an incomming conn. */
+/*
+ * _sdp_cm_listen_lookup - match a listener with an incomming conn
+ */
 static int _sdp_cm_listen_lookup(struct sdp_opt *conn)
 {
struct sdp_opt *listen_conn;
@@ -297,8 +310,9 @@ lookup_err:
return result;
 } /* _sdp_cm_listen_lookup */
 
-/* = */
-/*.._sdp_cm_hello_check -- validate the hello header */
+/*
+ * _sdp_cm_hello_check - validate the hello header
+ */
 static int _sdp_cm_hello_check(struct msg_hello *msg_hello)
 {
/*
@@ -369,10 +383,10 @@ static int _sdp_cm_hello_check(struct ms
return 0; /* success */
 } /* _sdp_cm_hello_check */
 
-/* = */
-/*..sdp_cm_req_handler -- handler for passive connection open completion */
-int sdp_cm_req_handler(struct ib_cm_id *cm_id,
-  struct ib_cm_event *event)
+/*
+ * sdp_cm_req_handler - handler for passive connection open completion
+ */
+int sdp_cm_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
 {
struct msg_hello *msg_hello = (struct msg_hello *)event->private_data;
struct sdp_opt *conn;
@@ -483,4 +497,3 @@ error:
 done:
return result;
 } /* sdp_cm_req_handler */
-

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][18/33] Fix comment style in sdp_msgs.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_msgs.h  2005-02-10 18:42:56.449031000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_msgs.h   2005-02-17 11:07:20.058017000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_msgs.h 229 2004-06-04 00:55:12Z libor $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_MSGS_H
 #define _SDP_MSGS_H
@@ -259,12 +270,14 @@ struct msg_hdr_sch {
 #define SDP_MSG_MCH_GET_MODE(mch) (((mch)->flags & 0xF0) >> 4)
 #define SDP_MSG_MCH_SET_MODE(mch, value) \
 ((mch)->flags = (((mch)->flags & 0x0F) | (value << 4)))
-/*  */
-/* Endian Conversions   */
-/*  */
 
-/* === */
-/*..__sdp_msg_swap_bsdh -- SDP header endian byte swapping*/
+/*
+ * Endian Conversions
+ */
+
+/*
+ * __sdp_msg_swap_bsdh - SDP header endian byte swapping
+ */
 static __inline__ void __sdp_msg_swap_bsdh(struct msg_hdr_bsdh *header)
 {
header->recv_bufs = cpu_to_be16(header->recv_bufs);
@@ -273,8 +286,9 @@ static __inline__ void __sdp_msg_swap_bs
header->seq_ack = cpu_to_be32(header->seq_ack);
 } /* __sdp_msg_swap_bsdh */
 
-/* === */
-/*..__sdp_msg_swap_hh -- SDP header endian byte swapping  */
+/*
+ * __sdp_msg_swap_hh - SDP header endian byte swapping
+ */
 static __inline__ void __sdp_msg_swap_hh(struct msg_hdr_hh *header)
 {
header->r_rcv_size = cpu_to_be32(header->r_rcv_size);
@@ -290,15 +304,17 @@ static __inline__ void __sdp_msg_swap_hh
header->dst.ipv6.addr3 = cpu_to_be32(header->dst.ipv6.addr3);
 } /* __sdp_msg_swap_ */
 
-/* === */
-/*..__sdp_msg_swap_hah -- SDP header endian byte swapping */
+/*
+ * __sdp_msg_swap_hah - SDP header endian byte swapping
+ */
 static __inline__ void __sdp_msg_swap_hah(struct msg_hdr_hah *header)
 {
header->l_rcv_size = cpu_to_be32(header->l_rcv_size);
 } /* __sdp_msg_swap_hah */
 
-/* === */
-/*..__sdp_msg_swap_srcah -- SDP header endian byte swapping   */
+/*
+ * __sdp_msg_swap_srcah - SDP header endian byte swapping
+ */
 static __inline__ void __sdp_msg_swap_srcah(struct msg_hdr_srcah *header)
 {
header->size = cpu_to_be32(header->size);
@@ -311,8 +327,9 @@ static __inline__ void __sdp_msg_sw

[openib-general] [PATCH][SDP][17/33] Fix comment style in sdp_main.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_main.h  2005-02-14 11:20:29.04899 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_main.h   2005-02-17 11:04:28.550001000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_main.h 509 2004-07-21 22:57:41Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_MAIN_H
 #define _SDP_MAIN_H

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][16/33] Fix comment style in sdp_link.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_link.h  2005-02-10 18:42:56.37000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_link.h   2005-02-17 11:04:05.652004000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_link.h,v 1.14 2004/02/24 23:48:57 roland Exp $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_LINK_H
 #define _SDP_LINK_H

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][15/33] Fix comment style in sdp_link.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_link.c  2005-02-10 18:42:56.318026000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_link.c   2005-02-17 11:03:42.673005000 
-0800
@@ -1,25 +1,37 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
-  $Id: sdp_link.c,v 1.26 2004/03/29 03:13:18 roland Exp $
-*/
 #include "ipoib.h"
 #include "sdp_main.h"
 #include "sdp_link.h"
@@ -51,8 +63,9 @@ static u64 _path_lookup_id = 0;
  */
 void _sdp_link_path_lookup(void *data);
 
-/* = */
-/*.._sdp_link_path_complete -- generate a path record completion for user */
+/*
+ * _sdp_link_path_complete - generate a path record completion for user
+ */
 static void _sdp_link_path_complete(u64 id,
int status,
struct sdp_path_info *info,
@@ -82,8 +95,9 @@ static void _sdp_link_path_complete(u64 
return;
 } /* _sdp_link_path_complete */
 
-/* = */
-/*.._sdp_path_wait_add -- add a wait entry into the wait list for a path  */
+/*
+ * _sdp_path_wait_add - add a wait entry into the wait list for a path
+ */
 static void _sdp_path_wait_add(struct sdp_path_info *info,
   struct sdp_path_wait *wait)
 {
@@ -100,8 +114,9 @@ static void _sdp_path_wait_add(struct sd
return;
 } /* _sdp_path_wait_add */
 
-/* = */
-/*.._sdp_path_wait_destroy -- destroy an entry for a wait element */
+/*
+ * _sdp_path_wait_destroy - destroy an entry for a wait element
+ */
 static void _sdp_path_wait_destroy(struct sdp_path_wait *wait)
 {
/*
@@ -123,8 +138,10 @@ static void _sdp_path_wait_destroy(struc
 
return;
 } /* _sdp_path_wait_destroy */
-/* = */
-/*.._sdp_path_wait_complete -- complete an entry for a wait element */
+
+/*
+ * _sdp_path_wait_complete - complete an entry for a wait element
+ */
 static void _sdp_path_wait_complete(struct sdp_path_wait *wait,
   struct sdp_path_info *info,
   int status)
@@ -140,10 +157,10 @@ static void _sdp_path_wait_complete(stru
return;
 } /* _sdp_path_wait_complete */
 
-/* = */
-/*.._sdp_path_info_lookup -- lookup a path record entry */
-static struct sdp_path_info *_sdp_pa

[openib-general] [PATCH][SDP][14/33] Fix comment style in sdp_kvec.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_kvec.c  2005-02-10 18:42:56.228029000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_kvec.c   2005-02-17 10:58:33.716019000 
-0800
@@ -1,35 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_kvec.c 159 2004-05-14 00:16:54Z libor $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* --- */
-/* */
-/* static kvec internal functions  */
-/* */
-/* --- */
-/* = */
-/*.._sdp_iocb_q_cancel_lookup_func -- lookup function for cancelation */
+/*
+ * static kvec internal functions
+ */
+
+/*
+ * _sdp_iocb_q_cancel_lookup_func - lookup function for cancelation
+ */
 static int _sdp_iocb_q_cancel_lookup_func(struct sdpc_desc *element, void *arg)
 {
SDP_CHECK_NULL(element, -EINVAL);
@@ -37,20 +48,17 @@ static int _sdp_iocb_q_cancel_lookup_fun
return ((SDP_DESC_TYPE_IOCB == element->type) ? 0 : -ERANGE);
 } /* _sdp_iocb_q_cancel_lookup_func */
 
-/* --- */
-/* */
-/* Public write functions  */
-/* */
-/* --- */
-
-/* --- */
-/* */
-/* Cancel operations   */
-/* */
-/* --- */
+/*
+ * Public write functions
+ */
+
+/*
+ * Cancel operations
+ */
 
-/* = */
-/*.._sdp_iocb_q_cancel_read_pending -- cancel all pending read AIOs */
+/*
+ * _sdp_iocb_q_cancel_read_pending - cancel all pending read AIOs
+ */
 static int _sdp_iocb_q_cancel_read_pending(struct sdp_opt *conn, ssize_t error)
 {
SDP_CHECK_NULL(conn, -EINVAL);
@@ -59,8 +67,9 @@ static int _sdp_iocb_q_cancel_read_pendi
error);

[openib-general] [PATCH][SDP][13/33] Fix comment style in sdp_iocb.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_iocb.h  2005-02-10 18:42:56.974015000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_iocb.h   2005-02-17 10:55:51.305015000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_iocb.h 696 2004-08-28 03:10:21Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_IOCB_H
 #define _SDP_IOCB_H
@@ -53,9 +64,10 @@
  */
 #define sdp_iocb_q_size(table) ((table)->size)
 
-/* --- */
-/* INET read/write IOCBs   */
-/* --- */
+/*
+ * INET read/write IOCBs
+ */
+
 /*
  * save a kvec read/write for processing once data shows up.
  */
@@ -103,6 +115,7 @@ struct sdpc_iocb {
struct kiocb *req;
struct sock_iocb *si;
 }; /* struct sdpc_iocb */
+
 /*
  * table for IOCBs
  */
@@ -111,45 +124,31 @@ struct sdpc_iocb_q {
int size;   /* current number of IOCBs in table */
 }; /* struct sdpc_iocb_q */
 
-/* --- */
-/* */
-/* Address translations*/
-/* */
-/* --- */
-/* === */
-/*..__sdp_kmap -- map a page into kernel space */
-static __inline__ void *__sdp_kmap
-(
- struct page *page
-)
-{
-  if (in_atomic() || irqs_disabled()) {
-
-return kmap_atomic(page, KM_IRQ0);
-  }
-  else {
+/*
+ * Address translations
+ */
 
-return kmap(page);
-  }
+/*
+ * __sdp_kmap - map a page into kernel space
+ */
+static __inline__ void *__sdp_kmap(struct page *page)
+{
+   if (in_atomic() || irqs_disabled())
+   return kmap_atomic(page, KM_IRQ0);
+   else
+   return kmap(page);
 } /* __sdp_kmap */
 
-/* === */
-/*..__sdp_kunmap -- unmap a page into kernel space */
-static __inline__ void __sdp_kunmap
-(
- struct page *page
-)
+/*
+ * __sdp_kunmap - unmap a page into kernel space
+ */
+static __inline__ void __sdp_kunmap(struct page *page)
 {
-  if (in_atomic() || irqs_disabled()) {
-
-kunmap_atomic(page, KM_IRQ0);
-  }
-  else {
-
-kunmap(page);
-  }
-
-  return;
+   if (in_atomic() || irqs_disa

[openib-general] [PATCH][SDP][12/33] Fix comment style in sdp_iocb.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_iocb.c  2005-02-14 11:13:15.582961000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_iocb.c   2005-02-17 12:21:44.892003000 
-0800
@@ -1,42 +1,53 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_iocb.c 696 2004-08-28 03:10:21Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
 static kmem_cache_t *__sdp_iocb_cache = NULL;
 static kmem_cache_t *__sdp_iocb_table = NULL;
-/* - */
-/*   */
-/* memory locking functions  */
-/*   */
-/* - */
+
+/*
+ * memory locking functions
+ */
 #include 
 
 typedef int (*do_mlock_ptr_t)(unsigned long, size_t, int);
 static do_mlock_ptr_t _mlock_ptr = NULL;
 
-/* = */
-/*.._sdp_iocb_unlock -- unlock the memory for an IOCB. */
+/*
+ * _sdp_iocb_unlock - unlock the memory for an IOCB
+ */
 static int _sdp_iocb_unlock(struct sdpc_iocb *iocb)
 {
struct vm_area_struct *vma;
@@ -91,8 +102,9 @@ static int _sdp_iocb_unlock(struct sdpc_
return 0;
 } /* _sdp_iocb_unlock */
 
-/* = */
-/*..sdp_iocb_unlock -- unlock the memory for an IOCB. */
+/*
+ * sdp_iocb_unlock - unlock the memory for an IOCB
+ */
 int sdp_iocb_unlock(struct sdpc_iocb *iocb)
 {
int result;
@@ -128,8 +140,9 @@ int sdp_iocb_unlock(struct sdpc_iocb *io
return result;
 } /* sdp_iocb_unlock */
 
-/* = */
-/*.._sdp_iocb_page_save -- save page information for an IOCB. */
+/*
+ * _sdp_iocb_page_save - save page information for an IOCB
+ */
 static int _sdp_iocb_page_save(struct sdpc_iocb *iocb)
 {
unsigned int counter;
@@ -241,8 +254,9 @@ err_addr:
return result;
 } /* _sdp_iocb_page_save */
 
-/* = */
-/*..sdp_iocb_lock -- lock the memory for an IOCB. */
+/*
+ * sdp_iocb_lock - lock the memory for an IOCB
+ */
 int sdp_iocb_lock(struct sdpc_iocb *iocb)
 {
struct vm_area_struct *vma;
@@ -367,11 +381,9 @@ err_lock:
return result;
 } /* sdp_iocb_lock */
 
-/* - */

[openib-general] [PATCH][SDP][11/33] Fix comment style in sdp_inet.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_inet.c  2005-02-11 17:50:31.98000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_inet.c   2005-02-17 10:51:06.250001000 
-0800
@@ -1,29 +1,41 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_inet.c 994 2004-10-14 05:38:39Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
-#include "sdp_main.h"
 #include 
 #include 
+#include "sdp_main.h"
+
 /*
  * list of connections waiting for an incomming connection
  */
@@ -79,13 +91,14 @@ module_param(debug_level, int, 0);
  *unsigned short max_ack_backlog; (accept max backlog)
  * };
  */
-/* - */
-/*   */
-/* Notification of significant events.   */
-/*   */
-/* - */
-/* = */
-/*..sdp_inet_wake_send -- test, set, and notify socket of write space */
+
+/*
+ * Notification of significant events
+ */
+
+/*
+ * sdp_inet_wake_send - test, set, and notify socket of write space
+ */
 void sdp_inet_wake_send(struct sock *sk)
 {
struct sdp_opt *conn;
@@ -118,8 +131,9 @@ void sdp_inet_wake_send(struct sock *sk)
return;
 } /* sdp_inet_wake_send */
 
-/* = */
-/*..sdp_inet_wake_generic -- wake up a socket */
+/*
+ * sdp_inet_wake_generic - wake up a socket
+ */
 void sdp_inet_wake_generic(struct sock *sk)
 {
if (NULL != sk) {
@@ -138,8 +152,9 @@ void sdp_inet_wake_generic(struct sock *
return;
 } /* sdp_inet_wake_generic */
 
-/* = */
-/*..sdp_inet_wake_recv -- wake up a socket for read */
+/*
+ * sdp_inet_wake_recv - wake up a socket for read
+ */
 void sdp_inet_wake_recv(struct sock *sk, int len)
 {
if (NULL != sk) {
@@ -157,8 +172,9 @@ void sdp_inet_wake_recv(struct sock *sk,
return;
 } /* sdp_inet_wake_recv */
 
-/* = */
-/*..sdp_inet_wake_error -- wake up a socket for error */
+/*
+ * sdp_inet_wake_error - wake up a socket for error
+ */
 void sdp_inet_wake_error(struct sock *sk)
 {
if (NULL != sk) {
@@ -176,8 +192,9 @@ void sdp_inet_wake_error(struct sock *sk
return;
 } /* sdp_inet_wake_error */
 
-/

[openib-general] [PATCH][SDP][10/33] Fix comment style in sdp_event.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_event.c 2005-02-15 16:33:46.254005000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_event.c  2005-02-17 10:43:35.172004000 
-0800
@@ -1,35 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_event.c 836 2004-09-14 20:50:32Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* Primary QP Event Handler  */
-/*   */
-/* - */
-/* = */
-/*..sdp_cq_event_locked -- main per QP event handler */
+/*
+ * Primary QP Event Handler
+ */
+
+/*
+ * sdp_cq_event_locked - main per QP event handler
+ */
 int sdp_cq_event_locked(struct ib_wc *comp, struct sdp_opt *conn)
 {
int result = 0;
@@ -126,8 +137,9 @@ done:
return result;
 } /* sdp_cq_event_locked */
 
-/* = */
-/*..sdp_cq_event_handler -- main per QP event handler, and demuxer */
+/*
+ * sdp_cq_event_handler - main per QP event handler, and demuxer
+ */
 void sdp_cq_event_handler(struct ib_cq *cq, void *arg)
 {
s32 hashent = (unsigned long)arg;
@@ -200,14 +212,13 @@ done:
return;
 } /* sdp_cq_event_handler */
 
-/* - */
-/*   */
-/* Connection establishment IB/CM callback functions */
-/*   */
-/* - */
+/*
+ * Connection establishment IB/CM callback functions
+ */
 
-/* = */
-/*.._sdp_cm_idle -- handler for connection idle completion */
+/*
+ * _sdp_cm_idle - handler for connection idle completion
+ */
 static int _sdp_cm_idle(struct ib_cm_id *cm_id,
struct ib_cm_event *event,
struct sdp_opt *conn)
@@ -310,8 +321,9 @@ error:
return result;
 } /* _sdp_cm_idle */
 
-/* = */
-/*.._sdp_cm_established -- handler for connection established compl

[openib-general] [PATCH][SDP][9/33] Fix comment style in sdp_dev.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_dev.h   2005-02-11 17:27:53.697025000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_dev.h2005-02-17 10:40:47.692004000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_dev.h 1032 2004-10-20 23:17:34Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_DEV_H
 #define _SDP_DEV_H
@@ -100,11 +111,11 @@
 #define SDP_SEND_POST_FRACTION   0x06
 #define SDP_SEND_POST_SLOW   0x01
 #define SDP_SEND_POST_COUNT  0x0A
-/* -- */
-/**/
-/* SDP experimental parameters.   */
-/**/
-/* -- */
+
+/*
+ * SDP experimental parameters.
+ */
+
 /*
  * maximum consecutive unsignalled send events.
  * (crap, watch out for deactivated nodelay!)
@@ -124,11 +135,10 @@
  */
 #define SDP_RECV_POST_FREQ 0x08/* rate for posting new recv buffs */
 #define SDP_RECV_POST_ACK  0x08/* rate for posting ack windows. */
-/* -- */
-/**/
-/* SDP root device structure. */
-/**/
-/* -- */
+
+/*
+ * SDP root device structure
+ */
 struct sdev_hca_port {
u8index; /* port ID */
union ib_gid  gid;   /* port GID */

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][8/33] Fix comment style in sdp_conn.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_conn.h  2005-02-14 11:13:15.571961000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_conn.h   2005-02-17 12:44:49.618014000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_conn.h 488 2004-07-16 23:40:31Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_CONN_H
 #define _SDP_CONN_H
@@ -27,9 +38,11 @@
 #include "sdp_advt.h"
 #include "sdp_iocb.h"
 #include "sdp_dev.h"
-/* -- */
-/* SDP connection specific definitions*/
-/* -- */
+
+/*
+ * SDP connection specific definitions
+ */
+
 /*
  * definitions
  */
@@ -56,6 +69,7 @@ enum sdp_mode {
SDP_MODE_PIPE = 0x02,
SDP_MODE_ERROR = 0x03
 };
+
 /*
  * First two bytes are the primary state values. Third byte is a bit
  * field used for different mask operations, defined below. Fourth
@@ -89,6 +103,7 @@ enum sdp_mode {
 #define SDP_CONN_ST_ERROR_STRM  0xFD01 /* gateway error, waiting on CM */
 #define SDP_CONN_ST_CLOSED  0xFE03 /* not connected */
 #define SDP_CONN_ST_INVALID 0xFF03 /* not connected */
+
 /*
  * states masks for SDP
  */
@@ -98,11 +113,13 @@ enum sdp_mode {
 #define SDP_ST_MASK_CTRL_OK   0x0020   /* posting control for send */
 #define SDP_ST_MASK_DIS_PEND  0x0040   /* disconnect transmission pending. */
 #define SDP_ST_MASK_RCV_POST  0x0080   /* posting IB recv's is allowed. */
+
 /*
  * transition one of the disconnect pending states to disconnect send
  */
 #define SDP_ST_PEND_2_SEND(conn) \
 (conn)->state = ((conn)->state + 0x0100) & ~SDP_ST_MASK_DIS_PEND;
+
 /*
  * internal connection structure
  */
@@ -116,16 +133,19 @@ enum sdp_mode {
 #define SDP_SOCK_ST_CLOSING 0x0800
 #define SDP_SOCK_ST_LISTEN  0x0901
 #define SDP_SOCK_ST_ERROR   0xFF01
+
 /*
  * state masks.
  */
 #define SDP_ST_MASK_CLOSED 0x0001 /* socket is not referenced by the GW. */
 #define SDP_ST_MASK_SEND   0x0004 /* valid state for API send */
 #define SDP_ST_MASK_OPEN   0x0008 /* send window is valid (writeable) */
+
 /*
  * event dispatch table
  */
 #define SDP_MSG_EVENT_TABLE_SIZE 0x20
+
 /*
  * connection handle within a socket.
  */
@@ -179,6 +199,7 @@ struct sdp_conn_state {
 #define SDP_CONN_ST_SET(conn, val) (conn)->state = (val)
 #define SDP_CONN_ST_INIT(conn) (conn)->state = SDP_CONN_ST_INVALID
 #endif
+
 /*
  * connection lock
  */
@@ -187,6 +208,7 @@ struct sdp_conn_lock {
spinlock_t slock

[openib-general] [PATCH][SDP][7/33] Fix comment style in sdp_conn.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_conn.c  2005-02-14 12:51:45.936001000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_conn.c   2005-02-17 10:38:44.836003000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_conn.c 1032 2004-10-20 23:17:34Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
@@ -37,13 +48,13 @@ static struct ib_client sdp_client = {
 static spinlock_t psn_lock = SPIN_LOCK_UNLOCKED;
 static u32psn_seed;
 
-/* - */
-/*   */
-/* module specific functions */
-/*   */
-/* - */
-/* = */
-/*..sdp_psn_generate -- generate a PSN for connection management. */
+/*
+ * module specific functions
+ */
+
+/*
+ * sdp_psn_generate - generate a PSN for connection management.
+ */
 static u32 _sdp_psn_generate(void)
 {
 u32 psn;
@@ -62,8 +73,9 @@ static u32 _sdp_psn_generate(void)
 return psn;
 } /* sdp_psn_generate */
 
-/* = */
-/*..sdp_inet_accept_q_put -- put a conn into a listen conn's accept Q. */
+/*
+ * sdp_inet_accept_q_put - put a conn into a listen conn's accept Q.
+ */
 int sdp_inet_accept_q_put(struct sdp_opt *listen_conn,
  struct sdp_opt *accept_conn)
 {
@@ -97,8 +109,9 @@ int sdp_inet_accept_q_put(struct sdp_opt
return 0;
 } /* sdp_inet_accept_q_put */
 
-/* = */
-/*..sdp_inet_accept_q_get -- get a conn from a listen conn's accept Q. */
+/*
+ * sdp_inet_accept_q_get - get a conn from a listen conn's accept Q.
+ */
 struct sdp_opt *sdp_inet_accept_q_get(struct sdp_opt *listen_conn)
 {
struct sdp_opt *prev_conn;
@@ -139,8 +152,9 @@ struct sdp_opt *sdp_inet_accept_q_get(st
return accept_conn;
 } /* sdp_inet_accept_q_get */
 
-/* = */
-/*..sdp_inet_accept_q_remove -- remove a conn from a conn's accept Q. */
+/*
+ * sdp_inet_accept_q_remove - remove a conn from a conn's accept Q.
+ */
 int sdp_inet_accept_q_remove(struct sdp_opt *accept_conn)
 {
struct sdp_opt *next_conn;
@@ -177,8 +191,9 @@ int sdp_i

[openib-general] [PATCH][SDP][6/33] Fix comment style in sdp_buff_p.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_buff_p.h2005-02-10 
18:42:56.714018000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_buff_p.h 2005-02-17 10:28:48.95000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_buff_p.h 994 2004-10-14 05:38:39Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_BUFF_P_H
 #define _SDP_BUFF_P_H
@@ -63,9 +74,3 @@ struct sdpc_buff_root {
 }; /* struct sdpc_buff_root */
 
 #endif /* _SDP_BUFF_P_H */
-
-
-
-
-
-

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][5/33] Fix comment style in sdp_buff.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_buff.h  2005-02-11 07:59:56.184009000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_buff.h   2005-02-17 10:28:23.514011000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_buff.h 994 2004-10-14 05:38:39Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_BUFF_H
 #define _SDP_BUFF_H

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][4/33] Fix comment style in sdp_buff.c

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_buff.c  2005-02-11 08:02:05.883004000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_buff.c   2005-02-17 10:27:46.25000 
-0800
@@ -1,25 +1,36 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_buff.c 994 2004-10-14 05:38:39Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
@@ -27,8 +38,10 @@ static struct sdpc_buff_root *main_pool 
 /*
  * data buffers managment API
  */
-/* = */
-/*.._sdp_buff_q_get - Get a buffer from a specific pool */
+
+/*
+ * _sdp_buff_q_get - Get a buffer from a specific pool
+ */
 static __inline__ struct sdpc_buff *_sdp_buff_q_get
 (
struct sdpc_buff_q *pool,
@@ -84,8 +97,9 @@ static __inline__ struct sdpc_buff *_sdp
return buff;
 } /* _sdp_buff_q_get */
 
-/* = */
-/*.._sdp_buff_q_put - Place a buffer into a specific pool */
+/*
+ * _sdp_buff_q_put - Place a buffer into a specific pool
+ */
 static __inline__ int _sdp_buff_q_put(struct sdpc_buff_q *pool,
  struct sdpc_buff *buff,
  int fifo)
@@ -124,8 +138,9 @@ static __inline__ int _sdp_buff_q_put(st
return 0;
 } /* _sdp_buff_q_put */
 
-/* = */
-/*.._sdp_buff_q_look - look at a buffer from a specific pool */
+/*
+ * _sdp_buff_q_look - look at a buffer from a specific pool
+ */
 static __inline__ struct sdpc_buff *_sdp_buff_q_look(struct sdpc_buff_q *pool,
 int fifo)
 {
@@ -141,8 +156,9 @@ static __inline__ struct sdpc_buff *_sdp
}
 } /* _sdp_buff_q_look */
 
-/* = */
-/*.._sdp_buff_q_remove - remove a specific buffer from a specific pool */
+/*
+ * _sdp_buff_q_remove - remove a specific buffer from a specific pool
+ */
 static __inline__ int _sdp_buff_q_remove(struct sdpc_buff_q *pool, 
 struct sdpc_buff *buff)
 {
@@ -186,8 +202,9 @@ static __inline__ int _sdp_buff_q_remove
return 0;
 } /* _sdp_buff_q_remove */
 
-/* = */
-/*..sdp_buff_q_init - Init a pool drawing its buffers from the main pool */
+/*
+ * sdp_buff_q_init - Init a pool drawing its buffers from the main pool
+ */
 int sdp_buff_q_init(struct sdpc_buff_q *pool, u32 siz

[openib-general] [PATCH][SDP][3/33] Fix comment style in sdp_advt.h

2005-02-17 Thread Tom Duffy

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_advt.h  2005-02-10 18:42:56.640003000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_advt.h   2005-02-17 12:45:25.967016000 
-0800
@@ -1,38 +1,50 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_advt.h 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #ifndef _SDP_ADVT_H
 #define _SDP_ADVT_H
 
 #include "sdp_queue.h"
+
 /*
  * IOCB flags.
  */
 #define SDP_ADVT_F_READ 0x0001 /* ADVT has an active read operation */
-/* --- */
-/* SDP read/write advertisments*/
-/* --- */
 
+/*
+ * SDP read/write advertisments
+ */
 struct sdpc_advt {
struct sdpc_advt   *next;  /* next structure in table */
struct sdpc_advt   *prev;  /* previous structure in table */
@@ -49,6 +61,7 @@ struct sdpc_advt {
u32 flag; /* advertisment flags. */
u64 addr; /* advertised buffer virtual address */
 }; /* struct sdpc_advt */
+
 /*
  * table for holding SDP advertisments.
  */
@@ -56,6 +69,7 @@ struct sdpc_advt_q {
struct sdpc_advt *head; /* double linked list of advertisments */
s32 size;   /* current number of advertisments in table */
 }; /* struct sdpc_advt_q */
+
 /*
  * make size a macro.
  */

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH][SDP][2/33] Fix comment style in sdp_advt.c

2005-02-17 Thread Tom Duffy
Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_advt.c  2005-02-10 18:42:56.537025000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_advt.c   2005-02-17 10:22:17.245012000 
-0800
@@ -1,44 +1,53 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_advt.c 619 2004-08-10 03:23:02Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
 static kmem_cache_t *__sdp_advt_cache = NULL;
 static kmem_cache_t *__sdp_advt_table = NULL;
 
-/* - */
-/*   */
-/* module specific functions */
-/*   */
-/* - */
-
-/* - */
-/*   */
-/* public advertisment object functions for FIFO object table*/
-/*   */
-/* - */
-/* = */
-/*..sdp_advt_create - create an advertisment object */
+/*
+ * module specific functions
+ */
+
+/*
+ * public advertisment object functions for FIFO object table
+ */
+
+/*
+ * sdp_advt_create - create an advertisment object
+ */
 struct sdpc_advt *sdp_advt_create(void)
 {
struct sdpc_advt *advt;
@@ -60,8 +69,9 @@ struct sdpc_advt *sdp_advt_create(void)
return advt;
 } /* sdp_advt_create */
 
-/* = */
-/*..sdp_advt_destroy - destroy an advertisment object */
+/*
+ * sdp_advt_destroy - destroy an advertisment object
+ */
 int sdp_advt_destroy(struct sdpc_advt *advt)
 {
SDP_CHECK_NULL(advt, -EINVAL);
@@ -78,8 +88,9 @@ int sdp_advt_destroy(struct sdpc_advt *a
return 0;
 } /* sdp_advt_destroy */
 
-/* = */
-/*..sdp_advt_q_get - get, and remove, the object at the tables head */
+/*
+ * sdp_advt_q_get - get, and remove, the object at the tables head
+ */
 struct sdpc_advt *sdp_advt_q_get(struct sdpc_advt_q *table)
 {
struct sdpc_advt *advt;
@@ -116,8 +127,9 @@ struct sdpc_advt *sdp_advt_q_get(struct 
return advt;
 } /* sdp_advt_q_get */
 
-/* ==

[openib-general] [PATCH][SDP][1/33] Fix comment style in sdp_actv.c

2005-02-17 Thread Tom Duffy
Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

--- drivers/infiniband/ulp/sdp-orig/sdp_actv.c  2005-02-15 16:33:46.230002000 
-0800
+++ drivers/infiniband/ulp/sdp/sdp_actv.c   2005-02-17 10:19:08.821002000 
-0800
@@ -1,35 +1,46 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  , or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  .
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
-
-  $Id: sdp_post.c 649 2004-08-13 22:41:04Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ *  - Redistributions of source code must retain the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer.
+ *
+ *  - Redistributions in binary form must reproduce the above
+ *copyright notice, this list of conditions and the following
+ *disclaimer in the documentation and/or other materials
+ *provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
 #include "sdp_main.h"
 
-/* - */
-/*   */
-/* Connection establishment functions*/
-/*   */
-/* - */
-/* = */
-/*.._sdp_actv_conn_establish-- process an accepted connection request. */
+/*
+ * Connection establishment functions
+ */
+
+/*
+ * _sdp_actv_conn_establish - process an accepted connection request.
+ */
 static int _sdp_actv_conn_establish(struct sdp_opt *conn)
 {
struct ib_qp_attr *qp_attr;
@@ -187,8 +198,9 @@ drop:
return result;
 } /* _sdp_actv_conn_establish */
 
-/* = */
-/*.._sdp_cm_hello_ack_check -- validate the hello ack header */
+/*
+ * _sdp_cm_hello_ack_check - validate the hello ack header
+ */
 static int _sdp_cm_hello_ack_check(struct msg_hello_ack *hello_ack)
 {
/*
@@ -244,8 +256,9 @@ static int _sdp_cm_hello_ack_check(struc
return 0; /* success */
 } /* _sdp_cm_hello_ack_check */
 
-/* = */
-/*..sdp_cm_rep_handler -- handler for active connection open completion */
+/*
+ * sdp_cm_rep_handler - handler for active connection open completion
+ */
 int sdp_cm_rep_handler(struct ib_cm_id *cm_id,
   struct ib_cm_event *event,
   struct sdp_opt *conn)
@@ -355,8 +368,9 @@ done:
return error;
 } /* sdp_cm_rep_handler */
 
-/* = */
-/*.._sdp_cm_path_complete -- path lookup complete, initiate SDP connection */
+/*
+ * _sdp_cm_path_complete - path lookup complete, initiate SDP connection
+ */
 static void _sdp_cm_path_complete(u64 id,
  int status,
  u32 dst_addr,
@@ -562,8 +576,9 @@ done:
return;
 } /* _sdp_cm_path_complete */
 
-/* =

[openib-general] [PATCH][SDP][0/33] Fix comment style in SDP

2005-02-17 Thread Tom Duffy
These patches clean up the comment formatting in sdp.  They also update
the copyright header to match the rest of OpenIB files.

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Roland Dreier
BTW, since mthca currently calls completion handlers directly from
interrupt context (rather than BH/tasklet context), it might be worth
renaming all the SDP locking macros so they're not confusingly named
with _BH suffixes.

 - R.
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Libor Michalek
On Thu, Feb 17, 2005 at 11:29:37PM +0200, Michael S. Tsirkin wrote:
> Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> > Subject: Re: [openib-general] SDP_CONN_LOCK
> > 
> > On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> > > Hi, Libor!
> > > Could you please explain what are the SDP_CONN_LOCK
> > > and friends doing in SDP?
> > > 
> > > It seems they just implement exclusive access to socket,
> > > but if so, why is a simple semaphore or mutex not used?
> > 
> >   They do implement exclusive access to the socket, but they implement
> > exclusive access from both process and irq context, which is why a
> > semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is used
> > to lock the connection, look in sdp_cq_event_handler() for it's use,
> > and in process context SDP_CONN_LOCK is used.
> 
> I dont really understand how it works.
> When an interrupt arrives while users != 0, it seems you are
> calling scheduler().
> What is sdp_conn_internal_lock doing? I understand it is to be called
> from interrupt context, but how can it call scheduler() then?

  SDP_CONN_LOCK and SDP_CONN_UNLOCK are never called from interrupt
context, only from process context. The spinlock conn->lock.slock
is called in interrupt context and process context before the 'users'
variable is changed or read. If users != 0, then the connection is in
use by process context. If the connection is in use then another lock
request in process context will sleep until users == 0, if the connection
is in use then a lock request in interrupt context will mark the
connection as having had an event and return. When a process context
lock holder releases the lock, it checks if there has been an interrupt
event, which it then processes by draining and arming the CQ, and it
wakes any process context waiting for the lock.


-Libor


___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Michael S. Tsirkin

Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> Subject: Re: [openib-general] SDP_CONN_LOCK
> 
> On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> > Hi, Libor!
> > Could you please explain what are the SDP_CONN_LOCK
> > and friends doing in SDP?
> > 
> > It seems they just implement exclusive access to socket,
> > but if so, why is a simple semaphore or mutex not used?
> 
>   They do implement exclusive access to the socket, but they implement
> exclusive access from both process and irq context, which is why a
> semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is used
> to lock the connection, look in sdp_cq_event_handler() for it's use,
> and in process context SDP_CONN_LOCK is used.

I dont really understand how it works.
When an interrupt arrives while users != 0, it seems you are
calling scheduler().
What is sdp_conn_internal_lock doing? I understand it is to be called
from interrupt context, but how can it call scheduler() then?



-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] Solaris IPoIB MTU with OpenSM

2005-02-17 Thread Hal Rosenstock
Hi Nitin,

On Wed, 2005-02-16 at 17:33, Nitin Hande wrote: 
> On Wed, 2005-02-16 at 13:26, Hal Rosenstock wrote:
> > On Wed, 2005-02-16 at 16:08, Nitin Hande wrote:
> > > Hal,
> [snip..]
> > > 
> > > 
> > > Here is the trace of 256 sized MTU:
> > > 
> > > Outgoing MAD:
> > > BaseVersion: 0x1
> > > MgmtClass: 0x3 - SubnAdm
> > > ClassVersion: 0x2
> > > R_Method: 0x12 - SubnAdmGetTable()
> > > Status: 0x0 - NO_ERROR
> > > ClassSpecific: 0x0
> > > TransactionID: 0x97651d10096
> > > AttributeID: 0x38 - SA_MCMEMBERRECORD_ATTRID
> > > 
> > > 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
> > >  0: 01 03 02 12 00 00 00 00 09 76 51 d1 00 00 00 96  .vQ.
> > > 10: 00 38 00 00 ff ff ff ff 00 00 00 00 00 00 00 00  .8..
> > > 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 30: 00 00 00 00 00 00 80 81 ff 12 40 1b ff ff 00 00  [EMAIL PROTECTED]
> > > 40: 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00  
> > > 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 60: ff ff 00 00 00 00 00 00 20 00 00 00 00 00 00 00   ...
> > > 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 
> > > Incoming MAD:
> > > BaseVersion: 0x1
> > > MgmtClass: 0x3 - SubnAdm
> > > ClassVersion: 0x2
> > > R_Method: 0x92 -
> > > Status: 0x0 - NO_ERROR
> > > ClassSpecific: 0x0
> > > TransactionID: 0x97651d10096
> > > AttributeID: 0x38 - SA_MCMEMBERRECORD_ATTRID
> > > 
> > > 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
> > >  0: 01 03 02 92 00 00 00 00 09 76 51 d1 00 00 00 96  .vQ.
> > > 10: 00 38 00 00 ff ff ff ff 01 01 77 00 00 00 00 01  .8w.
> > > 20: 00 00 00 4c 00 00 00 00 00 00 00 00 00 07 00 00  ...L
> > > 30: 00 00 00 00 00 00 80 81 ff 12 40 1b ff ff 00 00  [EMAIL PROTECTED]
> > > 40: 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00  
> > > 50: 00 00 00 00 00 00 00 00 00 00 0b 1b c0 00 01 00  
> > > 60: ff ff 03 12 00 00 00 00 20 00 00 00 00 00 00 00   ...
> > > 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 
> > > And on other occassions where OpenSM reports the 2048 sized MTU:
> > > 
> > > Outgoing MAD:
> > > BaseVersion: 0x1
> > > MgmtClass: 0x3 - SubnAdm
> > > ClassVersion: 0x2
> > > R_Method: 0x12 - SubnAdmGetTable()
> > > Status: 0x0 - NO_ERROR
> > > ClassSpecific: 0x0
> > > TransactionID: 0x97651d1009a
> > > AttributeID: 0x38 - SA_MCMEMBERRECORD_ATTRID
> > > 
> > > 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
> > >  0: 01 03 02 12 00 00 00 00 09 76 51 d1 00 00 00 9a  .vQ.
> > > 10: 00 38 00 00 ff ff ff ff 00 00 00 00 00 00 00 00  .8..
> > > 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 30: 00 00 00 00 00 00 80 81 ff 12 40 1b ff ff 00 00  [EMAIL PROTECTED]
> > > 40: 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00  
> > > 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 60: ff ff 00 00 00 00 00 00 20 00 00 00 00 00 00 00   ...
> > > 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > > c0: 00 00 00 00 00 00 00 00 00 00 0

[openib-general] [PATCH] [CM] add stale connection checks on passive side

2005-02-17 Thread Sean Hefty
This patch adds checks for a stale connection to the passive side of
the connection protocol.  Checks on the active side are still needed.

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>

Index: infiniband/core/cm.c
===
--- infiniband/core/cm.c(revision 1817)
+++ infiniband/core/cm.c(working copy)
@@ -108,10 +108,11 @@ struct cm_work {
 
 struct cm_timewait_info {
struct cm_work work;/* Must be first. */
-   /* struct rb_node remote_qp_node; */
+   struct rb_node remote_qp_node;
struct rb_node remote_id_node;
u64 remote_ca_guid;
u32 remote_qpn;
+   u8 inserted_remote_qp;
u8 inserted_remote_id;
 };
 
@@ -424,80 +425,35 @@ static struct cm_id_private * cm_find_id
 }
 */
 
-static void cm_remove_remote_id(struct cm_timewait_info *timewait_info)
-{
-   unsigned long flags;
-
-   timewait_info->inserted_remote_id = 0;
-   spin_lock_irqsave(&cm.lock, flags);
-   rb_erase(&timewait_info->remote_id_node, &cm.remote_id_table);
-   spin_unlock_irqrestore(&cm.lock, flags);
-}
-
-/*
-todo: add test for stale connections
-static struct cm_id_private * cm_insert_remote_qpn(struct cm_id_private
-  *cm_id_priv)
+static struct cm_timewait_info * cm_insert_remote_qpn(struct cm_timewait_info
+ *timewait_info)
 {
struct rb_node **link = &cm.remote_qp_table.rb_node;
struct rb_node *parent = NULL;
-   struct cm_id_private *cur_cm_id_priv;
-   union ib_gid *port_gid = &cm_id_priv->dgid;
-   u32 remote_qpn = cm_id_priv->remote_qpn;
+   struct cm_timewait_info *cur_timewait_info;
+   u64 remote_ca_guid = timewait_info->remote_ca_guid;
+   u32 remote_qpn = timewait_info->remote_qpn;
 
while (*link) {
parent = *link;
-   cur_cm_id_priv = rb_entry(parent, struct cm_id_private,
- remote_qp_node);
-   if (remote_qpn < cur_cm_id_priv->remote_qpn)
+   cur_timewait_info = rb_entry(parent, struct cm_timewait_info,
+remote_qp_node);
+   if (remote_qpn < cur_timewait_info->remote_qpn)
link = &(*link)->rb_left;
-   else if (remote_qpn > cur_cm_id_priv->remote_qpn)
+   else if (remote_qpn > cur_timewait_info->remote_qpn)
link = &(*link)->rb_right;
-   else {
-   int cmp;
-   cmp = memcmp(port_gid, &cur_cm_id_priv->dgid,
-sizeof *port_gid);
-   if (cmp < 0)
-   link = &(*link)->rb_left;
-   else if (cmp > 0)
-   link = &(*link)->rb_right;
-   else
-   return cur_cm_id_priv;
-   }
-   }
-   rb_link_node(&cm_id_priv->remote_qp_node, parent, link);
-   rb_insert_color(&cm_id_priv->remote_qp_node, &cm.remote_qp_table);
-   return NULL;
-}
-
-static struct cm_id_private * cm_find_id_by_remote_qpn(union ib_gid *port_gid,
-  u32 remote_qpn)
-{
-   struct rb_node *node = cm.remote_qp_table.rb_node;
-   struct cm_id_private *cm_id_priv;
-
-   while (node) {
-   cm_id_priv = rb_entry(node, struct cm_id_private, 
remote_qp_node);
-
-   if (remote_qpn < cm_id_priv->remote_qpn)
-   node = node->rb_left;
-   else if (remote_qpn > cm_id_priv->remote_qpn)
-   node = node->rb_right;
-   else {
-   int cmp;
-   cmp = memcmp(port_gid, &cm_id_priv->dgid,
-sizeof *port_gid);
-   if (cmp < 0)
-   node = node->rb_left;
-   else if (cmp > 0)
-   node = node->rb_right;
-   else
-   return cm_id_priv;
-   }
+   else if (remote_ca_guid < cur_timewait_info->remote_ca_guid)
+   link = &(*link)->rb_left;
+   else if (remote_ca_guid > cur_timewait_info->remote_ca_guid)
+   link = &(*link)->rb_right;
+   else
+   return cur_timewait_info;
}
+   timewait_info->inserted_remote_qp = 1;
+   rb_link_node(&timewait_info->remote_qp_node, parent, link);
+   rb_insert_color(&timewait_info->remote_qp_node, &cm.remote_qp_table);
return NULL;
 }
-*/
 
 static struct cm_id_private * cm_insert_remote_sidr(struct cm_id_private
*cm_id_priv)
@@ -601,13 +557,23

Re: [openib-general] [RFC] CM reject handling and redirection

2005-02-17 Thread Hal Rosenstock
On Thu, 2005-02-17 at 15:10, Roland Dreier wrote:
> It is orthogonal in a sense, but consider something like the
> following.  I set up a connection with a primary path and a secondary
> path, using the same primary path for CM communication.  Some time
> later the primary path fails, so APM causes the connection to migrate
> to the secondary path.  I get a "path migrated" async event and so I
> want to set up a new secondary path so that my connection remains
> resilient.   Where do I send the LAP?

Hadn't quite thought it through all the way. Sean's subsequent post also
filled in more.

IMO this is worth clarifying with the CM authors. We will hopefully be
enlightened. If no one objects, I am going to take the liberty to cross
post this issue although not everyone will be able to post on the IBA
SWG as you need to be a member.

-- Hal

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [RFC] CM reject handling and redirection

2005-02-17 Thread Sean Hefty
Hal Rosenstock wrote:
Code 25 (port redirection only) raises a separate issue that I think
is orthogonal to REJ handling.  The CM spec always allows the CM to
How much complexity is added to the CM to support this ? Do we really need to
(and if so what is the application which requires this) ? 
I think it can be as simple as adding a new field, cm_path, that can be 
used.  (The user gets back a ClassPortInfo, which would need to be 
converted to a PathRecord...)

Is it needed?  I doubt it.  I'm more concerned that if it ever does 
become needed that we don't have an architecture that prevents adding it.

I'm not sure I get the "connection" between the CM path and data path.
Doesn't failover and APM apply only to the data path ?
It does.  However, if the CM established the connection along the 
failed path, it will not be able to send future LAP, DREQ, etc. 
messages unless it sends those along a new path.

Is it purely the
detected of a failed path between CMs (which seems orthogonal to this to
me) ? That's not to say that this is not an issue.
These are somewhat separate issues.  My intention was to have the CM 
send to the destination port that matched the currently active/primary 
path, with the hope that this would result in CM "failover" as well. 
The CM has some of the framework in place to do this, but is lacking 
most of the actual implementation.

- Sean
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [RFC] CM reject handling and redirection

2005-02-17 Thread Roland Dreier
Hal> I'm not sure I get the "connection" between the CM path and
Hal> data path.  Doesn't failover and APM apply only to the data
Hal> path ? Is it purely the detected of a failed path between CMs
Hal> (which seems orthogonal to this to me) ? That's not to say
Hal> that this is not an issue.

It is orthogonal in a sense, but consider something like the
following.  I set up a connection with a primary path and a secondary
path, using the same primary path for CM communication.  Some time
later the primary path fails, so APM causes the connection to migrate
to the secondary path.  I get a "path migrated" async event and so I
want to set up a new secondary path so that my connection remains
resilient.   Where do I send the LAP?

 - R.




___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [RFC] CM reject handling and redirection

2005-02-17 Thread Hal Rosenstock
On Thu, 2005-02-17 at 12:51, Sean Hefty wrote:
> It looks like one way to handle this is to add a new field to struct 
> ib_cm_req_param: struct ib_sa_path_rec *cm_path.  A user could easily 
> set this to the same path record referenced by the *primary_path field. 
>   This would only be a small change to existing users.

Sounds straightforward.

> I'm still not sure how to handle a failed path between the CMs.  And 
> even if you could detect a failed path, recovering from it is difficult 
> without violating the REQ max_cm_retries.  Is anyone planning on using APM?

Won't the CM protocol time out in this case and this error be pushed
back on the user ? Would the user then rerequest a PathRecord ?

-- Hal

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [RFC] CM reject handling and redirection

2005-02-17 Thread Hal Rosenstock
On Wed, 2005-02-16 at 22:50, Roland Dreier wrote:
> Code 25 (port redirection only) raises a separate issue that I think
> is orthogonal to REJ handling.  The CM spec always allows the CM to
> run on a different port from the destination of a connection so if we
> want to implement the whole spec we do need a way for the consumer to
> specify a primary and alternate path for the connection itself as well
> as a CM path.

How much complexity is added to the CM to support this ? Do we really need to
(and if so what is the application which requires this) ? 

> As you say, separating the CM path from the connection path does raise
> the question of what to do for failover and APM.  As far as I can tell
> this is an area that the IB spec is silent on and I'm not sure that
> anyone ever came up with a good answer.

I'm not sure I get the "connection" between the CM path and data path.
Doesn't failover and APM apply only to the data path ? Is it purely the
detected of a failed path between CMs (which seems orthogonal to this to
me) ? That's not to say that this is not an issue.

-- Hal



___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [PATCH][IPOIB] bring interface down panic

2005-02-17 Thread Shirley Ma

Sorry, it's an oops not a panic. 

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Re: [openib-general] SDP_CONN_LOCK

2005-02-17 Thread Libor Michalek
On Thu, Feb 17, 2005 at 05:35:17PM +0200, Michael S. Tsirkin wrote:
> Hi, Libor!
> Could you please explain what are the SDP_CONN_LOCK
> and friends doing in SDP?
> 
> It seems they just implement exclusive access to socket,
> but if so, why is a simple semaphore or mutex not used?

  They do implement exclusive access to the socket, but they implement
exclusive access from both process and irq context, which is why a
semaphore was not used. In interrupt context SDP_CONN_LOCK_BH is used
to lock the connection, look in sdp_cq_event_handler() for it's use,
and in process context SDP_CONN_LOCK is used.

  
  The lock structure has a spinlock around a users counter, the process
context lock will increment the counter when it's using the connection,
but will not hold the spinlock for the duration. The spinlock is only
held for the duration when used in process context. In process context
the wait queue is used if the number of users is non zero, and the
wait queue is awoken when process context decrements the users counter.

  struct sdp_conn_lock {
__u32 users;
spinlock_t slock;
wait_queue_head_t waitq;
  }; /* struct sdp_conn_lock */
   
   Further more if a CQ event occurs and the connection is already locked
in process context (lock.users is non-zero) the connection is marked as
having received an event and the CQ is not polled or rearmed. Instead
when the connection is unlocked using SDP_CONN_UNLOCK the CQ is drained
and rearmed. This results in a significant reduction in interrupts when
the connection is under heavy load. The fifth macro, SDP_CONN_RELOCK,
performs the equivalent of an unlock/lock in process context, which will
cause the CQ to be drained.

   The two flags SDP_CONN_F_{SEND,RECV}_CQ_PEND should not be in the
conn->flags variable, as they are currently, since that variable can be
accessed outside of the spinlock when the process context lock is held.
Instead these two flags struct sdp_conn_lock since they are only
protected when the spinlock is held.


-Libor





___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] [PATCH]deadlock problem in ipoib

2005-02-17 Thread Shirley Ma

Hi, Roland,

I've created a new patch. Please review
this one.


diff -urN infiniband/ulp/ipoib/ipoib_main.c
infiniband-lock/ulp/ipoib/ipoib_main.c
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-17
17:24:56.0 +
+++ infiniband-lock/ulp/ipoib/ipoib_main.c        2005-02-17
17:46:43.0 +
@@ -220,18 +220,23 @@
         struct ipoib_dev_priv *priv = netdev_priv(dev);
         struct ipoib_neigh *neigh, *tn;
         struct sk_buff *skb;
+        LIST_HEAD(ah_list);
+        struct ipoib_ah *ah, *tah;
 
         while ((skb = __skb_dequeue(&path->queue)))
                 dev_kfree_skb_irq(skb);
 
         list_for_each_entry_safe(neigh, tn,
&path->neigh_list, list) {
                 if
(neigh->ah)
-                
       ipoib_put_ah(neigh->ah);
+                
       list_add_tail(&ah_list, &neigh->ah->list);
       
                 *to_ipoib_neigh(neigh->neighbour)
= NULL;
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
         }
 
+        list_for_each_entry_safe(ah, tah,
&ah_list, list)
+                ipoib_put_ah(ah);
+
         if (path->ah)
                 ipoib_put_ah(path->ah);
 
@@ -660,6 +665,7 @@
         struct ipoib_neigh *neigh = *to_ipoib_neigh(n);
         struct ipoib_dev_priv *priv = netdev_priv(n->dev);
         unsigned long flags;
+        struct
ipoib_ah *ah = NULL;
 
         ipoib_dbg(priv,
                  
"neigh_destructor for %06x " IPOIB_GID_FMT "\n",
@@ -670,13 +676,16 @@
 
         if (neigh) {
                 if
(neigh->ah)
-                
       ipoib_put_ah(neigh->ah);
+                
       ah = neigh->ah;
                 list_del(&neigh->list);
                 *to_ipoib_neigh(n)
= NULL;
                 kfree(neigh);
         }
 
         spin_unlock_irqrestore(&priv->lock,
flags);
+        
+        if (ah)
+                ipoib_put_ah(ah);
 }
 
 static int ipoib_neigh_setup(struct neighbour *neigh)
diff -urN infiniband/ulp/ipoib/ipoib_multicast.c infiniband-lock/ulp/ipoib/ipoib_multicast.c
--- infiniband/ulp/ipoib/ipoib_multicast.c        2005-02-17
17:24:56.0 +
+++ infiniband-lock/ulp/ipoib/ipoib_multicast.c        2005-02-17
17:37:03.0 +
@@ -93,6 +93,8 @@
         struct ipoib_dev_priv *priv = netdev_priv(dev);
         struct ipoib_neigh *neigh, *tmp;
         unsigned long flags;
+        LIST_HEAD(ah_list);
+        struct ipoib_ah *ah, *tah;
 
         ipoib_dbg_mcast(netdev_priv(dev),
                  
      "deleting multicast group " IPOIB_GID_FMT
"\n",
@@ -101,7 +103,8 @@
         spin_lock_irqsave(&priv->lock,
flags);
 
         list_for_each_entry_safe(neigh, tmp,
&mcast->neigh_list, list) {
-        
       ipoib_put_ah(neigh->ah);
+                if
(neigh->ah)
+                
       list_add_tail(&ah_list, &neigh->ah->list);
                 *to_ipoib_neigh(neigh->neighbour)
= NULL;
                 neigh->neighbour->ops->destructor
= NULL;
                 kfree(neigh);
@@ -109,6 +112,9 @@
 
         spin_unlock_irqrestore(&priv->lock,
flags);
 
+        list_for_each_entry_safe(ah, tah,
&ah_list, list)
+                ipoib_put_ah(ah);
+
         if (mcast->ah)
                 ipoib_put_ah(mcast->ah);

 

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638



infiniband-lock.patch
Description: Binary data
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Re: [openib-general] [RFC] CM reject handling and redirection

2005-02-17 Thread Sean Hefty
Roland Dreier wrote:
Code 25 (port redirection only) raises a separate issue that I think
is orthogonal to REJ handling.  The CM spec always allows the CM to
run on a different port from the destination of a connection so if we
want to implement the whole spec we do need a way for the consumer to
specify a primary and alternate path for the connection itself as well
as a CM path.
It looks like one way to handle this is to add a new field to struct 
ib_cm_req_param: struct ib_sa_path_rec *cm_path.  A user could easily 
set this to the same path record referenced by the *primary_path field. 
 This would only be a small change to existing users.

I'm still not sure how to handle a failed path between the CMs.  And 
even if you could detect a failed path, recovering from it is difficult 
without violating the REQ max_cm_retries.  Is anyone planning on using APM?

- Sean
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


RE: [openib-general] 2005 OpenIB Developers Workshop presentations

2005-02-17 Thread Woodruff, Robert J
 James Wrote, 
> We are proposing to maintain the code in both locations. The OpenIB 
> specific implementation would be on openib.org while a 
> platform/transport independent implementation would continue on 
> our SourceForge site.
> 
 
I also agree this seems like the right approach. I don't think the 
actual coding (porting from gen1 to gen2 verbs) will take more than
a few weeks. I suspect most of the time will be spent debugging
issues in the stack, since this will be one of the first
users of the user-mode infrastucture. 

woody

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [PATCH] SDP headers using unsafe macros

2005-02-17 Thread Michael S. Tsirkin

Some SDP hdeaders defines unsafe macros, which may be
dangerous to use, e.g. inside an if or while statement.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

Index: sdp_proto.h
===
--- sdp_proto.h (revision 1810)
+++ sdp_proto.h (working copy)
@@ -585,15 +585,16 @@
 #define SDP_EXPECT(expr)
 #define SDP_CHECK_NULL(value, result)
 #else
-#define SDP_EXPECT(expr) \
-{\
-  if (!(expr)) { \
-sdp_dbg_err("EXCEPT: Internal error check <%s> failed.", #expr); \
-  }  \
-} /* SDP_EXPECT */
+#define SDP_EXPECT(expr)   \
+do {   \
+   if (!(expr)) { \
+   sdp_dbg_err("EXCEPT: Internal error check <%s> failed.",   \
+   #expr);\
+   }  \
+} while (0) /* SDP_EXPECT */
 
 #define SDP_CHECK_NULL(value, result) \
-if (NULL == (value)) return (result);
+do { if (NULL == (value)) return (result); } while (0)
 #endif
 /* - */
 /* Inline functions. */
Index: sdp_conn.h
===
--- sdp_conn.h  (revision 1810)
+++ sdp_conn.h  (working copy)
@@ -102,7 +102,7 @@
  * transition one of the disconnect pending states to disconnect send
  */
 #define SDP_ST_PEND_2_SEND(conn) \
-(conn)->state = ((conn)->state + 0x0100) & ~SDP_ST_MASK_DIS_PEND;
+((conn)->state = ((conn)->state + 0x0100) & ~SDP_ST_MASK_DIS_PEND)
 /*
  * internal connection structure
  */
@@ -130,14 +130,14 @@
  * connection handle within a socket.
  */
 #define SDP_GET_CONN(sk) \
-   *((struct sdp_opt **)&(sk)->sk_protinfo)
+   (*((struct sdp_opt **)&(sk)->sk_protinfo))
 #define SDP_SET_CONN(sk, conn) \
-   *((struct sdp_opt **)&(sk)->sk_protinfo) = (conn)
+   (*((struct sdp_opt **)&(sk)->sk_protinfo) = (conn))
 
 #define SDP_CONN_SET_ERR(conn, val) \
-(conn)->error = (conn)->sk->sk_err = (val)
+((conn)->error = (conn)->sk->sk_err = (val))
 #define SDP_CONN_GET_ERR(conn) \
-(conn)->error
+((conn)->error)
 /* - */
 /* state transition information recording*/
 /* - */
@@ -153,7 +153,7 @@
 }; /* struct sdp_conn_state */
 
 #define SDP_CONN_ST_SET(conn, val) \
-{ \
+do { \
   (conn)->state = (val); \
   if (SDP_CONN_STATE_MAX > (conn)->state_rec.value) { \
 (conn)->state_rec.state[(conn)->state_rec.value] = (val); \
@@ -161,10 +161,10 @@
 (conn)->state_rec.line[(conn)->state_rec.value] = __LINE__; \
 (conn)->state_rec.value++; \
   } \
-} 
+} while(0)
 
 #define SDP_CONN_ST_INIT(conn) \
-{ \
+do { \
   (conn)->state = SDP_CONN_ST_INVALID; \
   for ((conn)->state_rec.value = 0; \
SDP_CONN_STATE_MAX > (conn)->state_rec.value; \
@@ -174,10 +174,10 @@
 (conn)->state_rec.line[(conn)->state_rec.value] = 0; \
   } \
   (conn)->state_rec.value = 0; \
-} 
+} while(0)
 #else
-#define SDP_CONN_ST_SET(conn, val) (conn)->state = (val)
-#define SDP_CONN_ST_INIT(conn) (conn)->state = SDP_CONN_ST_INVALID
+#define SDP_CONN_ST_SET(conn, val) ((conn)->state = (val))
+#define SDP_CONN_ST_INIT(conn) ((conn)->state = SDP_CONN_ST_INVALID)
 #endif
 /*
  * connection lock

-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] SDP_CONN_LOCK

2005-02-17 Thread Michael S. Tsirkin
Hi, Libor!
Could you please explain what are the SDP_CONN_LOCK
and friends doing in SDP?

It seems they just implement exclusive access to socket,
but if so, why is a simple semaphore or mutex not used?

Thanks,

-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] Re: ib_mthca 0000:04:00.0: CQ overrun on CQN 00000082, [patchlet] for opensm --guid

2005-02-17 Thread Hal Rosenstock
On Thu, 2005-02-10 at 11:22, Bernhard Fischer wrote: 
> small nitpick to opensm is attached. I'm not keen on implementing
> the menu stuff, just listing them is good enough for me. Please fix
> properly.

Thanks. Applied with minor format changes.

-- Hal

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


Re: [openib-general] Incorrect endian in GUID comparison/SM master selection

2005-02-17 Thread Hal Rosenstock
Hi Brian,

On Wed, 2005-02-16 at 21:37, Brian Eng wrote: 
> Per the IBA spec, the selection of a master SM is determined by the
> GUID (lowest wins).  When OpenSM does its comparison, it does not adjust
> for the endian of the host.  For our x86 systems, this means the
> comparison is based on the byte-swapped value of the GUID.  It looks
> like the patch below is in order.  Is that correct?
> 
> -- osm_sminfo_rcv.c3 Feb 2005 19:33:39 -   1.2.2.3
> +++ osm_sminfo_rcv.c16 Feb 2005 23:13:39 -
> @@ -173,7 +173,8 @@ __osm_sminfo_rcv_remote_sm_is_higher (
>  if( ib_sminfo_get_priority( p_remote_sm ) ==
>  p_rcv->p_subn->opt.sm_priority )
>  {
> -  if( p_remote_sm->guid < p_rcv->p_subn->sm_port_guid )
> +  if( cl_ntoh64( p_remote_sm->guid ) <
> +  cl_ntoh64( p_rcv->p_subn->sm_port_guid ) )
>{
>  return( TRUE );
>}

Thanks. Applied. I also added a fix to a log message when displaying the
GUID.

-- Hal

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] [RFC] Diagnostic tree structure

2005-02-17 Thread Hal Rosenstock
Hi,

The current userspace diagnostics tree structure has host and net
subdirectories. The distinction between the two is blurring so we would
like to flatten the tree and just have all the tools under diags. Any
objections ?

Thanks.

-- Hal

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] Re: RFC on SDP checkin

2005-02-17 Thread Michael S. Tsirkin

Quoting r. Libor Michalek <[EMAIL PROTECTED]>:
> Subject: Re: RFC on SDP checkin
> Possible Issues
> 
>   
> [...] 
> 
>   - Memory locking for AIO requires a call to do_mlock() which is not a
> kernel exported function, the method for calling the function is not
> standard.

Libor, in my eyes this is the biggest issue with this gen2 sdp code.
In short, I dont think using do_mlock is a good idea.
Even if do_mlock *would* be exported, using this call to
do user page locking has other limitations:

- number of locked pages is very restricted, if its not,
  user can easily DOS the box
- fork() is broken in many ways
- user is forbidden from doing mlock/munlock

This may work well enough for things like MPI where
software may be rewritten for infiniband use, but SDP
shall provide migration path for legacy applications without
code changes.

I would like to suggest, once again, that the standard get_user_pages
call is used, instead. It is true that virtual mappings may change,
but it is easy to check that once the transaction is complete,
and perform copy if this happends.

Mellanox implemented and benchmarked this on Gen1 with good results.

If you are interested, I may post the design document for how this
works for us, or I can try and find some time to build a patch.
However, the second option wont happend till the end of
the month, and the patch is likely to be quite big.


-- 
MST - Michael S. Tsirkin
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


RE: [openib-general] question on opensm error

2005-02-17 Thread shaharf
Hi,

> > There is a sys fail red light on the CPU on the 96-port switch that
the
> > opensm host attaches to.
> >
> > What's weird is none of the ib admin tools found anything.
ibnetdiscover
> > happily walked the whole subnet. The only problem was that opensm
would
> > not run, but the errors were unclear. So many things appeared to be
> > working that it did not occur to me to walk over and look at the
switch.
> > Stupid of me.
> 
> Still not 100% clear on the failure mode. I don't know what the sys
fail
> light on the CPU means. It may mean that things partially work. By
that,
> I mean the CPU might crash but the IB chips continue to function based
> on their current setup. It would depend on the split of functionality
> between the CPU and the IB chip firmware (which may depend on vendor).
> 
> If you were able to walk the subnet with the (SMP based) diags, the SM
> port had to be at least in init (ibstat/ibstatus).
> 
> The "keys" are what was the failure mode so we can see how this can be
> detected better in the future, and what caused the switch CPU to crash
> in the first place.
> 
> -- Hal
> 

I totally agree with Hal. The switch's CPU error is not the bug that is
in our concern. We should handle it is just as a failure of a device,
and we should be able to either overcome such failure or at least be
able to diagnose the error.
If you are able to reproduce the situation, please do it while the SM is
running with -V flag (full verbosity) and send the osm log file
(/tmp/osm.log) to the list. This will help us understand what is the
opensm problem. The output of the ibnetdiscover may help too.

Thanks,
Shahar

___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[openib-general] Re:$B??M}$G$9!#(B

2005-02-17 Thread $B??M}(B
$B!ZA0!Y!'??M}(B
$B!XG/Np!Y!'(B37$B:P(B
$B!X?&6H!Y!'2qhttp://cutybee.hosting-geomax.jp/secret.php?pr=ext458
$B"(8=:_!"??N$$5$s$+$i$N;XL>%a!<%k$O5.J}MM$X$N0lDL$N$_$H$J$C$F$*$j$^$9!#(B
$B%U%j!<%a!<%k%"%I%l%9$+$i$NEPO?$K$bBP1~$7$F$$$^$9!#(B
(B
(B___
(Bopenib-general mailing list
(Bopenib-general@openib.org
(Bhttp://openib.org/mailman/listinfo/openib-general
(B
(BTo unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general