From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7357CC49ED7 for ; Mon, 16 Sep 2019 07:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40B672067D for ; Mon, 16 Sep 2019 07:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfIPHDH (ORCPT ); Mon, 16 Sep 2019 03:03:07 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:44206 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbfIPHDH (ORCPT ); Mon, 16 Sep 2019 03:03:07 -0400 Received: from localhost (unknown [85.119.46.8]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id D2C2A1510890B; Mon, 16 Sep 2019 00:03:04 -0700 (PDT) Date: Mon, 16 Sep 2019 09:03:03 +0200 (CEST) Message-Id: <20190916.090303.994115261056261585.davem@davemloft.net> To: willemdebruijn.kernel@gmail.com Cc: netdev@vger.kernel.org, edumazet@google.com, kraig@google.com, zabele@comcast.net, pabeni@redhat.com, mark.keaton@raytheon.com, willemb@google.com Subject: Re: [PATCH net] udp: correct reuseport selection with connected sockets From: David Miller In-Reply-To: <20190913011639.55895-1-willemdebruijn.kernel@gmail.com> References: <20190913011639.55895-1-willemdebruijn.kernel@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 16 Sep 2019 00:03:06 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Willem de Bruijn Date: Thu, 12 Sep 2019 21:16:39 -0400 > From: Willem de Bruijn > > UDP reuseport groups can hold a mix unconnected and connected sockets. > Ensure that connections only receive all traffic to their 4-tuple. > > Fast reuseport returns on the first reuseport match on the assumption > that all matches are equal. Only if connections are present, return to > the previous behavior of scoring all sockets. > > Record if connections are present and if so (1) treat such connected > sockets as an independent match from the group, (2) only return > 2-tuple matches from reuseport and (3) do not return on the first > 2-tuple reuseport match to allow for a higher scoring match later. > > New field has_conns is set without locks. No other fields in the > bitmap are modified at runtime and the field is only ever set > unconditionally, so an RMW cannot miss a change. > > Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") > Link: http://lkml.kernel.org/r/CA+FuTSfRP09aJNYRt04SS6qj22ViiOEWaWmLAwX0psk8-PGNxw@mail.gmail.com > Signed-off-by: Willem de Bruijn Applied and queued up for -stable, thanks.