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

link: add test for UDP iter #1044

Merged
merged 1 commit into from
Jun 7, 2023
Merged

link: add test for UDP iter #1044

merged 1 commit into from
Jun 7, 2023

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented May 25, 2023

Ensure that we can create a global UDP iterator.

Ensure that we can create a global UDP iterator.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb requested a review from aditighag May 25, 2023 14:20
@lmb
Copy link
Collaborator Author

lmb commented May 25, 2023

@aditighag it's possible to create an iterator, but we'll have to add support for passing a netns fd. I can take a stab at that if you have code with proposed UAPI somewhere.

@lmb lmb merged commit 940221e into cilium:master Jun 7, 2023
@aditighag
Copy link
Member

Sorry, I missed your ping.

it's possible to create an iterator, but we'll have to add support for passing a netns fd. I can take a stab at that if you have code with proposed UAPI somewhere.

The current default behavior is for users to enter network namespaces that they wish to iterate sockets over. So if a user wishes to iterate over all host-wide sockets, they'll need to run BPF programs with targets iter/{tcp,udp} in all netns's on the host. Maybe I'm missing something, but given that the kernel doesn't support a global iterator, what's your proposal from the library as a loader agent?

@lmb lmb deleted the udp-iter branch June 15, 2023 08:03
@lmb
Copy link
Collaborator Author

lmb commented Jun 15, 2023

Maybe I'm missing something, but given that the kernel doesn't support a global iterator, what's your proposal from the library as a loader agent?

Maybe I misremembered, I thought the plan was to add UAPI which allows specifiying the netns when creating the iterator, with a special value meaning "global iterator"? If that isn't in the cards we don't need to / shouldn't change the lib.

@aditighag
Copy link
Member

The details around the UAPI extensions are still tbd. If the TCP/UDP iterators are getting loaded by the library as expected, then it's all good for now.

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