[openib-general] Re: [PATCH] CMA: allow/require bind beforeconnect
Tom Tucker
tom at opengridcomputing.com
Tue Mar 28 11:46:38 PST 2006
On Tue, 2006-03-28 at 09:50 -0800, Sean Hefty wrote:
> >>The app _usually_ doesn't care. See NFS discussion for a
> >>client app that does care. Also, providers DO care. Because
> >>of this issue, the chelsio iwarp provider right now has to
> >>allocate its own ephemeral ports at connect time. This logic
> >>should be moved into the IWCM or maybe the CMA and an
> >>explicit bind() operation be exported by the iwarp providers
> >>to allow the IWCM or CMA to track all port allocations.
>
> Somehow I didn't receive Steve's response. Anyway, I'm referring to apps that
> don't specify which port to use as the one's that don't care, versus those that
> do want to know their port.
>
> In reality, the port space for RDMA connections over IB is distinct from the TCP
> port space. No attempt is made to coordinate between the two, and I am not
> convinced that those two port spaces should be one and the same. This is where
> I believe there's disconnect.
Whether it's a separate port space or not is as simple as defining a
different hash_info structure.
struct inet_hashinfo __cachline_aligned ib_hashinfo = {
.lhash_lock = RW_LOCK_UNLOCKED,
.lhash_users = ATOMIC_INIT(0),
.lhash_wait = _WAIT_QUEUE_HEAD_INITIALIZER(ib_hashinfo.lhash_wait);
};
#ifndef I_WANT_SHARED_TCP_PORTSPACE
struct inet_hashinfo __cachline_aligned __iw_hashinfo = {
.lhash_lock = RW_LOCK_UNLOCKED,
.lhash_users = ATOMIC_INIT(0),
.lhash_wait = _WAIT_QUEUE_HEAD_INITIALIZER(ib_hashinfo.lhash_wait);
};
struct inet_hashinfo *iw_hashinfo = &__iw_hashinfo;
#else
struct inet_hashinfo *iw_hashinfo = &tcp_hashinfo;
#endif
struct sock dummy {
/* initialized for REUSE port, etc... */
};
struct sock *ib_sock = &dummy;
int ib_get_port(unsigned short snum)
{
return inet_csk_get_port(&ib_hashinfo, ib_sock, snum)
}
int iw_get_port(unsigned short snum)
{
return inet_csk_get_port(&iw_hashinfo, iw_sock, snum);
}
>
> - Sean
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list