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

Add context create/delete functions #425

Merged
merged 6 commits into from
Jan 16, 2024

Conversation

saxena-anurag
Copy link
Contributor

@saxena-anurag saxena-anurag commented Dec 9, 2023

Fixes #401

This PR:

  1. Adds add_context and delete_context functions for XDP eBPF extension. These functions allow bpf_prog_test_run to be used with XDP extension.
  2. Adds tests which invokes bpf_prog_test_run flow.

@saxena-anurag saxena-anurag changed the title [DRAFT] add context create/delete functions Add context create/delete functions Dec 21, 2023
@saxena-anurag saxena-anurag marked this pull request as ready for review December 21, 2023 20:39
@saxena-anurag saxena-anurag requested a review from a team as a code owner December 21, 2023 20:39
src/xdp/program.c Outdated Show resolved Hide resolved
src/xdp/program.c Outdated Show resolved Hide resolved
src/xdp/program.c Outdated Show resolved Hide resolved
Copy link
Contributor

@mtfriesen mtfriesen left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple minor nits.

* @retval STATUS_NO_MEMORY Failed to allocate resources for this operation.
*/
static ebpf_result_t
XdpCreateContext(
Copy link
Contributor

Choose a reason for hiding this comment

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

These routines need spin/fuzz testing via bpf_prog_test_run - please add some randomized input cases to spinxsk.c.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@saxena-anurag saxena-anurag merged commit 8f6c4df into microsoft:main Jan 16, 2024
28 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.

XDP eBPF extension must support BPF_PROG_TEST_RUN.
2 participants