lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 bpf-next 02/11] tcp: Add num_closed_socks to struct sock_reuseport.
On Mon, May 10, 2021 at 12:44:24PM +0900, Kuniyuki Iwashima wrote:
> As noted in the following commit, a closed listener has to hold the
> reference to the reuseport group for socket migration. This patch adds a
> field (num_closed_socks) to struct sock_reuseport to manage closed sockets
> within the same reuseport group. Moreover, this and the following commits
> introduce some helper functions to split socks[] into two sections and keep
> TCP_LISTEN and TCP_CLOSE sockets in each section. Like a double-ended
> queue, we will place TCP_LISTEN sockets from the front and TCP_CLOSE
> sockets from the end.
>
> TCP_LISTEN----------> <-------TCP_CLOSE
> +---+---+ --- +---+ --- +---+ --- +---+
> | 0 | 1 | ... | i | ... | j | ... | k |
> +---+---+ --- +---+ --- +---+ --- +---+
>
> i = num_socks - 1
> j = max_socks - num_closed_socks
> k = max_socks - 1
>
> This patch also extends reuseport_add_sock() and reuseport_grow() to
> support num_closed_socks.
Acked-by: Martin KaFai Lau <kafai@fb.com>

\
 
 \ /
  Last update: 2021-05-15 02:50    [W:0.244 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site