Wind River Support Network

HomeDefectsOVP7-112
Fixed

OVP7-112 : OVP7: can't add dpdk port to openvswitch, segment fault to ovs-vswitchd

Created: Jan 18, 2018    Updated: May 16, 2019
Resolved Date: Feb 26, 2018
Found In Version: 7.0.0.25, 7.0.0.26
Fix Version: 7.0.0.28
Severity: Severe
Applicable for: Wind River Linux 7
Component/s: Userspace

Description

OVP7 RCPL 25, with the new dpdk/ovs versions, when bind a NIC to dpdk ovs. The ovs-vswitchd will get segment fault.
And the ovs-vsctl command will stuck all the time.

root@localhost:~# ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk options:dpdk-devargs=0000:45:00.2

dmesg:
------
[ 1119.147027] ovs-vswitchd[4552]: segfault at 18 ip 000000000070cb0f sp 00007fff2f4801c0 error 6 in ovs-vswitchd[400000+487000]
[ 1143.487184] device ovs-netdev entered promiscuous mode
[ 1143.495219] device br0 entered promiscuous mode
[ 1143.504377] [5014]: segfault at 18 ip 000000000070cb0f sp 00007fff2f4801c0 error 6 in ovs-vswitchd[400000+487000]
[ 1167.837793] device ovs-netdev entered promiscuous mode
[ 1167.845793] device br0 entered promiscuous mode
[ 1167.856937] [5240]: segfault at 18 ip 000000000070cb0f sp 00007fff2f4801c0 error 6 in ovs-vswitchd[400000+487000]
[ 1192.156379] device ovs-netdev entered promiscuous mode
[ 1192.164272] device br0 entered promiscuous mode
[ 1192.173244] [5469]: segfault at 18 ip 000000000070cb0f sp 00007fff2f4801c0 error 6 in ovs-vswitchd[400000+487000]
------

Steps to Reproduce

1. project configuration:
/opt/WRL7/wrlinux-7/wrlinux/configure --enable-board=intel-x86-64 --enable-rootfs=ovp-kvm+installer-support --enable-addons=wr-ovp --enable-jobs=8 --enable-parallel-pkgbuilds=8 --enable-reconfig --with-layer=wr-dpdk --enable-bootimage=hdd,tar.bz2 --with-bootimage-space=1024 --enable-checkout-all-layers=yes --enable-rm-oldimgs=yes --with-template=feature/new-dpdk-ovs --with-init=sysvinit --with-rcpl-version=0025

2. Steps below:
root@localhost:~# modprobe uio
root@localhost:~# modprobe igb_uio
root@localhost:~# modprobe rte_kni
root@localhost:~# mkdir /mnt/huge
mkdir: cannot create directory '/mnt/huge': File exists
root@localhost:~# mount -t hugetlbfs nodev /mnt/huge
root@localhost:~# ifconfig eth3 down
root@localhost:~# ifconfig eth4 down
root@localhost:~# /opt/dpdk/share/tools/dpdk_nic_bind.py --bind=igb_uio eth3
root@localhost:~# /opt/dpdk/share/tools/dpdk_nic_bind.py --bind=igb_uio eth4
root@localhost:~# /opt/dpdk/share/tools/dpdk_nic_bind.py --status           

Network devices using DPDK-compatible driver
============================================
0000:45:00.2 'I350 Gigabit Network Connection' drv=igb_uio unused=
0000:45:00.3 'I350 Gigabit Network Connection' drv=igb_uio unused=

Network devices using kernel driver
===================================
0000:33:00.0 'I210 Gigabit Network Connection' if=eth0 drv=igb unused=igb_uio 
0000:45:00.0 'I350 Gigabit Network Connection' if=eth1 drv=igb unused=igb_uio 
0000:45:00.1 'I350 Gigabit Network Connection' if=eth2 drv=igb unused=igb_uio 

Other network devices
=====================
0000:2d:00.0 'Device 374c' unused=igb_uio

Crypto devices using DPDK-compatible driver
===========================================
<none>

Crypto devices using kernel driver
==================================
<none>

Other crypto devices
====================
0000:27:00.0 'Device 37c8' unused=igb_uio
0000:29:00.0 'Device 37c8' unused=igb_uio
0000:2b:00.0 'Device 37c8' unused=igb_uio
root@localhost:~# DB_SOCK=/var/run/openvswitch/db.sock
root@localhost:~# DB_FILE=/etc/openvswitch/conf.db
root@localhost:~# /etc/init.d/openvswitch-switch stop
Exiting ovs-vswitchd (4129).
Exiting ovsdb-server (4118).
root@localhost:~# rm $DB_FILE
root@localhost:~# ovsdb-tool create $DB_FILE /usr/share/openvswitch/vswitch.ovsschema
root@localhost:~# ovsdb-server $DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:$DB_SOCK --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
root@localhost:~# ovs-vsctl --no-wait init
root@localhost:~# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=0x1e
root@localhost:~# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="4096,0"
root@localhost:~# ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0x1fe0
root@localhost:~# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
root@localhost:~# ovs-vswitchd unix:$DB_SOCK --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach --monitor

root@localhost:~# ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev

root@localhost:~# ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk options:dpdk-devargs=0000:45:00.2


Other Downloads


Live chat
Online