]> git.proxmox.com Git - mirror_kronosnet.git/commit
[RX] handle short write to the application properly
authorFabio M. Di Nitto <fdinitto@redhat.com>
Sat, 19 Oct 2019 06:47:27 +0000 (08:47 +0200)
committerFabio M. Di Nitto <fdinitto@redhat.com>
Tue, 29 Oct 2019 07:45:04 +0000 (08:45 +0100)
commitec962c18f74d2270d3a2b73df13c20ed7fc98516
tree6ffde5505e6cfb31689c2bf727c2a385aff10611
parentd3d06971d9bcb9b76b350459041c77c9270ec779
[RX] handle short write to the application properly

this change affects only applications that are not using knet
generated socketpairs to deliver/receive data to/from knet.

If an application uses a fd that is not SOCK_SEQPACKET (basically
streaming), we have to handle short writes accordingly, and knet
will continue delivering as long as there is progress.

The application is responsible to verify that the data packet
is complete as the delivery is not guaranteed to be complete.
The application can either embed the size of the packet in their
data structure or use the socket error notification callback
that will be invoked in case of errors or 0 data delivery.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
libknet/threads_rx.c