Whamcloud - gitweb
EX-3937 lnet: include linux/ethtool.h
authorJian Yu <yujian@whamcloud.com>
Fri, 1 Oct 2021 06:41:10 +0000 (23:41 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 2 Oct 2021 18:44:21 +0000 (18:44 +0000)
Commit a8929b9f0b3e86ae91fd0037edc37a356020a947 added
a check to see if linux/ethtool.h is included in
linux/netdevice.h. However, a more simple way is to
include linux/ethtool.h directly in the files that use
"struct ethtool_ops".

Test-Parameters: trivial

Fixes: a8929b9f0b3 ("EX-3937 lnet: check if ethtool.h is included in netdevice.h")
Change-Id: I5d1b45a15194a0ba2dbd52ce47fdb9bf9fda028c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45110
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/autoconf/lustre-lnet.m4
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/socklnd/socklnd.c

index 4ad6ee2..fb14104 100644 (file)
@@ -806,27 +806,6 @@ EXTRA_KCFLAGS="$tmp_flags"
 ]) # LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL
 
 #
-# LN_HAVE_ETHTOOL_H_INCLUDED
-#
-# kernel 5.11.0-36 removes including linux/ethtool.h from linux/netdevice.h
-#
-AC_DEFUN([LN_HAVE_ETHTOOL_H_INCLUDED], [
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_CHECK_COMPILE([if ethtool.h is included in netdevice.h],
-ethtool_h, [
-       #include <linux/netdevice.h>
-],[
-       struct ethtool_ops ethtool_ops = {};
-       (void)ethtool_ops;
-],[
-       AC_DEFINE(HAVE_ETHTOOL_H_INCLUDED, 1,
-               [ethtool.h is included in netdevice.h])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-]) # LN_HAVE_ETHTOOL_H_INCLUDED
-
-#
 # LN_IB_DEVICE_OPS_EXISTS
 #
 # kernel 5.0 commit 521ed0d92ab0db3edd17a5f4716b7f698f4fce61
@@ -924,8 +903,6 @@ LN_HAVE_ORACLE_OFED_EXTENSIONS
 LN_CONFIG_SOCK_GETNAME
 # 5.3 and 4.18.0-193.el8
 LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL
-# 5.11
-LN_HAVE_ETHTOOL_H_INCLUDED
 ]) # LN_PROG_LINUX
 
 #
index 1435e96..b63f75e 100644 (file)
@@ -35,9 +35,7 @@
  */
 
 #include <asm/page.h>
-#ifndef HAVE_ETHTOOL_H_INCLUDED
 #include <linux/ethtool.h>
-#endif
 #include <linux/inetdevice.h>
 
 #include "o2iblnd.h"
index 22387ec..8342200 100644 (file)
@@ -37,9 +37,7 @@
  * Author: Eric Barton <eric@bartonsoftware.com>
  */
 
-#ifndef HAVE_ETHTOOL_H_INCLUDED
 #include <linux/ethtool.h>
-#endif
 #include <linux/inetdevice.h>
 #include "socklnd.h"