Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp343760pxb; Thu, 27 Jan 2022 23:50:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2BuUr1PMUjT0rmjf/8kjLKSbMHl5VJA2mn6bPtEg8nAHs4XmMCk+WzE2dTMvip3VX3vlo X-Received: by 2002:a17:90b:1c12:: with SMTP id oc18mr8543529pjb.174.1643356208186; Thu, 27 Jan 2022 23:50:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643356208; cv=none; d=google.com; s=arc-20160816; b=s284EC2URvhuCdl0vwCnZc/7MqTdjuxl6gYI7nrUYcTga2nMSXOgzyFF6EJtjqt6+Z zHIFsfZnrvrUc8Mm49AxtWRiO4/a2rx7yjROuzIv/Jlr2Q1GEUWb3NUe/HRxVouGYVIJ r/V91ruzwS9m4JkGidS4fUP6BnPDyFxs/7tnqqH95ljiCJtyJsN8l3tA8UkeGS5kgKTL VahlbpIjT2RsOnV6vaopOYa/0kw4COTkX7lhVgY3xBBkptno1OozRtvXS3esBMef1C8t neUDSbCZFqxXdts7zHEVdr+6QadwqlbL2Yo0/5Af6b4lCGXuSpB9m9SZFy2orpz4LN/1 ekDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3L9dijJzC3e3/PCe51KV9pEonuhgRM2pwbe2CRq/cZg=; b=FCx7ndCiHqb1hmtVza/qkEa2mte7bDPHBKCd2lNIsetaxow3pHzzt1LsO84scYH2nY puF4Ii/7EoZyukkYl/SgN72k9OG37WC3DpsRLPRmsctrYLfrIkkA6CfewBXdlvItFygU EXxTm5ksnCvXIXlVtmHl53aPEpX6SAA3Ew7p5ADGfJ/pTCIXNxys/I0uXXNgnKYh6VtO 2JUERS3aW0+cShYrIUpTs4G8fSJtNTBK00/aS//lNqDUH4L9x9EyGQMpoiLkUhKSxA65 qTBwM4sEklKBbEM7uzox7wzHcwwgEG7iP0rnOUH5HTAAtvxWfmBehkxW6os7QNviBgfl fuFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Hi1EbSU3; 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 c30si4419841pgc.575.2022.01.27.23.49.56; Thu, 27 Jan 2022 23:50:08 -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=@gmail.com header.s=20210112 header.b=Hi1EbSU3; 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 S243009AbiA0PSB (ORCPT + 99 others); Thu, 27 Jan 2022 10:18:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243140AbiA0PRw (ORCPT ); Thu, 27 Jan 2022 10:17:52 -0500 Received: from mail-vk1-xa36.google.com (mail-vk1-xa36.google.com [IPv6:2607:f8b0:4864:20::a36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E706C061753 for ; Thu, 27 Jan 2022 07:17:52 -0800 (PST) Received: by mail-vk1-xa36.google.com with SMTP id o15so2067709vki.2 for ; Thu, 27 Jan 2022 07:17:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3L9dijJzC3e3/PCe51KV9pEonuhgRM2pwbe2CRq/cZg=; b=Hi1EbSU3KfSYW6t3mHRqxA7YFt5tK95/PMV+AHZgPTzxlY/b12QKGs6RJbVAjhZepz ew/eQOgDvEriqLoJCwiLplxCz38HtJ0hU4P4NWAM4y5pbab4xYnzI0PcHrwhFintDOYQ tv5e32a18VVXRITOk9uUvNVBPXt/8K6rgI9Xkx9B4B7hgjRJS+vLFs1KE9t6Dj9vCoDw ibRBOqQW5x5fbUqTNxKx1a3g5UEnnYGfvDp4lHuHsm7cQAORMeOiRnvrDvD6PG3tHYpG PqvgPRfPCIucMcs63yIol5xLAe2MbrIZojEv8AB+VP1cm3n2ZzCsWLWRa+ys+wdCGAld pw0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3L9dijJzC3e3/PCe51KV9pEonuhgRM2pwbe2CRq/cZg=; b=BuGWQeMg5TMzhoeReCoGn+X6uYXV/t6cOugIuMr6S4apqohG6aqOUfovYiwZjCOZQy 0/Uot4CVV5uYlJ2ALK616JIVZlWvnFpZsR74iNbZDqZuBgnHlEoa19+I/+ZInERpZJsy EGUlU994ir4CqDRmq6bhdk25KEFSsU+SSmEZExjq2zBASYJb/xuyiZIZA6i6mo/jFGye qXHE4HGySa7mkxBL82aQdr5cTDONAdtzzhK0DYLzY76HPs3sglSO2MHoIQsQgOyPTwoj 93h9CsgK8kwp8TEug+/SGMokl9+CorJV9Gn3XDMPVVFw1NLhMNFE7PLa6dsuf4dIFus4 Hk2Q== X-Gm-Message-State: AOAM533DXpn3t1EERvzQqSlmnU5kFCvhx7q6L157JBFsJrqtJYcrCRbN VcKhBEenNWfp+r7DCkceiegWgbagDfE= X-Received: by 2002:a1f:640e:: with SMTP id y14mr1852642vkb.2.1643296671278; Thu, 27 Jan 2022 07:17:51 -0800 (PST) Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com. [209.85.221.179]) by smtp.gmail.com with ESMTPSA id r11sm1445066uaw.7.2022.01.27.07.17.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jan 2022 07:17:50 -0800 (PST) Received: by mail-vk1-f179.google.com with SMTP id o15so2067674vki.2 for ; Thu, 27 Jan 2022 07:17:50 -0800 (PST) X-Received: by 2002:a05:6122:1811:: with SMTP id ay17mr1708154vkb.2.1643296669982; Thu, 27 Jan 2022 07:17:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Willem de Bruijn Date: Thu, 27 Jan 2022 10:17:13 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v2 00/10] udp/ipv6 optimisations To: Pavel Begunkov Cc: netdev@vger.kernel.org, "David S . Miller" , Jakub Kicinski , Eric Dumazet , Willem de Bruijn , linux-kernel@vger.kernel.org, Paolo Abeni Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 7:36 PM Pavel Begunkov wrote: > > Shed some weight from udp/ipv6. Zerocopy benchmarks over dummy showed > ~5% tx/s improvement, should be similar for small payload non-zc > cases. > > The performance comes from killing 4 atomics and a couple of big struct > memcpy/memset. 1/10 removes a pair of atomics on dst refcounting for > cork->skb setup, 9/10 saves another pair on cork init. 5/10 and 8/10 > kill extra 88B memset and memcpy respectively. > > v2: add a comment about setting dst early in ip6_setup_cork() > drop non-udp patches for now > add patch 10 > > Pavel Begunkov (10): > ipv6: optimise dst refcounting on skb init > udp6: shuffle up->pending AF_INET bits > ipv6: remove daddr temp buffer in __ip6_make_skb > ipv6: clean up cork setup/release > ipv6: don't zero inet_cork_full::fl after use > ipv6: pass full cork into __ip6_append_data() > udp6: pass flow in ip6_make_skb together with cork > udp6: don't make extra copies of iflow > ipv6: optimise dst refcounting on cork init > ipv6: partially inline ipv6_fixup_options > > include/net/ipv6.h | 14 ++++-- > net/ipv6/exthdrs.c | 8 ++-- > net/ipv6/ip6_output.c | 99 ++++++++++++++++++++++------------------ > net/ipv6/udp.c | 103 ++++++++++++++++++++---------------------- > 4 files changed, 118 insertions(+), 106 deletions(-) For the series: Reviewed-by: Willem de Bruijn Iterative review vs v1, where I only had one small comment, which was addressed. NB: Due to some subject line changes, it wasn't immediately clear to me that this was just a range-diff over the first 10 patches in both series.