Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp277471lql; Mon, 11 Mar 2024 02:18:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6ueWrLSsv8nF6JjK6XTM+ag/Vi3oJzotNpWzNu7UY3VqdbST4RcYBBt8eXSUxmOjFG+XtebFDXjogA1i+ER2Tez8zUsQTL9eaVGq5ig== X-Google-Smtp-Source: AGHT+IHFr4CtYx9a6FcraVIELz2qKWuql+8LJho0C++idhi5yg1AKlyuU0XXVI6iwpX+shj6zH+I X-Received: by 2002:a17:90b:251:b0:29b:972a:4990 with SMTP id fz17-20020a17090b025100b0029b972a4990mr3569065pjb.29.1710148727349; Mon, 11 Mar 2024 02:18:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710148727; cv=pass; d=google.com; s=arc-20160816; b=fqqI/3Izpt09hIOpAqYbYzyBckcn17x1aLRxNdeHh1kZEF9oy0mA5ayILFELHbyYA4 bF/amsh4goPWYHEZx4YHsF3NOHHQvVjZEYRBb5Tz8q8jm5i4bnAIUHBerD00daSKdumw A4VucBSs0TRAF3uMzox8XeHf/HX6mq7Z+ZqzYDff3p6JJyvMW4tKq/nUK+YLmj3zzpjP O+j1PPVH7SV9/raTlkXz0OH/ItmW93VbSqi9Y/iC27Zr5tm+ZUXKxP+KibPyiPvKOeZN HW8wHAcZu2o+HoIFiX0u5hkY5M90c9k9NpE+eTSSwYVL9fzH+oJjcLa8gsUFlzhAcksc 4/Mw== 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:subject :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=JbqKzLJ5nYzAiRDltlyNyfUgOESvxNq1tUNr15ZO288=; fh=e5SdwvZOaZxaoI8k2CNX5MWZYt7f/QSj24BKi1rrJoA=; b=MwyZpHS40ksUriCPTxe+bDs1oZXVUEh5SgnL0aZrLv21BAyGw2+Nybl+oYsmNQVNDL C1uTBt3HO5SN3y0XynRFpLZlYS5XQBxkT6zlXPHaKEdZflbUMtOerDlVA8GAoMSGQMwT xbHNmp/sZWeQYt7wCHRtj461ll7KG6HcnxWbOJopjTciMk8wr7KAorSYPqVdk/YgPwq6 WsM8vi56yH5M8+O/eUDOhiuAJEfKHO55EUsgLmV5GxdqTLoLb2tAMFqIKCKDq7DTX0zv BBKP7236tzuBiuCvuhucVedNvdyO/KzsqwdKteJOh7BljCqpOdXIoizYdA7JnNMmfGsp ZjIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="YoNP/pKR"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-98600-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98600-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x4-20020a17090aca0400b0029b9ee66252si4504240pjt.180.2024.03.11.02.18.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 02:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98600-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=@gmail.com header.s=20230601 header.b="YoNP/pKR"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-98600-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98600-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 D7997280C46 for ; Mon, 11 Mar 2024 09:18:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D5C31755B; Mon, 11 Mar 2024 09:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YoNP/pKR" Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 BB8B511725; Mon, 11 Mar 2024 09:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710148716; cv=none; b=OTlMUlsNwqQIC4XGcEm2ZAZpLet9g/gTlBQEX/kEaGEb9yEwaZMhAujQSIp4+tNU2o66nllbtqeOb7RtxgZfXUfact+J2KPOwR/ic50MSHekqhWrxo29nHxaW8D/Gt23tSVlV5TFohTYp5JZ6Ie8IVMPCLjOpx6gyGbqC+VxPgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710148716; c=relaxed/simple; bh=J4jr8Nj1C74GgqQYi+iZpfykkkAoiiD0M5AXL0/pJwQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=O7kT/6X/2/8r1oiAKp9fRZaLv0YFt1rCtiMsoGULlGJgwVCCkuERHteDtKQ/OPbH/d2wLxOHEKXo574niIIxb4Rka5bRRazwS5ZxrNnHsdqUZLXxRR4o3L2G8dhsydoyTZjeL5XNAU8ujIXiiVMJY6jn6nAX7446HMc8Dmc5etI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YoNP/pKR; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4132a436086so3808925e9.2; Mon, 11 Mar 2024 02:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710148713; x=1710753513; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=JbqKzLJ5nYzAiRDltlyNyfUgOESvxNq1tUNr15ZO288=; b=YoNP/pKRhnzKC6sRXr9m83SY678QVF1oz8XYV9XkZkmsw5Tnae95actDvA6UY0XJcS 9EMW+okI2l123VqzwGHph5MUrNF71hr/+qOrwesmwU4BuAbjAjfu4PbqRN77+WURDXip /6UZSCAD1SFNr2uypSxIXG09oXnNHQ+KJY+/hCDL++jJ0yODd5stonmKoeUi6W8/3tNj V359DrN6e2oeDzHHmrc3P1nz/Xmns51TUrM50BIcRgStqAofg1FOe1E+kbyM5LjEwhUF Eb+IaADh/nDUsuQTior7DXiXuOcKqwUZgxJ62ppdYderhLJHzfJzGWDa8UXoIpkjJlBt Eg7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710148713; x=1710753513; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=JbqKzLJ5nYzAiRDltlyNyfUgOESvxNq1tUNr15ZO288=; b=LziIExIbc4rzgmeaiuwnuCqN0JTv8ts7w0cpxHAviTKp7S+Dsmz7C+P8k79Dwkg1Nt z53madpNJDUMVz7Ock51i5iNHtV9AxH2rnOCtzgx2DouFFknP1ruHtF8QndtJSFv6VgH PCgNlnLHftxqbqsOc89Nny87xjyZETZfBn+ULk7q9yZfHsmtSugOiOBu8omLa4fMbVxk iDKRAbwnpEhIrAhTveTIOtRW+hKNll9wtm6xn+Of9Z4DYjEBh+zbEPTnh7nrB2xliVVk 41+8P36eBfV+uqQb3x87+ysZM/ydSDWBd1Oy1eebDGgQNfHev0plpTE09f0kxnnqP5aT GPSQ== X-Forwarded-Encrypted: i=1; AJvYcCVsdT2x6iKnMeodft4kuFJv97z7RWMobZZxH4+LiQ3yLhoSr0hUmR7s+PmIP/11QcEgNOlGhsRDWH3fjerVrlhIOJeSVxlyqP054G6jZk8FbmKEXa/3T+gLcPrECnQE7MpGNkLVHOEPWOJ2qOeuwlXEuCpWj02dJOemCbxhV8VmRFTfGYRA X-Gm-Message-State: AOJu0YxD5viyIKRFx/SSi8Eh2qC20W9r1FOJDk6O3p9etTKpaormUGKJ LSzxQpxmU1ovFkuH2yAB5uopz9FcPXRXrerlXyaYfunY8LmqfGdl X-Received: by 2002:a05:600c:3556:b0:413:1013:cc7f with SMTP id i22-20020a05600c355600b004131013cc7fmr4250696wmq.29.1710148712913; Mon, 11 Mar 2024 02:18:32 -0700 (PDT) Received: from debian ([146.70.204.204]) by smtp.gmail.com with ESMTPSA id l18-20020a05600c1d1200b004132f3ace5csm269938wms.37.2024.03.11.02.18.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Mar 2024 02:18:32 -0700 (PDT) Message-ID: <967ed173-b556-4bfc-b3c8-ff0fc902b951@gmail.com> Date: Mon, 11 Mar 2024 10:18:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive To: Eric Dumazet Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, willemdebruijn.kernel@gmail.com, dsahern@kernel.org, xeb@mail.ru, shuah@kernel.org, idosch@nvidia.com, razor@blackwall.org, amcohen@nvidia.com, petrm@nvidia.com, jbenc@redhat.com, bpoirier@nvidia.com, b.galvani@gmail.com, gavinl@nvidia.com, liujian56@huawei.com, horms@kernel.org, linyunsheng@huawei.com, therbert@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <88831c36-a589-429f-8e8b-2ecb66a30263@gmail.com> From: Richard Gobert In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eric Dumazet wrote: > On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert wrote: >> >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are >> relevant only to tcp flows, and as such they're used to determine whether >> the packets can be merged later in tcp_gro_receive. >> >> These checks are not relevant to UDP packets. > > I do not think this claim is true. > > Incoming packets -> GRO -> GSO -> forwarded packets > > The {GRO,GSO} step must be transparent, GRO is not LRO. Sorry, I should rephrase myself. The patch preserves the current logic in GRO. These L3 checks (ttl, flags, etc.) are written to NAPI_GRO_CB(p)->{flush,flush_id}, and NAPI_GRO_CB(skb)->is_atomic - and all of these are currently used only in tcp_gro_receive.