码迷,mamicode.com
首页 > 其他好文 > 详细

[ovs][dpdk] ovs-dpdk, dpdk port 大量丢包

时间:2018-05-22 14:45:09      阅读:810      评论:0      收藏:0      [点我收藏+]

标签:pts   figure   with   reason   AC   remote   .sh   add   share   

 

gdb了ovs的代码,发现是 dpdk的imiss计数在不断的丢包。

 

看了ovs-openvswitchd的日志,重启时发现如下行:

3590 2018-05-21T11:57:03.427Z|00033|timeval|WARN|Unreasonably long 22418ms poll interval (474ms user, 21612ms system)
3591 2018-05-21T11:57:03.427Z|00034|timeval|WARN|faults: 141393 minor, 0 major
3592 2018-05-21T11:57:03.427Z|00035|timeval|WARN|disk: 0 reads, 16 writes
3593 2018-05-21T11:57:03.427Z|00036|timeval|WARN|context switches: 14 voluntary, 120 involuntary

 

开启debug

[root@vrouter1 ~]# ovs-appctl vlog/set file:dbg

 

重装新版dpdk

[root@vrouter1 ovs-dpdk]# ls
dpdk-17.11.2.tar.xz  dpdk-stable-17.11.2  openvswitch-2.9.1  openvswitch-2.9.1.tar.gz

1. 编译dpdk

[root@vrouter1 dpdk-stable-17.11.2]# make config T=$RTE_TARGET O=$RTE_TARGET
Configuration done using x86_64-native-linuxapp-gcc
[root@vrouter1 dpdk-stable-17.11.2]# cd x86_64-native-linuxapp-gcc/
[root@vrouter1 x86_64-native-linuxapp-gcc]# make

2. 编译ovs

[root@vrouter1 openvswitch-2.9.1]# ./boot.sh 
[root@vrouter1 openvswitch-2.9.1]# ./configure --with-dpdk=$RTE_SDK/$RTE_TARGET
[root@vrouter1 openvswitch-2.9.1]# make
[root@vrouter1 openvswitch-2.9.1]# make install

 

3. 运行

[root@vrouter1 ovs-dpdk]# cat ovs.sh 
export PATH=$PATH:/usr/local/share/openvswitch/scripts
export DB_SOCK=/usr/local/var/run/openvswitch/db.sock

ovs-ctl --no-ovs-vswitchd start
#ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
#ovs-ctl --no-ovsdb-server --db-sock="$DB_SOCK" start
ovs-ctl --no-ovsdb-server start
[root@vrouter1 ovs-dpdk]# 

 

4. 配置

[root@vrouter1 Datapath]# dpdk-devbind -b vfio-pci 0000:01:00.0
[root@vrouter1 ovs-dpdk]# ovs-vsctl add-br br-phy -- set bridge br-phy datapath_type=netdev
[root@vrouter1 ovs-dpdk]# ovs-vsctl add-port br-phy dpdk-p0 -- set Interface dpdk-p0 type=dpdk options:dpdk-devargs=0000:01:00.0

 

[root@vrouter1 ovs-dpdk]# ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
[root@vrouter1 ovs-dpdk]# ovs-vsctl add-port br0 vxlan0 -- set Interface vxlan0 type=vxlan options:remote_ip=10.0.0.163 options:local_ip=10.0.0.161 options:in_key=flow options:out_key=flow

 

 #>ovs-appctl ovs/route/add 10.0.0.163/24 br-phy
[root@vrouter1 ~]# ip a add 10.0.0.161/24 dev br-phy

 

[ovs][dpdk] ovs-dpdk, dpdk port 大量丢包

标签:pts   figure   with   reason   AC   remote   .sh   add   share   

原文地址:https://www.cnblogs.com/hugetong/p/9071564.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!