-
Notifications
You must be signed in to change notification settings - Fork 375
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
prov/efa: Fix fi_sendmsg/fi_writemsg with FI_INJECT #10347
Conversation
0fbfa87
to
c9c6b03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some nits on the comments
prov/efa/src/rdm/efa_rdm_pke_utils.c
Outdated
* and we use 1st iov for header. | ||
* 2. EFA can directly access the memory | ||
* Note that FI_INJECT requires outbound buffer to be reusable | ||
* immediately after function returns, so without the inline HW support, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rephrase the without the inline HW support,
to unless using inline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can we change EFA can directly access the memory
to p2p is available or using inline
here
prov/efa/src/rdm/efa_rdm_pke_utils.c
Outdated
@@ -61,34 +62,36 @@ ssize_t efa_rdm_pke_init_payload_from_ope(struct efa_rdm_pke *pke, | |||
assert(tx_iov_index < ope->iov_count); | |||
assert(tx_iov_offset < ope->iov[tx_iov_index].iov_len); | |||
iov_mr = ope->desc[tx_iov_index]; | |||
|
|||
p2p_available = false; | |||
inline_send = false; | |||
/* When using EFA device, EFA device can access memory that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are removing efa_can_access_memory
, I think we can remove these comments, just explain how copy can be removed based on the p2p_available and inline_send status later.
Currently EFA provider doesn't handle the fi_sendmsg call with FI_INJECT flags correctly. It allows user to pass in a buffer with valid MR while doing inject - outbound buffer should be reusable immediately after function returns. That being said, without the inline HW support, EFA provider should do a copy from the user buffer to the internal bounce buffer even if application provides a valid MR for the buffer. Signed-off-by: Jessie Yang <[email protected]>
fi_writemsg with FI_INJECT needs to copy from outbound buffer to internal bounce buffer. The outbound buffer can be non-system. Extract and call a helper function for device to host copy. Signed-off-by: Jessie Yang <[email protected]>
bot:aws:retest |
1 similar comment
bot:aws:retest |
Currently EFA provider doesn't handle the *msg call with FI_INJECT flags correctly. It allows user to pass in a buffer with valid MR while doing inject - outbound buffer should be reusable immediately after function returns.
That being said, without the inline HW support, EFA provider should do a copy from the user buffer to the internal bounce buffer even if application provides a valid MR for the buffer.
The inject rdma write path assumes the outbound buffer is always FI_HMEM_SYSTEM, but it doesn't have to.