Hi,

I have detected some bugs compilling openvswitch 1.4.3 in a RHEL/CentOS 6.3:

-- snip --
In file included from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/if.h:4,
                 from include/linux/netdevice.h:28,
from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/netdevice.h:4,
                 from include/net/sock.h:50,
                 from include/linux/tcp.h:179,
from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/tcp.h:4, from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/actions.c:25: include/linux/if.h:77:1: warning: this is the location of the previous definition make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/genetlink-brcompat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/brcompat.o] Error 1 make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/actions.o] Error 1 make[1]: *** [_module_/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32-279.5.2.el6.x86_64'
make: *** [default] Error 2
make: Leaving directory `/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux'
error: Bad exit status from /var/tmp/rpm-tmp.1MRub8 (%build)
-- snip --

  After fixing if.h, now a new bugs appears:

-- snip --
from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/if_ether.h:4,
                 from include/linux/etherdevice.h:27,
from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/brcompat.c:25: /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/skbuff.h:236: error: redefinition of 'skb_frag_page' include/linux/skbuff.h:1612: note: previous definition of 'skb_frag_page' was here In file included from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/actions.c:21: /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/skbuff.h:236: error: redefinition of 'skb_frag_page' include/linux/skbuff.h:1612: note: previous definition of 'skb_frag_page' was here make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/genetlink-brcompat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/brcompat.o] Error 1 make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/actions.o] Error 1 make[1]: *** [_module_/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32-279.5.2.el6.x86_64'
make: *** [default] Error 2
make: Leaving directory `/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux'
error: Bad exit status from /var/tmp/rpm-tmp.qll6Kl (%build)
-- snip --

  After applying the patch:

http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commit;h=6c4ea27c48b30eaec8e37e642d5072f53c5b2670

  the same bug appears:

-- snip --
In file included from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/netlink.h:4, from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/net/genetlink.h:5, from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/genetlink.inc:3, from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/genetlink-brcompat.c:10: /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/skbuff.h:236: error: redefinition of 'skb_frag_page' include/linux/skbuff.h:1612: note: previous definition of 'skb_frag_page' was here
In file included from include/linux/if_ether.h:126,
from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/if_ether.h:4,
                 from include/linux/etherdevice.h:27,
from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/brcompat.c:25: /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/skbuff.h:236: error: redefinition of 'skb_frag_page' include/linux/skbuff.h:1612: note: previous definition of 'skb_frag_page' was here In file included from /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/actions.c:21: /root/rpmbuild/BUILD/openvswitch-1.4.3/_default/../datapath/linux/compat/include/linux/skbuff.h:236: error: redefinition of 'skb_frag_page' include/linux/skbuff.h:1612: note: previous definition of 'skb_frag_page' was here make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/genetlink-brcompat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/brcompat.o] Error 1 make[2]: *** [/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux/actions.o] Error 1 make[1]: *** [_module_/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32-279.5.2.el6.x86_64'
make: *** [default] Error 2
make: Leaving directory `/root/rpmbuild/BUILD/openvswitch-1.4.3/_default/datapath/linux'
error: Bad exit status from /var/tmp/rpm-tmp.q1fDTc (%build)
-- snip --

  In RHEL/CentOS, skb_frag_page was yast defined at include/linux/skbuff.h.

I have create a patch for all these issues, attached to this email, please ... review.

  Regards.


--
Juan Jesús Prieto - Consultoría TI
[email protected]
http://www.eneotecnologia.com
---------------------------------------
Tlf: 955601160/606250264
echo "kkqubqjbAhnbjm/dpn" | perl -pe 's/(.)/chr(ord($1)-1)/ge'

diff -Nru a/acinclude.m4 b/acinclude.m4
--- a/acinclude.m4	2012-09-07 03:10:15.000000000 +0200
+++ b/acinclude.m4	2012-09-11 20:42:04.651823981 +0200
@@ -245,6 +245,7 @@
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro],
                   [OVS_DEFINE([HAVE_SKB_WARN_LRO])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb])
+  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_frag_page])
 
   OVS_GREP_IFELSE([$KSRC/include/linux/string.h], [kmemdup], [],
                   [OVS_GREP_IFELSE([$KSRC/include/linux/slab.h], [kmemdup])])
diff -Nru a/datapath/linux/compat/include/linux/if.h b/datapath/linux/compat/include/linux/if.h
--- a/datapath/linux/compat/include/linux/if.h	2012-09-07 03:10:15.000000000 +0200
+++ b/datapath/linux/compat/include/linux/if.h	2012-09-11 21:10:37.277854741 +0200
@@ -16,8 +16,6 @@
 
 #if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,36)
 #define IFF_OVS_DATAPATH IFF_BRIDGE_PORT
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
-#define IFF_OVS_DATAPATH 0		/* no-op flag */
 #endif
 
 #endif
diff -Nru a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h
--- a/datapath/linux/compat/include/linux/skbuff.h	2012-09-07 03:10:15.000000000 +0200
+++ b/datapath/linux/compat/include/linux/skbuff.h	2012-09-11 21:15:10.795854502 +0200
@@ -232,13 +232,6 @@
 #define consume_skb kfree_skb
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
-static inline struct page *skb_frag_page(const skb_frag_t *frag)
-{
-	return frag->page;
-}
-#endif
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
 static inline void skb_reset_mac_len(struct sk_buff *skb)
 {
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to