-
Notifications
You must be signed in to change notification settings - Fork 135
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
[PATCH v10] api: dma: support source free and destination allocation features #2179
base: master
Are you sure you want to change the base?
Conversation
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.
Still a few comments from internal review, we're getting there.
For better trackability, you can rebase-amend the commits with the fixes locally on your branch and then force-push to your fork-remote-branch. The changes then appear in this same pull request and GitHub can track the diff between versions (GitHub automatically updates the "[PATCH vX]" prefix when new stuff is pushed to the PR-branch).
Sure Tuomas, thanks for reviewing it. |
adf37e0
to
ccc11ae
Compare
Addressed V6 review comments. |
ccc11ae
to
e730ae3
Compare
e730ae3
to
2c838f5
Compare
include/odp/api/spec/dma_types.h
Outdated
* destination packet. Indexes should appear in ascending order, starting | ||
* from index 0. | ||
*/ | ||
uint16_t index; |
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.
For consistency (to match pkt_len), name of this field could be pkt_index. Also, "pkt_index" is less likely to collide later if another "index" field needs to be added into this struct.
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.
I believe the naming is now fine, but additionally the type of the index could be changed from uint16_t
to uint32_t
, this would then be more consistent with odp_dma_transfer_param_t::num_dst
and odp_dma_result_t::num_dst
which are both uint32_t
.
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.
Thank you for fixing the field name. I agree with Tuomas that uint32_t could be used instead. It does not increase struct size and harmonizes numbers DMA segments/packets parameter types.
This specification change details the necessary fields for advertising the source segment freeing offload for data format #ODP_DMA_FORMAT_PACKET. It also defines the required fields to enable this feature. Application can free all the source segments using odp_dma_transfer_t:seg_free field. The 'unique_src_segs' field can be used to indicate if the source packet is reused across multiple segments to avoid any double-free issues. Additionally, application can use dma transfer options field odp_dma_transfer_t:single_pool to free all source segments to a single pool, provided all segments belong to a same pool. Signed-off-by: Vamsi Attunuru <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
This specification change outlines the necessary fields to advertise the destination segment allocation offload feature. It also defines the required fields in odp_dma_transfer_param_t and odp_dma_seg_t to leverage this feature. When the application opts for destination packet allocation, it will receive the allocated packet details in odp_dma_result_t::dst_pkt array after the DMA completion. Signed-off-by: Vamsi Attunuru <[email protected]> Reviewed-by: Tuomas Taipale <[email protected]>
2c838f5
to
4cbf5fe
Compare
Thanks Petri for the comments, fixed them in v10. |
* descriptor. Same pkt_index can be reused across subsequent segments if | ||
* application wishes to transfer to different offsets of the same | ||
* destination packet. This means that if application for example uses | ||
* segment index 0 in each destination segment descriptor (with different |
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.
Typo: "segment index 0 ..." -> "packet index 0 ..."
No description provided.