Skip to contentSkip to conversation

perftest: make inline send on ocrdma work better

PATCH In review Jarod Wilson 2 participants 4 messages Aug 19, 2016 3 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

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.

CC Gil Rockah <gilr-VPRAkNaXOzVWk0Htik3J/[email protected]>
---
 src/perftest_parameters.c | 8 ++++++++
 src/perftest_parameters.h | 3 +++
 2 files changed, 11 insertions(+)
src/perftest_parameters.c +8 -0
index 3ffddd7..65ce731 100755
@@ -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
index 1122792..a566f42 100755
@@ -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

A message that is not in the archive (sent off-list or not yet received): 1471633611-41155-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#2 lore raw
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_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>

Quoted 31 lines
CC Gil Rockah <gilr-VPRAkNaXOzVWk0Htik3J/[email protected]>
---
  src/perftest_parameters.c | 8 ++++++++
  src/perftest_parameters.h | 3 +++
  2 files changed, 11 insertions(+)
src/perftest_parameters.c +8 -0
index 3ffddd7..65ce731 100755
@@ -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
index 1122792..a566f42 100755

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

A message that is not in the archive (sent off-list or not yet received): 85f0801f-a78f-7091-7ae2-5febde6b19b6-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org

#4 lore raw
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_lat on 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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
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_lat on 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