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

Fix function return to be -errno not errno #479

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

brian90013
Copy link
Contributor

I believe the expected API behavior is functions return -errno on error. There are two locations, xsk_umem__create_with_fd() and xsk_socket__create_shared() where return errno is used instead of return -errno. This led libxdp library functions to return positive values. This problem was reported in issue #473.

The expected behavior is that functions return -errno on error. Correct
two locations where errno was returned directly as a positive integer.
This affects xsk_umem__create_with_fd() and xsk_socket__create_shared().

Signed-off-by: Brian Poole <[email protected]>
Copy link
Member

@tohojo tohojo left a comment

Choose a reason for hiding this comment

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

Thank you for the fix!

@tohojo tohojo merged commit 289c8eb into xdp-project:main Feb 21, 2025
29 checks passed
@brian90013 brian90013 deleted the negative-errno branch February 21, 2025 18:05
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