]> git.openfabrics.org - ~aditr/compat.git/commitdiff
rdma.m4: Added test for en_ethtool_ops.get_rxfh_indir
authorVladimir Sokolovsky <vlad@mellanox.com>
Sun, 13 Mar 2016 08:55:00 +0000 (10:55 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Sun, 13 Mar 2016 08:55:00 +0000 (10:55 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4

index cc132fb4d7a2ce08b16427ea16abf4f5360e65dc..901d4ea8c738bcd99ff741177afeaddddfe571fb 100644 (file)
@@ -227,7 +227,7 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                #include <linux/ethtool.h>
        ],[
                const struct ethtool_ops en_ethtool_ops = {
-                       .get_rxfh_indir_size = NULL,
+                       .get_rxfh_key_size = NULL,
                        .get_rxfh = NULL,
                        .set_rxfh = NULL,
                };
@@ -241,61 +241,97 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
-
-       AC_MSG_CHECKING([if struct ethtool_ops has get/set_tunable])
+       AC_MSG_CHECKING([if struct ethtool_ops has get_rxfh_indir_size])
        LB_LINUX_TRY_COMPILE([
                #include <linux/ethtool.h>
        ],[
                const struct ethtool_ops en_ethtool_ops = {
-                       .get_tunable = NULL,
-                       .set_tunable = NULL,
+                       .get_rxfh_indir_size = NULL,
                };
 
                return 0;
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_GET_SET_TUNABLE, 1,
-                         [get/set_tunable is defined])
+               AC_DEFINE(HAVE_RXFH_INDIR_SIZE, 1,
+                       [get_rxfh_indir_size is defined])
        ],[
                AC_MSG_RESULT(no)
        ])
 
-       AC_MSG_CHECKING([if exist struct ethtool_ops_ext])
+       AC_MSG_CHECKING([if struct ethtool_ops_ext has get_rxfh_indir_size])
        LB_LINUX_TRY_COMPILE([
                #include <linux/ethtool.h>
        ],[
                const struct ethtool_ops_ext en_ethtool_ops_ext = {
-                       .size = sizeof(struct ethtool_ops_ext),
+                       .get_rxfh_indir_size = NULL,
                };
 
                return 0;
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_ETHTOOL_OPS_EXT, 1,
-                         [struct ethtool_ops_ext is defined])
+               AC_DEFINE(HAVE_RXFH_INDIR_SIZE_EXT, 1,
+                       [get_rxfh_indir_size is defined in ethtool_ops_ext])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if struct ethtool_ops has get/set_rxfh_indir])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/ethtool.h>
+
+               int mlx4_en_get_rxfh_indir(struct net_device *d, u32 *r)
+               {
+                       return 0;
+               }
+       ],[
+               struct ethtool_ops en_ethtool_ops;
+               en_ethtool_ops.get_rxfh_indir = mlx4_en_get_rxfh_indir;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GET_SET_RXFH_INDIR, 1,
+                       [get/set_rxfh_indir is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if struct ethtool_ops has get/set_tunable])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/ethtool.h>
+       ],[
+               const struct ethtool_ops en_ethtool_ops = {
+                       .get_tunable = NULL,
+                       .set_tunable = NULL,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GET_SET_TUNABLE, 1,
+                         [get/set_tunable is defined])
        ],[
                AC_MSG_RESULT(no)
        ])
 
-       AC_MSG_CHECKING([if struct ethtool_ops_ext has get/set_rxfh])
+       AC_MSG_CHECKING([if exist struct ethtool_ops_ext])
        LB_LINUX_TRY_COMPILE([
                #include <linux/ethtool.h>
        ],[
                const struct ethtool_ops_ext en_ethtool_ops_ext = {
-                       .get_rxfh_indir_size = NULL,
-                       .get_rxfh = NULL,
-                       .set_rxfh = NULL,
+                       .size = sizeof(struct ethtool_ops_ext),
                };
 
                return 0;
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_GET_SET_RXFH_OPS_EXT, 1,
-                         [get/set_rxfh is defined])
+               AC_DEFINE(HAVE_ETHTOOL_OPS_EXT, 1,
+                         [struct ethtool_ops_ext is defined])
        ],[
                AC_MSG_RESULT(no)
        ])
 
+
        AC_MSG_CHECKING([if struct ethtool_ops_ext has get/set_rxfh_indir])
        LB_LINUX_TRY_COMPILE([
                #include <linux/ethtool.h>