@@ -544,6 +544,11 @@ static void usage(const char *argv0, VerbType verb, TestType tst, int connection
544
544
printf (" --tclass=<value> " );
545
545
printf (" Set the Traffic Class in GRH (if GRH is in use)\n" );
546
546
547
+ if (connection_type != RawEth ) {
548
+ printf (" --flow_label=<value> " );
549
+ printf (" Set the flow_label in GRH (if GRH is in use)\n" );
550
+ }
551
+
547
552
if (cuda_memory_supported ()) {
548
553
printf (" --use_cuda=<cuda device id>" );
549
554
printf (" Use CUDA specific device for GPUDirect RDMA testing\n" );
@@ -841,6 +846,7 @@ static void init_perftest_params(struct perftest_parameters *user_param)
841
846
user_param -> mr_per_qp = 0 ;
842
847
user_param -> dlid = 0 ;
843
848
user_param -> traffic_class = 0 ;
849
+ user_param -> flow_label = 0 ;
844
850
user_param -> flows = DEF_FLOWS ;
845
851
user_param -> flows_burst = 1 ;
846
852
user_param -> perform_warm_up = 0 ;
@@ -2819,7 +2825,11 @@ int parser(struct perftest_parameters *user_param,char *argv[], int argc)
2819
2825
use_hl_flag = 0 ;
2820
2826
}
2821
2827
if (flow_label_flag ) {
2822
- CHECK_VALUE_NON_NEGATIVE (user_param -> flow_label ,int ,"flow label" ,not_int_ptr );
2828
+ CHECK_VALUE (user_param -> flow_label ,int ,"flow label" ,not_int_ptr );
2829
+ if (user_param -> connection_type == RawEth && user_param -> flow_label < 0 ) {
2830
+ fprintf (stderr ," flow label must be non-negative for RawEth\n" );
2831
+ return FAILURE ;
2832
+ }
2823
2833
flow_label_flag = 0 ;
2824
2834
}
2825
2835
if (retry_count_flag ) {
0 commit comments