* Re: tcp_diag for all network namespaces?
[not found] ` <20241210020057.26127-1-kuniyu@amazon.com>
@ 2024-12-19 18:11 ` Martin KaFai Lau
0 siblings, 0 replies; only message in thread
From: Martin KaFai Lau @ 2024-12-19 18:11 UTC (permalink / raw)
To: Kuniyuki Iwashima, dave.seddon.ca; +Cc: netdev, bpf
On 12/9/24 6:00 PM, Kuniyuki Iwashima wrote:
>> G'day,
>>
>> Short
>> Is there a way to extract tcp_diag socket data for all sockets from
>> all network name spaces please?
> I think there's no such interface.
>
> I remember there was a similar request for TCP BPF iterator,
> but now it's difficult because each netns could have its own
> TCP hash table for established connections.
It would be nice to be able to iterate netns in bpf. There is a bpf task/file
iterator that iterates tasks and all files under each task
(tools/testing/selftests/bpf/progs/bpf_iter_task_file.c). The netns/sock
iteration feels similar. The first step could be to allow bpf prog to iterate
all netns first. Then it will allow bpf to inspect "struct net". There is also a
newer open iterator approach in bpf which should be considered also.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-19 18:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CANypexQX+MW_00xAo-sxO19jR1yCLVKNU3pCZvmFPuphk=cRFw@mail.gmail.com>
[not found] ` <20241210020057.26127-1-kuniyu@amazon.com>
2024-12-19 18:11 ` tcp_diag for all network namespaces? Martin KaFai Lau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox