public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Subject: Re: [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB
Date: Thu, 1 Dec 2011 10:37:02 +0200	[thread overview]
Message-ID: <4ED73CAE.9080805@mellanox.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A8237316E8D150-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

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 = be64_to_cpu(sib->sib_sid_mask)&  RDMA_IB_IP_PS_MASK;
> +	sid = be64_to_cpu(sib->sib_sid)&  mask;
> +
> +	if ((id_priv->id.ps == RDMA_PS_IB)&&  (sid == (RDMA_IB_IP_PS_IB&  mask))) {
> +		sid_ps = RDMA_IB_IP_PS_IB;
> +		ps =&ib_ps;
> +	} else if (((id_priv->id.ps == RDMA_PS_IB) || (id_priv->id.ps == RDMA_PS_TCP))&&
> +		   (sid == (RDMA_IB_IP_PS_TCP&  mask))) {
> +		sid_ps = RDMA_IB_IP_PS_TCP;
> +		ps =&tcp_ps;
> +	} else if (((id_priv->id.ps == RDMA_PS_IB) || (id_priv->id.ps == RDMA_PS_UDP))&&
> +		   (sid == (RDMA_IB_IP_PS_UDP&  mask))) {
> +		sid_ps = RDMA_IB_IP_PS_UDP;
> +		ps =&udp_ps;
>   	}

I see here some relation between PS_IB to PS_TCP and PS_UDP, isn't a 
similar interaction is needed with PS_IPOIB?

> --- a/include/rdma/rdma_cm.h
> +++ b/include/rdma/rdma_cm.h
> @@ -70,6 +70,11 @@ enum rdma_port_space {
>   	RDMA_PS_UDP   = 0x0111,
>   };
>
> +#define RDMA_IB_IP_PS_MASK   0xFFFFFFFFFFFF0000ULL
> +#define RDMA_IB_IP_PS_TCP    0x0000000001060000ULL
> +#define RDMA_IB_IP_PS_UDP    0x0000000001110000ULL
> +#define RDMA_IB_IP_PS_IB     0x00000000013F0000ULL

so 0x3f here in RDMA_IB_IP_PS_IB stand's for IANA's "any local network", 
correct?


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-12-01  8:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-04  7:08 [PATCH 4/5] rdma/cm: Update port reservation to support AF_IB Hefty, Sean
     [not found] ` <1828884A29C6694DAF28B7E6B8A8237316E8D150-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-12-01  8:37   ` Or Gerlitz [this message]
     [not found]     ` <4ED73CAE.9080805-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2011-12-01 18:14       ` Hefty, Sean
2011-12-01  8:49   ` Or Gerlitz
     [not found]     ` <4ED73F81.6060605-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2011-12-01 18:31       ` Hefty, Sean
2011-12-02 22:41       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373256521A6-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-12-03 22:12           ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED73CAE.9080805@mellanox.com \
    --to=ogerlitz-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox