From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K2MVaRLX; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id CD80D5A004E for ; Mon, 28 Oct 2024 19:43:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730140980; 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; bh=ocMdM+vd6de5//QLqGVDOkDfzu0vm31HVpK2rufGiaY=; b=K2MVaRLX0L0/ekiyqheMlYeuv1OozZ1CUqIuQ3xqygTwNq6NkxybFgtZm+SA2loGNfCcq3 kUO04PFxbznd0dZCYlsfgyke2GD+dnPHWnruEFqY5z7n9etR9f9nOX9tMMEsdrL9zQMhxk I35h8eD8Sgkfo0RtWA/SQ1sfjlNNXZI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629--hd6dxzSNO-esHTlgKZ87w-1; Mon, 28 Oct 2024 14:42:59 -0400 X-MC-Unique: -hd6dxzSNO-esHTlgKZ87w-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4317391101aso33411175e9.2 for ; Mon, 28 Oct 2024 11:42:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730140978; x=1730745778; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ocMdM+vd6de5//QLqGVDOkDfzu0vm31HVpK2rufGiaY=; b=AvBa2hL0o4zhZd5xcpSRCBhHijgS8v4wBu5+TGaAafr5CIAt31Dr1iWZ8mL8wf3qOW ez2LNiUOH1qLhp1/Z44G+grS0HtSWSV2XkhCEOZSrkegdaQIOQRDC9TVlbuiuhvkYXqV c/zFcGFmbUMh2M7sXvt5Wc9rEuETbLGGXxuDMsYWjZ8wPUZTXTF0B4a5xk6N1lC1EK7A Qy9bybjRoOdneKSDtA0xIOpmZID1l9o/u4jESyPaOR5jeiJwTB4dQrYP8FuAEO7aqG69 rrhrRps4CIhJefAxYayo+LvC47XTECwhaPqV8bNyxySF8KmnVoMHy1DZ4GsYYVzH53SC es2w== X-Forwarded-Encrypted: i=1; AJvYcCWCjlmy3BSivadNkxpkTosVyXnJMnWTHD6XIdrstcKM7t5e49L5N9ocivO8lhoea9lFa1ET7bBeKZ8=@passt.top X-Gm-Message-State: AOJu0YxIybi4NYnIljKdoF1zuCfU8Ges41n5o3I4EhaIX6tYGuBzypRX CKCXErUnUNZJNBidAqGqDw4yaDz5g6vDP2dKFhSr8oGsGWShSbsNFYt9A0rzCXhKpNZ/M1qqrbc dhK/Kc4YYbr94tCacCHkFQY3I08K2ssmObznjJwQ1nwOcOzcdeQ== X-Received: by 2002:a05:600c:4e04:b0:431:5c7b:e937 with SMTP id 5b1f17b1804b1-4319acb42cemr94605155e9.17.1730140977829; Mon, 28 Oct 2024 11:42:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBlFL4lc6rqhd3DOkEgilCMsPALb1RZMftRxTMTlHB53RQ+G9eQg5L4KfbkUZaQv55WUwmGw== X-Received: by 2002:a05:600c:4e04:b0:431:5c7b:e937 with SMTP id 5b1f17b1804b1-4319acb42cemr94604985e9.17.1730140977468; Mon, 28 Oct 2024 11:42:57 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b55f689sm148845445e9.16.2024.10.28.11.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 11:42:56 -0700 (PDT) Date: Mon, 28 Oct 2024 19:42:54 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 1/7] tcp: Pass TCP header and payload separately to tcp_update_check_tcp[46]() Message-ID: <20241028194254.71df8d2f@elisabeth> In-Reply-To: <20241028094050.1609090-2-david@gibson.dropbear.id.au> References: <20241028094050.1609090-1-david@gibson.dropbear.id.au> <20241028094050.1609090-2-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: EUCYAFXOCLZQBSMRHMMZFZJLIBGVL5CD X-Message-ID-Hash: EUCYAFXOCLZQBSMRHMMZFZJLIBGVL5CD X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier , passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 28 Oct 2024 20:40:44 +1100 David Gibson wrote: > Currently these expects both the TCP header and payload in a single IOV, > and goes to some trouble to locate the checksum field within it. In the > current caller we've already know where the TCP header is, so we might as > well just pass it in. This will need to work a bit differently for > vhost-user, but that code already needs to locate the TCP header for other > reasons, so again we can just pass it in. We couldn't do this, and also what you're now doing in 5/7, because with vhost-user the TCP header is not aligned, so we can't pass it around as a pointer, see: https://archives.passt.top/passt-dev/ZeUpxEY-sn64NLE5@zatzit/ and following. That one is about IP headers, but the same applies to TCP and UDP headers. Of course the current solution is not elegant and it would be nice to find another way to deal with it, but we couldn't come up with anything better back then. The rest of the series looks good to me, but I'm afraid that without this one and 5/7 the other changes will be a bit more complicated to implement (if at all possible). -- Stefano