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