Whamcloud - gitweb
LU-10391 lnet: use data_ready callback to trigger accept() 02/37302/6
authorMr NeilBrown <neilb@suse.de>
Wed, 22 Jan 2020 06:16:12 +0000 (17:16 +1100)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Feb 2020 07:13:17 +0000 (07:13 +0000)
commit40e4d957e33268354a3fd938545bf717ed415372
tree190659e6bcdcc2d3b1f67bf0610ac7c77d4c3b30
parent9e5cb57addbb5d7bc1596096821ad8dcac7a939b
LU-10391 lnet: use data_ready callback to trigger accept()

Rather than blocking in lnet_sock_accept(), set up a data_ready
callback, and use that to find out when to call lnet_sock_accept()
again.

This simplifies lnet_sock_accept() (which will be removed in
next patch), and means that we could listen on multiple
sockets, which will be useful for IPv6 support.

The code design in based on that in net/sunrpc/svcsock.c.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I3015f2f6b6d420af5c8454b6c1a99611b48e7702
Reviewed-on: https://review.whamcloud.com/37302
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/acceptor.c
lnet/lnet/lib-socket.c