From: Roland Dreier <rdreier@cisco.com>
To: Amerigo Wang <amwang@redhat.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
davem@davemloft.net, linux-rdma@vger.kernel.org,
sean.hefty@intel.com
Subject: Re: [Patch] infiniband: check local reserved ports
Date: Thu, 03 Jun 2010 09:39:16 -0700 [thread overview]
Message-ID: <ada1vcoqde3.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <20100603083106.6047.7657.sendpatchset@localhost.localdomain> (Amerigo Wang's message of "Thu, 3 Jun 2010 04:27:02 -0400")
> Since Tetsuo's patch already got merged, now this is the missing part
> for local port reservation.
>
> Cc: Roland Dreier <rdreier@cisco.com>
> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
> Signed-off-by: WANG Cong <amwang@redhat.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@cisco.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
next prev parent reply other threads:[~2010-06-03 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 8:27 [Patch] infiniband: check local reserved ports Amerigo Wang
2010-06-03 16:39 ` Roland Dreier [this message]
[not found] ` <ada1vcoqde3.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-06-04 1:53 ` Cong Wang
[not found] ` <4C085C9A.30506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-04 16:04 ` Roland Dreier
[not found] ` <ada1vcmpyvu.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-06-07 9:04 ` Cong Wang
2010-06-07 15:45 ` Roland Dreier
[not found] ` <adad3w2onhs.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-06-08 2:23 ` Cong Wang
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=ada1vcoqde3.fsf@roland-alpha.cisco.com \
--to=rdreier@cisco.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=sean.hefty@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).