Added NDO_SELECT_QUEUE_HAS_ACCEL_PRIV and HAVE_BONDING_H
[~tnikolova/compat/.git] / config / rdma.m4
index 2f9d923..c66bc7c 100644 (file)
@@ -445,9 +445,9 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
 
        AC_MSG_CHECKING([if pci.h has enum pcie_link_width])
        LB_LINUX_TRY_COMPILE([
-               #include <scsi/iscsi_if.h>
+               #include <linux/pci.h>
        ],[
-               enum pcie_link_width *x;
+               enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
 
                return 0;
        ],[
@@ -458,6 +458,21 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if pci.h has enum pci_bus_speed])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/pci.h>
+       ],[
+               enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_PCI_BUS_SPEED, 1,
+                         [pci_bus_speed is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
        AC_MSG_CHECKING([if netdevice.h has struct netdev_phys_port_id])
        LB_LINUX_TRY_COMPILE([
                #include <linux/netdevice.h>
@@ -626,6 +641,88 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ],[
                AC_MSG_RESULT(no)
        ])
+
+       AC_MSG_CHECKING([if if_vlan.h has vlan_dev_get_egress_qos_mask])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/if_vlan.h>
+       ],[
+               vlan_dev_get_egress_qos_mask(NULL, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_VLAN_DEV_GET_EGRESS_QOS_MASK, 1,
+                         [vlan_dev_get_egress_qos_mask is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if netdevice.h has netdev_get_prio_tc_map])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/netdevice.h>
+       ],[
+               netdev_get_prio_tc_map(NULL, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_NETDEV_GET_PRIO_TC_MAP, 1,
+                         [netdev_get_prio_tc_map is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if if_vlan.h has __vlan_find_dev_deep_rcu])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/if_vlan.h>
+       ],[
+               __vlan_find_dev_deep_rcu(NULL, 0, 0);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE___VLAN_FIND_DEV_DEEP_RCU, 1,
+                         [__vlan_find_dev_deep_rcu is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if ndo_select_queue has accel_priv])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/netdevice.h>
+       ],[
+               struct net_device_opts ndops;
+
+               static u16 select_queue(struct net_device *dev, struct sk_buff *skb,
+                                       void *accel_priv)
+               {
+                       return 0;
+               }
+
+               ndoops.ndo_select_queue = select_queue;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(NDO_SELECT_QUEUE_HAS_ACCEL_PRIV, 1,
+                         [ndo_select_queue has accel_priv])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if drivers/net/bonding/bonding.h exists])
+       LB_LINUX_TRY_COMPILE([
+               #include "../drivers/net/bonding/bonding.h"
+       ],[
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_BONDING_H, 1,
+                         [drivers/net/bonding/bonding.h exists])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS