Added macro for iSER on RHEL7.6
[compat-rdma/compat.git] / config / rdma.m4
index 6721825..2b77c3c 100644 (file)
@@ -3958,6 +3958,23 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if scsi_host.h struct Scsi_Host has member virt_boundary_mask])
+       LB_LINUX_TRY_COMPILE([
+               #include <scsi/scsi_host.h>
+       ],[
+               struct Scsi_Host sh = {
+                       .virt_boundary_mask = 0,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SCSI_HOST_VIRT_BOUNDARY_MASK, 1,
+                               [Scsi_Host has members virt_boundary_mask])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
        AC_MSG_CHECKING([if scsi_host.h struct scsi_host_template has member track_queue_depth])
        LB_LINUX_TRY_COMPILE([
                #include <scsi/scsi_host.h>
@@ -9578,6 +9595,71 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if netdevice.h dev_change_flags has 3 parameters])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/netdevice.h>
+       ],[
+               dev_change_flags(NULL, 0, NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_DEV_CHANGE_FLAGS_HAS_3_PARAMS, 1,
+                         [dev_change_flags has 3 parameters])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if struct net_device has close_list])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/netdevice.h>
+       ],[
+               struct net_device *dev = NULL;
+               struct list_head xlist;
+
+               dev->close_list = xlist;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_NET_DEVICE_HAS_CLOSE_LIST, 1,
+                         [net_device close_list is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if struct net_device has needs_free_netdev])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/netdevice.h>
+       ],[
+               struct net_device *dev = NULL;
+
+               dev->needs_free_netdev = true;
+               dev->priv_destructor = NULL;
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_NET_DEVICE_NEEDS_FREE_NETDEV, 1,
+                         [net_device needs_free_netdev is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if mm.h has kvcalloc])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/mm.h>
+       ],[
+               kvcalloc(0, 0, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_KVCALLOC, 1,
+                       [kvcalloc is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS