Skip to content

[PATCH v1] linux-dpdk: event: improve event validity checking #253

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatiasElo
Copy link
Contributor

Utilize rte_mbuf_check() function for event validity checking.

Utilize rte_mbuf_check() function for event validity checking.

Signed-off-by: Matias Elo <[email protected]>
@odpbuild odpbuild changed the title linux-dpdk: event: improve event validity checking [PATCH v1] linux-dpdk: event: improve event validity checking Mar 21, 2025
@@ -234,6 +236,11 @@ int _odp_event_is_valid(odp_event_t event)
if (event_hdr->hdr.index >= pool->rte_mempool->size)
return 0;

if (odp_unlikely(rte_mbuf_check(_odp_event_to_mbuf(event), 1, &reason))) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

External API so could use the explicit failure return value of -1.

Worth also making the rest of the failure branches odp_unlikely()?

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