Whamcloud - gitweb
LU-9480 lnet: add struct lnet_ping_buffer 73/25773/21
authorOlaf Weber <olaf@sgi.com>
Fri, 27 Jan 2017 15:16:16 +0000 (16:16 +0100)
committerAmir Shehata <amir.shehata@intel.com>
Tue, 22 Aug 2017 16:20:58 +0000 (16:20 +0000)
commitd062d03aa913f7fcabd603ad6de27d3ed086f6df
tree74b7943a49e5dc76d513d8f4539c2edb2c06a383
parent00e73d22f04f440ac81281f584445e258269f654
LU-9480 lnet: add struct lnet_ping_buffer

The Multi-Rail code will use the ping target buffer also as the
source of data to push to other nodes. This means that there
will be multiple MDs referencing the same buffer, and care must
be taken to ensure that the buffer is not freed while any such
reference remains.

Encapsulate the struct lnet_ping_info (aka lnet_ping_info_t) in
a struct lnet_ping_buffer. This adds a reference count, and the
number of NIDs for the encapsulated lnet_ping_info has been
sized.

For sizing the buffer the constant LNET_PINGINFO_SIZE is replaced
with LNET_PING_INFO_SIZE(NNIS).

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Iae255a7ebd6099c050bddbea84fb1923a586ac66
Reviewed-on: https://review.whamcloud.com/25773
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-types.h
lnet/lnet/api-ni.c
lnet/lnet/router.c