Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp607461pxb; Wed, 11 Nov 2020 11:30:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4bFVuaU0ZLLiLRnqRK3eLvBNEv9GPszFkv+fVkJzMi4e3DRKaFhT7R7xfOObVNE/eCD/D X-Received: by 2002:a17:906:ca93:: with SMTP id js19mr26397070ejb.124.1605123009181; Wed, 11 Nov 2020 11:30:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605123009; cv=none; d=google.com; s=arc-20160816; b=CfNzgHkfaeAza4dILY7/eoibyVv9bpsCnlquTbuO/ogU6KDH2gPck5QShWd0GW6yes yqIU9DiACZVXgoM/e3/qF3Dv+eC5V6GM6SgHQ9J/ETZUzUYWDZSyosRr2wmZerHyhMaK mmLsyxLFVsR7Sb+eqHj67iWF6Uhmqj9PuSgMvrdaWaiB/jwokT5N/v58xU8TB6wDzJDU 28KnAeKFzyYZk2WW59rnLFlUamV+7+qOMW/D7piTNVdIEre1casUBd1FN/83DBtRZvZb rdmQvuLVPJ2qgD9Abyt+K+DpcHMDqTWSpjnC9Ve6WFFvOUo+wVNmKAgm4ma1ByCG9Car X2kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=ZIGJsv6VuvrH6aqhvv1rHsUpskcyiznKXAa1hoxNvCs=; b=tvgAArUUpep3tQ9hFho9TVmbF/PMciYV2c3GZaQTLanBHYSb47CEK1G5GRioZEFDjd PZ9X6ZAtUc0tMaZMfOHkPWn2rI0uAWb6c3eP5BMn6TkECiZ8wZy1GDkluvnsfXa0Odzd y2EfHwehDaGzYMEe9nVI4MMT/7mAiX2BSzojLietplOOdUm/bbY/MBwriyMTOsGFbcJq hSZseK3/513UVXbEIJhPR8/bebLyYheaHGAx3tm/PY+lStCb+COOY9wiYumA78/XtuW8 1ZCqlQf6+MqyerVhvvjmcmwTGXdQPZXEiIx9dPDCJsh2mbyB8u1b9DjxjqzS5kbPPSLi frIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=K5fArzI3; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si1717079ejc.351.2020.11.11.11.29.45; Wed, 11 Nov 2020 11:30:09 -0800 (PST) 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=@pm.me header.s=protonmail header.b=K5fArzI3; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727441AbgKKT0V (ORCPT + 99 others); Wed, 11 Nov 2020 14:26:21 -0500 Received: from mail1.protonmail.ch ([185.70.40.18]:16458 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgKKT0U (ORCPT ); Wed, 11 Nov 2020 14:26:20 -0500 Date: Wed, 11 Nov 2020 19:26:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1605122778; bh=ZIGJsv6VuvrH6aqhvv1rHsUpskcyiznKXAa1hoxNvCs=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=K5fArzI38ps9TNjIyC/yfuMfwNSbHEkbFN0Swyu9QWnMaAup1vOTuq6ZC9hJZj6j7 J+IV3NJDbuYZTBkXzBtj4WO0YXOP/o5aNbE9mPk50G3q/uJBzDwEE+UmjJgL5lZunW /0t//mBJhR1uweHvHISekwkTdNhGwvHRuL/AvHtdeJnvj+1UuKPnv1dBAC4+KitsKc II6PU+Gpm3es4OZPKyEVIZ68Qbj09BX8zZ39Jk9DyUFevvOhXP5VPYNjCNCctYJPLy EgugshrdqEuSb2yCUZ5usJfkZW/t/x/Aw7bmPDGU/n5i6mRZj76O8NN426EpME7yuT BC0OSJaG+GgLA== To: Willem de Bruijn From: Alexander Lobakin Cc: Jakub Kicinski , Alexander Lobakin , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Paolo Abeni , Steffen Klassert , Eric Dumazet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: Re: [PATCH v4 net] net: udp: fix Fast/frag0 UDP GRO Message-ID: <95YTSkmAW8hn6cmmEKdJEAGj6Mn5r07PALzHZW4@cp7-web-044.plabs.ch> In-Reply-To: References: <20201111082658.4cd3bb1d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski From: Willem de Bruijn Date: Wed, 11 Nov 2020 12:28:21 -0500 > On Wed, Nov 11, 2020 at 11:27 AM Jakub Kicinski wrote: >> >> On Wed, 11 Nov 2020 11:29:06 +0000 Alexander Lobakin wrote: >>>>>> + sk =3D static_branch_unlikely(&udp_encap_needed_key) ? >>>>>> + udp4_gro_lookup_skb(skb, uh->source, uh->dest) : >>>>>> + NULL; >>>> >>>> Does this indentation pass checkpatch? >>> >>> Sure, I always check my changes with checkpatch --strict. >>> >>>> Else, the line limit is no longer strict,a and this only shortens the >>>> line, so a single line is fine. >>> >>> These single lines is about 120 chars, don't find them eye-pleasant. >>> But, as with "u32" above, they're pure cosmetics and can be changed. >> >> let me chime in on the perhaps least important aspect of the patch :) >> >> Is there are reason to use a ternary operator here at all? >> Isn't this cleaner when written with an if statement? >> >> sk =3D NULL; >> if (static_branch_unlikely(&udp_encap_needed_key)) >> sk =3D udp4_gro_lookup_skb(skb, uh->source, uh->dest); This idea came to me right after I submitted the last version actually. Sure, there's absolutely no need to use a split ternary. > Ah indeed :) > > One other thing I missed before. The socket lookup is actually an > independent issue, introduced on commit a6024562ffd7 ("udp: Add GRO > functions to UDP socket"). Should be a separate Fixes tag, perhaps > even a separate patch. Seems reasonable. I'll convert v5 to a pair. Thanks, Al