On 05/14/2014 12:56 AM, Jesse Gross wrote:
> On Tue, May 13, 2014 at 1:52 PM, Andrey Korolyov <[email protected]> wrote:
>> On Wed, May 14, 2014 at 12:44 AM, Jesse Gross <[email protected]> wrote:
>>> On Tue, May 13, 2014 at 1:25 PM, Andrey Korolyov <[email protected]> wrote:
>>>> On Wed, May 14, 2014 at 12:19 AM, Jesse Gross <[email protected]> wrote:
>>>>> On Tue, May 13, 2014 at 1:58 AM, Andrey Korolyov <[email protected]> wrote:
>>>>>> On Tue, May 13, 2014 at 4:41 AM, Jesse Gross <[email protected]> wrote:
>>>>>>> On Mon, May 12, 2014 at 2:04 PM, Andrey Korolyov <[email protected]> wrote:
>>>>>>>> On Tue, May 13, 2014 at 12:58 AM, Jesse Gross <[email protected]> wrote:
>>>>>>>>> On Sat, May 10, 2014 at 2:13 PM, Andrey Korolyov <[email protected]>
>>>>>>>>> wrote:
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> sorry for bringing this old thread on top, but right now building
>>>>>>>>>> against current RHEL 3.10.121.el7 seems not possible without
>>>>>>>>>> patchwork. After fixing some obvious kversion checks and code
>>>>>>>>>> snippets, I had stuck on f067987973facf28916a2f5ee48bf02ce5938bf8:
>>>>>>>>>>
>>>>>>>>>> In file included from
>>>>>>>>>> /builder/rpmbuild/BUILD/openvswitch-2.1.3/_default/../datapath/linux/compat/include/net/gre.h:9:0,
>>>>>>>>>> from
>>>>>>>>>> /builder/rpmbuild/BUILD/openvswitch-2.1.3/_default/datapath/linux/vport-gre.c:44:
>>>>>>>>>> include/net/gre.h: In function ‘gre_handle_offloads’:
>>>>>>>>>> include/net/gre.h:42:2: error: implicit declaration of function
>>>>>>>>>> ‘iptunnel_handle_offloads’ [-Werror=implicit-function-declaration]
>>>>>>>>>> return iptunnel_handle_offloads(skb, gre_csum, SKB_GSO_GRE);
>>>>>>>>>> ^
>>>>>>>>>> include/net/gre.h:42:2: warning: return makes pointer from integer
>>>>>>>>>> without a cast [enabled by default]
>>>>>>>>>> cc1: some warnings being treated as errors
>>>>>>>>>>
>>>>>>>>>> Bare look says that this snippet should be modified more intensively
>>>>>>>>>> than by one-line patch to work well, so I thought it would be better
>>>>>>>>>> to ask there on how to fix this properly.
>>>>>>>>>
>>>>>>>>> What version of OVS is this and which patch are you specifically
>>>>>>>>> referring to?
>>>>>>>>
>>>>>>>> Sorry if it was unclear, I pointed hash above, it` s 2.1.2. By patch I
>>>>>>>> meant one-liners which helps to mock kernel version checking in the
>>>>>>>> places where conflict of backported functions can take place. I
>>>>>>>> replaced failed checks one by one and then stuck with error above.
>>>>>>>> Actually, both gre.h - from compat/ and from RH kernel headers
>>>>>>>> resulting to this error if one want to try to point them explicitly.
>>>>>>>
>>>>>>> Can you post the changes you had to make to get to this point? I would
>>>>>>> expect that HAVE_GRE_CISCO_REGISTER would be defined and so there
>>>>>>> should be relatively little that is version specific.
>>>>>>>
>>>>>>> Have you also tried branch-2.2 or master?
>>>>>>
>>>>>> There are no such thing in public repo as branch-2.2, so with master
>>>>>> 75264fe5f1ceb73a33bcc8e1adb3ad9aad57237d I`ve got the same. Please
>>>>>> take a look on the attached patch. Also mind that the change in
>>>>>> datapath.c is purely a mock to pass through it to next failure and
>>>>>> shouldn`t go anywhere :)
>>>>>
>>>>> OK - I see. These changes are just miscellaneous backports and not in
>>>>> the tunnel code as I thought you were saying. I don't have a copy of
>>>>> the RHEL 7 beta source handy but it seems like this could be a missing
>>>>> definition in those headers. OVS should just be using the tunnel code
>>>>> from the kernel headers and the use of iptunnel_handle_offloads()
>>>>> would be from there. If they use it, they should also define it...
>>>>
>>>> You can use srpm for headers:
>>>> http://ftp.redhat.com/redhat/rhel/rc/7/ComputeNode/source/tree/Packages/kernel-3.10.0-121.el7.src.rpm
>>>
>>> Since you're already working in this code, it might be faster for you
>>> to take a look.
>>
>> Ok, will check tomorrow morning, but since RH-Oracle counterstand took
>> place, there are no reliable changelog except text remarks in the spec
>> file, so it`s a bit uneasy to say which bits should be presented and
>> which should not...
>
> I would just look into how and where iptunnel_handle_offloads is used
> and defined. I don't think that there is really more to it than that.
> OVS is using the GRE receive code wholesale in this version so there
> shouldn't be any tricky dependencies.
>
I had modified checks a little, so right now module compiles but there
are unported fixes after 3.11 for ip_tunnel stuff which are doing build
warnings. Also differences in declaration of skb_zerocopy (void vs
non-void) making proper build impossible without porting all code
related to this function from RH`s version of queue_userspace_packet to
mainline using a lot of ``if'' blocks. Please take a look on a revised
patch and attached build log. I`ve added some folks in CC who are known
for work on OVS subsystem of RedHat kernel, so they may have a word on
which changes will be incorporated in next minor kernel release and
resulting patch can be created without wasting much effort away.
diff -ru a/datapath.c b/datapath.c
--- a/datapath.c 2014-05-13 08:12:10.000000000 +0400
+++ b/datapath.c 2014-05-14 19:12:11.231467041 +0400
@@ -497,9 +497,7 @@
}
nla->nla_len = nla_attr_size(skb->len);
- err = skb_zerocopy(user_skb, skb, skb->len, hlen);
- if (err)
- goto out;
+ skb_zerocopy(user_skb, skb, skb->len, hlen);
/* Pad OVS_PACKET_ATTR_PACKET if linear copy was performed */
if (!(dp->user_features & OVS_DP_F_UNALIGNED)) {
diff -ru a/linux/compat/include/linux/hash.h b/linux/compat/include/linux/hash.h
--- a/linux/compat/include/linux/hash.h 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/include/linux/hash.h 2014-05-14 19:12:07.035455358 +0400
@@ -4,7 +4,7 @@
#include_next <linux/hash.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
#include <asm/hash.h>
struct fast_hash_ops {
diff -ru a/linux/compat/include/linux/skbuff.h b/linux/compat/include/linux/skbuff.h
--- a/linux/compat/include/linux/skbuff.h 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/include/linux/skbuff.h 2014-05-14 19:12:07.034455416 +0400
@@ -277,7 +277,7 @@
}
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
unsigned int skb_zerocopy_headlen(const struct sk_buff *from);
int skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len,
int hlen);
diff -ru a/linux/compat/include/net/genetlink.h b/linux/compat/include/net/genetlink.h
--- a/linux/compat/include/net/genetlink.h 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/include/net/genetlink.h 2014-05-14 19:12:07.037455247 +0400
@@ -96,7 +96,7 @@
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
static inline struct sk_buff *genlmsg_new_unicast(size_t payload,
struct genl_info *info,
gfp_t flags)
diff -ru a/linux/compat/include/net/ip_tunnels.h b/linux/compat/include/net/ip_tunnels.h
--- a/linux/compat/include/net/ip_tunnels.h 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/include/net/ip_tunnels.h 2014-05-14 19:20:40.002146046 +0400
@@ -2,7 +2,7 @@
#define __NET_IP_TUNNELS_WRAPPER_H 1
#include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
#include_next <net/ip_tunnels.h>
#else
diff -ru a/linux/compat/ip_tunnels_core.c b/linux/compat/ip_tunnels_core.c
--- a/linux/compat/ip_tunnels_core.c 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/ip_tunnels_core.c 2014-05-14 19:21:49.264500651 +0400
@@ -17,7 +17,7 @@
*/
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff -ru a/linux/compat/skbuff-openvswitch.c b/linux/compat/skbuff-openvswitch.c
--- a/linux/compat/skbuff-openvswitch.c 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/skbuff-openvswitch.c 2014-05-14 19:22:31.992726145 +0400
@@ -15,7 +15,7 @@
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
static inline bool head_frag(const struct sk_buff *skb)
{
diff -ru a/linux/compat/vxlan.c b/linux/compat/vxlan.c
--- a/linux/compat/vxlan.c 2014-05-13 08:12:10.000000000 +0400
+++ b/linux/compat/vxlan.c 2014-05-14 19:25:50.408761017 +0400
@@ -19,7 +19,7 @@
*/
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
make[1]: Entering directory `/root/openvswitch-75264fe'
make[1]: Leaving directory `/root/openvswitch-75264fe'
Making all in linux
make[1]: Entering directory `/root/openvswitch-75264fe/datapath/linux'
ln -s /root/openvswitch-75264fe/datapath/linux/../actions.c
ln -s /root/openvswitch-75264fe/datapath/linux/../datapath.c
ln -s /root/openvswitch-75264fe/datapath/linux/../dp_notify.c
ln -s /root/openvswitch-75264fe/datapath/linux/../flow.c
ln -s /root/openvswitch-75264fe/datapath/linux/../flow_netlink.c
ln -s /root/openvswitch-75264fe/datapath/linux/../flow_table.c
ln -s /root/openvswitch-75264fe/datapath/linux/../vport.c
ln -s /root/openvswitch-75264fe/datapath/linux/../vport-gre.c
ln -s /root/openvswitch-75264fe/datapath/linux/../vport-internal_dev.c
ln -s /root/openvswitch-75264fe/datapath/linux/../vport-lisp.c
ln -s /root/openvswitch-75264fe/datapath/linux/../vport-netdev.c
ln -s /root/openvswitch-75264fe/datapath/linux/../vport-vxlan.c
ln -s
/root/openvswitch-75264fe/datapath/linux/../linux/compat/dev-openvswitch.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/exthdrs_core.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/flex_array.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/flow_dissector.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/gre.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/gso.c
ln -s
/root/openvswitch-75264fe/datapath/linux/../linux/compat/genetlink-openvswitch.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/hash.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/hash-x86.c
ln -s
/root/openvswitch-75264fe/datapath/linux/../linux/compat/ip_tunnels_core.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/netdevice.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/net_namespace.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/reciprocal_div.c
ln -s
/root/openvswitch-75264fe/datapath/linux/../linux/compat/skbuff-openvswitch.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/vxlan.c
ln -s /root/openvswitch-75264fe/datapath/linux/../linux/compat/utils.c
make -C /usr/src/kernels/3.10.0-121.el7.x86_64/
M=/root/openvswitch-75264fe/datapath/linux modules
make[2]: Entering directory `/usr/src/kernels/3.10.0-121.el7.x86_64'
CC [M] /root/openvswitch-75264fe/datapath/linux/actions.o
CC [M] /root/openvswitch-75264fe/datapath/linux/datapath.o
CC [M] /root/openvswitch-75264fe/datapath/linux/dp_notify.o
CC [M] /root/openvswitch-75264fe/datapath/linux/flow.o
CC [M] /root/openvswitch-75264fe/datapath/linux/flow_netlink.o
CC [M] /root/openvswitch-75264fe/datapath/linux/flow_table.o
CC [M] /root/openvswitch-75264fe/datapath/linux/vport.o
CC [M] /root/openvswitch-75264fe/datapath/linux/vport-gre.o
In file included from /root/openvswitch-75264fe/datapath/linux/vport-gre.c:47:0:
/root/openvswitch-75264fe/datapath/linux/vport-gre.c: In function ‘__send’:
/root/openvswitch-75264fe/datapath/linux/../datapath.h:111:30: warning: passing
argument 1 of ‘iptunnel_xmit’ from incompatible pointer type [enabled by
default]
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
^
/root/openvswitch-75264fe/datapath/linux/vport-gre.c:200:9: note: in expansion
of macro ‘OVS_CB’
OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
^
In file included from
/root/openvswitch-75264fe/datapath/linux/compat/include/net/ip_tunnels.h:6:0,
from /root/openvswitch-75264fe/datapath/linux/vport-gre.c:43:
include/net/ip_tunnels.h:159:5: note: expected ‘struct net *’ but argument is
of type ‘struct rtable *’
int iptunnel_xmit(struct net *net, struct rtable *rt,
^
In file included from /root/openvswitch-75264fe/datapath/linux/vport-gre.c:47:0:
/root/openvswitch-75264fe/datapath/linux/../datapath.h:111:30: warning: passing
argument 2 of ‘iptunnel_xmit’ from incompatible pointer type [enabled by
default]
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
^
/root/openvswitch-75264fe/datapath/linux/vport-gre.c:200:9: note: in expansion
of macro ‘OVS_CB’
OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
^
In file included from
/root/openvswitch-75264fe/datapath/linux/compat/include/net/ip_tunnels.h:6:0,
from /root/openvswitch-75264fe/datapath/linux/vport-gre.c:43:
include/net/ip_tunnels.h:159:5: note: expected ‘struct rtable *’ but argument
is of type ‘struct sk_buff *’
int iptunnel_xmit(struct net *net, struct rtable *rt,
^
In file included from /root/openvswitch-75264fe/datapath/linux/vport-gre.c:47:0:
/root/openvswitch-75264fe/datapath/linux/../datapath.h:111:30: warning: passing
argument 3 of ‘iptunnel_xmit’ makes pointer from integer without a cast
[enabled by default]
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
^
/root/openvswitch-75264fe/datapath/linux/vport-gre.c:200:9: note: in expansion
of macro ‘OVS_CB’
OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
^
In file included from
/root/openvswitch-75264fe/datapath/linux/compat/include/net/ip_tunnels.h:6:0,
from /root/openvswitch-75264fe/datapath/linux/vport-gre.c:43:
include/net/ip_tunnels.h:159:5: note: expected ‘struct sk_buff *’ but argument
is of type ‘__be32’
int iptunnel_xmit(struct net *net, struct rtable *rt,
^
CC [M] /root/openvswitch-75264fe/datapath/linux/vport-internal_dev.o
CC [M] /root/openvswitch-75264fe/datapath/linux/vport-lisp.o
In file included from
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c:36:0:
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c: In function ‘lisp_send’:
/root/openvswitch-75264fe/datapath/linux/../datapath.h:111:30: warning: passing
argument 1 of ‘iptunnel_xmit’ from incompatible pointer type [enabled by
default]
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
^
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c:489:9: note: in expansion
of macro ‘OVS_CB’
OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
^
In file included from
/root/openvswitch-75264fe/datapath/linux/compat/include/net/ip_tunnels.h:6:0,
from /root/openvswitch-75264fe/datapath/linux/../flow.h:36,
from /root/openvswitch-75264fe/datapath/linux/../datapath.h:30,
from /root/openvswitch-75264fe/datapath/linux/vport-lisp.c:36:
include/net/ip_tunnels.h:159:5: note: expected ‘struct net *’ but argument is
of type ‘struct rtable *’
int iptunnel_xmit(struct net *net, struct rtable *rt,
^
In file included from
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c:36:0:
/root/openvswitch-75264fe/datapath/linux/../datapath.h:111:30: warning: passing
argument 2 of ‘iptunnel_xmit’ from incompatible pointer type [enabled by
default]
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
^
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c:489:9: note: in expansion
of macro ‘OVS_CB’
OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
^
In file included from
/root/openvswitch-75264fe/datapath/linux/compat/include/net/ip_tunnels.h:6:0,
from /root/openvswitch-75264fe/datapath/linux/../flow.h:36,
from /root/openvswitch-75264fe/datapath/linux/../datapath.h:30,
from /root/openvswitch-75264fe/datapath/linux/vport-lisp.c:36:
include/net/ip_tunnels.h:159:5: note: expected ‘struct rtable *’ but argument
is of type ‘struct sk_buff *’
int iptunnel_xmit(struct net *net, struct rtable *rt,
^
In file included from
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c:36:0:
/root/openvswitch-75264fe/datapath/linux/../datapath.h:111:30: warning: passing
argument 3 of ‘iptunnel_xmit’ makes pointer from integer without a cast
[enabled by default]
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
^
/root/openvswitch-75264fe/datapath/linux/vport-lisp.c:489:9: note: in expansion
of macro ‘OVS_CB’
OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
^
In file included from
/root/openvswitch-75264fe/datapath/linux/compat/include/net/ip_tunnels.h:6:0,
from /root/openvswitch-75264fe/datapath/linux/../flow.h:36,
from /root/openvswitch-75264fe/datapath/linux/../datapath.h:30,
from /root/openvswitch-75264fe/datapath/linux/vport-lisp.c:36:
include/net/ip_tunnels.h:159:5: note: expected ‘struct sk_buff *’ but argument
is of type ‘__be32’
int iptunnel_xmit(struct net *net, struct rtable *rt,
^
CC [M] /root/openvswitch-75264fe/datapath/linux/vport-netdev.o
CC [M] /root/openvswitch-75264fe/datapath/linux/vport-vxlan.o
CC [M] /root/openvswitch-75264fe/datapath/linux/dev-openvswitch.o
CC [M] /root/openvswitch-75264fe/datapath/linux/exthdrs_core.o
CC [M] /root/openvswitch-75264fe/datapath/linux/flex_array.o
CC [M] /root/openvswitch-75264fe/datapath/linux/flow_dissector.o
CC [M] /root/openvswitch-75264fe/datapath/linux/gre.o
CC [M] /root/openvswitch-75264fe/datapath/linux/gso.o
CC [M] /root/openvswitch-75264fe/datapath/linux/genetlink-openvswitch.o
CC [M] /root/openvswitch-75264fe/datapath/linux/hash.o
CC [M] /root/openvswitch-75264fe/datapath/linux/hash-x86.o
CC [M] /root/openvswitch-75264fe/datapath/linux/ip_tunnels_core.o
CC [M] /root/openvswitch-75264fe/datapath/linux/netdevice.o
CC [M] /root/openvswitch-75264fe/datapath/linux/net_namespace.o
CC [M] /root/openvswitch-75264fe/datapath/linux/reciprocal_div.o
CC [M] /root/openvswitch-75264fe/datapath/linux/skbuff-openvswitch.o
CC [M] /root/openvswitch-75264fe/datapath/linux/vxlan.o
CC [M] /root/openvswitch-75264fe/datapath/linux/utils.o
LD [M] /root/openvswitch-75264fe/datapath/linux/openvswitch.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/openvswitch-75264fe/datapath/linux/openvswitch.mod.o
LD [M] /root/openvswitch-75264fe/datapath/linux/openvswitch.ko
make[2]: Leaving directory `/usr/src/kernels/3.10.0-121.el7.x86_64'
make[1]: Leaving directory `/root/openvswitch-75264fe/datapath/linux'
make[1]: Entering directory `/root/openvswitch-75264fe/datapath'
make[2]: Entering directory `/root/openvswitch-75264fe'
make[2]: Leaving directory `/root/openvswitch-75264fe'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/root/openvswitch-75264fe/datapath'
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss