OFED/compat: modify rdma.m4 to fix ofed-bz2539
authorDevesh Sharma <devesh.sharma@avagotech.com>
Mon, 18 May 2015 17:08:06 +0000 (22:38 +0530)
committerSelvin Xavier <selvin.xavier@emulex.com>
Mon, 18 May 2015 11:49:03 +0000 (04:49 -0700)
patch is to check vlan_insert_tag_set_proto, a recent rename of __valn_put_tag()
function in kernel.

Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com>
config/rdma.m4

index 0a2aaa3..1cd8351 100644 (file)
@@ -1698,20 +1698,34 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ],[
                AC_MSG_RESULT(no)
        ])
-       AC_MSG_CHECKING([if __vlan_put_tag has 3 parameters])
+
+       AC_MSG_CHECKING([if vlan_insert_tag_set_proto is defined])
        LB_LINUX_TRY_COMPILE([
                #include <linux/if_vlan.h>
        ],[
                struct sk_buff *skb;
-               __vlan_put_tag(skb, 0, 0);
-
+               vlan_insert_tag_set_proto(skb, 0, 0);
                return 0;
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_3_PARAMS_FOR_VLAN_PUT_TAG, 1,
-                         [__vlan_put_tag has 3 parameters])
+               AC_DEFINE(HAVE_VLAN_INSERT_TAG_SET_PROTO, 1,
+                         [vlan_insert_tag_set_proto is defined])
        ],[
                AC_MSG_RESULT(no)
+               AC_MSG_CHECKING([if __vlan_put_tag has 3 parameters])
+               LB_LINUX_TRY_COMPILE([
+                       #include <linux/if_vlan.h>
+               ],[
+                       struct sk_buff *skb;
+                       __vlan_put_tag(skb, 0, 0);
+                       return 0;
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_3_PARAMS_FOR_VLAN_PUT_TAG, 1,
+                                 [__vlan_put_tag has 3 parameters])
+               ],[
+                       AC_MSG_RESULT(no)
+               ])
        ])
 
        AC_MSG_CHECKING([if __vlan_hwaccel_put_tag has 3 parameters])