Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73D3FC433FE for ; Fri, 21 Oct 2022 20:04:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229645AbiJUUE5 (ORCPT ); Fri, 21 Oct 2022 16:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiJUUEz (ORCPT ); Fri, 21 Oct 2022 16:04:55 -0400 Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 505FD46623 for ; Fri, 21 Oct 2022 13:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1666382693; x=1697918693; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4+IlTYpHwdpNbeJxK3hBQy29gjRirvLHg7L8Y7dKaQk=; b=fPns+mcSLycksj60Y6PqpqTRmTf5lWg6ptgKgiTYf9/M3jaZAbmtiIyf yKNXmRm10HXlV4dXInb4HCU8eVlLzZTW7BoXF9UiCZoboDS3MIcajTGmk 4EDmc6lEQtS6SAOHPNUKIJL2fdJc38xdXUJUF40hQM09g0RSsIwcuZcz1 4=; X-IronPort-AV: E=Sophos;i="5.95,203,1661817600"; d="scan'208";a="254971905" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2b-m6i4x-f323d91c.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 20:04:47 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2b-m6i4x-f323d91c.us-west-2.amazon.com (Postfix) with ESMTPS id 76F69416BB; Fri, 21 Oct 2022 20:04:46 +0000 (UTC) Received: from EX19D004ANA001.ant.amazon.com (10.37.240.138) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 21 Oct 2022 20:04:46 +0000 Received: from 88665a182662.ant.amazon.com.com (10.43.162.134) by EX19D004ANA001.ant.amazon.com (10.37.240.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.15; Fri, 21 Oct 2022 20:04:42 +0000 From: Kuniyuki Iwashima To: CC: , , , , , , , , Subject: Re: [PATCH v2 net-next 0/2] soreuseport: Fix issues related to the faster selection algorithm. Date: Fri, 21 Oct 2022 13:04:34 -0700 Message-ID: <20221021200434.543-1-kuniyu@amazon.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221020163954.93618-1-kuniyu@amazon.com> References: <20221020163954.93618-1-kuniyu@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.43.162.134] X-ClientProxiedBy: EX13D36UWB001.ant.amazon.com (10.43.161.84) To EX19D004ANA001.ant.amazon.com (10.37.240.138) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Kuniyuki Iwashima Date: Thu, 20 Oct 2022 09:39:52 -0700 > 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. This cannot be applied on net-next cleanly for now, I'll rebase.