Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp115436lqf; Fri, 26 Apr 2024 01:00:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZIH61a3aCASpY3t3KiY1REW2zsmDQbP/A4Pmvm3yjIwjDP3QorliAbIioVWb0L/adCrzIvLCz7SvazXgbhfLw7cCXxICVme+Tgy7IuA== X-Google-Smtp-Source: AGHT+IFNaBKpa+vt4m0g1VwWsT007I8DUFCZFedx+6JX5IfOGDHbwvlYwpbjq8aaQJBDS1eNEQEQ X-Received: by 2002:a05:6122:30a6:b0:4b9:e8bd:3b2 with SMTP id cd38-20020a05612230a600b004b9e8bd03b2mr2368026vkb.2.1714118447013; Fri, 26 Apr 2024 01:00:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714118447; cv=pass; d=google.com; s=arc-20160816; b=UTczLFa2hIiXqmevNC4O6V+g3jAESKCwlpEKMq55bVeZNnIDkoG+h4AVGZM3WddE7U /kaK0zDAKrqIyRyvKLfrwvhKbq5YuDkqwCHPnQdeQmrfq0XKCVvMdz9+8HM+zTpdq3vO L35H8Y3DUOPU+vvD/8KraZzyMyEvIUnrGNpFTmFXhzgNjlNzoKWXLPVk21PdLuHwroAz qsOGZyINHKt7QTX8rqJ3QuTl0ND8xze1nKXS4hnNSpC1Yni3nvwPiP8fIs/hasGjHUIA BTgtMwbOIB6ps06QZd2danTgshJJNaO5N6AvsamrdY0af9UAqprn7loFsESAH4M7HYf9 wJ6A== 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=I4jyXyyAi3QZnASgYGGXmnwFXyQmLri5sJPLHXDrOcE=; fh=5gxvU9SB+2998JNz+KRII+jRzjwzxcuX4ehCeQgVRfc=; b=c4DsCfzZxw3fvfyf0BhhOLCRNSvD2aue0Kv2pSgPxr+70Cn2bT3hGdRdkO0awQF2Ni dUFRVnyTLywRLoOqws++qMvnmXcImnAN1Bx0WL/pq8xXyjL66uPPsfrJ906sUEaPk6rj o4eh0UktPlUela0vrWPjmaeuzTqyA6+0eqAsk1DfoxpJvauf8DoNUoUV3fLRPaz8dF9O cigi7I3c7Ua/Hpge39vIciNqWUPu0m3YGYXRiibmmkJvN2l8utdBPPWqwOUpZSp5uUxU FR2DxCWzP44iSzjC4bE68Lh5pDAKQLePJ6FWVrZPrgWFt6cqD3RMvB/kg8mcZXl5kmVT 55jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GdOJm0S+; 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-159669-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159669-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id cz17-20020a056122449100b004d8957a5720si3527968vkb.259.2024.04.26.01.00.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159669-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=@redhat.com header.s=mimecast20190719 header.b=GdOJm0S+; 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-159669-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159669-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6CCC31C212B2 for ; Fri, 26 Apr 2024 08:00:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A90C113C8F5; Fri, 26 Apr 2024 08:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GdOJm0S+" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 2E22413B7AC for ; Fri, 26 Apr 2024 08:00:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714118430; cv=none; b=FnX8/AySZWtJT9xfsC0P/0d34ISZY7y8Fh+xRTxJTGb+AB9gmYzo1GqKkHOTwu/d12sKEkajigLcqTuZ9ZKeKs0FTN+OOYrAFGqcNqfyigIXdtEXKmxLQhIdvLsklOQjBmr+hA2poQwPWemEBb+nk+PTePXK2KnLTEm9B7j+XzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714118430; c=relaxed/simple; bh=I4jyXyyAi3QZnASgYGGXmnwFXyQmLri5sJPLHXDrOcE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=GBut/yQyO3u8BgdzitQj84zW5Ju/ofOOcj78uctVFZJhRBe2iBlVRXozAMf1JE/Bm1I/PmfiDwthDFY+tPpplA+YoWx9rJ4nERIDdn/g29W9aHcw2bTDtpn01UwPTcDzQ7eX2XVMCLlZfYCTqrjaig12Acb9ftELUpgf1IEyzpY= 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=GdOJm0S+; arc=none smtp.client-ip=170.10.133.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=1714118428; 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=I4jyXyyAi3QZnASgYGGXmnwFXyQmLri5sJPLHXDrOcE=; b=GdOJm0S+V/tIdGxh7uf9oGUN87qJuSHeW68xsSOp0QZmDcretwTgFt4+vfrhuDgH9sh30x g07Z7ki3+0frfYtH0vCGDPdROwjOsCecZ9WeJ8thbdWpacXLGXhYezG990xoNHuVDWjBO5 wL+Mzxacrkzm6kLow5A9rd6i9Ljrm24= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-120-hTk7tO6ZMK2u6twcdo7SFg-1; Fri, 26 Apr 2024 04:00:26 -0400 X-MC-Unique: hTk7tO6ZMK2u6twcdo7SFg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-349d169170bso242792f8f.3 for ; Fri, 26 Apr 2024 01:00:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714118425; x=1714723225; 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=I4jyXyyAi3QZnASgYGGXmnwFXyQmLri5sJPLHXDrOcE=; b=UnNNqbvI8c4dcicDfDQATyBu4SwRrHSvMSxOHFxKZ2T3cSVbf5y8cP6MkyYL4pSs4x 89CxgLJO0g2PRYEBUVKz0MFwTBOkM2+Jc1W5JPF7Lbq+z/v2wepfGlf7PHLn9QAuKO6F p0qEOJpOWrBDbk832RcRBVIx4InJ5+T3GUvNPOY2JxiGN/yyEex8l/lHt1NfVCKbVVWx VCRW/2D90Tcve/jAEmQsWl3snQlNwFToeFZ5TkeopCVQDct/ppQIbFzGVJ4cB8FteABY yrrzSmtIutpmHC+yn7mkAchmkVG39J7NLOQQ4qEMMT3H4oJqsl15CXhJhrX/lID9rK4j blLg== X-Gm-Message-State: AOJu0Yw15XPDuna5EH5uYSYRalq0dp6seVckMfdtDmVuWcodYokAz2aF Q9uNYsafVUoor7uj3ULWA6EfxI2UWD7MGJOwV4sD3bFPo5l6RcxWytaIM3qCnID1F7E1oKg+7R/ QjHcXKDrKf10dl4nyCeU0crRtHnKApc5Htk48LFIuhpKnNJXcExTcLtPNrXtiTg== X-Received: by 2002:a05:600c:4f13:b0:41a:c4fe:b0a6 with SMTP id l19-20020a05600c4f1300b0041ac4feb0a6mr1425662wmq.4.1714118425386; Fri, 26 Apr 2024 01:00:25 -0700 (PDT) X-Received: by 2002:a05:600c:4f13:b0:41a:c4fe:b0a6 with SMTP id l19-20020a05600c4f1300b0041ac4feb0a6mr1425635wmq.4.1714118424976; Fri, 26 Apr 2024 01:00:24 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3344:171d:a510::f71]) by smtp.gmail.com with ESMTPSA id r14-20020a05600c458e00b00417e5b71188sm29990437wmo.34.2024.04.26.01.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:00:24 -0700 (PDT) Message-ID: Subject: Re: [PATCH net-next 2/4] net: add support for segmenting TCP fraglist GSO packets From: Paolo Abeni To: Felix Fietkau , Willem de Bruijn , netdev@vger.kernel.org, Eric Dumazet , "David S. Miller" , David Ahern , Jakub Kicinski Cc: linux-kernel@vger.kernel.org Date: Fri, 26 Apr 2024 10:00:22 +0200 In-Reply-To: <1bc0ac3d-b18d-4969-a090-6803fa4dd5b4@nbd.name> References: <20240424180458.56211-1-nbd@nbd.name> <20240424180458.56211-3-nbd@nbd.name> <6629c805d808e_1bd6b029424@willemb.c.googlers.com.notmuch> <1bc0ac3d-b18d-4969-a090-6803fa4dd5b4@nbd.name> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB/9zPvVq8xfiVbdT0sPzBtxW0fXwrbFxY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vDOKsywfs5HMiUZhLKoZzCcU/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 Thu, 2024-04-25 at 09:51 +0200, Felix Fietkau wrote: > On 25.04.24 05:03, Willem de Bruijn wrote: > > Felix Fietkau wrote: > > > Preparation for adding TCP fraglist GRO support. It expects packets t= o be > > > combined in a similar way as UDP fraglist GSO packets. > > > One difference is the fact that this code assumes that the TCP flags = of > > > all packets have the same value. This allows simple handling of flags > > > mutations. > >=20 > > Can you clarify this some more? We expect potentially different flags > > on first and last packet in a TSO train. With fraglist, the segments > > keep their original flags, as the headers are only pulled. When do > > segment flags need to be replaced with those of the first segment? >=20 > Maybe I just misunderstood a comment that Paolo made earlier regarding= =20 > TCP header mutations. Will review this again and compare with regular TSO= . I likely was not clear, I'm sorry. Let me try to rephrase. After the GRO stage, and before segmentation, the stack could change other fields inside the TCP header (beyond src/dst port). e.g. nftables can clear the ECN bit, or strip all the TCP options. The frag_list segmentation should catch such changes and update the individual segments csum accordingly. Note that even IPv6 could snat/dnat a packet! The GRO stage allows aggregating with different flags. Later on, at segmentation stage, all the individual packets except the last one will retain the same flags of the first segment, except for the PUSH and FIN bit, that will be cleared. The last segment will have such bit value preserved. Cheers, Paolo