From: Paolo Abeni Date: Tue, 25 Oct 2022 09:35:19 +0000 (+0200) Subject: Merge branch 'soreuseport-fix-broken-so_incoming_cpu' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=818a26048a292e290a6b76e3fe2174344824b3b7;p=linux.git Merge branch 'soreuseport-fix-broken-so_incoming_cpu' Kuniyuki Iwashima says: ==================== soreuseport: Fix broken SO_INCOMING_CPU. setsockopt(SO_INCOMING_CPU) for UDP/TCP is broken since 4.5/4.6 due to these commits: * e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") * c125e80b8868 ("soreuseport: fast reuseport TCP socket selection") These commits introduced the O(1) socket selection algorithm and removed O(n) iteration over the list, but it ignores the score calculated by compute_score(). As a result, it caused two misbehaviours: * Unconnected sockets receive packets sent to connected sockets * SO_INCOMING_CPU does not work The former is fixed by commit acdcecc61285 ("udp: correct reuseport selection with connected sockets"). This series fixes the latter and adds some tests for SO_INCOMING_CPU. ==================== Link: https://lore.kernel.org/r/20221021204435.4259-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni --- 818a26048a292e290a6b76e3fe2174344824b3b7