Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp157043lqf; Fri, 26 Apr 2024 02:44:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVR/IcBH1TV6ySt3xBCTOpb4YUonsLnem8rTtHFt1NeiqsTq9Nzj9pdPwor5knp3aObbvq8Ij03apFwyhCpCvBQ/qWFk0eontUBYBR2pg== X-Google-Smtp-Source: AGHT+IFdOqgLXDh5XD2lS4WHJ5Z3qpsZfnREeHBtb+Oc1+bVnDnEa9vkiJ6IeYBqDe1BF4rmS8qq X-Received: by 2002:a17:906:4ac3:b0:a58:8de4:59a5 with SMTP id u3-20020a1709064ac300b00a588de459a5mr2053063ejt.22.1714124666953; Fri, 26 Apr 2024 02:44:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714124666; cv=pass; d=google.com; s=arc-20160816; b=DGpY4fGZLrlMKgtu2xagdiF5uoiODIx3CdkwFWYzcO+IwuDdzp19J98V2vxIfZI1xG j4Wu3C1D2ps0JE6pIhVYDohl78hATkJ4YvIefu0r3XZiz3y7zehIQ3V/kb+WtiWsN/VX VCyqiJJstzUhacojbYULI+9cusM9UXy0a6yi8vQsK5Onhk/9cDpaj71TkjMuTVO3GHmB +XJDNrLrXLpiWNRtjwP+86DmkljgGsd2wUjerpw/yyux7c1qJw7x/C4vXU6U9y2o/92s ooaGEulDr6yZdKTdxfydd1GgdIy+4x3GjZlR5kHLJ+I/ePxDZM2a/Un5IsG4YJ50FQCe MAwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=lrRX54MnE7N1SwDYnQYFuVjnKtKhZl0KPn/EaI2eehw=; fh=zgkV1V0F4pGrjn1lrAdaBOgn+B5WgBIjHF7v4c4V/Jk=; b=0UQc4p7S95P+hZvoPqETewtYJQiXEBALyWK4Q4HhQayMwxX0wHY2de3PNxP1rEK4XO B0AfAfZpY3CpwqmCN5xIlu7LitStfgDPR9x4FB+nQU4G1i4Khr/+KVXhOUqfGoY5OyQp O1iYwWUJKa5dxAGzvckAlDwtDckdZl7LilUhRdgHf2/L5JizalBkk0WLAtgHHvV9LYXW KvErJ8lDDTmGXTRurnnmPKc7wGvAfaIW7vw0esutPJ54OhdOs6QQIR7psR9Q2FSt0lTy kGOup5C/eNhz9PzsY+jO1XtFSFDL/XIo5XbPhWR7RzCLUb6/OWEUQwhRzYEo2AgLdMA1 WW6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=R5Bo7mRx; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-kernel+bounces-159809-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159809-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n16-20020a170906165000b00a4e05accf57si10165920ejd.789.2024.04.26.02.44.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 02:44:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159809-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=R5Bo7mRx; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-kernel+bounces-159809-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159809-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name 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 am.mirrors.kernel.org (Postfix) with ESMTPS id A25011F23456 for ; Fri, 26 Apr 2024 09:44:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3524D140380; Fri, 26 Apr 2024 09:44:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="R5Bo7mRx" Received: from nbd.name (nbd.name [46.4.11.11]) (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 AD57A13F42F; Fri, 26 Apr 2024 09:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714124651; cv=none; b=OrFZUB9ITAQy4XQWq76N0qGMCpJnrBiwlgK1EKDBn1hi/NMtmaXFOUPWPo2krks6+42gO8JbP4KIPHSLxqlmijqeV3lN+pz6x4NlpQynPF1R4jD/FqOGpjGdSPI65ENnxvj5/XPsCH9Y8vxuAVXFbpf1xWUOq5N+yxNo8JljbHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714124651; c=relaxed/simple; bh=5E3B17m8uLwC20aNoNMZoOGKpedUvgx2ahK7LQM5YK8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JwcxOH58zoOnN0XCui9Wt5mac6+OTsX33/lb0WMYcAbs/gpTahyuB/3NJuRMVWCseC3xAZCGNSsXB/WHirLSyRvh6YZCoBaLbi07JN/P8w36/6udEedTOiAgeqK8MFnBxwIQkEtjtOcWFRs9vK+SZKiyv47B7pHIGqXHJjNBXtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=R5Bo7mRx; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lrRX54MnE7N1SwDYnQYFuVjnKtKhZl0KPn/EaI2eehw=; b=R5Bo7mRxV11CrcOoUILAQR0VsE nfx+FD817knGHxCeFc4qGwtSD+YzVzxrVDg7PKrTZCnO+GVJwoFTcDgee040CPmp+3TQugxdEd4zi +gyQ/yN6+5aWmhVwrwNbByTSvKI8j+kBDMy37qtWk6OGK2Mubqk5km8mGDG47lXsNLXY=; Received: from p54ae9c93.dip0.t-ipconnect.de ([84.174.156.147] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1s0I7f-007t7d-0m; Fri, 26 Apr 2024 11:44:03 +0200 Message-ID: Date: Fri, 26 Apr 2024 11:44:02 +0200 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 v3 net-next v3 3/6] net: add code for TCP fraglist GRO To: Eric Dumazet Cc: netdev@vger.kernel.org, "David S. Miller" , David Ahern , Jakub Kicinski , Paolo Abeni , willemdebruijn.kernel@gmail.com, linux-kernel@vger.kernel.org References: <20240426065143.4667-1-nbd@nbd.name> <20240426065143.4667-4-nbd@nbd.name> From: Felix Fietkau Content-Language: en-US Autocrypt: addr=nbd@nbd.name; keydata= xsDiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtcAunDaMKi9xVQW18FsUusM TdRvTZLBpoUAy+MajAL+R73TwLq3LnKpIcCwftyQXK5pEDKq57OhxJVv1Q8XkA9Dn1SBOjNB l25vJDFAT9ntp9THeDD2fv15yk4EKpWhu4H00/YX8KkhFsrtUs69+vZQwc0cRmVsaXggRmll dGthdSA8bmJkQG5iZC5uYW1lPsJgBBMRAgAgBQJGoeQnAhsjBgsJCAcDAgQVAggDBBYCAwEC HgECF4AACgkQ130UHQKnbvXsvgCgjsAIIOsY7xZ8VcSm7NABpi91yTMAniMMmH7FRenEAYMa VrwYTIThkTlQzsFNBEah5FQQCACMIep/hTzgPZ9HbCTKm9xN4bZX0JjrqjFem1Nxf3MBM5vN CYGBn8F4sGIzPmLhl4xFeq3k5irVg/YvxSDbQN6NJv8o+tP6zsMeWX2JjtV0P4aDIN1pK2/w VxcicArw0VYdv2ZCarccFBgH2a6GjswqlCqVM3gNIMI8ikzenKcso8YErGGiKYeMEZLwHaxE Y7mTPuOTrWL8uWWRL5mVjhZEVvDez6em/OYvzBwbkhImrryF29e3Po2cfY2n7EKjjr3/141K DHBBdgXlPNfDwROnA5ugjjEBjwkwBQqPpDA7AYPvpHh5vLbZnVGu5CwG7NAsrb2isRmjYoqk wu++3117AAMFB/9S0Sj7qFFQcD4laADVsabTpNNpaV4wAgVTRHKV/kC9luItzwDnUcsZUPdQ f3MueRJ3jIHU0UmRBG3uQftqbZJj3ikhnfvyLmkCNe+/hXhPu9sGvXyi2D4vszICvc1KL4RD aLSrOsROx22eZ26KqcW4ny7+va2FnvjsZgI8h4sDmaLzKczVRIiLITiMpLFEU/VoSv0m1F4B FtRgoiyjFzigWG0MsTdAN6FJzGh4mWWGIlE7o5JraNhnTd+yTUIPtw3ym6l8P+gbvfoZida0 TspgwBWLnXQvP5EDvlZnNaKa/3oBes6z0QdaSOwZCRA3QSLHBwtgUsrT6RxRSweLrcabwkkE GBECAAkFAkah5FQCGwwACgkQ130UHQKnbvW2GgCeMncXpbbWNT2AtoAYICrKyX5R3iMAoMhw cL98efvrjdstUfTCP2pfetyN In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 26.04.24 09:47, Eric Dumazet wrote: > On Fri, Apr 26, 2024 at 8:51 AM Felix Fietkau wrote: >> >> This implements fraglist GRO similar to how it's handled in UDP, however >> no functional changes are added yet. The next change adds a heuristic for >> using fraglist GRO instead of regular GRO. >> >> Signed-off-by: Felix Fietkau >> --- >> net/ipv4/tcp_offload.c | 22 ++++++++++++++++++++++ >> net/ipv6/tcpv6_offload.c | 9 +++++++++ >> 2 files changed, 31 insertions(+) >> >> diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c >> index c493e95e09a5..ffd6b7a4163a 100644 >> --- a/net/ipv4/tcp_offload.c >> +++ b/net/ipv4/tcp_offload.c >> @@ -332,6 +332,19 @@ struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb) >> flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); >> flush |= skb_cmp_decrypted(p, skb); >> >> + if (NAPI_GRO_CB(p)->is_flist) { > > > Please add unlikely() for all NAPI_GRO_CB(p)->is_flist checks added in > this patch. Will do, thanks. - Felix