[openib-general] [PATCH] RDMA CM: assign port numbers when binding a cm_id to an address

Ranjit Pandit rpandit at silverstorm.com
Tue May 2 17:10:22 PDT 2006


Sean,

Rds uses RDMA_PS_UDP.
Here is a patch to add that.

Signed-off-by: Ranjit Pandit <rpandit at silverstorm.com>

Index: cma.c
===================================================================
--- cma.c   (revision 6737)
+++ cma.c   (working copy)
@@ -62,6 +62,7 @@
 static struct workqueue_struct *cma_wq;
 static DEFINE_IDR(sdp_ps);
 static DEFINE_IDR(tcp_ps);
+static DEFINE_IDR(udp_ps);

 struct cma_device {
    struct list_head    list;
@@ -1427,6 +1428,9 @@
    case RDMA_PS_TCP:
        ps = &tcp_ps;
        break;
+   case RDMA_PS_UDP:
+       ps = &udp_ps;
+       break;
    default:
        return -EPROTONOSUPPORT;
    }
@@ -1831,6 +1835,7 @@
    destroy_workqueue(cma_wq);
    idr_destroy(&sdp_ps);
    idr_destroy(&tcp_ps);
+   idr_destroy(&udp_ps);
 }

 module_init(cma_init);




> >> +static int cma_get_port(struct rdma_id_private *id_priv)
> >> +{
> >> +    struct idr *ps;
> >> +    int ret;
> >> +
> >> +    switch (id_priv->id.ps) {
> >> +    case RDMA_PS_SDP:
> >> +            ps = &sdp_ps;
> >> +            break;
> >> +    case RDMA_PS_TCP:
> >> +            ps = &tcp_ps;
> >> +            break;
> >> +    default:
> >> +            return -EPROTONOSUPPORT;
> >> +    }
> >
> >Do you plan to add support for UDP and SCTP since they have
> >rdma_port_space values? Is it as simple as adding a UDP and SCTP idr?
>
> Adding the port space values should be as simple as adding the UDP / SCTP idr's.
> I'm just not as sure that SCTP support is handled in other locations in the
> code, and I don't think it makes sense to have UDP connections.  I deferred both
> of these for now.
> - Sean
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>



More information about the general mailing list