]> 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>
Sat, 19 Oct 2019 06:47:27 +0000 (08:47 +0200)
commitdecf2dfdb25f5ff01faf0e4ac67fd31fbe0674cb
tree9f09827072fbdadcae225497e4ba441cbfebdb4f
parent41401bc005f40256af8bfe6c47e51afa4106ac36
[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