All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] Verbs requirement for GRH when working in GID based addressing
@ 2018-01-10 19:28 Alex Rosenbaum
       [not found] ` <CAFgAxU_p4OR7qUe+HjK_rYP+LxUUOxYs+Qp6g4_e64WvOXMWDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Rosenbaum @ 2018-01-10 19:28 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Yishai Hadas, Leon Romanovsky, Alex @ Mellanox, Majd Dibbiny,
	Artemy Kovalyov, Yossi Itigin

RDMA applications require an indication they are operating in an
environment which is based on GID addressing, such as SR-IOV IB
Virtualization. In this mode, all sent traffic must include a GRH.

This RFC exposes a new verbs port capability flag: GRH_REQUIRED.
When GRH_REQUIRED port capability flag is set, the applications must
create all AH with GRH configured. Meaning calling ibv_create_ah() with
'struct ibv_ah_attr { is_global = 1 }'

Signed-off-by: Alex Rosenbaum <alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/man/ibv_create_ah.3 | 4 ++++
 libibverbs/verbs.h             | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libibverbs/man/ibv_create_ah.3 b/libibverbs/man/ibv_create_ah.3
index 0ca2198..b645ea3 100644
--- a/libibverbs/man/ibv_create_ah.3
+++ b/libibverbs/man/ibv_create_ah.3
@@ -53,6 +53,10 @@ destroys the AH
 .SH "RETURN VALUE"
 .B ibv_create_ah()
 returns a pointer to the created AH, or NULL if the request fails.
+.SH "NOTES"
+If port cap flag IBV_PORT_GRH_REQUIRED is set then
+.B ibv_create_ah()
+must be created with definition of 'struct ibv_ah_attr { .is_global =
1; .grh = {...}; }'.
 .PP
 .B ibv_destroy_ah()
 returns 0 on success, or the value of errno on failure (which
indicates the failure reason).
diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
index 997597a..12e80b3 100644
--- a/libibverbs/verbs.h
+++ b/libibverbs/verbs.h
@@ -338,7 +338,8 @@ enum ibv_port_cap_flags {
        IBV_PORT_BOOT_MGMT_SUP                  = 1 << 23,
        IBV_PORT_LINK_LATENCY_SUP               = 1 << 24,
        IBV_PORT_CLIENT_REG_SUP                 = 1 << 25,
-       IBV_PORT_IP_BASED_GIDS                  = 1 << 26
+       IBV_PORT_IP_BASED_GIDS                  = 1 << 26,
+       IBV_PORT_GRH_REQUIRED                   = 1 << 27
 };

 struct ibv_port_attr {
-- 
1.8.3.1
--
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 related	[flat|nested] 3+ messages in thread

* Re: [PATCH RFC] Verbs requirement for GRH when working in GID based addressing
       [not found] ` <CAFgAxU_p4OR7qUe+HjK_rYP+LxUUOxYs+Qp6g4_e64WvOXMWDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-01-10 21:59   ` Or Gerlitz
       [not found]     ` <CAJ3xEMgtcv0dgyY59i4+t9tOt8QOfGD9onPcc=QdZBe2ZmKA9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Or Gerlitz @ 2018-01-10 21:59 UTC (permalink / raw)
  To: Alex Rosenbaum; +Cc: RDMA mailing list

On Wed, Jan 10, 2018 at 9:28 PM, Alex Rosenbaum <rosenbaumalex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> RDMA applications require an indication they are operating in an
> environment which is based on GID addressing, such as SR-IOV IB
> Virtualization. In this mode, all sent traffic must include a GRH.

Hi Alex,

Isn't this the case for RoCE since it's day one? how does it work there? maybe
a hop limit > 1 is used and the kernel rdma stack tweaks it over RoCE ports?
--
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] 3+ messages in thread

* Re: [PATCH RFC] Verbs requirement for GRH when working in GID based addressing
       [not found]     ` <CAJ3xEMgtcv0dgyY59i4+t9tOt8QOfGD9onPcc=QdZBe2ZmKA9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-01-10 22:31       ` Jason Gunthorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2018-01-10 22:31 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Alex Rosenbaum, RDMA mailing list

On Wed, Jan 10, 2018 at 11:59:18PM +0200, Or Gerlitz wrote:
> On Wed, Jan 10, 2018 at 9:28 PM, Alex Rosenbaum <rosenbaumalex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > RDMA applications require an indication they are operating in an
> > environment which is based on GID addressing, such as SR-IOV IB
> > Virtualization. In this mode, all sent traffic must include a GRH.
> 
> Hi Alex,
> 
> Isn't this the case for RoCE since it's day one? how does it work there? maybe
> a hop limit > 1 is used and the kernel rdma stack tweaks it over RoCE ports?

roce requires GRH because it is roce. Everything should just use
that as the criteria.

The hop limit trick is only for IB and it is only for path records
from the SA. It allows the SA to say 'a GRH is required for this path'
even if the path has local GIDs.

The SA *should* be returning hop limit > 1 for any GID that has
grh_required=1 in this patch, otherwise CM won't work right if the
node is a target.

Presumably the attr is required for non SA based schemes?

Jason
--
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] 3+ messages in thread

end of thread, other threads:[~2018-01-10 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 19:28 [PATCH RFC] Verbs requirement for GRH when working in GID based addressing Alex Rosenbaum
     [not found] ` <CAFgAxU_p4OR7qUe+HjK_rYP+LxUUOxYs+Qp6g4_e64WvOXMWDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-10 21:59   ` Or Gerlitz
     [not found]     ` <CAJ3xEMgtcv0dgyY59i4+t9tOt8QOfGD9onPcc=QdZBe2ZmKA9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-10 22:31       ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.