Re: [PATCH v2 5/5] bpf: Add an iterator selftest for bpf_sk_storage_get

2020-11-26 Thread Florent Revest
On Thu, 2020-11-19 at 16:32 -0800, Martin KaFai Lau wrote: > Does it affect all sk(s) in the system? Can it be limited to > the sk that the test is testing? Oh I just realized I haven't answered you here yet! Thanks for the reviews. :D I'm sending a v3 addressing your comments

Re: [PATCH v2 5/5] bpf: Add an iterator selftest for bpf_sk_storage_get

2020-11-19 Thread KP Singh
On Fri, Nov 20, 2020 at 1:32 AM Martin KaFai Lau wrote: > > On Thu, Nov 19, 2020 at 05:26:54PM +0100, Florent Revest wrote: > > From: Florent Revest > > > > The eBPF program iterates over all files and tasks. For all socket > > files, it stores the tgid of the last task it encountered with a

Re: [PATCH v2 5/5] bpf: Add an iterator selftest for bpf_sk_storage_get

2020-11-19 Thread Martin KaFai Lau
On Thu, Nov 19, 2020 at 05:26:54PM +0100, Florent Revest wrote: > From: Florent Revest > > The eBPF program iterates over all files and tasks. For all socket > files, it stores the tgid of the last task it encountered with a handle > to that socket. This is a heuristic for finding the "owner" of

[PATCH v2 5/5] bpf: Add an iterator selftest for bpf_sk_storage_get

2020-11-19 Thread Florent Revest
From: Florent Revest The eBPF program iterates over all files and tasks. For all socket files, it stores the tgid of the last task it encountered with a handle to that socket. This is a heuristic for finding the "owner" of a socket similar to what's done by lsof, ss, netstat or fuser.