[ovs-discuss] ovs-vswitchd with crashes when adding a dpdk port

Daniel Badea daniel.badea at windriver.com
Fri Sep 26 10:39:39 UTC 2014


Here the output of building OVS master vs DPDK master (make -j 16).
I'm working on an environment setup script to build everything from scratch
in a reproducible way and will post it when it's done.

Thanks,
Daniel

cd dpdk
grep url .git/config 
# url = git://dpdk.org/dpdk
git log -n1 --pretty=format:%H%d
# 23fcffe8ffaccf8a2901050e7daa4979597141ed (HEAD, origin/master,
origin/HEAD, master)

cd ../ovs
grep url .git/config 
# url = https://github.com/openvswitch/ovs.git
git log -n1 --pretty=format:%H%d
# 260f76b7e3cf6bd52a2a80d5186f2a68b0123017 (HEAD, origin/master,
origin/HEAD, master)

...
lib/ofpbuf.h:363:19: error: 'const struct rte_mbuf' has no member named
'pkt'
lib/ofpbuf.h: In function 'ofpbuf_set_data':
lib/ofpbuf.h:368:12: error: 'struct rte_mbuf' has no member named 'pkt'
lib/ofpbuf.h: In function 'ofpbuf_size':
lib/ofpbuf.h:383:19: error: 'const struct rte_mbuf' has no member named
'pkt'
lib/ofpbuf.h: In function 'ofpbuf_set_size':
lib/ofpbuf.h:388:12: error: 'struct rte_mbuf' has no member named 'pkt'
lib/ofpbuf.h:389:12: error: 'struct rte_mbuf' has no member named 'pkt'
In file included from
/opt/ovs-dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:98:0,
                 from
/opt/ovs-dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_mempool.h:74,
                 from
/opt/ovs-dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_mbuf.h:56,
                 from
/opt/ovs-dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:178,
                 from lib/netdev-dpdk.h:13,
                 from lib/ofpbuf.h:25,
                 from lib/dpif.h:392,
                 from lib/dpif-provider.h:26,
                 from lib/dpif.c:18:
/opt/ovs-dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_common.h: In
function 'rte_is_aligned':
/opt/ovs-dpdk/dpdk/x86_64-native-linuxapp-gcc/include/rte_common.h:176:9:
warning: cast from function call of type 'uintptr_t' to non-matching type
'void *' [-Wbad-function-cast]
In file included from lib/dpif.h:392:0,
                 from lib/dpctl.c:33:
lib/ofpbuf.h: In function 'ofpbuf_data':
lib/ofpbuf.h:363:19: error: 'const struct rte_mbuf' has no member named
'pkt'
lib/ofpbuf.h: In function 'ofpbuf_set_data':
lib/ofpbuf.h:368:12: error: 'struct rte_mbuf' has no member named 'pkt'
lib/ofpbuf.h: In function 'ofpbuf_size':
lib/ofpbuf.h:383:19: error: 'const struct rte_mbuf' has no member named
'pkt'
lib/ofpbuf.h: In function 'ofpbuf_set_size':
lib/ofpbuf.h:388:12: error: 'struct rte_mbuf' has no member named 'pkt'
lib/ofpbuf.h:389:12: error: 'struct rte_mbuf' has no member named 'pkt'
In file included from lib/dpif.h:392:0,
                 from lib/dpif-provider.h:26,
                 from lib/dpif.c:18:
lib/ofpbuf.h: In function 'ofpbuf_data':
lib/ofpbuf.h:363:19: error: 'const struct rte_mbuf' has no member named
'pkt'
lib/ofpbuf.h: In function 'ofpbuf_set_data':
lib/ofpbuf.h:368:12: error: 'struct rte_mbuf' has no member named 'pkt'
lib/ofpbuf.h: In function 'ofpbuf_size':
lib/ofpbuf.h:383:19: error: 'const struct rte_mbuf' has no member named
'pkt'
lib/ofpbuf.h: In function 'ofpbuf_set_size':
lib/ofpbuf.h:388:12: error: 'struct rte_mbuf' has no member named 'pkt'
lib/ofpbuf.h:389:12: error: 'struct rte_mbuf' has no member named 'pkt'
In file included from lib/dpif-netdev.c:57:0:
lib/packet-dpif.h: In function 'dpif_packet_get_dp_hash':
lib/packet-dpif.h:52:26: error: 'struct rte_mbuf' has no member named 'pkt'
lib/packet-dpif.h: In function 'dpif_packet_set_dp_hash':
lib/packet-dpif.h:62:19: error: 'struct rte_mbuf' has no member named 'pkt'
lib/dpctl.c: In function 'ofpbuf_size':
lib/ofpbuf.h:384:1: warning: control reaches end of non-void function
[-Wreturn-type]
lib/dpctl.c: In function 'ofpbuf_data':
lib/ofpbuf.h:364:1: warning: control reaches end of non-void function
[-Wreturn-type]
make[2]: *** [lib/dpctl.lo] Error 1
In file included from lib/dpif.c:38:0:
lib/packet-dpif.h: In function 'dpif_packet_get_dp_hash':
lib/packet-dpif.h:52:26: error: 'struct rte_mbuf' has no member named 'pkt'
lib/packet-dpif.h: In function 'dpif_packet_set_dp_hash':
lib/packet-dpif.h:62:19: error: 'struct rte_mbuf' has no member named 'pkt'
lib/dpif-netdev.c: In function 'ofpbuf_size':
lib/ofpbuf.h:384:1: warning: control reaches end of non-void function
[-Wreturn-type]
lib/dpif-netdev.c: In function 'dpif_packet_get_dp_hash':
lib/packet-dpif.h:56:1: warning: control reaches end of non-void function
[-Wreturn-type]
lib/dpif-netdev.c: In function 'ofpbuf_data':
lib/ofpbuf.h:364:1: warning: control reaches end of non-void function
[-Wreturn-type]
lib/dpif.c: In function 'ofpbuf_size':
lib/ofpbuf.h:384:1: warning: control reaches end of non-void function
[-Wreturn-type]
lib/dpif.c: In function 'ofpbuf_data':
lib/ofpbuf.h:364:1: warning: control reaches end of non-void function
[-Wreturn-type]
make[2]: *** [lib/dpif.lo] Error 1
make[2]: *** [lib/dpif-netdev.lo] Error 1
make[2]: Leaving directory `/opt/ovs-dpdk/ovs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/ovs-dpdk/ovs'
make: *** [all] Error 2

-----Original Message-----
From: Daniele Di Proietto [mailto:ddiproietto at vmware.com] 
Sent: Thursday, September 25, 2014 11:14 PM
To: Daniel Badea
Cc: discuss at openvswitch.org; Alex Wang
Subject: Re: [ovs-discuss] ovs-vswitchd with crashes when adding a dpdk port

Hi Daniel,

On 9/25/14, 10:34 AM, "Daniel Badea" <daniel.badea at windriver.com> wrote:

>I encountered the following issue: ovs-vswitchd with crashes when 
>adding a dpdk port.
> 
>Building ovs with dpdk support is not straightforward because:
>  - ovs doest not build with the latest dpdk version 1.7.1

We're regularly building with dpdk 1.7.1 (dpdk 1.7.0 is also supported).
Can you please tell us the error that you're experiencing, so that we can
try to fix it?

>  - the document here
>http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plai
>n;f =INSTALL.DPDK;hb=HEAD refers to dpdk 1.6.0r2 but that doesn't work 
>either.

That's an old version of the file. Please read INSTALL.DPDK in the source
tree (or
https://raw.githubusercontent.com/openvswitch/ovs/master/INSTALL.DPDK)

> 
>So I checked out dpdk 1.7.0 did some minor changes (combine libs and 
>kcompat fix for kernel 3.13.0) Now ovs builds ok but:
>  - if the database is empty then ovs-vswitchd starts but crashes on 
>ovs-vsctl add-port ... type=dpdk
>  - if the database already contains dpdk port configuration then 
>ovs-vswitchd crashes at startup
> 
>Logs seem to indicate a numa socket = -1 problem.
> 
>Any ideea how to fix his?

We've managed to reproduce the crash on a single node numa machine. Alex is
about to post a fix to the mailing list.


Thank you for the detailed report!

Daniele





More information about the discuss mailing list