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

libxdp: Modify semantic of fill and comp in xsk_socket_opts, with tests edited #462

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

tacslon
Copy link
Contributor

@tacslon tacslon commented Dec 14, 2024

Use umem's fill_save and fill_comp if fill and comp in opts are both unset when calling xsk_socket__create_opts(), otherwise use what they are set in opts. Add validation for only one of fill and comp are set.
This is to keep the same semantic as xsk_socket__create() and xsk_socket__create_shared().
Also, use opts-style API to create XDP socket in libxdp tests.

headers/xdp/xsk.h Outdated Show resolved Hide resolved
Use umem's fill_save and fill_comp if fill and comp in opts
are both unset when calling xsk_socket__create_opts(),
otherwise use what they are set in opts.
This is to keep the same semantic as xsk_socket__create() and
xsk_socket__create_shared().

Signed-off-by: Muyang Tian <tianmuyang@huawei.com>
Signed-off-by: Muyang Tian <tianmuyang@huawei.com>
@tacslon tacslon changed the title libxdp: Introduce 'shared' field in xsk creation opts-struct, with tests edited libxdp: Modify semantic of fill and comp in xsk_socket_opts, with tests edited Dec 16, 2024
Signed-off-by: Muyang Tian <tianmuyang@huawei.com>
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.

LGTM - @magnus-karlsson PTAL :)

@tohojo tohojo merged commit e7e2272 into xdp-project:master Jan 8, 2025
29 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.

2 participants