Whamcloud - gitweb
LU-17579 build: drop SUSE in-kernel ofed special handling 76/54176/5
authorShaun Tancheff <shaun.tancheff@hpe.com>
Wed, 28 Feb 2024 16:00:26 +0000 (23:00 +0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2024 03:25:23 +0000 (03:25 +0000)
SUSE special case handling for mofed does not apply to in-kernel
ofed build.

Drop the complicated search and filter looking for Module.symvers

Test-Parameters: trivial
Fixes: 8b1d2a72f1 ("LU-16967 build: Add in-kernel-ko2iblnd driver")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I90c3de9020a26bdbc12c0ca859ada722b7c73c94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54176
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Caleb Carlson <caleb.carlson@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/autoconf/lustre-lnet.m4

index 180f175..8595211 100644 (file)
@@ -310,29 +310,15 @@ Auto detection of external O2IB failed. Build of external o2ib disabled.])
                fi
        fi
 
-       # we suspect that the found in-kernel OFED source+headers are good
-       # the above compile test *could* be repeated with in-kernel paths ... 
+       # we expect that the found in-kernel OFED source+headers are good
        INT_O2IB_SYMBOLS=""
        CHECK_SYMBOLS=""
-       if test -f $INT_O2IBPATH/Module.symvers; then
-               CHECK_SYMBOLS=$INT_O2IBPATH/Module.symvers
-       elif test "x$SUSE_KERNEL" = "xyes"; then
-               CHECK_SYMBOLS=$(find ${INT_O2IBPATH}* -name Module.symvers -printf "%p ")
-               # Select only the current 'flavor' if there is more than 1
-               NUM_AVAIL=$(find ${INT_O2IBPATH}* -name Module.symvers | wc -l)
-               if test ${NUM_AVAIL} -gt 1; then
-                       PREFER=$(basename ${LINUX_OBJ})
-                       for F in $(find ${O2IBPATH}-obj -name Module.symvers)
-                       do
-                               maybe=$(echo $F | grep "/${PREFER}")
-                               if test "x$maybe" != "x"; then
-                                       CHECK_SYMBOLS=$F
-                               fi
-                       done
-               fi
-       elif test -f $LINUX_OBJ/Module.symvers; then
+       if test -f $LINUX_OBJ/Module.symvers; then
                # Debian symvers is in the arch tree
+               # SUSE symvers is in the OBJ tree [KVER-obj/<arch>/<flavor>/]
                CHECK_SYMBOLS=$LINUX_OBJ/Module.symvers
+       elif test -f $INT_O2IBPATH/Module.symvers; then
+               CHECK_SYMBOLS=$INT_O2IBPATH/Module.symvers
        fi
 
        if test -n "$CHECK_SYMBOLS"; then