Skip to content

RDMA FLUSH and ATOMIC WRITE with ODP #1580

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ddmatsu
Copy link
Contributor

@ddmatsu ddmatsu commented Mar 14, 2025

RDMA FLUSH[1] and ATOMIC WRITE[2] were added to rxe, but they cannot run
in the ODP mode as of now. This series is for the userspace enablement.

The former two patches add definitions of ODP capabilities for these operations.
The rest add rdma-core testcases for these capabilities

For kernel-side enablement in rxe, please see:
(Updated v3) https://lore.kernel.org/linux-rdma/[email protected]/T/#t

[1] [for-next PATCH 00/10] RDMA/rxe: Add RDMA FLUSH operation
https://lore.kernel.org/lkml/[email protected]/

[2] [PATCH v7 0/8] RDMA/rxe: Add atomic write operation
https://lore.kernel.org/linux-rdma/[email protected]/

@ddmatsu ddmatsu marked this pull request as ready for review March 14, 2025 08:18
@ddmatsu
Copy link
Contributor Author

ddmatsu commented Apr 9, 2025

The kernel-side enablement was merged to for-next.
I have confirmed that tests added in this PR run successfully with the latest for-next kernel.

@@ -235,6 +235,8 @@ enum ibv_odp_transport_cap_bits {
IBV_ODP_SUPPORT_READ = 1 << 3,
IBV_ODP_SUPPORT_ATOMIC = 1 << 4,
IBV_ODP_SUPPORT_SRQ_RECV = 1 << 5,
IBV_ODP_SUPPORT_FLUSH = 1 << 6,
Copy link
Member

Choose a reason for hiding this comment

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

Why aren't these bits coming from UAPI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. I will send a kernel patch to add IB_UVERBS_ODP_* flags in include/uapi/rdma/ib_user_verbs.h and update this PR accordingly.

@rleon
Copy link
Member

rleon commented Apr 10, 2025

General comment to all patches. Please write commit messages for all commits.

Thanks

To commit: ?? ("RDMA/core: Move ODP capability definitions to uapi").

Signed-off-by: Daisuke Matsuda <[email protected]>
@ddmatsu ddmatsu marked this pull request as draft April 16, 2025 04:28
ddmatsu added 5 commits April 18, 2025 01:51
The bits are used from both kernel space and userland, so the definitions in
libibverbs should depend on those in UAPI.

Signed-off-by: Daisuke Matsuda <[email protected]>
Add ODP capabilities for RDMA FLUSH and ATOMIC WRITE from UAPI definitions
so that the flags can be queried via ibv_query_device_ex().

Signed-off-by: Daisuke Matsuda <[email protected]>
Let pyverbs use the new bits for ODP capabilities.

Signed-off-by: Daisuke Matsuda <[email protected]>
Add a test of ATOMIC WRITE sequences with ODP. MR is invalidated at the
beginning of this workload so that page fault is triggered at least once.

The test was implemented in reference to test_qp_ex_rc_atomic_write() in
test_qpex.py. create_qp_ex() is moved to utils.py so that it can be used
from other tests.

Signed-off-by: Daisuke Matsuda <[email protected]>
Add a test of RDMA FLUSH sequences with ODP. MR is invalidated at the
beginning of this workload so that page fault is triggered at least once.
The test was implemented in reference to test_qp_ex_rc_flush() in
test_qpex.py

Signed-off-by: Daisuke Matsuda <[email protected]>
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