Whamcloud - gitweb
LU-16822 lnet: use proper Netlink flags for setup 29/55129/5
authorJames Simmons <jsimmons@infradead.org>
Fri, 31 May 2024 17:33:46 +0000 (11:33 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 10 Jun 2024 06:08:07 +0000 (06:08 +0000)
commit9d9b8cbaa4123df708a072acd1a4f30120075418
tree410026344259f8a2fe3cf1bcae4bb0c7d9b0fe13
parentb0ab0c9fa54a9b28db677133efd219d6720fec15
LU-16822 lnet: use proper Netlink flags for setup

The Netlink flags sent to lnet_net_conf_cmd() were incorrect.
You can't use both NLM_F_EXCL and NLM_F_REPLACE together. If you
think about it these flags are opposites. Together this flags
also equal NLM_F_DUMP which the kernel doesn't support for this
operations so it failed with EOPNOTSUPP which tells user land
to use the old API so the failure wasn't easily detected.
We replace NLM_F_REPLACE with NLM_F_APPEND to avoid this
issue. Also for some reason lct_version gets stomped on
so we can't use it.

Fixes: ab6c8bd18e1 ("LU-16822 lnet: always initialize IPv6 at start up")
Test-Parameters: trivial testlist=sanity-lnet
Change-Id: I6b9eb013f6fc10276e91848d7b5f17d406fbbdb4
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55129
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/socklnd/socklnd.c
lnet/lnet/api-ni.c
lnet/lnet/config.c
lnet/utils/lnetctl.c