]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
cxgb4: add m4 check for net_device.max_mtu ofed_4_8_x vofed-4.8-2 vofed-4.8-2-rc1 vofed-4.8-2-rc2 vofed-4.8-2-rc3
authorSteve Wise <swise@opengridcomputing.com>
Fri, 19 Jan 2018 19:59:12 +0000 (11:59 -0800)
committerSteve Wise <swise@opengridcomputing.com>
Fri, 19 Jan 2018 19:59:12 +0000 (11:59 -0800)
If max_mtu is part of struct net_device, then define
HAVE_NET_DEVICE_MAX_MTU.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
config/rdma.m4

index 1f98d7c9da51e1be481d62949d97f539d52feb9f..02eb460c96372b531dd4944df149e0695c82faec 100644 (file)
@@ -4729,6 +4729,24 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ],[
                AC_MSG_RESULT(no)
        ])
+
+       AC_MSG_CHECKING([if struct net_device has max_mtu])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/netdevice.h>
+       ],[
+               struct net_device *dev = NULL;
+
+               dev->max_mtu = 0;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_NET_DEVICE_MAX_MTU, 1,
+                         [max_mtu is in struct net_device])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS