Whamcloud - gitweb
LU-18137 ksocklnd: Fix TCP socket cleanup 89/56089/4
authorMark Roper <ropermar@amazon.com>
Sun, 18 Aug 2024 18:25:54 +0000 (18:25 +0000)
committerOleg Drokin <green@whamcloud.com>
Fri, 30 Aug 2024 06:02:27 +0000 (06:02 +0000)
commit3367ef3eb29cb989232cfa925b02b89e6638058c
treef644534e94cfe19c3709707fc504103e7b276048
parent9a339420d903a10fdb310adc691426321637e91e
LU-18137 ksocklnd: Fix TCP socket cleanup

Linux upstream commit v6.11-rc3-g151c9c724d05d5b0d changed the
handling of orphaned TCP connections. The commit stops the timers
and orphan connection cleanup by default for kernel-created
sockets after sock_release is called. ksocklnd relies on Linux
TCP orphan connection cleanup and this commit changes ksocklnd
socket creation to increment sk_net_refcnt on each socket it
creates and to register each socket with the namespace for
proper orphan connection management.

The upstream Linux commit has been backported to various Linux
distributions including Amazon Linux 2 kernels 4.14 and 5.10.

Test-Parameters: trivial
Signed-off-by: Mark Roper <ropermar@amazon.com>
Change-Id: Ib70ba8fcc3f1e49d3afbe788fccd777d02ec39b8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56089
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/autoconf/lustre-lnet.m4
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_lib.c