Re: [RFC PATCH bpf-next 6/8] bpf: Add cookie in sk_reuseport_md.

2020-11-19 Thread Kuniyuki Iwashima
From: Martin KaFai Lau Date: Wed, 18 Nov 2020 16:11:54 -0800 > On Tue, Nov 17, 2020 at 06:40:21PM +0900, Kuniyuki Iwashima wrote: > > We will call sock_reuseport.prog for socket migration in the next commit, > > so the eBPF program has to know which listener is closing in order to > > select t

Re: [RFC PATCH bpf-next 6/8] bpf: Add cookie in sk_reuseport_md.

2020-11-18 Thread Martin KaFai Lau
On Tue, Nov 17, 2020 at 06:40:21PM +0900, Kuniyuki Iwashima wrote: > We will call sock_reuseport.prog for socket migration in the next commit, > so the eBPF program has to know which listener is closing in order to > select the new listener. > > Currently, we can get a unique ID for each listener

[RFC PATCH bpf-next 6/8] bpf: Add cookie in sk_reuseport_md.

2020-11-17 Thread Kuniyuki Iwashima
We will call sock_reuseport.prog for socket migration in the next commit, so the eBPF program has to know which listener is closing in order to select the new listener. Currently, we can get a unique ID for each listener in the userspace by calling bpf_map_lookup_elem() for BPF_MAP_TYPE_REUSEPORT_