Hi Jay,
   From the logs below, it looks like the agent configuration file 
(/etc/contrail/contrail-vrouter-agent.conf) is not populated with the PCI index 
of the physical interface. It needs to be provisioned with entries as below.

platform=dpdk
physical_interface_address=<pci ID of interface>
physical_interface_mac=<MAC of interface>

These are usually populated by the provisioning scripts in 
https://github.com/Juniper/contrail-fabric-utils

You can also look at the “fab” commands that need to be executed to provision 
Contrail in the docs at 
http://www.juniper.net/techpubs/en_US/contrail3.0/information-products/pathway-pages/index-r3.0.html

Also, please look at the the agent log file in 
/var/log/contrail/contrail-vrouter-agent.log to check if there are any other 
errors.

Raja

From: "Rhine, Jay (Nokia - US)" <[email protected]>
Date: Friday, June 3, 2016 at 10:57 AM
To: "Rhine, Jay (Nokia - US)" <[email protected]>, Raja Sivaramakrishnan 
<[email protected]>, Matthew Welch <[email protected]>
Cc: "[email protected]" <[email protected]>, 
"[email protected]" <[email protected]>
Subject: RE: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a 
Compute

Raja,

                So with the kernel modules loaded, I can get  
contrail-vrouter-dpdk running and the vhost0 created via vif commands or via 
the startup scripts.  .  I can even use the vhost to ping other systems on the 
same subnet.  However, once I start the contrail-vrouter-agent it starts 
communicating with the vrouter and then crashes with a “Segmentation fault”.    
Have you ever seen this before?  Do you have any idea how to fix it?

Thank you very much for any ideas!

Jay

The crash occurs when doing strcmp in sandesh.c:

sandesh_find_info (sandesh_info_t *infos, const char *name) {
    int sidx = 0;
    while (infos[sidx].name != NULL) {
        if (strcmp(infos[sidx].name, name) == 0) {
            return &infos[sidx];
        }
        sidx++;
    }
    return NULL;
}

Here is the stack trace from the crash (generated by running 
contrail-vrouter-dpdk in gdb):

__strcmp_sse2_unaligned () at 
../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:30
30      ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: No such file or 
directory.
(gdb) bt
#0  __strcmp_sse2_unaligned () at 
../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:30
#1  0x000000000052dd58 in sandesh_find_info (infos=<optimized out>, name=0x0) 
at tools/sandesh/library/c/sandesh.c:22
#2  0x000000000052dbb3 in sandesh_decode_one (buf=buf@entry=0x7fffcef5cd98 "", 
buf_len=buf_len@entry=48,
    sinfo_find_fn=sinfo_find_fn@entry=0x52d8d0 <vr_find_sandesh_info>, 
error=error@entry=0x7ffff0bfa7b0) at tools/sandesh/library/c/sandesh.c:61
#3  0x000000000052ddc4 in sandesh_decode (buf=0x7fffcef5cd98 "", buf_len=48, 
sinfo_find_fn=0x52d8d0 <vr_find_sandesh_info>, error=error@entry=0x7ffff0bfa7b0)
    at tools/sandesh/library/c/sandesh.c:128
#4  0x000000000051a8e8 in sandesh_proto_decode (buf=<optimized out>, 
len=<optimized out>, cb=<optimized out>, cb_arg=<optimized out>)
    at vrouter/dp-core/vr_sandesh.c:136
#5  0x000000000050e858 in vr_message_request 
(message=message@entry=0x7ffff0bfa7e0) at vrouter/dp-core/vr_message.c:71
#6  0x00000000004f0abd in dpdk_netlink_receive 
(usockp=usockp@entry=0x7fffcef5ddc0, nl_buf=0x7fffcef5cd80 "H", 
nl_len=<optimized out>)
    at vrouter/dpdk/vr_dpdk_netlink.c:105
#7  0x00000000004f375a in usock_read_done (usockp=0x7fffcef5ddc0) at 
vrouter/dpdk/vr_dpdk_usocket.c:549
#8  vr_usocket_read (usockp=0x7fffcef5ddc0) at 
vrouter/dpdk/vr_dpdk_usocket.c:1006
#9  0x00000000004f49ed in vr_usocket_io (transport=<optimized out>) at 
vrouter/dpdk/vr_dpdk_usocket.c:1272
#10 0x00000000004f013d in dpdk_lcore_netlink_loop () at 
vrouter/dpdk/vr_dpdk_lcore.c:1534
#11 vr_dpdk_lcore_launch (dummy=<optimized out>) at 
vrouter/dpdk/vr_dpdk_lcore.c:1661
#12 0x0000000000434225 in eal_thread_loop (arg=<optimized out>) at 
/home/kwc/contrail_master.current/third_party/dpdk/lib/librte_eal/linuxapp/eal/eal_thread.c:184
#13 0x00007ffff74b2182 in start_thread (arg=0x7ffff0bfb700) at 
pthread_create.c:312
#14 0x00007ffff6fd947d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Here is the full gdb run showing all the output from the virtual router

(gdb) set args --no-daemon --socket-mem 1024,1024
(gdb) run
Starting program: /usr/bin/contrail-vrouter-dpdk --no-daemon --socket-mem 
1024,1024
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2016-06-03 11:34:46,282 VROUTER: vRouter/DPDK version: {"build-info": 
[{"build-time": "2016-06-02 14:15:54.370040", "build-hostname": "HP-RBC-07", 
"build-user": "kwc", "build-version": "3.1.0.0"}]}
2016-06-03 11:34:46,297 VROUTER: Max HOLD flow entries set to 1000
2016-06-03 11:34:46,297 VROUTER: Use taskset(1) to set the core mask. Falling 
back do the default core mask 0xf
2016-06-03 11:34:46,297 VROUTER: Bridge Table limit:          262144
2016-06-03 11:34:46,297 VROUTER: Bridge Table overflow limit: 4096
2016-06-03 11:34:46,297 VROUTER: Flow Table limit:            524288
2016-06-03 11:34:46,297 VROUTER: Flow Table overflow limit:   8192
2016-06-03 11:34:46,298 VROUTER: MPLS labels limit:           5120
2016-06-03 11:34:46,298 VROUTER: Nexthops limit:              65536
2016-06-03 11:34:46,298 VROUTER: VRF tables limit:            4096
2016-06-03 11:34:46,298 VROUTER: EAL arguments:
2016-06-03 11:34:46,298 VROUTER:            -n  "4"
2016-06-03 11:34:46,298 VROUTER:  --socket-mem  "1024,1024"
2016-06-03 11:34:46,298 VROUTER:      --lcores  
"(0-2)@(0-31),(8-9)@(0-31),10@0,11@1,12@2,13@3"
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Detected lcore 2 as core 2 on socket 0
EAL: Detected lcore 3 as core 3 on socket 0
EAL: Detected lcore 4 as core 4 on socket 0
EAL: Detected lcore 5 as core 5 on socket 0
EAL: Detected lcore 6 as core 6 on socket 0
EAL: Detected lcore 7 as core 7 on socket 0
EAL: Detected lcore 8 as core 0 on socket 1
EAL: Detected lcore 9 as core 1 on socket 1
EAL: Detected lcore 10 as core 2 on socket 1
EAL: Detected lcore 11 as core 3 on socket 1
EAL: Detected lcore 12 as core 4 on socket 1
EAL: Detected lcore 13 as core 5 on socket 1
EAL: Detected lcore 14 as core 6 on socket 1
EAL: Detected lcore 15 as core 7 on socket 1
EAL: Detected lcore 16 as core 0 on socket 0
EAL: Detected lcore 17 as core 1 on socket 0
EAL: Detected lcore 18 as core 2 on socket 0
EAL: Detected lcore 19 as core 3 on socket 0
EAL: Detected lcore 20 as core 4 on socket 0
EAL: Detected lcore 21 as core 5 on socket 0
EAL: Detected lcore 22 as core 6 on socket 0
EAL: Detected lcore 23 as core 7 on socket 0
EAL: Detected lcore 24 as core 0 on socket 1
EAL: Detected lcore 25 as core 1 on socket 1
EAL: Detected lcore 26 as core 2 on socket 1
EAL: Detected lcore 27 as core 3 on socket 1
EAL: Detected lcore 28 as core 4 on socket 1
EAL: Detected lcore 29 as core 5 on socket 1
EAL: Detected lcore 30 as core 6 on socket 1
EAL: Detected lcore 31 as core 7 on socket 1
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 32 lcore(s)
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
EAL: Ask a virtual area of 0xc00000 bytes
EAL: Virtual area found at 0x7fffee800000 (size = 0xc00000)
EAL: Ask a virtual area of 0x800000 bytes
EAL: Virtual area found at 0x7fffede00000 (size = 0x800000)
EAL: Ask a virtual area of 0x51000000 bytes
EAL: Virtual area found at 0x7fff9cc00000 (size = 0x51000000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff9c800000 (size = 0x200000)
EAL: Ask a virtual area of 0x228c00000 bytes
EAL: Virtual area found at 0x7ffd73a00000 (size = 0x228c00000)
EAL: Ask a virtual area of 0x280000000 bytes
EAL: Virtual area found at 0x7ffaf3800000 (size = 0x280000000)
EAL: Requesting 512 pages of size 2MB from socket 0
EAL: Requesting 512 pages of size 2MB from socket 1
[New Thread 0x7ffff2bff700 (LWP 29281)]
EAL: TSC frequency is ~2593499 KHz
EAL: Master lcore 0 is ready 
(tid=f7fe5b00;cpuset=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])
[New Thread 0x7ffff23fe700 (LWP 29282)]
EAL: lcore 1 is ready 
(tid=f23fe700;cpuset=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])
[New Thread 0x7ffff1bfd700 (LWP 29283)]
EAL: lcore 2 is ready 
(tid=f1bfd700;cpuset=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])
[New Thread 0x7ffff13fc700 (LWP 29284)]
EAL: lcore 8 is ready 
(tid=f13fc700;cpuset=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])
[New Thread 0x7ffff0bfb700 (LWP 29285)]
EAL: lcore 9 is ready 
(tid=f0bfb700;cpuset=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])
[New Thread 0x7ffff03fa700 (LWP 29286)]
EAL: lcore 10 is ready (tid=f03fa700;cpuset=[0])
[New Thread 0x7fffeddff700 (LWP 29287)]
EAL: lcore 11 is ready (tid=eddff700;cpuset=[1])
[New Thread 0x7fffed5fe700 (LWP 29288)]
EAL: lcore 12 is ready (tid=ed5fe700;cpuset=[2])
[New Thread 0x7fffecdfd700 (LWP 29289)]
EAL: lcore 13 is ready (tid=ecdfd700;cpuset=[3])
EAL: PCI device 0000:07:00.0 on NUMA socket 0
EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:07:00.1 on NUMA socket 0
EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
EAL:   PCI memory mapped at 0x7fffef400000
EAL:   PCI memory mapped at 0x7fffef500000
PMD: eth_ixgbe_dev_init(): MAC: 2, PHY: 12, SFP+: 3
PMD: eth_ixgbe_dev_init(): port 0 vendorID=0x8086 deviceID=0x10fb
2016-06-03 11:34:52,481 VROUTER: Found 1 eth device(s)
2016-06-03 11:34:52,481 VROUTER: Using 4 forwarding lcore(s)
2016-06-03 11:34:52,481 VROUTER: Using 0 IO lcore(s)
2016-06-03 11:34:52,481 VROUTER: Using 5 service lcores
2016-06-03 11:34:52,481 VROUTER: set fd limit to 4096 (prev 1024, max 4096)
2016-06-03 11:34:52,497 VROUTER: Starting NetLink...
2016-06-03 11:34:52,497 USOCK: usock_alloc[7ffff0bfb700]: new socket FD 43
2016-06-03 11:34:52,497 USOCK: usock_alloc[7ffff0bfb700]: setting socket FD 43 
send buff size.
Buffer size set to 18320000 (requested 9216000)
2016-06-03 11:34:52,497 VROUTER:     NetLink TCP socket FD is 43
2016-06-03 11:34:52,497 VROUTER:     uvhost Unix socket FD is 44
2016-06-03 11:34:52,497 VROUTER: Lcore 10: distributing MPLSoGRE packets to 
[11,12,13]
2016-06-03 11:34:52,497 VROUTER: Lcore 11: distributing MPLSoGRE packets to 
[10,12,13]
2016-06-03 11:34:52,497 VROUTER: Lcore 12: distributing MPLSoGRE packets to 
[10,11,13]
2016-06-03 11:34:52,497 VROUTER: Lcore 13: distributing MPLSoGRE packets to 
[10,11,12]
2016-06-03 11:34:52,497 UVHOST: Starting uvhost server...
2016-06-03 11:34:52,498 UVHOST:     server event FD is 45
2016-06-03 11:34:52,498 UVHOST:     server socket FD is 46
2016-06-03 11:34:53,497 VROUTER: Retrying connection for socket 44...
2016-06-03 11:34:53,497 UVHOST: Handling connection FD 46...
2016-06-03 11:34:53,497 UVHOST:     FD 46 accepted new NetLink connection FD 49
2016-06-03 11:34:53,498 DPCORE: vrouter soft reset start
2016-06-03 11:34:53,524 DPCORE: vrouter soft reset done (0)
2016-06-03 11:34:53,541 VROUTER: Adding vif 0 (gen. 1) eth device 0 PCI 
0000:07:00.1 MAC 8c:dc:d4:aa:6e:ad (vif MAC 8c:dc:d4:aa:6e:ad)
2016-06-03 11:34:53,541 VROUTER:     setup 4 RSS queue(s) and 0 filtering 
queue(s)
2016-06-03 11:34:53,706 VROUTER:     lcore 10 TX to HW queue 0
2016-06-03 11:34:53,706 VROUTER:     lcore 11 TX to HW queue 1
2016-06-03 11:34:53,707 VROUTER:     lcore 12 TX to HW queue 2
2016-06-03 11:34:53,707 VROUTER:     lcore 13 TX to HW queue 3
2016-06-03 11:34:53,707 VROUTER:     lcore  8 TX to HW queue 4
2016-06-03 11:34:53,707 VROUTER:     lcore  9 TX to HW queue 5
2016-06-03 11:34:53,707 VROUTER:     lcore 10 RX from HW queue 0
2016-06-03 11:34:53,707 VROUTER:     lcore 11 RX from HW queue 1
2016-06-03 11:34:53,707 VROUTER:     lcore 12 RX from HW queue 2
2016-06-03 11:34:53,707 VROUTER:     lcore 13 RX from HW queue 3
2016-06-03 11:34:53,707 VROUTER: Adding vif 1 (gen. 2) KNI device vhost0 at eth 
device 0 MAC 8c:dc:d4:aa:6e:ad (vif MAC 8c:dc:d4:aa:6e:ad)
2016-06-03 11:34:53,707 VROUTER:     bind KNI kernel thread to CPU 4
2016-06-03 11:34:53,707 KNI: pci: 07:00:01       8086:10fb
2016-06-03 11:34:53,749 VROUTER:     lcore 10 TX to HW queue 0
2016-06-03 11:34:53,749 VROUTER:     lcore 11 TX to SW ring
2016-06-03 11:34:53,749 VROUTER:     lcore 10 now has 1 ring(s) to push
2016-06-03 11:34:53,749 VROUTER:     lcore 12 TX to SW ring
2016-06-03 11:34:53,749 VROUTER:     lcore 10 now has 2 ring(s) to push
2016-06-03 11:34:53,749 VROUTER:     lcore 13 TX to SW ring
2016-06-03 11:34:53,749 VROUTER:     lcore 10 now has 3 ring(s) to push
2016-06-03 11:34:53,749 VROUTER:     lcore  8 TX to SW ring
2016-06-03 11:34:53,749 VROUTER:     lcore 10 now has 4 ring(s) to push
2016-06-03 11:34:53,749 VROUTER:     lcore  9 TX to SW ring
2016-06-03 11:34:53,749 VROUTER:     lcore 10 now has 5 ring(s) to push
2016-06-03 11:34:53,749 VROUTER:     lcore 10 RX from HW queue 0
2016-06-03 11:34:53,749 VROUTER: Adding vif 2 (gen. 3) packet device unix
2016-06-03 11:34:53,749 USOCK: usock_alloc[7ffff0bfb700]: new socket FD 51
2016-06-03 11:34:53,749 USOCK: usock_alloc[7ffff0bfb700]: setting socket FD 51 
send buff size.
Buffer size set to 18320000 (requested 9216000)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff0bfb700 (LWP 29285)]
__strcmp_sse2_unaligned () at 
../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:30
30      ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: No such file or 
directory.
(gdb) bt
#0  __strcmp_sse2_unaligned () at 
../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:30
#1  0x000000000052dd58 in sandesh_find_info (infos=<optimized out>, name=0x0) 
at tools/sandesh/library/c/sandesh.c:22
#2  0x000000000052dbb3 in sandesh_decode_one (buf=buf@entry=0x7fffcef5cd98 "", 
buf_len=buf_len@entry=48,
    sinfo_find_fn=sinfo_find_fn@entry=0x52d8d0 <vr_find_sandesh_info>, 
error=error@entry=0x7ffff0bfa7b0) at tools/sandesh/library/c/sandesh.c:61
#3  0x000000000052ddc4 in sandesh_decode (buf=0x7fffcef5cd98 "", buf_len=48, 
sinfo_find_fn=0x52d8d0 <vr_find_sandesh_info>, error=error@entry=0x7ffff0bfa7b0)
    at tools/sandesh/library/c/sandesh.c:128
#4  0x000000000051a8e8 in sandesh_proto_decode (buf=<optimized out>, 
len=<optimized out>, cb=<optimized out>, cb_arg=<optimized out>)
    at vrouter/dp-core/vr_sandesh.c:136
#5  0x000000000050e858 in vr_message_request 
(message=message@entry=0x7ffff0bfa7e0) at vrouter/dp-core/vr_message.c:71
#6  0x00000000004f0abd in dpdk_netlink_receive 
(usockp=usockp@entry=0x7fffcef5ddc0, nl_buf=0x7fffcef5cd80 "H", 
nl_len=<optimized out>)
    at vrouter/dpdk/vr_dpdk_netlink.c:105
#7  0x00000000004f375a in usock_read_done (usockp=0x7fffcef5ddc0) at 
vrouter/dpdk/vr_dpdk_usocket.c:549
#8  vr_usocket_read (usockp=0x7fffcef5ddc0) at 
vrouter/dpdk/vr_dpdk_usocket.c:1006
#9  0x00000000004f49ed in vr_usocket_io (transport=<optimized out>) at 
vrouter/dpdk/vr_dpdk_usocket.c:1272
#10 0x00000000004f013d in dpdk_lcore_netlink_loop () at 
vrouter/dpdk/vr_dpdk_lcore.c:1534
#11 vr_dpdk_lcore_launch (dummy=<optimized out>) at 
vrouter/dpdk/vr_dpdk_lcore.c:1661
#12 0x0000000000434225 in eal_thread_loop (arg=<optimized out>) at 
/home/kwc/contrail_master.current/third_party/dpdk/lib/librte_eal/linuxapp/eal/eal_thread.c:184
#13 0x00007ffff74b2182 in start_thread (arg=0x7ffff0bfb700) at 
pthread_create.c:312
#14 0x00007ffff6fd947d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)

contrail-vrouter-agent: controller/src/vnsw/agent/oper/interface.cc:354: void 
Interface::SetPciIndex(Agent*): Assertion `0' failed.



----
Jay Rhine, CISSP

From: Rhine, Jay (Nokia - US)
Sent: Thursday, June 02, 2016 11:53 PM
To: 'Rajagopalan Sivaramakrishnan'; Matthew Welch
Cc: [email protected]; [email protected]
Subject: RE: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a 
Compute

Raja,

                Thank you!  That was it.  Something is still not perfect, but 
those missing kernel modules were the current problem.  Hopefully, I can get 
this routing traffic tomorrow!

Thanks!

JAy

----
Jay Rhine, CISSP

From: Rajagopalan Sivaramakrishnan [mailto:[email protected]]
Sent: Thursday, June 02, 2016 4:57 PM
To: Rhine, Jay (Nokia - US); Matthew Welch
Cc: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: Re: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a 
Compute

Hi Jay,
   You might need to load the igb_uio /rte_kni modules and bind the NIC to DPDK 
(using dpdk_nic_bind.py).

Raja

From: Dev 
<[email protected]<mailto:[email protected]>> 
on behalf of "Rhine, Jay (Nokia - US)" 
<[email protected]<mailto:[email protected]>>
Date: Thursday, June 2, 2016 at 1:37 PM
To: Matthew Welch <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a 
Compute

Matthew,

                Good thought, but when using the vrouter in dpdk mode there is 
no vrouter kernel module … I can’t find where this is documented exactly, but 
that seem to be the case.

I have tracked down a little more info.  When you run “vif --add 0 --mac 
xx:xx:xx:xx:xx:xx --vrf 0 --vhost-phys --type physical --pmd --id 0”, you get 
“vRouter(Response): No such file or directory (2)” on the command line, but you 
also get the following in the vrouter log:
2016-06-02 16:18:44,141 VROUTER: Error adding vif 0 eth device 1: invalid PMD 1 
(must be less than 0)
2016-06-02 16:18:44,141 VROUTER: Deleting vif 0 eth device
2016-06-02 16:18:44,141 VROUTER:     error deleting eth dev : already removed

                I’ve tracked that error down to the following function in 
“vr_dpdk_interface.c” … Reading this source code it seems that 
“rte_eth_dev_count()” is returning 0.   So apparently, the problem is that I 
have 0 “rte_eth” devices … “rte_eth” is part of dpdk in some way, but I don’t 
understand what it is exactly.  I feel like I’m very close to getting this 
vrouter operational … but I’m still missing something.

Any thoughts are appreciated.

Thanks!

Jay

Here is the code snippet from “vr_dpdk_interface.c” which is generating the 
error:

static int
dpdk_fabric_if_add(struct vr_interface *vif)
{
    int ret;
    uint8_t port_id;
    struct rte_pci_addr pci_address;
    struct vr_dpdk_ethdev *ethdev;
    struct ether_addr mac_addr;

    memset(&pci_address, 0, sizeof(pci_address));
    memset(&mac_addr, 0, sizeof(mac_addr));
    if (vif->vif_flags & VIF_FLAG_PMD) {
        if (vif->vif_os_idx >= rte_eth_dev_count()) {
            RTE_LOG(ERR, VROUTER, "Error adding vif %u eth device %s: invalid 
PMD %u"
                    " (must be less than %u)\n", vif->vif_idx, vif->vif_name,
                    vif->vif_os_idx, (unsigned)rte_eth_dev_count());
            return -ENOENT;
        }


----
Jay Rhine, CISSP

From: Matthew Welch [mailto:[email protected]]
Sent: Thursday, June 02, 2016 4:24 PM
To: Rhine, Jay (Nokia - US)
Cc: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: Re: [opencontrail-dev] Help with configure contrail-vrouter-dpdk on a 
Compute

Off the top of my head, does lsmod show the vrouter module?

On Thursday, June 2, 2016, Rhine, Jay (Nokia - US) 
<[email protected]<mailto:[email protected]>> wrote:
Folks

                Okay, I have moved further.   I’ve read that contrail-packing 
is going to go away, but it does contain a “contrail-vrouter-dpdk-init” 
package.  I managed to build that, and install it on the compute.

                This setup seems like it should work, BUT its failing to create 
the vhost0, and that’s blocking us from getting any further.  Specifically, the 
vrouter_dpdk_start function from vrouter-functions.sh is fainig to run the 
following two vif commands, with these errors.
vif --add 0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --vhost-phys --type physical --pmd 
--id 0
vRouter(Response): No such file or directory (2)

vif --add vhost0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --type vhost --xconnect 0 
--pmd --id 1
vRouter(Response): No such device (19)

                Does anyone have ideas on this?

Thank you very much,

Jay

Here are the commands and errors in the context of the log:

+ echo 'Thu Jun  2 15:58:18 EDT 2016: Error Agent configuring vhost0: interface 
does not exist'
Thu Jun  2 15:58:18 EDT 2016: Error Agent configuring vhost0: interface does 
not exist
+ break
+ '[' '!' -L /sys/class/net/vhost0 ']'
++ date
+ echo 'Thu Jun  2 15:58:18 EDT 2016: Creating vhost0 interface with vif 
utility...'
Thu Jun  2 15:58:18 EDT 2016: Creating vhost0 interface with vif utility...
+ '[' -z xx:xx:xx:xx:xx:xx ']'
+ '[' -z 172.16.xx.xx/24 ']'
++ date
+ echo 'Thu Jun  2 15:58:18 EDT 2016: Adding p2p2 interface with vif utility...'
Thu Jun  2 15:58:18 EDT 2016: Adding p2p2 interface with vif utility...
Thu Jun  2 15:58:18 EDT 2016: Adding p2p2 interface with vif utility...
+ vif --add 0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --vhost-phys --type physical 
--pmd --id 0
vRouter(Response): No such file or directory (2)
+ '[' 0 '!=' 0 ']'
++ date
+ echo 'Thu Jun  2 15:58:18 EDT 2016: Adding vhost0 interface with vif 
utility...'
Thu Jun  2 15:58:18 EDT 2016: Adding vhost0 interface with vif utility...
+ vif --add vhost0 --mac xx:xx:xx:xx:xx:xx --vrf 0 --type vhost --xconnect 0 
--pmd --id 1
vRouter(Response): No such device (19)
+ '[' 0 '!=' 0 ']'
++ date
+ echo 'Thu Jun  2 15:58:18 EDT 2016: Done starting vRouter/DPDK.'
Thu Jun  2 15:58:18 EDT 2016: Done starting vRouter/DPDK.
+ return 0
+ return 0
Thu Jun  2 15:58:18 EDT 2016: Value

----
Jay Rhine, CISSP

From: Rhine, Jay (Nokia - US)
Sent: Thursday, June 02, 2016 2:01 PM
To: 
[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>;
 
'[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>'
Subject: Help with configure contrail-vrouter-dpdk on a Compute

Howdy,

                In my last email, I said I was having vrouter dpdk compile 
problems.  I do have something compiled now. I had to make a few minor tweaks 
to get it to compile, so I’m not entirely convinced it’s perfect.

                However, at this point I’m trying to configure the 
contrail-vrouter-dpdk on an OpenStack compute node, and I’m struggling to 
understand how it should be configured.  I am using Ubuntu 14.04 and with 
Contrail 2.2x, I would configure a vhost0 interface in /etc/network/interfaces 
using the “vif” command to associated it with the correct physical interface.  
However, the vif command does not seem to work with the Contrail 3.x dpdk based 
vrouter.  I believe this is because there is no longer a vrouter kernel module. 
 There are no startup scripts in the contrail-packages repo for 
contrail-vrouter-dpdk, and no configuration file for it.  I’m able to run it 
manually like “/usr/bin/contrail-vrouter-dpdk --vdev  
eth_bond0,mode=4,slave=0000:07:00.1 --no-daemon”.  I think maybe I can use the 
“vdev” option to setup the vhost0 interface, but I cannot figure out the 
correct syntax.  Also, I’m not clear if when using contrail-vrouter-dpdk, I 
still need to use the “contrail-vrouter-agent” or not.

                Any help, suggestions, or pointers would be appreciated.

Thank you very much,

Jay
----
Jay Rhine, CISSP
_______________________________________________
Dev mailing list
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

Reply via email to