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

Add query MR EFA direct verb #1412

Merged
merged 4 commits into from Jan 17, 2024
Merged

Add query MR EFA direct verb #1412

merged 4 commits into from Jan 17, 2024

Conversation

mrgolin
Copy link
Contributor

@mrgolin mrgolin commented Dec 5, 2023

This PR is adding a new EFA DV interface to query for MR attributes, with an initial implementation that returns PCIe bus IDs used by the device to reach the MR to write data for receive, RDMA read, and RDMA write receive operations.
Documentation was updated accordingly and pyverbs layer and a test to cover this new functionality are being added.

};
```

*inlen*

Choose a reason for hiding this comment

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

is inlen part of the struct? Didn't see it

Choose a reason for hiding this comment

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

Nvm it's an argument in efadv_query_mr call.

@mrgolin
Copy link
Contributor Author

mrgolin commented Dec 7, 2023

Fixed some Cython 0.26 version specific compilation error and now all tests have passed.

@mrgolin
Copy link
Contributor Author

mrgolin commented Dec 7, 2023

The related kernel patch is here.

@shijin-aws
Copy link

Can we have someone review this PR? We have a Libfabric PR pending on this ofiwg/libfabric#9525

@mrgolin
Copy link
Contributor Author

mrgolin commented Jan 4, 2024

Updated naming for consistency with the kernel patch changes.

return err;
}

if (ic_id_validity & EFA_QUERY_MR_VALIDITY_RECV_IC_ID) {
Copy link
Member

Choose a reason for hiding this comment

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

This ic_id_validity thing doesn't make alot of sense, we already have UVERBS_ATTR_F_VALID_OUTPUT to signal when the attribute was supported. I'd suggest just keeping this simple, make the interconnect ID a u64 and have -1ULL mean not supported, then you can pre-init it to -1 and not worry about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was looking for some way to get validity of an optional out field after calling to execute_ioctl. Initiating to an illegal value could overcome the need but didn't seem clear enough to me especially there is no logically invalid values for those fields. In addition, it is device sourced validity rather than kernel support / no support.

@mrgolin
Copy link
Contributor Author

mrgolin commented Jan 11, 2024

@rleon @jgunthorpe Can you please merge this? We need it in the upcoming release.

@rleon
Copy link
Member

rleon commented Jan 11, 2024

@rleon @jgunthorpe Can you please merge this? We need it in the upcoming release.

At least you need to update first patch to right kernel commit.

Thanks

To commit: 2307157c8509 ("RDMA/efa: Add EFA query MR support").

Signed-off-by: Michael Margolin <[email protected]>
Add a new EFA DV interface to query for MR attributes. Initial
implementation returns interconnects used by the device to reach the
MR to write data for receive, RDMA read, and RDMA write receive
operations. Update documentation accordingly.

Signed-off-by: Michael Margolin <[email protected]>
Expose efadv_query_mr verb and the related types in pyverbs.

Signed-off-by: Michael Margolin <[email protected]>
Add basic coverage for EFA direct verbs query MR function.

Signed-off-by: Michael Margolin <[email protected]>
@mrgolin
Copy link
Contributor Author

mrgolin commented Jan 11, 2024

Updated kernel headers. Thanks.

@rleon rleon merged commit 37295b8 into linux-rdma:master Jan 17, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants