From: Jian Yu Date: Fri, 1 Oct 2021 06:41:10 +0000 (-0700) Subject: EX-3937 lnet: include linux/ethtool.h X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a472a92866a47428714c0ea94ef32945a8834334;p=fs%2Flustre-release.git EX-3937 lnet: include linux/ethtool.h 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 Reviewed-on: https://review.whamcloud.com/45110 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo --- diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 4ad6ee2..fb14104 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -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 -],[ - 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 # diff --git a/lnet/klnds/o2iblnd/o2iblnd.c b/lnet/klnds/o2iblnd/o2iblnd.c index 1435e96..b63f75e 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.c +++ b/lnet/klnds/o2iblnd/o2iblnd.c @@ -35,9 +35,7 @@ */ #include -#ifndef HAVE_ETHTOOL_H_INCLUDED #include -#endif #include #include "o2iblnd.h" diff --git a/lnet/klnds/socklnd/socklnd.c b/lnet/klnds/socklnd/socklnd.c index 22387ec..8342200 100644 --- a/lnet/klnds/socklnd/socklnd.c +++ b/lnet/klnds/socklnd/socklnd.c @@ -37,9 +37,7 @@ * Author: Eric Barton */ -#ifndef HAVE_ETHTOOL_H_INCLUDED #include -#endif #include #include "socklnd.h"