* [Patch] infiniband: check local reserved ports @ 2010-06-03 8:27 Amerigo Wang 2010-06-03 16:39 ` Roland Dreier 0 siblings, 1 reply; 7+ messages in thread From: Amerigo Wang @ 2010-06-03 8:27 UTC (permalink / raw) To: linux-kernel; +Cc: netdev, Tetsuo Handa, Amerigo Wang, Roland Dreier, davem 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); /* ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch] infiniband: check local reserved ports 2010-06-03 8:27 [Patch] infiniband: check local reserved ports Amerigo Wang @ 2010-06-03 16:39 ` Roland Dreier [not found] ` <ada1vcoqde3.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Roland Dreier @ 2010-06-03 16:39 UTC (permalink / raw) To: Amerigo Wang Cc: linux-kernel, netdev, Tetsuo Handa, davem, linux-rdma, sean.hefty > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <ada1vcoqde3.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>]
* Re: [Patch] infiniband: check local reserved ports [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> 0 siblings, 1 reply; 7+ messages in thread From: Cong Wang @ 2010-06-04 1:53 UTC (permalink / raw) To: Roland Dreier Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, Tetsuo Handa, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w 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<rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> > > Cc: Tetsuo Handa<penguin-kernel-1yMVhJb1mP/7nzcFbJAaVXf5DAMn2ifp@public.gmane.org> > > Signed-off-by: WANG Cong<amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > > > --- > > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <4C085C9A.30506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [Patch] infiniband: check local reserved ports [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> 0 siblings, 1 reply; 7+ messages in thread From: Roland Dreier @ 2010-06-04 16:04 UTC (permalink / raw) To: Cong Wang Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, Tetsuo Handa, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w > > 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? My question was more in the other direction: should this test apply to all the "port spaces" handled here? From looking at the code, it appears the answer is yes -- it seems that putting a port in local_reserved_ports reserves that port for IPv4 and IPv6, UDP, TCP, SCTP, DCCP, everything, so we should probably reserve all RDMA CM ports too. -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || 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-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <ada1vcmpyvu.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>]
* Re: [Patch] infiniband: check local reserved ports [not found] ` <ada1vcmpyvu.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> @ 2010-06-07 9:04 ` Cong Wang 2010-06-07 15:45 ` Roland Dreier 0 siblings, 1 reply; 7+ messages in thread From: Cong Wang @ 2010-06-07 9:04 UTC (permalink / raw) To: Roland Dreier Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, Tetsuo Handa, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w On 06/05/10 00:04, Roland Dreier wrote: > > > 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? > > My question was more in the other direction: should this test apply to > all the "port spaces" handled here? From looking at the code, it > appears the answer is yes -- it seems that putting a port in > local_reserved_ports reserves that port for IPv4 and IPv6, UDP, TCP, > SCTP, DCCP, everything, so we should probably reserve all RDMA CM ports too. Yes. So this patch looks good for you? :) 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch] infiniband: check local reserved ports 2010-06-07 9:04 ` Cong Wang @ 2010-06-07 15:45 ` Roland Dreier [not found] ` <adad3w2onhs.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Roland Dreier @ 2010-06-07 15:45 UTC (permalink / raw) To: Cong Wang Cc: linux-kernel, netdev, Tetsuo Handa, davem, linux-rdma, sean.hefty > So this patch looks good for you? :) Yes, will queue it up, thanks. -- Roland Dreier <rolandd@cisco.com> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <adad3w2onhs.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>]
* Re: [Patch] infiniband: check local reserved ports [not found] ` <adad3w2onhs.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> @ 2010-06-08 2:23 ` Cong Wang 0 siblings, 0 replies; 7+ messages in thread From: Cong Wang @ 2010-06-08 2:23 UTC (permalink / raw) To: Roland Dreier Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, Tetsuo Handa, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w On 06/07/10 23:45, Roland Dreier wrote: > > So this patch looks good for you? :) > > Yes, will queue it up, thanks. 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-06-08 2:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-06-03 8:27 [Patch] infiniband: check local reserved ports Amerigo Wang 2010-06-03 16:39 ` Roland Dreier [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
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).