[ovs-discuss] Error - build kernel module (openvswitch-2.0.0.tar.gz) on RHEL 7 Beta

Andrey Korolyov andrey at xdel.ru
Wed May 14 15:55:18 UTC 2014


On 05/14/2014 12:56 AM, Jesse Gross wrote:
> On Tue, May 13, 2014 at 1:52 PM, Andrey Korolyov <andrey at xdel.ru> wrote:
>> On Wed, May 14, 2014 at 12:44 AM, Jesse Gross <jesse at nicira.com> wrote:
>>> On Tue, May 13, 2014 at 1:25 PM, Andrey Korolyov <andrey at xdel.ru> wrote:
>>>> On Wed, May 14, 2014 at 12:19 AM, Jesse Gross <jesse at nicira.com> wrote:
>>>>> On Tue, May 13, 2014 at 1:58 AM, Andrey Korolyov <andrey at xdel.ru> wrote:
>>>>>> On Tue, May 13, 2014 at 4:41 AM, Jesse Gross <jesse at nicira.com> wrote:
>>>>>>> On Mon, May 12, 2014 at 2:04 PM, Andrey Korolyov <andrey at xdel.ru> wrote:
>>>>>>>> On Tue, May 13, 2014 at 12:58 AM, Jesse Gross <jesse at nicira.com> wrote:
>>>>>>>>> On Sat, May 10, 2014 at 2:13 PM, Andrey Korolyov <andrey at xdel.ru> 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.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel-versions-diff.patch
Type: text/x-patch
Size: 3672 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20140514/7e34ff07/attachment-0002.bin>
-------------- next part --------------
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'


More information about the discuss mailing list