aboutgitcodebugslistschat
path: root/contrib/qemu
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2026-06-05 10:34:16 +1000
committerStefano Brivio <sbrivio@redhat.com>2026-06-05 09:46:52 +0200
commit21f4d13c4cd4db24b65926265c98d5f41f0c6a9b (patch)
tree626b588bbfa5081430a4d71283b5dc225f93389a /contrib/qemu
parent31d0893d47e3d147b3a1597bbede7de65281a62f (diff)
downloadpasst-master.tar
passt-master.tar.gz
passt-master.tar.bz2
passt-master.tar.lz
passt-master.tar.xz
passt-master.tar.zst
passt-master.zip
tcp_splice: Improve EOF and read stall exit conditionsHEADmaster
At the end of our loop we have a conditional 'break' that exits if we're at EOF on the read side and have nothing left in the pipe. This makes sense: at EOF there's nothing left to do read-side and with nothing in the pipe there's nothing to do write side either. The same is true if the read side hit an EAGAIN and the pipe is empty: there's nothing we can do (for now) read side, and with an empty pipe nothing write side either. So, generalise the condition to exit on either EOF or EAGAIN read side. Furthermore, if the read side is at EOF or EAGAIN and there's already nothing in the pipe before the write-side splice(), then that write side splice() can't accomplish anything, so exit the loop early in that case avoiding a harmless but unnecessary write-splice(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [sbrivio: Minor comment fix] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/qemu')
0 files changed, 0 insertions, 0 deletions