On Mon, 19 Jan 2026 17:19:12 +0100
Laurent Vivier
This series simplifies epoll registration by moving it to flow creation time rather than deferring it to the first event update. By registering sockets with epoll immediately (using events=0), the epoll control functions can always use EPOLL_CTL_MOD, eliminating the need to track whether a flow is already registered.
Patch 1 registers both splice sockets with epoll in tcp_splice_connect() before initiating the connection, allowing tcp_splice_epoll_ctl() to always use EPOLL_CTL_MOD.
Patch 2 does the same for regular TCP connections in tcp_conn_from_tap(), tcp_tap_conn_from_sock(), and tcp_flow_migrate_target(), simplifying tcp_epoll_ctl() by removing the ADD/MOD conditional logic.
Patch 3 removes EPOLLFD_ID_INVALID and related infrastructure now that all flows are registered at creation: flow_in_epoll(), flow_epollid_clear(), and the defensive checks in flow_epollfd().
Applied. -- Stefano