Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2838862lqt; Tue, 23 Apr 2024 03:16:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX//zS7aC2NZNhVdl3W6MDViksAdflmA1RE0ibOXwIygtgPWxe0ipRPVR/nWbjjb8fqDmesBD8aC25L0fZ1FU5yuOpwJzsJjEfEvPKuNQ== X-Google-Smtp-Source: AGHT+IE0Msoim7VcnL6PVC+jra6ykehQWD0AAj0YtNzPzLAHv6ETeRrx5KBN/Gggv8w9cwp4mdT7 X-Received: by 2002:a17:903:32cd:b0:1e4:3e23:ca72 with SMTP id i13-20020a17090332cd00b001e43e23ca72mr15240809plr.42.1713867379872; Tue, 23 Apr 2024 03:16:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713867379; cv=pass; d=google.com; s=arc-20160816; b=NenjixUUQnBbCimppx35ifT69RYVc6hKOCtH5e0wdk/GALeWw5uTG3x0O5rj1VLPzl Q07ZRnaFn1GZ/WihfBofVy5lYQPzZ5cmdgdfGfa31bx1lJ8ADoDP36rLsPgaQH1fmEsE 5TOQPFh2vKNummrp1ANSgsqfWoxk7hSe927ClTwoPfsIs7+G7auxfyl8Khhn7wWw1pu7 k+xnma0WFeRmRMTC+z6g3KHxzY4nYhPrKKHk+micH20irjYot7pXCKkGFxipbL8t2UFj ZTz816SPjRiq2ulvJqpxZaCbcHmMFbnbkjhyHgXkK5on6bx5gu4o2hEACdR6bvAKkMoS /TFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=r3NXpsdHuYBobJGGyVWsy5SU7aCIFWQG4b8AIKli8P0=; fh=zSkRjD4jAzi6tucVwCYjMGIFg8Zj/efODwHv5KHEO98=; b=aondywomY9FztxjEu/yzedA3K1umfSvIHMGxn+m8yP5PCziBecTRjJnnDBckzS008H TohCvaFq45H2ueULN+c+jcyin1s9cWARnNSv8IYdHsab+XvCTZ9zu6Xg8kbGFMPNGYSE 437WyxhkLPKLVhthBMLFUY/FGTEPVUQDBpwaVPgVLHAhlf9ocO7CpF/TvEHdfxOrKNFW N/yQ/JhqL4vHgwQEevqP+7BHeUniVCckiNRO23dtqxh37djN+6mMLF1qCQj2NYYZt9pY 3EFxSRoV+oIWKlAv3mUiEFcIW0Xr32DIu/DmeZlv3LlenjuRYoYu9rhn0V35tp0byiho WWZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Od7jFFq3; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-154847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b12-20020a170902e94c00b001e5d136eac0si9838806pll.90.2024.04.23.03.16.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 03:16:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Od7jFFq3; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-154847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8435F281859 for ; Tue, 23 Apr 2024 10:16:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCB2F612EB; Tue, 23 Apr 2024 10:16:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Od7jFFq3" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E44B60279 for ; Tue, 23 Apr 2024 10:16:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713867370; cv=none; b=gmP56XZ2CNzYFcMtnqljs041RwlHTUGVdRYIbmR/oiCfmoyVhhWnvAXx4MheEktKZKixVQVDVmD4FVNCaAePqA1SFEc1pLjStREqEMp5fVdbVfM33xLZfLh86q3ek5oKF+Ou5UePSw6V+/dUWxyNaQjnLvDcLTJP8XxwA5Tb7pI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713867370; c=relaxed/simple; bh=jy5arJm1forKrmneoXB2SHX8PNwRuIx0u7xPry8cZsQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JcN0Vq71hBNMEns8db1wp/W9DbuvOOpiFmv04QMfPJ8Z7+XJ17Dh3phYdIzuvW1pwREwvsPthMFA4lcokaIp4egGkUzLB3a7v6HNCA7x5v8WtvXvf+qO9GT8S1r0bZnUNhViiI5aoKoLxtzGSp9iHOLJfL2anevTz8yno7+xqJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Od7jFFq3; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5720583df54so8698a12.0 for ; Tue, 23 Apr 2024 03:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713867367; x=1714472167; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=r3NXpsdHuYBobJGGyVWsy5SU7aCIFWQG4b8AIKli8P0=; b=Od7jFFq3mqrPpd6LeZRscG0mYmp8d1sW0jlQA1P8HTZeNt0jtOhYN2LudVgKLjB6AX jtH96KI0VyI5WnpVyzCwvrftcwDB/vb0qS00HbkqXH0OCMTCQu0wFQ+GGsIbkXz7/sa2 /8XtUG3o8m70RUN5j1JmdCWtP0/EqhGrsuVsEbHiK/RVm5AkbDj65CC9CG6VCXczeg4y 4OXfn3kP0l5pSJY9+0SBKTeVP1sisHMvFxbtJWPKBe2DqvYksUa9hBNEyYM3ZVLIxGly CJUAEuOm2p1cVU2TGa/XPcXIlMzOINxTo8pFQlP8DVZSMx40Kgs2psAsLWzsA5+cbI0h RUWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713867367; x=1714472167; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r3NXpsdHuYBobJGGyVWsy5SU7aCIFWQG4b8AIKli8P0=; b=D5emsFxPl7dC8bCfmGJ5D3HzEI+tHuH2AjuT6zPIqyowXcjDw5EeGiBuigMx4e68Gb hekLqKyxM2i6WCTmT6yIXNIStPnJXd2dazOMiGind6zwF4dXspvWvX8DKXHwfAos2nM+ CVWaiTS73fveB3LQpdoWwa9ti1L1hT9MWBvtHTVdj5HV6SL/LR1e/FFqvqAD8X0JEINY ge5pgptusMfH2E4MdvFwsqFxdVQFi91Ycm1/3jiQBWhqdXFjirOo2Cux9cm+YUhsHiZA ujTRqmcl23xstlrvDzAoP3mdX9G+Hz5LS/mjvqh7eY3C/HEY7FjPvWtBppSYWol01q6+ HeQg== X-Forwarded-Encrypted: i=1; AJvYcCWy5ZsbL6rrwDY6PXj4i1bktQC293a3o0Jx/nPC/d/qda99SoqpBCMsz6p3hoS5ZkyFFxXuNYgsKoC21wJGioBARg1z4EVWiJbh1mH9 X-Gm-Message-State: AOJu0YwZtomPvjj4xcdA1DFV53J61kew5eq2ryVhvpx0U+SbMPK6khfG oInw6msdm4QrGJTEUjcMNop7MyLPtkqq1nhfQCB4raztSzetk6RiuQK/ng80UcmNdrOjq9yfTS6 tQxGqXe08735TAUOWNu5a005UUosYF00bckLN X-Received: by 2002:aa7:c147:0:b0:572:ca7:989d with SMTP id r7-20020aa7c147000000b005720ca7989dmr105916edp.3.1713867366480; Tue, 23 Apr 2024 03:16:06 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240423094117.93206-1-nbd@nbd.name> In-Reply-To: <20240423094117.93206-1-nbd@nbd.name> From: Eric Dumazet Date: Tue, 23 Apr 2024 12:15:55 +0200 Message-ID: Subject: Re: [RFC] net: add TCP fraglist GRO support To: Felix Fietkau Cc: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , David Ahern , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 11:41=E2=80=AFAM 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. > > 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 Hi Felix changelog is a bit terse, and patch complex. Could you elaborate why this issue seems to be related to a specific driver ? I think we should push hard to not use frag_list in drivers :/ And GRO itself could avoid building frag_list skbs in hosts where forwarding is enabled. (Note that we also can increase MAX_SKB_FRAGS to 45 these days)