* [PATCH rdma-next] IB/cma: Set default gid type to RoCEv2
@ 2017-05-30 6:47 Leon Romanovsky
[not found] ` <20170530064734.4731-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2017-05-30 6:47 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua
From: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
RoCEv2 is the preferred RDMA protocol for Ethernet link layer because
of its advantages over RoCEv1. For better user experience make it the
default choice for RDMA_CM connections if device/port support it.
Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/core/cma.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 91b7a2fe5a55..5ce3c9e1657e 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -72,6 +72,7 @@ MODULE_LICENSE("Dual BSD/GPL");
#define CMA_MAX_CM_RETRIES 15
#define CMA_CM_MRA_SETTING (IB_CM_MRA_FLAG_DELAY | 24)
#define CMA_IBOE_PACKET_LIFETIME 18
+#define CMA_PREFERRED_ROCE_GID_TYPE IB_GID_TYPE_ROCE_UDP_ENCAP
static const char * const cma_events[] = {
[RDMA_CM_EVENT_ADDR_RESOLVED] = "address resolved",
@@ -4305,8 +4306,12 @@ static void cma_add_one(struct ib_device *device)
for (i = rdma_start_port(device); i <= rdma_end_port(device); i++) {
supported_gids = roce_gid_type_mask_support(device, i);
WARN_ON(!supported_gids);
- cma_dev->default_gid_type[i - rdma_start_port(device)] =
- find_first_bit(&supported_gids, BITS_PER_LONG);
+ if (supported_gids & CMA_PREFERRED_ROCE_GID_TYPE)
+ cma_dev->default_gid_type[i - rdma_start_port(device)] =
+ CMA_PREFERRED_ROCE_GID_TYPE;
+ else
+ cma_dev->default_gid_type[i - rdma_start_port(device)] =
+ find_first_bit(&supported_gids, BITS_PER_LONG);
cma_dev->default_roce_tos[i - rdma_start_port(device)] = 0;
}
--
2.12.2
--
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] 4+ messages in thread[parent not found: <20170530064734.4731-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH rdma-next] IB/cma: Set default gid type to RoCEv2 [not found] ` <20170530064734.4731-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2017-06-07 9:07 ` Leon Romanovsky [not found] ` <20170607090750.GC1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Leon Romanovsky @ 2017-06-07 9:07 UTC (permalink / raw) To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua [-- Attachment #1: Type: text/plain, Size: 1244 bytes --] On Tue, May 30, 2017 at 09:47:34AM +0300, Leon Romanovsky wrote: > From: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > RoCEv2 is the preferred RDMA protocol for Ethernet link layer because > of its advantages over RoCEv1. For better user experience make it the > default choice for RDMA_CM connections if device/port support it. > > Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > Reviewed-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > --- > drivers/infiniband/core/cma.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c > index 91b7a2fe5a55..5ce3c9e1657e 100644 > --- a/drivers/infiniband/core/cma.c > +++ b/drivers/infiniband/core/cma.c > @@ -72,6 +72,7 @@ MODULE_LICENSE("Dual BSD/GPL"); > #define CMA_MAX_CM_RETRIES 15 > #define CMA_CM_MRA_SETTING (IB_CM_MRA_FLAG_DELAY | 24) > #define CMA_IBOE_PACKET_LIFETIME 18 > +#define CMA_PREFERRED_ROCE_GID_TYPE IB_GID_TYPE_ROCE_UDP_ENCAP It should be (1 << IB_GID_TYPE_ROCE_UDP_ENCAP) and not as was written above. We will send a fix for that. Thanks [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20170607090750.GC1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>]
* Re: [PATCH rdma-next] IB/cma: Set default gid type to RoCEv2 [not found] ` <20170607090750.GC1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org> @ 2017-07-28 17:50 ` Doug Ledford [not found] ` <1501264241.2593.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Doug Ledford @ 2017-07-28 17:50 UTC (permalink / raw) To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua On Wed, 2017-06-07 at 12:07 +0300, Leon Romanovsky wrote: > On Tue, May 30, 2017 at 09:47:34AM +0300, Leon Romanovsky wrote: > > From: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > > > RoCEv2 is the preferred RDMA protocol for Ethernet link layer > > because > > of its advantages over RoCEv1. For better user experience make it > > the > > default choice for RDMA_CM connections if device/port support it. > > > > Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > Reviewed-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > > --- > > drivers/infiniband/core/cma.c | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/infiniband/core/cma.c > > b/drivers/infiniband/core/cma.c > > index 91b7a2fe5a55..5ce3c9e1657e 100644 > > --- a/drivers/infiniband/core/cma.c > > +++ b/drivers/infiniband/core/cma.c > > @@ -72,6 +72,7 @@ MODULE_LICENSE("Dual BSD/GPL"); > > #define CMA_MAX_CM_RETRIES 15 > > #define CMA_CM_MRA_SETTING (IB_CM_MRA_FLAG_DELAY | 24) > > #define CMA_IBOE_PACKET_LIFETIME 18 > > +#define CMA_PREFERRED_ROCE_GID_TYPE IB_GID_TYPE_ROCE_UDP_ENCAP > > It should be (1 << IB_GID_TYPE_ROCE_UDP_ENCAP) and not as was written > above. We will send a fix for that. I didn't see a followup that fixed this, so I took this patch and then created a fix patch myself. -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- 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] 4+ messages in thread
[parent not found: <1501264241.2593.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH rdma-next] IB/cma: Set default gid type to RoCEv2 [not found] ` <1501264241.2593.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2017-07-30 6:12 ` Leon Romanovsky 0 siblings, 0 replies; 4+ messages in thread From: Leon Romanovsky @ 2017-07-30 6:12 UTC (permalink / raw) To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua [-- Attachment #1: Type: text/plain, Size: 2004 bytes --] On Fri, Jul 28, 2017 at 01:50:41PM -0400, Doug Ledford wrote: > On Wed, 2017-06-07 at 12:07 +0300, Leon Romanovsky wrote: > > On Tue, May 30, 2017 at 09:47:34AM +0300, Leon Romanovsky wrote: > > > From: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > > > > > RoCEv2 is the preferred RDMA protocol for Ethernet link layer > > > because > > > of its advantages over RoCEv1. For better user experience make it > > > the > > > default choice for RDMA_CM connections if device/port support it. > > > > > > Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > > Reviewed-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > > > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > > > --- > > > drivers/infiniband/core/cma.c | 9 +++++++-- > > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/infiniband/core/cma.c > > > b/drivers/infiniband/core/cma.c > > > index 91b7a2fe5a55..5ce3c9e1657e 100644 > > > --- a/drivers/infiniband/core/cma.c > > > +++ b/drivers/infiniband/core/cma.c > > > @@ -72,6 +72,7 @@ MODULE_LICENSE("Dual BSD/GPL"); > > > #define CMA_MAX_CM_RETRIES 15 > > > #define CMA_CM_MRA_SETTING (IB_CM_MRA_FLAG_DELAY | 24) > > > #define CMA_IBOE_PACKET_LIFETIME 18 > > > +#define CMA_PREFERRED_ROCE_GID_TYPE IB_GID_TYPE_ROCE_UDP_ENCAP > > > > It should be (1 << IB_GID_TYPE_ROCE_UDP_ENCAP) and not as was written > > above. We will send a fix for that. > > I didn't see a followup that fixed this, so I took this patch and then > created a fix patch myself. Thanks. > > -- > Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > GPG KeyID: B826A3330E572FDD > Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD > > -- > 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-30 6:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-30 6:47 [PATCH rdma-next] IB/cma: Set default gid type to RoCEv2 Leon Romanovsky
[not found] ` <20170530064734.4731-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-07 9:07 ` Leon Romanovsky
[not found] ` <20170607090750.GC1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-28 17:50 ` Doug Ledford
[not found] ` <1501264241.2593.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-30 6:12 ` Leon Romanovsky
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).