Skip to content

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

Merged
tohojo merged 3 commits intoxdp-project:masterfrom
tacslon:feat/xsk-sock
Jan 8, 2025
Merged

libxdp: Modify semantic of fill and comp in xsk_socket_opts, with tests edited#462
tohojo merged 3 commits intoxdp-project:masterfrom
tacslon:feat/xsk-sock

Conversation

@tacslon
Copy link
Copy Markdown
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.

Comment thread headers/xdp/xsk.h Outdated
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
Comment thread lib/libxdp/xsk.c
Signed-off-by: Muyang Tian <tianmuyang@huawei.com>
Copy link
Copy Markdown
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
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