public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH perftest] perftest: make inline send on ocrdma work better
@ 2016-08-19 19:06 Jarod Wilson
       [not found] ` <1471633611-41155-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jarod Wilson @ 2016-08-19 19:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jarod Wilson, Gil Rockah

The ocrdma driver supports a maximum inline send size of 224, while the
current code sets this size to 236. Add an ocrdma-specific check when
setting max inline size to eliminate the need to always pass -I 224 when
running ib_send_lat on ocrdma hardware.

CC: Gil Rockah <gilr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Jarod Wilson <jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 src/perftest_parameters.c | 8 ++++++++
 src/perftest_parameters.h | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/src/perftest_parameters.c b/src/perftest_parameters.c
index 3ffddd7..65ce731 100755
--- a/src/perftest_parameters.c
+++ b/src/perftest_parameters.c
@@ -1465,6 +1465,14 @@ static void ctx_set_max_inline(struct ibv_context *context,struct perftest_param
 		}
 	}
 
+	if (strncmp("ocrdma", user_param->ib_devname, 6) == 0) {
+		if (user_param->inline_size > DEF_INLINE_SEND_MAX_OCRDMA) {
+			fprintf(stdout, "lowering inline size to ocrdma supported maximum of %d\n",
+				DEF_INLINE_SEND_MAX_OCRDMA);
+			user_param->inline_size = DEF_INLINE_SEND_MAX_OCRDMA;
+		}
+	}
+
 	return;
 }
 /******************************************************************************
diff --git a/src/perftest_parameters.h b/src/perftest_parameters.h
index 1122792..a566f42 100755
--- a/src/perftest_parameters.h
+++ b/src/perftest_parameters.h
@@ -133,6 +133,9 @@
 #define DEF_INLINE_SEND_UD (188)
 #define DEF_INLINE_DC (150)
 
+/* OCRDMA has an inline max of 224 */
+#define DEF_INLINE_SEND_MAX_OCRDMA (224)
+
 /* Max and Min allowed values for perftest parameters. */
 #define MIN_TOS		(0)
 #define MAX_TOS		(256)
-- 
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] 4+ messages in thread

* Re: [PATCH perftest] perftest: make inline send on ocrdma work better
       [not found] ` <1471633611-41155-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-08-19 20:45   ` Steve Wise
       [not found]     ` <85f0801f-a78f-7091-7ae2-5febde6b19b6-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2016-08-19 20:45 UTC (permalink / raw)
  To: Jarod Wilson, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Gil Rockah, Jason Gunthorpe

On 8/19/2016 2:06 PM, Jarod Wilson wrote:
> The ocrdma driver supports a maximum inline send size of 224, while the
> current code sets this size to 236. Add an ocrdma-specific check when
> setting max inline size to eliminate the need to always pass -I 224 when
> running ib_send_lat on ocrdma hardware.

<soap box>
We really should fix the RDMA uAPI to allow querying the device to get 
the max inline size for various SQ WRs (it might vary for send vs write, 
for example), instead of requiring applications to guess or hardcoding 
benchmarks based on device name...
</soap box>

> CC: Gil Rockah <gilr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Jarod Wilson <jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>   src/perftest_parameters.c | 8 ++++++++
>   src/perftest_parameters.h | 3 +++
>   2 files changed, 11 insertions(+)
>
> diff --git a/src/perftest_parameters.c b/src/perftest_parameters.c
> index 3ffddd7..65ce731 100755
> --- a/src/perftest_parameters.c
> +++ b/src/perftest_parameters.c
> @@ -1465,6 +1465,14 @@ static void ctx_set_max_inline(struct ibv_context *context,struct perftest_param
>   		}
>   	}
>   
> +	if (strncmp("ocrdma", user_param->ib_devname, 6) == 0) {
> +		if (user_param->inline_size > DEF_INLINE_SEND_MAX_OCRDMA) {
> +			fprintf(stdout, "lowering inline size to ocrdma supported maximum of %d\n",
> +				DEF_INLINE_SEND_MAX_OCRDMA);
> +			user_param->inline_size = DEF_INLINE_SEND_MAX_OCRDMA;
> +		}
> +	}
> +
>   	return;
>   }
>   /******************************************************************************
> diff --git a/src/perftest_parameters.h b/src/perftest_parameters.h
> index 1122792..a566f42 100755
> --- a/src/perftest_parameters.h
> +++ b/src/perftest_parameters.h
> @@ -133,6 +133,9 @@
>   #define DEF_INLINE_SEND_UD (188)
>   #define DEF_INLINE_DC (150)
>   
> +/* OCRDMA has an inline max of 224 */
> +#define DEF_INLINE_SEND_MAX_OCRDMA (224)
> +
>   /* Max and Min allowed values for perftest parameters. */
>   #define MIN_TOS		(0)
>   #define MAX_TOS		(256)


--
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

* Re: [PATCH perftest] perftest: make inline send on ocrdma work better
       [not found]     ` <85f0801f-a78f-7091-7ae2-5febde6b19b6-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
@ 2016-08-19 21:12       ` Jarod Wilson
       [not found]         ` <20160819211242.GY1916-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jarod Wilson @ 2016-08-19 21:12 UTC (permalink / raw)
  To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Gil Rockah, Jason Gunthorpe

On Fri, Aug 19, 2016 at 03:45:57PM -0500, Steve Wise wrote:
> On 8/19/2016 2:06 PM, Jarod Wilson wrote:
> >The ocrdma driver supports a maximum inline send size of 224, while the
> >current code sets this size to 236. Add an ocrdma-specific check when
> >setting max inline size to eliminate the need to always pass -I 224 when
> >running ib_send_lat on ocrdma hardware.
> 
> <soap box>
> We really should fix the RDMA uAPI to allow querying the device to
> get the max inline size for various SQ WRs (it might vary for send
> vs write, for example), instead of requiring applications to guess
> or hardcoding benchmarks based on device name...
> </soap box>

This was a nice quick hack Friday afternoon hack to get it working
with existing kernels in our testing infra, but having a way to ask
the hardware would definitely be vastly superior.

-- 
Jarod Wilson
jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

--
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

* RE: [PATCH perftest] perftest: make inline send on ocrdma work better
       [not found]         ` <20160819211242.GY1916-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-08-19 21:31           ` Steve Wise
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Wise @ 2016-08-19 21:31 UTC (permalink / raw)
  To: 'Jarod Wilson'
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, 'Gil Rockah',
	'Jason Gunthorpe'

> On Fri, Aug 19, 2016 at 03:45:57PM -0500, Steve Wise wrote:
> > On 8/19/2016 2:06 PM, Jarod Wilson wrote:
> > >The ocrdma driver supports a maximum inline send size of 224, while the
> > >current code sets this size to 236. Add an ocrdma-specific check when
> > >setting max inline size to eliminate the need to always pass -I 224 when
> > >running ib_send_lat on ocrdma hardware.
> >
> > <soap box>
> > We really should fix the RDMA uAPI to allow querying the device to
> > get the max inline size for various SQ WRs (it might vary for send
> > vs write, for example), instead of requiring applications to guess
> > or hardcoding benchmarks based on device name...
> > </soap box>
> 
> This was a nice quick hack Friday afternoon hack to get it working
> with existing kernels in our testing infra, but having a way to ask
> the hardware would definitely be vastly superior.
> 

I hear ya.  Maybe as part of the new verbs API work we could provide a way for
applications to query the max inline...

--
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

end of thread, other threads:[~2016-08-19 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 19:06 [PATCH perftest] perftest: make inline send on ocrdma work better Jarod Wilson
     [not found] ` <1471633611-41155-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-19 20:45   ` Steve Wise
     [not found]     ` <85f0801f-a78f-7091-7ae2-5febde6b19b6-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2016-08-19 21:12       ` Jarod Wilson
     [not found]         ` <20160819211242.GY1916-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-19 21:31           ` Steve Wise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox