@@ -544,6 +544,11 @@ static void usage(const char *argv0, VerbType verb, TestType tst, int connection
544544 printf (" --tclass=<value> " );
545545 printf (" Set the Traffic Class in GRH (if GRH is in use)\n" );
546546
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+
547552 if (cuda_memory_supported ()) {
548553 printf (" --use_cuda=<cuda device id>" );
549554 printf (" Use CUDA specific device for GPUDirect RDMA testing\n" );
@@ -841,6 +846,7 @@ static void init_perftest_params(struct perftest_parameters *user_param)
841846 user_param -> mr_per_qp = 0 ;
842847 user_param -> dlid = 0 ;
843848 user_param -> traffic_class = 0 ;
849+ user_param -> flow_label = 0 ;
844850 user_param -> flows = DEF_FLOWS ;
845851 user_param -> flows_burst = 1 ;
846852 user_param -> perform_warm_up = 0 ;
@@ -2819,7 +2825,11 @@ int parser(struct perftest_parameters *user_param,char *argv[], int argc)
28192825 use_hl_flag = 0 ;
28202826 }
28212827 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+ }
28232833 flow_label_flag = 0 ;
28242834 }
28252835 if (retry_count_flag ) {
0 commit comments