Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perftest: support set flow_label list val in GRH with RR method #279

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

changchengx
Copy link
Contributor

For different QP, it may need to set different flow_label. Extend the flow_label option to support list val configuration and keep compatibility.

@changchengx
Copy link
Contributor Author

extend #224

@changchengx
Copy link
Contributor Author

@HassanKhadour FYI

@sshaulnv
Copy link
Contributor

@changchengx, can you please rebase?

@changchengx
Copy link
Contributor Author

@sshaulnv Done

@changchengx
Copy link
Contributor Author

@sshaulnv @HassanKhadour ping

@sshaulnv
Copy link
Contributor

sshaulnv commented Sep 5, 2024

@changchengx thanks for your contribution, the PR is under review

@sshaulnv
Copy link
Contributor

Hi @changchengx ,
im getting the following errors when trying to compile:

 src/perftest_parameters.c: In function ‘parser’:
src/perftest_parameters.c:2958:10: warning: implicit declaration of function ‘parse_flow_label_from_str’; did you mean ‘parse_ethertype_from_str’? [-Wimplicit-function-declaration]
      if (parse_flow_label_from_str(user_param, optarg)) {
          ^~~~~~~~~~~~~~~~~~~~~~~~~
          parse_ethertype_from_str
src/perftest_parameters.c: At top level:
src/perftest_parameters.c:3356:12: error: static declaration of ‘parse_flow_label_from_str’ follows non-static declaration
 static int parse_flow_label_from_str(struct perftest_parameters *user_param, char *flow_label_str)
            ^~~~~~~~~~~~~~~~~~~~~~~~~
src/perftest_parameters.c:2958:10: note: previous implicit declaration of ‘parse_flow_label_from_str’ was here
      if (parse_flow_label_from_str(user_param, optarg)) {
          ^~~~~~~~~~~~~~~~~~~~~~~~~
src/perftest_parameters.c:3356:12: warning: ‘parse_flow_label_from_str’ defined but not used [-Wunused-function]
 static int parse_flow_label_from_str(struct perftest_parameters *user_param, char *flow_label_str)
            ^~~~~~~~~~~~~~~~~~~~~~~~~

please fix it, and also update man page.

Thanks

@changchengx
Copy link
Contributor Author

@sshaulnv Thanks for your check. I've updated the commit according to your feedback and requirement. If you still hit some problem, please let me know the build environment: OS version & gcc version

}
}

if (user_param->flow_label) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in which scenario this will be true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sshaulnv Good catch, it seems that's dead code. I'll remove this if-condition and feedback later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sshaulnv This scenario is to deal with the case that user config the command option --flow_label=xxxx for more than one time. This is rare case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the app checks for duplicate arguments on the 'parser' function, and if it will encounter more than one appearance of 'flow_label' it will produce:

Duplicated argument: flow_label 
 Parser function exited with Error

please remove the dead code.
beside this, everything looks great and we can merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sshaulnv I've removed the dead code and rebased this commit.

For different QPs, they may need to set different flow_label.
Extend the flow_label option to support list val configuration
and keep compatibility.

Signed-off-by: Liu, Changcheng <changcheng.liu@aliyun.com>
@sshaulnv sshaulnv merged commit d61f8fb into linux-rdma:master Jan 6, 2025
@sshaulnv
Copy link
Contributor

sshaulnv commented Jan 6, 2025

Merged, thanks for your contribution!

@changchengx changchengx deleted the flow_label branch January 6, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants