[ofa-general] RE: [RFC PATCH 4/4] rdma/cma: implement RDMA_ALIGN_WITH_NETDEVICE ha mode

Or Gerlitz or.gerlitz at gmail.com
Tue May 13 13:26:06 PDT 2008


On 5/13/08, Sean Hefty <sean.hefty at intel.com> wrote:

This will race with other user calls.  I've found it fairly difficult for
> the
> rdma_cm to call back into its own API and avoid racing with the user
> trying to
> destroy the cm_id.  None of the APIs are coded to allow calling them
> simultaneously with destroy.


I see.


> A better solution for this may be for the rdma_cm to simply notify the
> user that
> the IP mapping for their RDMA device has changed.  The user can then
> disconnect,
> with the appropriate synchronization, if they want their RDMA connection
> to
> follow the IP address.


Yes, this is possible, I have tried to implement it at the rdma-cm to avoid
having each ULP do it at their code, if you think its practially impossible
for the rdma-cm to call its own API, I will can change this into delivering
disconnected event.

(If I understood correctly, the reason for this is to allow failing back to
> a repaired port.)


indeed, this is a possible use case.

>+      list_for_each_entry(cma_dev, &dev_list, list)
> >+              list_for_each_entry(id_priv, &cma_dev->id_list, list) {
> >+                      dev_addr = &id_priv->id.route.addr.dev_addr;
> >+                      if (!memcmp(dev_addr->src_netdev_name, ndev->name,
> IFNAMSIZ) &&
> >+                              memcmp(dev_addr->src_dev_addr,
> ndev->dev_addr,ndev->addr_len)
> >+                                      if (id_priv->ha_mode ==
> RDMA_ALIGN_WITH_NETDEVICE)
> >+
> schedule_work(&id_priv->ha_work);
>
> As Roland mentioned, this is racy in the areas he pointed out.  This will
> take
> some thought to handle correctly.
>

OK, I will try to improve things here, any hints/directions would be very
much appreciated...

Or.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080513/d3bcd23c/attachment.html>


More information about the general mailing list