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

prov/efa: Make efa_rdm_cq use efa_cq #10697

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

shijin-aws
Copy link
Contributor

The structs efa_rdm_cq and efa_cq share the
same members util_cq and ibv_cq. This patch makes efa_rdm_cq use efa_cq as a subset so we can convert between efa_rdm_cq and efa_cq via container_of, like efa_rdm_ep and efa_base_ep.

The structs efa_rdm_cq and efa_cq share the
same members util_cq and ibv_cq. This patch makes efa_rdm_cq
use efa_cq as a subset so we can convert between efa_rdm_cq and efa_cq
via container_of, like efa_rdm_ep and efa_base_ep.

Signed-off-by: Shi Jin <[email protected]>
@shijin-aws shijin-aws requested a review from a team January 13, 2025 19:29
@@ -37,13 +37,13 @@ void efa_rdm_ep_construct_ibv_qp_init_attr_ex(struct efa_rdm_ep *ep,
static inline
struct efa_rdm_cq *efa_rdm_ep_get_tx_rdm_cq(struct efa_rdm_ep *ep)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you still need these two functions?

Copy link
Contributor Author

@shijin-aws shijin-aws Jan 14, 2025

Choose a reason for hiding this comment

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

I thought about removing them and get them from tx_cq/rx_cq (efa_cq). But then I need to check whether tx_cq / rx_cq is NULL before I can derive tx_rdm_cq and rx_rdm_cq from them via container_of.. so I tend to keep these two functions to avoid making the code too messy.

@shijin-aws shijin-aws merged commit 815a166 into ofiwg:main Jan 14, 2025
13 checks passed
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.

3 participants