[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ada1vcoqde3.fsf@roland-alpha.cisco.com>
Date: Thu, 03 Jun 2010 09:39:16 -0700
From: Roland Dreier <rdreier@...co.com>
To: Amerigo Wang <amwang@...hat.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
davem@...emloft.net, linux-rdma@...r.kernel.org,
sean.hefty@...el.com
Subject: Re: [Patch] infiniband: check local reserved ports
> Since Tetsuo's patch already got merged, now this is the missing part
> for local port reservation.
>
> Cc: Roland Dreier <rdreier@...co.com>
> Cc: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
> Signed-off-by: WANG Cong <amwang@...hat.com>
>
> ---
> 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.
- R.
--
Roland Dreier <rolandd@...co.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists