Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp614492ybh; Wed, 22 Jul 2020 08:50:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2UM3SQXHZE2Lp28UXMDg+/XoLY+9INIkmLlslJZ9zGe73PbZlIgrXbbl01wV03agClMj9 X-Received: by 2002:a05:6402:30b2:: with SMTP id df18mr75845edb.229.1595433053992; Wed, 22 Jul 2020 08:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595433053; cv=none; d=google.com; s=arc-20160816; b=J5hqhCbmzni8nYbBIjSzMqbC4oU3smOl3BACWzfEiDAMxN6O3LH9CQoWNtT6DCMdcF +Y8s+gBJbj6kOUhtJMEIdIO46gBDPmG2m6xYlfAQih9tP9OXUj0I2xuPv9xW5cG2IeRz CdY+zhDwSc5ILULzdkxuZ+fvIZ95NUgSbjPyJ8Eq8LomgJi+xSmdlPhqhiwdie9XDAlm iwCAkOY0Dkt+iH5lRCabUY3E5KVjTPDeH7KGlUqKoR/eiWnGRaPrJuPABNlDuUgY21mt zoBSM6YC8C0ri4M6rDoGqL2gQrTKKUHjGG5A7HereMa8WiYtI61wBjNeRO1Waa3pr9cz 3vcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FbZpQKjkyVWA5idi3w+btcCrZiLttKv+UA9Wn+yjyV0=; b=lkPanE8u4AkNSDF3sJwl8fBzJhecPoCOGkpO0Jxq7GxUMsBASwZPcBDmPxDd/YxgJE Mo+hforx/vu7JvvqpXIRfSmlgexyg/7iEEO+EDzWXg8wyH1CvRk7xwq1sNSVCSVcslKe 6TEojecFH7IchDAOMMDNNwITe36K+X+0B0ILJEbOVsOocXt0Eo993war5s2/q8jS12sZ al3+6Y/IRTr6q+c/f3KZetzULOQ//sNQJ0jV14Gri93F8iX/26FSPBAp/gDgBRLpNtbn RJNWCpTFBNrMNZgWqLo8Ge3l6rWrydYJmBUyujbZl9lyQSDszUGCMe92xRlK2GiJhRiu ZLoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OBleOo+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si241608edv.573.2020.07.22.08.50.30; Wed, 22 Jul 2020 08:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OBleOo+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732755AbgGVPuV (ORCPT + 99 others); Wed, 22 Jul 2020 11:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727778AbgGVPuV (ORCPT ); Wed, 22 Jul 2020 11:50:21 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7426C0619DC for ; Wed, 22 Jul 2020 08:50:20 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id h7so2409418qkk.7 for ; Wed, 22 Jul 2020 08:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FbZpQKjkyVWA5idi3w+btcCrZiLttKv+UA9Wn+yjyV0=; b=OBleOo+TpJlNHgO3Hupf36nyBJkcwDDKREwPcTAtj6Sp2D5PjGq5CvkBZSLh7t0ptU TYUv4+DllNHf7bn3Rh1p34Ffb8mU63zP0IIi9Ai2qGwBI3Qrv07OVzkOkL05OQ1rbeFR 9oBCEv+aVCb98tGVAtAEHt5/ZY8dADMil0LVidWEPfbhtXdHA965EUvmMKGsuXdontIb plNtHfvt1rTUVyFJRXM/R++7bl/E3CKm13FQ4u8VO8jOMskk/G1ilzLFdZp225CLN0B8 +XbqihxsVQqSYOFAuzVAqzg25leFXoVIL9Zu2oV1pzHbi08PdZv63INm2RU2vKOOhiIz VzzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FbZpQKjkyVWA5idi3w+btcCrZiLttKv+UA9Wn+yjyV0=; b=fxLHXm3yZ5fFlG76IRKtpU2o6/au7nTcf5sR0bc9PVXDrjEUHOmPsaYn4LfAWDUfMp 4WmciVksw9LRTxJ6vgkhtYmG2U2NMKEWzjqW8dV6ghLmn5hCZLXVLy8iDcKezhcYvYAG cSoami0xMJ/fadp4TJG79WVzEfuk+VuUDMJ9uKcW8vs8rcBR7tslT0537OVjCeX8E5sN HOwGtPPlGerOOAQpR7eMRABI1kuIT41DPifWavbPN5UKW/SfasJswtT1vqOA70z3UMOS +DkiA1P6EnF+jie1SLLCSjuBbt++J/gvkw8srIE3N8+WwuZX/Pq4feZcCiO2Y/kjdmsv bPLA== X-Gm-Message-State: AOAM531hNLuCymJAErsGEX7d78KLjIFu9WkeqZ9SJcpIdnM/LDFclStk GJ4A4+j9cFCfsGzpYUoOFRZQl96d X-Received: by 2002:a37:9347:: with SMTP id v68mr567052qkd.281.1595433019094; Wed, 22 Jul 2020 08:50:19 -0700 (PDT) Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com. [209.85.219.176]) by smtp.gmail.com with ESMTPSA id a8sm35205qth.69.2020.07.22.08.50.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2020 08:50:17 -0700 (PDT) Received: by mail-yb1-f176.google.com with SMTP id g6so1235544ybo.11 for ; Wed, 22 Jul 2020 08:50:17 -0700 (PDT) X-Received: by 2002:a25:cc4e:: with SMTP id l75mr52192685ybf.165.1595433016973; Wed, 22 Jul 2020 08:50:16 -0700 (PDT) MIME-Version: 1.0 References: <87wo2vwxq6.fsf@cloudflare.com> <20200722144212.27106-1-kuniyu@amazon.co.jp> <87v9ifwq2p.fsf@cloudflare.com> <87tuxzwp0v.fsf@cloudflare.com> In-Reply-To: <87tuxzwp0v.fsf@cloudflare.com> From: Willem de Bruijn Date: Wed, 22 Jul 2020 11:49:40 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: linux-next: manual merge of the bpf-next tree with the net tree To: Jakub Sitnicki Cc: Willem de Bruijn , Kuniyuki Iwashima , Alexei Starovoitov , Daniel Borkmann , David Miller , kernel-team , linux-kernel , Linux-Next Mailing List , Network Development , Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 11:25 AM Jakub Sitnicki wrote: > > On Wed, Jul 22, 2020 at 05:05 PM CEST, Willem de Bruijn wrote: > > On Wed, Jul 22, 2020 at 11:02 AM Jakub Sitnicki wrote: > >> > >> On Wed, Jul 22, 2020 at 04:42 PM CEST, Kuniyuki Iwashima wrote: > >> > Can I submit a patch to net tree that rewrites udp[46]_lib_lookup2() to > >> > use only 'result' ? > >> > >> Feel free. That should make the conflict resolution even easier later > >> on. > > > > Thanks for the detailed analysis, Jakub. > > > > Would it be easier to fix this wholly in bpf-next, by introducing > > reuseport_result there? > > Did you mean replicating the Kuniyuki fix in bpf-next, or just > introducing the intermediate 'reuseport_result' var? > > I'm assuming the former, so that the conflict resolving later on will > reduce to selecting everything from bpf-next side. Indeed. Since you are already adding a patch to bpf-next to move the reuseport_has_conns check back. At the same time, it can introduce reuseport_result: if (score > badness) { reuseport_result = lookup_reuseport(net, sk, skb, saddr, sport, daddr, hnum); if (reuseport_result && !reuseport_has_conns(sk, false)) return reuseport_result; result = reuseport_result ? : sk; badness = score; } > TBH, I don't what is the preferred way to handle it. Perhaps DaveM or > Alexei/Daniel can say what would make their life easiest? Good point. With the above, there still remains a merge conflict, of course. But then we can take bpf-next as is, so I think it would save a separate patch to net. But not sure whether that helps anything. It does add an unnecessary variable.