From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202408 header.b=EUTIPm97; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id DDDCB5A004C for ; Wed, 25 Sep 2024 09:32:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202408; t=1727249524; bh=wUACbxj/KeuYFkYvf8OR4c6wQw8uFDdkYtWLYZrG4GY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EUTIPm97sIw5naWHanrBF1DaedQ8NWzWUTZvwBEQwiHfE+Njba0RI6rgdzwzrpqLv 0zUN5m+h4JuskDS3JsubkoBjGEMxWsrbQI4lvlVftF2plGO/cT9AlJ7VevNA0Ucotn Uhf+gJ/qePL8UH0X3pS6B7ooxnmuUfgqQtiXI07BWxeDkwYBmLhASJGj3hu5L6BgJx +aKJGeyDZ+d8niONEO5fN4k3RK++Jo3TlH8mKQVwfTrOXGriBMiCpnRCJECXVn7c6V Ao8C3tTgVNgFGnmwKUIDofKHOcPbgt053ETd7+Uu2mKNEwD/InoTx7bQRkO0F/7ifH zIJXJAg3i/bKQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XD7j04ynjz4xPX; Wed, 25 Sep 2024 17:32:04 +1000 (AEST) Date: Wed, 25 Sep 2024 17:31:56 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 4/4] tcp: Update TCP checksum using an iovec array Message-ID: References: <20240924154642.182857-1-lvivier@redhat.com> <20240924154642.182857-5-lvivier@redhat.com> <61d4aaa5-8701-40ac-8810-08c2e28c43cf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jf8WjVguOQWJ7Oli" Content-Disposition: inline In-Reply-To: <61d4aaa5-8701-40ac-8810-08c2e28c43cf@redhat.com> Message-ID-Hash: QNCINHXQXT2UUHUVK5SKOJYTOMVO7PRL X-Message-ID-Hash: QNCINHXQXT2UUHUVK5SKOJYTOMVO7PRL X-MailFrom: dgibson@gandalf.ozlabs.org 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 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: --jf8WjVguOQWJ7Oli Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 25, 2024 at 09:27:03AM +0200, Laurent Vivier wrote: > On 25/09/2024 09:01, David Gibson wrote: > > > I don't want to write complicated code only to write the checksum of > > > the tcp header. > > I agree, but I think we should at least test and bail with an error > > message if our assumptions about the alignments of the IOVs were given > > aren't true. >=20 > Do you think an ASSERT() is enough? It probably shouldn't be an ASSERT(); that would indicate hitting it was a bug in past, whereas IIUC here it would be triggered by strange behaviour from the guest or qemu. I think a die() would suffice, though. Of course, just resetting the tap connection or even just dropping that flow would be even better, but given the unlikeliness of the event, I think die() would be fine. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --jf8WjVguOQWJ7Oli Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmbzvGsACgkQzQJF27ox 2GenMg//ZB6XJ6k0QFoHvhP+baRc2li/rznrP3sset86Tw+6IC0vYbXFr6/Vh7OH P6cu9yYXC/rtluaxh1I7aP2oDlukG072A8+qj9gDfyMT0PuevE5VIF62uzJ8OCHB aYDwu6OSKG21aaUDbbviDAwcKbYmkvNQQF/fZX2lIeayg6iQnmqJuWWso30ieW3M ABalqdP08Z72jzQcpqV+TbZxBqh1x7+uWO8KBQ6zp9S2L6Uazu4MGTu7ky+d+sVt lwoHfnAe/W3aJLuM1RI3YszGIBCNmKg9twKHXscrwZncJhUP6r8FOjl5J503M/oB CMqszRrKfopLGDQW09FVYUE1nx3I3oQXAIIxQxnzZcHPUxxrxxkMyzz8t6ZDtJfb +KqIIERMoj/QtUwtX/Y3yKNj8JzSHlE5SvLWCEHmq8+dhViCAgdXCR4JqF9X0rTX S65qya4Qr9st3qfWHfAWwAz8Kn2LEDNRmhZpr+NIDPJfPHsJzzzLuJZUTXZsk78c 3biJLFa985q/zprLIOYg0sHdQrpmuF3v3AifabiUHGJ96HHxHNNS+anaHCbiHNkU tmTRKde+T1QWwriGS2xsqj/qMr2nipq1N5239b2n52bIY8z9kuIaV6WVcTyqZx43 BB8L8k5QsUss2ONsvoEoqzdtrQoca2/RO7JlnNZ0jGmwsHzMpx4= =EgKb -----END PGP SIGNATURE----- --jf8WjVguOQWJ7Oli--