Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: d2e989476cc49c80c9d499d671459bd696f0323a
https://github.com/fabbione/kronosnet/commit/d2e989476cc49c80c9d499d671459b…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2015-12-20 (Sun, 20 Dec 2015)
Changed paths:
M TODO
M kronosnetd/vty_cli_cmds.c
M libknet/handle.c
M libknet/internals.h
M libknet/libknet.h
M libknet/ping_test.c
M libknet/threads_send_recv.c
Log Message:
-----------
[send/recv] rework handling of 0 byte read/write on local sockets
considering there is no obvious use case trying to send 0 byte packets
and that 0 byte packtes are filtered by iovec calls across the all
code, there is no point trying to handle 0 byte differently from
any other socket error.
this commit makes sure that every time there is an error (-1) or a 0
byte read from the locally provided sockets, a call back is issued.
on read errors (-1) the socket will be removed from the epoll
to avoid spinning and it is safe to call knet_handle_remove_datafd
afterwards to remove it completely.
it is now mandatory to enable a sock_notify callback before adding
datafd.
read libknet.h carefully on what the callback is supposed to do
based on the type of socket your application is adding.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 8c8d24f552bf36ce6626811ca558c92305da3b0f
https://github.com/fabbione/kronosnet/commit/8c8d24f552bf36ce6626811ca558c9…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2015-12-18 (Fri, 18 Dec 2015)
Changed paths:
M libknet/libknet.h
M libknet/threads_send_recv.c
Log Message:
-----------
[send/recv] deal properly with 0 bytes packets on local sockets
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 168a522766c052e70121713df985e8a3058059c4
https://github.com/fabbione/kronosnet/commit/168a522766c052e70121713df985e8…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2015-12-18 (Fri, 18 Dec 2015)
Changed paths:
M libknet/threads_send_recv.c
Log Message:
-----------
[send/recv] be consistent between readv and recvmmsg handling 0 bytes packets
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Branch: refs/heads/master
Home: https://github.com/fabbione/kronosnet
Commit: 6488bdd6d09f6823539212439c4ad7881ba3b972
https://github.com/fabbione/kronosnet/commit/6488bdd6d09f6823539212439c4ad7…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2015-12-18 (Fri, 18 Dec 2015)
Changed paths:
M TODO
M kronosnetd/etherfilter.c
M kronosnetd/etherfilter.h
M kronosnetd/vty_cli_cmds.c
M libknet/handle.c
M libknet/internals.h
M libknet/khandle_test.c
M libknet/libknet.h
M libknet/onwire.h
M libknet/ping_test.c
M libknet/threads_common.h
M libknet/threads_send_recv.c
Log Message:
-----------
[global] add support for multiple local sockets/fds
WARNING: this commit changes API and onwire protocol
It is now possible to configure multiple local sockets to send/recv
data over the same knet handle.
to every send/recv socket a channel is assigned that behaves more
or less like a VLAN.
hostA channel 0 will be delivered to datafd on hostB channel 0
hostA channel 1 to hostB channel 1
etc.
It is possible to configure up to 32 channel, but there is space
to increase this number if necessary.
New API calls:
knet_handle_add_datafd
knet_handle_remove_datafd
knet_handle_enable_sock_notify
knet_handle_get_channel
knet_handle_get_datafd
Notification has been added in cases where a local socket is the result
of accepting a tcp connection that gets disconnected and corrective
action needs to be taken by the application.
Changed API calls:
knet_handle_new
knet_recv
knet_send
knet_handle_enable_filter
onwire changes:
add one byte to transport channel information
channel information are also passed down to the dst_host_filter
in the event the application has needs to modify that on TX/RX
events.
Internal changes:
cleanup how sockpairs are handled in general to make it simpler
to map application side and internal side.
NOTE: callback function has not been properly tested.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>