From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 4/4] tcp: Update TCP checksum using an iovec array
Date: Wed, 25 Sep 2024 17:31:56 +1000 [thread overview]
Message-ID: <ZvO8bELp6VM8XQnv@zatzit.fritz.box> (raw)
In-Reply-To: <61d4aaa5-8701-40ac-8810-08c2e28c43cf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
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.
>
> 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.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2024-09-25 7:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 15:46 [PATCH 0/4] tcp: use csum_iov() in tcp_update_check_tcp[4|6]() Laurent Vivier
2024-09-24 15:46 ` [PATCH 1/4] tcp: Use tcp_payload_t rather than tcphdr Laurent Vivier
2024-09-24 15:46 ` [PATCH 2/4] pcap: Add an offset argument in pcap_iov() Laurent Vivier
2024-09-25 1:21 ` David Gibson
2024-09-24 15:46 ` [PATCH 3/4] checksum: Add an offset argument in csum_iov() Laurent Vivier
2024-09-25 0:51 ` David Gibson
2024-09-24 15:46 ` [PATCH 4/4] tcp: Update TCP checksum using an iovec array Laurent Vivier
2024-09-25 1:12 ` David Gibson
2024-09-25 6:40 ` Laurent Vivier
2024-09-25 7:01 ` David Gibson
2024-09-25 7:27 ` Laurent Vivier
2024-09-25 7:31 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZvO8bELp6VM8XQnv@zatzit.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).