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

supports AF_XDP socket diagnosis #847

Merged
merged 1 commit into from
Jul 13, 2024
Merged

Conversation

thediveo
Copy link
Contributor

  • dumps the diagnosis data of all sockets of type AF_XDP in the current network namespace.
  • dumps the diagnosis data of only a single socket that matches a specific inode number an/or socket cookie. Now, while the XDP socket diagnosis request allows for specifying a inode number and socket cookie this information doesn't seem to be used in the Linux kernel xsk_diag.c implementation anywhere and tests show that no filtering takes place.

Supplying tests is rather complex in the case of AF_XDP sockets and while I have tests, these pull in lots of other code because of the long-winded way these sockets need to be properly set up and rely on the Ginkgo/Gomega TDD framework in order to reduce lots of boilerplate, so I'm refraining from polluting the netlink module.

@aboch
Copy link
Collaborator

aboch commented Jul 3, 2024

@thediveo please resolve the conflicts

@thediveo
Copy link
Contributor Author

thediveo commented Jul 5, 2024

@aboch any idea why ...

=== RUN   TestSocketXDPGetInfo
    socket_xdp_linux_test.go:30: no such file or directory
--- FAIL: TestSocketXDPGetInfo (0.00s)

...fails on the Github runner, but succeeds on both a Ubuntu 24.04 (kernel 6.8) and 22.04LTS (kernel 5.15.0)?

@thediveo
Copy link
Contributor Author

thediveo commented Jul 8, 2024

@aboch skipping XDP socket diagnosis test if kernel reports ENOENT, thus lacking XSK diagnosis.

@aboch
Copy link
Collaborator

aboch commented Jul 8, 2024

please squash the two commits into one

@thediveo
Copy link
Contributor Author

thediveo commented Jul 8, 2024

@aboch done

@thediveo
Copy link
Contributor Author

any issues, or can this be please merged?

@aboch aboch merged commit d13535d into vishvananda:main Jul 13, 2024
2 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