Whamcloud - gitweb
LU-10391 socklnd: prepare for new KSOCK_MSG type 01/43601/11
authorMr NeilBrown <neilb@suse.de>
Mon, 11 May 2020 01:06:11 +0000 (11:06 +1000)
committerJames Simmons <jsimmons@infradead.org>
Fri, 7 Jan 2022 01:11:24 +0000 (20:11 -0500)
commit206d32e46c221b5c32729be3fe3f5ebd1c3fc29f
treeb0ab5c2fed2d64792960f5dc205ccf25142198df
parentf1eeaa7aa95ff31ae0795a8420ec9b878d287e9a
LU-10391 socklnd: prepare for new KSOCK_MSG type

Various places in socklnd assume there are only two message type:
KSOCK_MSG_NOOP and KSOCK_MSG_LNET.  We will soon add another type to
support a new lnet_hdr type with large addresses.
So do some cleanup first:

- get rid of ksock_lnet_msg - it doesn't add anything to lnet_hdr
- separate out 'struct ksock_hdr'.  We often want the size of this
  header, and instead request the offset of a field in ksock_msg.
- introduce switch statements in a couple of places to handle the
  different types of ksock_msg.

Test-Parameters: trivial
Test-Parameters: serverversion=2.12 serverdistro=el7.9 testlist=runtests
Test-Parameters: clientversion=2.12 testlist=runtests
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ibe484f76757c4100b8532cef659c3cc369b658ba
lnet/include/lnet/socklnd.h
lnet/klnds/socklnd/socklnd_cb.c
lnet/klnds/socklnd/socklnd_proto.c