[lustre-devel] [PATCH 20/20] lnet: include linux/ethtool.h

James Simmons jsimmons at infradead.org
Mon Oct 11 10:40:49 PDT 2021

From: Jian Yu <yujian at whamcloud.com>

Kernel 5.11+ removes including linux/ethtool.h from
linux/netdevice.h, which caused the following build error:

dereferencing pointer to incomplete type 'const struct ethtool_ops'

This patch fixes the above issue by adding the include into
the file that uses the structure.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15052
Lustre-commit: b2503cf65a0cb3583 ("LU-15052 lnet: include linux/ethtool.h")
Signed-off-by: Jian Yu <yujian at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45109
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 net/lnet/klnds/o2iblnd/o2iblnd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/lnet/klnds/o2iblnd/o2iblnd.c b/net/lnet/klnds/o2iblnd/o2iblnd.c
index fd807c2..36d26b2 100644
--- a/net/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/net/lnet/klnds/o2iblnd/o2iblnd.c
@@ -36,9 +36,11 @@
 #include <asm/div64.h>
 #include <asm/page.h>
-#include "o2iblnd.h"
+#include <linux/ethtool.h>
 #include <linux/inetdevice.h>
+#include "o2iblnd.h"
 static struct lnet_lnd the_o2iblnd;
 struct kib_data kiblnd_data;

More information about the lustre-devel mailing list