aboutgitcodebugslistschat
path: root/pasta.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-01-06 11:43:21 +1100
committerStefano Brivio <sbrivio@redhat.com>2023-01-23 18:55:01 +0100
commit2d553b587ada1f2d0d657e516f3d068efa4db074 (patch)
treea67f3ebad8049984cfd336006fb502c787f7a06e /pasta.h
parent97d1ca2ed64e85a7f4094330d753d1b690374af2 (diff)
downloadpasst-2d553b587ada1f2d0d657e516f3d068efa4db074.tar
passt-2d553b587ada1f2d0d657e516f3d068efa4db074.tar.gz
passt-2d553b587ada1f2d0d657e516f3d068efa4db074.tar.bz2
passt-2d553b587ada1f2d0d657e516f3d068efa4db074.tar.lz
passt-2d553b587ada1f2d0d657e516f3d068efa4db074.tar.xz
passt-2d553b587ada1f2d0d657e516f3d068efa4db074.tar.zst
passt-2d553b587ada1f2d0d657e516f3d068efa4db074.zip
tap: Improve handling of partial frame sends
In passt mode, when writing frames to the qemu socket, we might get a short send. If we ignored this and carried on, the qemu socket would get out of sync, because the bytes we actually sent wouldn't correspond to the length header we already sent. tap_send_frames_passt() handles that by doing a a blocking send to complete the message, but it has a few flaws: * We only attempt to resend once: although it's unlikely in practice, nothing prevents the blocking send() from also being short * We print a debug error if send() returns non-zero.. but send() returns the number of bytes sent, so we actually want it to return the length of the remaining data. Correct those flaws and also be a bit more thorough about reporting problems here. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'pasta.h')
0 files changed, 0 insertions, 0 deletions