Skip to content

Commit

Permalink
cxgb4: add m4 check for net_device.max_mtu
Browse files Browse the repository at this point in the history
If max_mtu is part of struct net_device, then define
HAVE_NET_DEVICE_MAX_MTU.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
  • Loading branch information
Steve Wise committed Jan 19, 2018
1 parent 36ae3a8 commit 399559f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions config/rdma.m4
Expand Up @@ -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
Expand Down

0 comments on commit 399559f

Please sign in to comment.