On Mon, 1 Nov 2004 17:50:26 -0800 (PST)
Krishna Kumar <[EMAIL PROTECTED]> wrote:

>       spin_lock_irqsave(&port_priv->reg_lock, flags);
>         /* Determine corresponding MAD agent for incoming receive MAD
>         */ solicited = solicited_mad(recv->header.recv_buf.mad);
>         mad_agent = find_mad_agent(port_priv,
>         recv->header.recv_buf.mad,
>                                    solicited);
>         if (!mad_agent) {
>                 spin_unlock_irqrestore(&port_priv->reg_lock, flags);
>                 printk(KERN_NOTICE PFX "No matching mad agent found
>                 for "
>                        "received MAD on port %d\n",
>                        port_priv->port_num);
>         } else {
>                 atomic_inc(&mad_agent->refcount);
>                 spin_unlock_irqrestore(&port_priv->reg_lock, flags);
>                 ib_mad_complete_recv(mad_agent, recv, solicited);

Related to this, the call to solicited_mad() doesn't need to be made
while holding the lock.  Moving this outside, we can push the locking
inside find_mad_agent as well, if it makes more sense to do so.

- Sean
_______________________________________________
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

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

Reply via email to