perftest: make inline send on ocrdma work better
PATCH 1/1 perftest: make inline send on ocrdma work better
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.
--- src/perftest_parameters.c | 8 ++++++++ src/perftest_parameters.h | 3 +++ 2 files changed, 11 insertions(+)
src/perftest_parameters.c +8 -0
@@ -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 ; }/******************************************************************************
src/perftest_parameters.h +3 -0
@@ -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)
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Jarod Wilson
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_laton 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>
Quoted 31 lines
CC Gil Rockah <gilr-VPRAkNaXOzVWk0Htik3J/[email protected]>Signed-off-by Jarod Wilson <[email protected]>--- src/perftest_parameters.c | 8 ++++++++ src/perftest_parameters.h | 3 +++ 2 files changed, 11 insertions(+)src/perftest_parameters.c +8
-0@@ -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 ; }/****************************************************************************** src/perftest_parameters.h +0
-0
src/perftest_parameters.h line 141
Quoted 9 lines
src/perftest_parameters.h +3
-0@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Steve Wise
Quoted 4 lines · Jarod Wilson
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_laton ocrdma hardware.
Quoted 6 lines
<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.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Steve Wise
Quoted 6 lines · Jarod Wilson
Quoted 4 lines
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_laton ocrdma hardware.Quoted 6 lines
<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>
Quoted 4 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html