Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2988393lqt; Tue, 23 Apr 2024 07:34:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU79IuXMPvtukyPGi6hJzE7yzlknd7NjyxkEP6dnLAvtUy1coC0dY+0a5fhlZsRgrlni4FzMDlEx+hO83lE4AAeq9DI65kWrWEnwVvR9g== X-Google-Smtp-Source: AGHT+IF/hGVF64ehxrJZNfO5utDWwj73Zb1Sgk4524WWbrdaGdZ1EbWSvgtu8RHFjKgUrLwsB6qd X-Received: by 2002:a50:c358:0:b0:565:f7c7:f23c with SMTP id q24-20020a50c358000000b00565f7c7f23cmr11836887edb.3.1713882877904; Tue, 23 Apr 2024 07:34:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713882877; cv=pass; d=google.com; s=arc-20160816; b=a9LVdfYbIU1F3csRfIIACnT1PFWakZlVWX1N/jzD2yXRiKnN0sB+2tCwelDnfYCMvA YpqbNp7L21AzNMB3pyVmzAJu+dm3JhwXNI1N2HuGmgrxvZD0THcb1zVBb4IEmKNigBbH 1B35RmT9MSl4JcXZHa9RzP471TxvNQGy4M5rMnobY7gvSsMHmv/GOMC7qkk4zP/+ILNK 9+BOz+1S8TUkj3gorPfxoOoiVln1FUwZceG0JY6AwdVHZhOcYYrTPKEMPw1cf5e9sVtw bNLDcHSSynIyWGHWwnEV+RZLXZgSXMiCnfD1EA8nUaLo4czLzR5TFZ5M8GQbA7FydUv5 stnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=lDYxbZe00LIEbZybUVITUvkhRFCHEVCyVrjLZoKn2iY=; fh=6yQmQ+x8qkWCxol+2VsykPXPVeW30bYKm83mherflU0=; b=vTYQnEQxyr1cVTw+BO9WnHmu0Oi+JJQF2crt0vD1q5eNKweLBqNdVjst06zlM+EK7m EZUtHlgE7jgMlz882qH7GthYL4Q5Qbf/FovH4n5q6CawqS6jUk7NkZ1eSDB+nNcw0bFI Euwcxnzoa5mY4CO78jaixJ5Vhx9MoNpL/WlC38pEiHss8gHHzFycrzAH4HH5hwToz1oV m6zMhFXPhDhlO+huqjCHlirdo6zvockzhnz9lrIj+5FCoxeNLhsueK8pHFHmrVDw/6cI t2HCkHzAZPzswhihogNSkEOAmiRwqFrxqk7twP+9l6T4PnBGPGCj4TeB8vetNAnC9BlF BxSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BnMWwYMr; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-155382-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cq9-20020a056402220900b0056e2a157a9bsi7507932edb.552.2024.04.23.07.34.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:34:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155382-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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BnMWwYMr; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-155382-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 786FF1F216B4 for ; Tue, 23 Apr 2024 14:34:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05A528593E; Tue, 23 Apr 2024 14:34:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BnMWwYMr" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 9170F17BA8 for ; Tue, 23 Apr 2024 14:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713882866; cv=none; b=nRkzVIkwR9eK9EdMj3/ipXfxoY5YXLfEFXSqsiWAEemPp5PI3GD+WDTkmhoy4jzAbxq4KhNF26XRfyej+h/MQVWFEs93QZ1LHaUVutijuOAwfZqI8zmWytTAsUQqTKDBTqSRObZ5UwoM9z7p8raleOnggckdWPaKymXrPGmh/pw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713882866; c=relaxed/simple; bh=lDYxbZe00LIEbZybUVITUvkhRFCHEVCyVrjLZoKn2iY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=aOA+JZXm0siYx6r/wKr9UjfQgFGTKaiAsG2yoVhR1xJM2blvbr36dwP3RnF6C0Q1ATu4zrHiQe4OtNvFuoGk23MuZn+EMx07TLEQSGByUwf09raz6llSVEp/NgWTbfUTVXOMk5IJhqsMUZxI0ZMQQEO46Z0zTaQ5OX1vWIle+MY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BnMWwYMr; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713882863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=lDYxbZe00LIEbZybUVITUvkhRFCHEVCyVrjLZoKn2iY=; b=BnMWwYMr/1Ik6ieMqambxar2J4JbgzjDbZJKE6tVwJ1eTD0vL1ixtXA4T5WDHAtR17sLuq htWjF2n15Qbf+yU2Cw2ZwJ6TZwqUaUJaaCnNa73OjYHF1dNmdk0KeNdzPiWnCO2GJuX4QF oEfYqqPJZlawyrbHX8QAmJkAn0ReHnE= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-423-SCjL2gV_MWazcJwF0QQJFA-1; Tue, 23 Apr 2024 10:34:22 -0400 X-MC-Unique: SCjL2gV_MWazcJwF0QQJFA-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-418265e9717so7070905e9.0 for ; Tue, 23 Apr 2024 07:34:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713882861; x=1714487661; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lDYxbZe00LIEbZybUVITUvkhRFCHEVCyVrjLZoKn2iY=; b=JHHeNtkv9veVhkRboFnL2k5qXnrGnraMsTj6HsoB/O1nsDJcJ7tgccg7iz7LEIkvFU qgGGHk8JdoFO3+CDTOhx6yJsueZPlohv82tdEY9pDnVX+AihtHQ07jWXuQSAI2Kfwp8k TLPYzfLlV8MMfWZHSLYV9nMjMNRJvCb8ZBSMPIwVdfVtNCsN0mNhvL9jhpVJwwbFdxaB 3Ju9k3jbQBGokgwbFLkB93LMYqy3LwVUh1DCaU4/V3n20z8PJp5I5E8DYTCCOHE2GEbY v2WwFnc2dKefv0JR8l4ayHcLdDwi2c++4GBCmVxe6EQf6paSaQsDRQCc9GooZZrh8Io6 91Lw== X-Forwarded-Encrypted: i=1; AJvYcCVHhPu3QGqyw/0enHNOkulpHFO6XDchRYVNHEqYHuVRH07dtz4p/WvEafuvKP88hgZb8lUnRktQ4ui2Cuonxaf9TLvrCeFycnz76PcI X-Gm-Message-State: AOJu0Yyeq73YuO5lguwGtRslMONFQiiJHwiOl4PS2gY9Xw7AefGhk+2D w2rWRUvguEU6cdTdhctM1MV4gmx0TQqcQySZ21WQIjbduqPLKHGXArjtnNravlRku20RX4X2o8m dnb590ZyINCnZffNTPmUbcb6EVarxdouQkB5KbqKzhq2yvM+RptkX0E/CBA9lldmG0QIbyA== X-Received: by 2002:a05:600c:468f:b0:418:9941:ca28 with SMTP id p15-20020a05600c468f00b004189941ca28mr9276389wmo.2.1713882860803; Tue, 23 Apr 2024 07:34:20 -0700 (PDT) X-Received: by 2002:a05:600c:468f:b0:418:9941:ca28 with SMTP id p15-20020a05600c468f00b004189941ca28mr9276370wmo.2.1713882860423; Tue, 23 Apr 2024 07:34:20 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3344:172c:4510::f71]) by smtp.gmail.com with ESMTPSA id jg1-20020a05600ca00100b004183e983d97sm20248859wmb.39.2024.04.23.07.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:34:19 -0700 (PDT) Message-ID: <97f10c8b5b615eac8f65d67ef10928d97b6b760d.camel@redhat.com> Subject: Re: [RFC] net: add TCP fraglist GRO support From: Paolo Abeni To: Felix Fietkau , Eric Dumazet Cc: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , David Ahern , linux-kernel@vger.kernel.org Date: Tue, 23 Apr 2024 16:34:18 +0200 In-Reply-To: References: <20240423094117.93206-1-nbd@nbd.name> <63abfa26-d990-46c3-8982-3eaf7b8f8ee5@nbd.name> <7476374f-cf0c-45d0-8100-1b2cd2f290d5@nbd.name> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV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UTpoyT3xwAzkmSxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-04-23 at 14:23 +0200, Felix Fietkau wrote: > On 23.04.24 14:11, Eric Dumazet wrote: > > On Tue, Apr 23, 2024 at 1:55=E2=80=AFPM Felix Fietkau wr= ote: > > >=20 > > > In the world of consumer-grade WiFi devices, there are a lot of chips= ets > > > with limited or nonexistent SG support, and very limited checksum > > > offload capabilities on Ethernet. The WiFi side of these devices is > > > often even worse. I think fraglist GRO is a decent fallback for the > > > inevitable corner cases. > >=20 > > What about netfilter and NAT ? Are they okay with NETIF_F_FRAGLIST_GRO = already ? > >=20 > > Many of these devices are probably using NAT. >=20 > In my tests, nftables NAT works just fine, both with and without=20 > flowtable offloading. I didn't see anything in netfilter that would have= =20 > a problem with this. I see you handle explicitly NAT changes in __tcpv4_gso_segment_csum(), like the current UDP code.=20 The TCP header has many other fields that could be updated affecting the TCP csum. Handling every possible mutation looks cumbersome and will likely reduce the performance benefits. What is your plan WRT other TCP header fields update? Strictly WRT the patch, I guess it deserves to be split in series, moving UDP helpers in common code and possibly factoring out more helpers with separate patches. e.g. in __tcpv4_gso_segment_csum() is quite similar=20 __udpv4_gso_segment_csum() - even too much, as the tcp csum should be always be updated when the ports or addresses change ;) Cheers, Paolo