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=CtlXhSrL; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id CD5285A004C for ; Fri, 27 Sep 2024 08:22:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727418146; 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=E9Hkr2NAriWGt2Nc60X7yyCzZZs4JhRA2Y75m0k3lZo=; b=CtlXhSrLeeTQspV/FFNUJ6ijRI9KizC8kz3LUhdAIQQJ/UALLpaSVbmr7BsoAb8PVwOzEn lQc8kXog62oa7BGB95b+I7CW29lAT5D0ivSHnIY6SKJ2Q1cgAOZ61P+4kppLNteJQpJTp2 PGVaF4LNIBcG5CGd8y2NK14lrb79vgk= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-GbAl7eI4ONOCdtl5I0izyg-1; Fri, 27 Sep 2024 02:22:24 -0400 X-MC-Unique: GbAl7eI4ONOCdtl5I0izyg-1 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-718e82769aeso2725533b3a.0 for ; Thu, 26 Sep 2024 23:22:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727418143; x=1728022943; 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=E9Hkr2NAriWGt2Nc60X7yyCzZZs4JhRA2Y75m0k3lZo=; b=V72fX34AkgkdN6hd0SbnUGs2miQNAUZumJw+d+JK5g93irDMBDlt9ga1Olg6H1IsRu IwNSZf5zZW5hPDJfNZuKsLWUifV832TcUS3ihnQ7nLvIvC6KEznq2/wn2Y1BQxirAJ3p 4v+fJCAyX6GAnhIPSzb68RJhjU7yMzFKyhnY9uO0pHYOujXErKaOoq3mlNJvLfJw2q7w uoapLqFzLIXenkQcOYViLOFXB41gQpchM3Irpz8T+YpRx0/bNLXLd/Yp0RR+cE/L89r2 xLOsue4SRy0prL2P7CNOWDwVJvUprVH5ucpgxMcZ1gLmjbO/MLNwO6amCZbte8+IqL6a UIDg== X-Gm-Message-State: AOJu0YyqCnCAhps0oc3i9FM3RE7k9h9NbM9zVtD08NZ6CZqPug7ISka4 e87G43KBFo7OFm+KzWOczI4TKLlcDALs7r3MRTGxzem+HNRNlSxGJLa/C1Eb6GdUnJrrhzP7wyC 9gBZ+mJ9iLf7T4up1HGMsfRSgOB/botVZroJEN8ony6OtIJUZ3g== X-Received: by 2002:a05:6a21:1796:b0:1d2:e78a:cab with SMTP id adf61e73a8af0-1d4fa78e8c0mr3140506637.35.1727418143408; Thu, 26 Sep 2024 23:22:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFghn9mqN2VosDzGaMNugd21C9/Ln5yf20ZB2bhz3L6kCcOWPOMKBfJ358tCl2wE2moZs3rgg== X-Received: by 2002:a05:6a21:1796:b0:1d2:e78a:cab with SMTP id adf61e73a8af0-1d4fa78e8c0mr3140479637.35.1727418142931; Thu, 26 Sep 2024 23:22:22 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b26515ef9sm858502b3a.134.2024.09.26.23.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 23:22:22 -0700 (PDT) Date: Fri, 27 Sep 2024 08:22:19 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v4 4/5] tcp: Update TCP checksum using an iovec array Message-ID: <20240927082219.1c3cc788@elisabeth> In-Reply-To: <20240926140415.441208-5-lvivier@redhat.com> References: <20240926140415.441208-1-lvivier@redhat.com> <20240926140415.441208-5-lvivier@redhat.com> 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: 366K3VT4IZBEJNQDU3HIIXWA2GYFU3O4 X-Message-ID-Hash: 366K3VT4IZBEJNQDU3HIIXWA2GYFU3O4 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: passt-dev@passt.top, David Gibson 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 Thu, 26 Sep 2024 16:04:14 +0200 Laurent Vivier wrote: > TCP header and payload are supposed to be in the same buffer, > and tcp_update_check_tcp4()/tcp_update_check_tcp6() compute > the checksum from the base address of the header using the > length of the IP payload. > > In the future (for vhost-user) we need to dispatch the TCP header and > the TCP payload through several buffers. To be able to manage that, we > provide an iovec array that points to the data of the TCP frame. > We provide also an offset to be able to provide an array that contains > the TCP frame embedded in an lower level frame, and this offset points > to the TCP header inside the iovec array. > > Signed-off-by: Laurent Vivier It looks like you missed David's comments from: ZvS8wXSMfoexsqXr@zatzit.fritz.box https://archives.passt.top/passt-dev/ZvS8wXSMfoexsqXr@zatzit.fritz.box/ Other than those, this looks good to me. -- Stefano