Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1227516lqm; Thu, 2 May 2024 08:34:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4RR8EBs+JSiVeN4NpGjLYOGkXaWllv339uTPYY+S7JjWoxfngXwdzPXUxhWWtcXHh+GETMsX2xcopClbOeclss7dJ/FZAj6WOlvFl/w== X-Google-Smtp-Source: AGHT+IFMcFSoIp5EWKyazq6ZwKN9O226rA7uPCr/v1hNWc6zzTzssl1EihbdjoNBYRBj3WR6rcMx X-Received: by 2002:a05:622a:289:b0:439:f663:dea7 with SMTP id z9-20020a05622a028900b00439f663dea7mr141406qtw.25.1714664053802; Thu, 02 May 2024 08:34:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714664053; cv=pass; d=google.com; s=arc-20160816; b=qg3HdLNXiUso2stz7gF/G2F8PMshAc8k1ZF1LV1akfW/QcxbWRVHlzSpGbLzv8r1PM J4jmKTWPvfpIL3GDl08uM0xn+hXF8NDq85c77uPSUK/RMjmW8X02y6Ljh9AL/IQyyYHr 1A7JMC+D/5TTPwrqdvjxN3qoc8ha13HdGVsRUBX2Xpyx98FPDJeOPAFEuK5Hmu5s4LPS UQWIKZ8sqhV/LQcGduwCcJvqZHnYH6Zd+ElorMtzJYfE293cRI3xyR5dt2I1Oj4G/lDv Y+9krO16Ok94bn7kvKTzpFmxN/2HTmHUOTJGEeEmzx3oF2nCM4SqsX5WlJNBFmOcZVuU jgLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=PdzRhQXWkRAc0lX7tmvKzITIEDtFm/Rc4YY83rSv7go=; fh=fVyg/8A8yToMl5etEkQs93jOfj3BNO35vEv4qAnmMB8=; b=uYYE8KYKGKLuP3X/MTNGyZ9TUw5gLan9O6C9YBOoxfS//9V/eLM+lov6adIq0IQHGi 84dlthmSSrSbtvDXmWMXJbp4uJHDJS5BdeUyukGROgk1o/PKCatvaBK+PDMAPwGjfLRh U5X0WVz8Is7wv/Df4/ZYnOmr1j+GB36vOWBdghoId2lckz7Qxv3jmzxwsl/Nx+RM+HGH 5wbaQ7gHxJPq2n5OFp8CGTuSzuEfoBUYeniPKafl/0qaFDQA+IwqUBIDONWlaTs3zBy+ Zemwt2tjWLAX1XxLIw5bHY1l5Douh5rs5kVkAlH4Bn2vXqHKWgKrkJ0eN5M1b+je9nOO hTOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PRTbwY9/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166649-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166649-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s15-20020a05622a178f00b0043ad560baf4si1262833qtk.35.2024.05.02.08.34.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166649-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PRTbwY9/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166649-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166649-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6E2EC1C209F2 for ; Thu, 2 May 2024 15:34:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCB6F15F30D; Thu, 2 May 2024 15:33:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PRTbwY9/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA76D15E7F6; Thu, 2 May 2024 15:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714663986; cv=none; b=nJrV4/YsMhj6hCsFgjotgOJk/suUWtBav1DndgnT6w30UN0tre76W6Ikjc0Ov8h6fL85jzxEZHNYSZovaPfe/3SJr/QB2tBQok312J9Z0F3sAiXjZ0rQdrmk6gI4roA73qv/RQVy9TKDGInP/Nlx1k/3Qt6NfsJpfCnhBWjHdLA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714663986; c=relaxed/simple; bh=GvjJgiAM3PUJapyMwa4WtNG7VdzKsQguOtRnheGULpk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oAOgQWlFFlBQ+5ZDcgR6FTuodwC3+CnkQ6CNQvo0r8IglSjU79XVfFlYhdfHoGK0czqDt4GmmaDP3LfRdt1wOnQcr+XU8AvY2aEoXryrRlQajJn3TN4rmthNTfVHo+Fa0SWXEGKr3BqgxhkgfOQ9ppnCjZ9krWPzNmz/Ib1sknE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PRTbwY9/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C156C4AF1A; Thu, 2 May 2024 15:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714663985; bh=GvjJgiAM3PUJapyMwa4WtNG7VdzKsQguOtRnheGULpk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PRTbwY9/laPMmo4/eJgvpC1MR9yVbDQjxF1Mfl7rbouHnYlCno/3dno+gS4seGYi8 Kkh/weVxtWoZQKhKakqwh5CywcMaIO69Zfsha1hAZCtOZQDdYK12buBF9zlq8MpJjW KBiaXE47ncu8pienmBVvUaP8UANvRQMyv8T3LfEqK8Q00ScwXKj8v7nkhDrqOB5zzf /t7D9agL9nGnTpyTuzFy7wcodUn0j8vM1nUQOzQkIshd8qbpoFBnxGvObCEp+9X6J9 TppmB1xArqn6JV/gna7K/d7SXYsyQZSX6RB70l03/QmK6CdueBH7CQ/wUqsfBzTNGb yTEHyJncC1vrQ== Message-ID: Date: Thu, 2 May 2024 09:33:05 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 net-next v5 6/6] net: add heuristic for enabling TCP fraglist GRO Content-Language: en-US To: Felix Fietkau , netdev@vger.kernel.org, Eric Dumazet , "David S. Miller" , Jakub Kicinski , Paolo Abeni Cc: willemdebruijn.kernel@gmail.com, linux-kernel@vger.kernel.org References: <20240502084450.44009-1-nbd@nbd.name> <20240502084450.44009-7-nbd@nbd.name> From: David Ahern In-Reply-To: <20240502084450.44009-7-nbd@nbd.name> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/2/24 2:44 AM, Felix Fietkau wrote: > When forwarding TCP after GRO, software segmentation is very expensive, > especially when the checksum needs to be recalculated. > One case where that's currently unavoidable is when routing packets over > PPPoE. Performance improves significantly when using fraglist GRO > implemented in the same way as for UDP. > > When NETIF_F_GRO_FRAGLIST is enabled, perform a lookup for an established > socket in the same netns as the receiving device. While this may not > cover all relevant use cases in multi-netns configurations, it should be > good enough for most configurations that need this. > > Here's a measurement of running 2 TCP streams through a MediaTek MT7622 > device (2-core Cortex-A53), which runs NAT with flow offload enabled from > one ethernet port to PPPoE on another ethernet port + cake qdisc set to > 1Gbps. > > rx-gro-list off: 630 Mbit/s, CPU 35% idle > rx-gro-list on: 770 Mbit/s, CPU 40% idle > > Acked-by: Paolo Abeni > Reviewed-by: Eric Dumazet > Signed-off-by: Felix Fietkau > --- > net/ipv4/tcp_offload.c | 32 ++++++++++++++++++++++++++++++++ > net/ipv6/tcpv6_offload.c | 35 +++++++++++++++++++++++++++++++++++ > 2 files changed, 67 insertions(+) > Reviewed-by: David Ahern