Skip to content

Conversation

@Yue-ByteDance
Copy link

@Yue-ByteDance Yue-ByteDance commented Sep 2, 2025

Currently, perftest supports RDMA Write / Write-with-Immediate / Send /
Read and Atomic operations, but lacks Send-with-Immediate support. This
commit adds Send-with-Immediate functionality, allowing users to test it
via ib_send_bw with --send_with_imm flag.

Additionally, to verify the completion logic for operations with
immediate data is correct, completion events are now validated to ensure
the IBV_WC_WITH_IMM flag is set.

@mrgolin
Copy link
Contributor

mrgolin commented Sep 2, 2025

Generally looks good to me but I think we should add a check in run_iter_bw* and run_iter_lat that completion really has imm data. Something like:

if (user_param->use_send_with_imm && !(wc[i].wc_flags & IBV_WC_WITH_IMM)) {
        // error
        ...

Also can you please describe your changes in the commit message?

@Yue-ByteDance
Copy link
Author

Generally looks good to me but I think we should add a check in run_iter_bw* and run_iter_lat that completion really has imm data. Something like:

if (user_param->use_send_with_imm && !(wc[i].wc_flags & IBV_WC_WITH_IMM)) {
        // error
        ...

Also can you please describe your changes in the commit message?

No problem, I will push a new version later

@Yue-ByteDance Yue-ByteDance force-pushed the yzl/send-with-imm branch 2 times, most recently from 6f13593 to 870ebda Compare September 30, 2025 10:24
@Yue-ByteDance Yue-ByteDance changed the title Perftest: Add support for send with imm verb Perftest: Add support for Send with Immediate verb Sep 30, 2025
@Yue-ByteDance
Copy link
Author

@mrgolin I've updated the code and the commit message with your suggestion, could you please take a look at the new version? Thanks!

ctx_post_send_work_request_func_pointer(ctx, user_param);
#endif

if (user_param->verb == SEND_IMM || user_param->verb == WRITE_IMM) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be always true.

Copy link
Author

Choose a reason for hiding this comment

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

Good catch, fixed, thanks a lot!

ctx_post_send_work_request_func_pointer(ctx, user_param);
#endif

if (user_param->verb == SEND_IMM || user_param->verb == WRITE_IMM) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't get here with user_param->verb == WRITE_IMM.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed, thanks!

@Yue-ByteDance Yue-ByteDance force-pushed the yzl/send-with-imm branch 2 times, most recently from 91a7185 to 2164eb2 Compare October 20, 2025 02:30
@NitzanLavy
Copy link

NitzanLavy commented Oct 20, 2025

Our team would like to leverage Perftest test suite to test send scenarios while using the immediate field.
We were working on an implementation (#357) while being unaware that this PR is in progress. As this PR is already in advanced stages and is quite extensive and comprehensive, I will abandon our PR and will follow this instead. Thanks @Yue-ByteDance.
Code looks good to me, left a few comments.

Currently, perftest supports RDMA Write / Write-with-Immediate / Send /
Read and Atomic operations, but lacks Send-with-Immediate support. This
commit adds Send-with-Immediate functionality, allowing users to test it
via ib_send_bw with --send_with_imm flag.

Additionally, to verify the completion logic for operations with
immediate data is correct, completion events are now validated to ensure
the IBV_WC_WITH_IMM flag is set.

Signed-off-by: Zelong Yue <[email protected]>
@Yue-ByteDance
Copy link
Author

Our team would like to leverage Perftest test suite to test send scenarios while using the immediate field. We were working on an implementation (#357) while being unaware that this PR is in progress. As this PR is already in advanced stages and is quite extensive and comprehensive, I will abandon our PR and will follow this instead. Thanks @Yue-ByteDance. Code looks good to me, left a few comments.

Thanks! I've noticed that your PR was checking against imm data correctness, but mine is not, should I add this to my code? Do you have any suggestion?

@NitzanLavy
Copy link

Our team would like to leverage Perftest test suite to test send scenarios while using the immediate field. We were working on an implementation (#357) while being unaware that this PR is in progress. As this PR is already in advanced stages and is quite extensive and comprehensive, I will abandon our PR and will follow this instead. Thanks @Yue-ByteDance. Code looks good to me, left a few comments.

Thanks! I've noticed that your PR was checking against imm data correctness, but mine is not, should I add this to my code? Do you have any suggestion?

Yes I noticed that too. It could be nice to have it, but since it is a hardcoded constant I'm not sure it gives so much added value in comparison to validating the imm flags (which you are doing in your PR).
You can also generate a new value each run and assign all the WQEs imm field that value, but than you will have communicate it to the other side out-of-band so the receiver will know what to expect. Perhaps this is an exaggeration.

@Yue-ByteDance
Copy link
Author

Our team would like to leverage Perftest test suite to test send scenarios while using the immediate field. We were working on an implementation (#357) while being unaware that this PR is in progress. As this PR is already in advanced stages and is quite extensive and comprehensive, I will abandon our PR and will follow this instead. Thanks @Yue-ByteDance. Code looks good to me, left a few comments.

Thanks! I've noticed that your PR was checking against imm data correctness, but mine is not, should I add this to my code? Do you have any suggestion?

Yes I noticed that too. It could be nice to have it, but since it is a hardcoded constant I'm not sure it gives so much added value in comparison to validating the imm flags (which you are doing in your PR). You can also generate a new value each run and assign all the WQEs imm field that value, but than you will have communicate it to the other side out-of-band so the receiver will know what to expect. Perhaps this is an exaggeration.

OK, I'll skip implementing imm data checking in this PR. I think perftest is mainly aimed at providing the best performance measurements for every opcode, rather than checking protocol correctness. Maybe we could add an option for that in the future, so it won't affect performance by default.

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.

4 participants