[PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-11-04 Thread Hefty, Sean
The AF_IB uses a 64-bit service id (SID), which the user can control through the use of a mask. The rdma_cm will assign values to the unmasked portions of the SID based on the selected port space and port number. Because the IB spec divides the SID range into several regions, a SID/mask combinati

Re: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-12-01 Thread Or Gerlitz
On 11/4/2011 9:08 AM, Hefty, Sean wrote: +static struct idr *cma_select_ib_ps(struct rdma_id_private *id_priv) +{ + struct idr *ps = NULL; + struct sockaddr_ib *sib; + u64 sid_ps, mask, sid; + + sib = (struct sockaddr_ib *)&id_priv->id.route.addr.src_addr; + mask = b

Re: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-12-01 Thread Or Gerlitz
On 11/4/2011 9:08 AM, Hefty, Sean wrote: +static struct idr *cma_select_ib_ps(struct rdma_id_private *id_priv) [...] + if (ps) { + sib->sib_sid = cpu_to_be64(sid_ps | ntohs(cma_port((struct sockaddr *) sib))); + sib->sib_sid_mask = cpu_to_be64(RDMA_IB_IP_PS_MASK

RE: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-12-01 Thread Hefty, Sean
> On 11/4/2011 9:08 AM, Hefty, Sean wrote: > > +static struct idr *cma_select_ib_ps(struct rdma_id_private *id_priv) > > +{ > > + struct idr *ps = NULL; > > + struct sockaddr_ib *sib; > > + u64 sid_ps, mask, sid; > > + > > + sib = (struct sockaddr_ib *)&id_priv->id.route.addr.src_addr; > >

RE: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-12-01 Thread Hefty, Sean
> > +static struct idr *cma_select_ib_ps(struct rdma_id_private *id_priv) > > [...] > > + if (ps) { > > + sib->sib_sid = cpu_to_be64(sid_ps | ntohs(cma_port((struct > sockaddr *) sib))); > > + sib->sib_sid_mask = cpu_to_be64(RDMA_IB_IP_PS_MASK | sib- > >sib_sid_mask); > > +

RE: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-12-02 Thread Hefty, Sean
> > +static struct idr *cma_select_ib_ps(struct rdma_id_private *id_priv) > > [...] > > + if (ps) { > > + sib->sib_sid = cpu_to_be64(sid_ps | ntohs(cma_port((struct > sockaddr *) sib))); > > + sib->sib_sid_mask = cpu_to_be64(RDMA_IB_IP_PS_MASK | sib- > >sib_sid_mask); > > +

Re: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB

2011-12-03 Thread Or Gerlitz
On Sat, Dec 3, 2011 at 12:41 AM, Hefty, Sean wrote: > What sparse settings did you use to produce this warning? make CF="-D__CHECK_ENDIAN__" C=2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at h