yyang13 / ovs_nsh_patches

21 stars 16 forks source link

Regarding vxlan-gpe port crashes the vswitch process on using dpdk datapath #2

Open Rakesh1983 opened 8 years ago

Rakesh1983 commented 8 years ago

Hello yang,

I am validating the basic vxlan-gpe to vxlan-gpe communication on using on applying https://github.com/yyang13/ovs_nsh_patches using dpdk datapath that results in crashing of vswitchd process(Terminates using SIGABRT signal).

The diagram and commands used for launching of dpdk is as follows,

192.168.10.10/24                      192.168.10.20/24
+--------------+                       +--------------+
|    br-int   |                       |    br-int    |
+--------------+                       +--------------+
| vxlan0-gpe  |                       | vxlan0-gpe   |
+--------------+                       +--------------+
       |                                      |
       |                                      |
       |                                      |
200.2.0.101/24                     200.2.0.102/24 
+--------------+                      +---------------+
|    br-eth1   |                      |     br-eth1   |
+--------------+                      +---------------+
|    eth1      |----------------------|      eth1     |
+--------------+                      +---------------+       

ifup br-int and ping form br-int (192.168.10.10 to 192.168.10.20) fails and ends up in aborting of vswitchd process.

kernel used : 4.4.0-22 (ubuntu 16.04) Release. ETH1 and ETH2 : Intel's 10-Gigabit X540-AT2 (rev 01), Binded with vfio-pci module

commands used for launching openvswitch process,

#  ./ovsdb/ovsdb-tool create /etc/openvswitch/conf.db ./vswitchd/vswitch.ovsschema
#  ./ovsdb/ovsdb-server --remote=punix:/var/run/openvswitch/db.sock  --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach
#  ./utilities/ovs-vsctl --no-wait init
#   export DB_SOCK=/var/run/openvswitch/db.sock
#  ./vswitchd/ovs-vswitchd --dpdk -c 0x3 -n 4 --socket-mem 2048,0 -- unix:$DB_SOCK --pidfile --detach --log-file=/var/log/openvswitch/ovs-vswitchd.log -vconsole:err -vsyslog:dbg -vfile:err --verbose=dbg

command used for creating the the br-int and br-eth1 bridges and ports(Remote ip, br-eth and br-int ip is been modified on HOSTB)

# ovs-vsctl add-br br-eth1 -- set bridge br-eth1 datapath_type=netdev
# ovs-vsctl add-port br-eth1 dpdk0 -- set Interface dpdk0 type=dpdk
# ip link set br-eth1  up
# ip addr add 200.2.0.101/24 dev br-eth1

# ovs-vsctl add-br  br-int -- set bridge br-ext  datapath_type=netdev
# ovs-vsctl add-port br-int vxlan0 -- set interface vxlan0 type=vxlan options:remote_ip=200.2.0.102 options:key=flow options:dst_port=4790 options:exts=gpe

Requesting to know Is there any steps i am are missing out or there is any alternative way to get vxlan-gpe to vxlan-gpe working, or the current release requires any support for SFC using DPDK data path.

Thanks, Rakesh

Rakesh1983 commented 8 years ago

Found a minor issue, In which mutex unlock was not called during building the vxlan header info, When tnl_flow->tunnel.gpe_np is not set returns with the lock acquired. Below are the changes,

--- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -1372,8 +1372,10 @@ netdev_vxlan_build_header(const struct netdev *netdev, put_16aligned_be32(&vxh->vx_flags, htonl(VXLAN_FLAGS | VXLAN_HF_GPE)); put_16aligned_be32(&vxh->vx_vni, htonl(ntohll(tnl_flow->tunnel.tun_id) << 8));