Re: [PATCH net-next 0/2] net: core: Two Helper function about socket information

2017-02-03 Thread Lorenzo Colitti
On Fri, Feb 3, 2017 at 9:13 AM, Alexei Starovoitov wrote: > I think sk_uid is self explanatory, but cookie is less so. > Please explain how you plan to use it. The cookie is the only way to uniquely identify a given socket on the system (the 5-tuple is not sufficient in the presence of SO_REUSEPO

Re: [PATCH net-next 0/2] net: core: Two Helper function about socket information

2017-02-02 Thread Alexei Starovoitov
On Thu, Feb 02, 2017 at 12:59:48PM -0800, Chenbo Feng wrote: > Introduce two eBpf helper function to get the socket cookie and > socket uid for each packet. The helper function is useful when > the *sk field inside sk_buff is not empty. Looks nice. I'd like to see a sample code/test for it though.

[PATCH net-next 0/2] net: core: Two Helper function about socket information

2017-02-02 Thread Chenbo Feng
Introduce two eBpf helper function to get the socket cookie and socket uid for each packet. The helper function is useful when the *sk field inside sk_buff is not empty. Chenbo Feng (2): Add a helper function to get socket cookie in eBPF Add a eBPF helper function to retrieve socket uid incl