Re: [Patch] infiniband: check local reserved ports
From: Cong Wang <hidden>
Date: 2010-06-04 01:49:37
Also in:
linux-rdma, lkml
On 06/04/10 00:39, Roland Dreier wrote:
> Since Tetsuo's patch already got merged, now this is the missing part
> for local port reservation.
>
> Cc: Roland Dreier[off-list ref]
> Cc: Tetsuo Handa[off-list ref]
> Signed-off-by: WANG Cong[off-list ref]
>
> ---
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index b930b81..7b89bab 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -1978,6 +1978,7 @@ static int cma_alloc_any_port(struct idr *ps, struct rdma_id_private *id_priv)
> rover = net_random() % remaining + low;
> retry:
> if (last_used_port != rover&&
> + !inet_is_reserved_local_port(rover)&&
> !idr_find(ps, (unsigned short) rover)) {
> int ret = cma_alloc_port(ps, id_priv, rover);
> /*
Should this inet_is_reserved_local_port() test apply to all the "port
spaces" that this code is handling? I honestly am ignorant of the
intended semantics of the new local_reserved_ports stuff, hence my question.Yes, but I only found this case, is there any else? Thanks! -- 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