Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-26 Thread Deepak Tiwari
Hi Paul,


I am setting up Opencontrail (DPDK) on a physical host. Earlier system didn't 
support SSE4.2 so I had to change the compilation flag to SSE4.1 after which I 
was able to move ahead. Also I replicated the setup on another system which 
supports SSE4.2. Right now I am able to bring the contrail-vrouter-dpdk binary 
up and running with bond interface created successfully and am able to ping, 
through vhost, other hosts.


Right now the problem I face is that vrouter-agent binary crashes. Although 
vRouter is stable.


Br, Deepak


From: Dev <dev-boun...@lists.opencontrail.org> on behalf of CARVER, PAUL 
<pc2...@att.com>
Sent: Thursday, April 27, 2017 3:49:50 AM
To: dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Deepak,

I don’t know what platform you’re running on that doesn’t support SSE4.2, but 
just in case it’s a VirtualBox VM running on a computer with a physical CPU 
that DOES support SSE4.2, take a look at 
https://www.virtualbox.org/manual/ch09.html#sse412passthrough


From: Dev [mailto:dev-boun...@lists.opencontrail.org] On Behalf Of Deepak Tiwari
Sent: Monday, April 10, 2017 01:57
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Raja,

As I updated last week, I am no longer getting this error (after I switched 
from trunk to 3.2 and back to trunk) now for some unknown reason. Now when I 
start the contrail-dpdk binary, I get following error—

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
ERROR: this system does not support “SSE4_2”.
Please check that RTE_MACHINE is set correctly.

After debugging the root-cause of above issue, I found that in file 
“third_party/dpdk/mk/machine/native/rte.vars.mk”, following check (marked in 
red) is missing. I came to this conclusion because—


1.   On my setup, compiler doesn’t report SSE4_2 support

a.   checked with command “gcc -march=native -dM -E - < /dev/null | grep 
SSE4_2”



2.   File “/var/run/dmesg.boot” is not present

Based on above points and following code, “MACHINE_CFLAGS” will get set to 
“-march=corei7”

# on FreeBSD systems, sometimes the correct cputype is not picked up.
# To get everything to compile, we need SSE4.2 support, so check if that is
# reported by compiler. If not, check if the CPU actually supports it, and if
# so, set the compilation target to be a corei7, minimum target with SSE4.2
SSE42_SUPPORT=$(shell $(CC) -march=native -dM -E - < /dev/null | grep SSE4_2)
ifeq ($(SSE42_SUPPORT),)
  CPU_SSE42_SUPPORT=$(shell if [ -f /var/run/dmesg.boot ] ; then grep SSE4\.2 
/var/run/dmesg.boot ; fi)
  ifneq ($(CPU_SSE42_SUPPORT),)
MACHINE_CFLAGS= -march=corei7
  endif
endif

Ref: 
http://dpdk.org/ml/archives/dev/2014-July/004053.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__dpdk.org_ml_archives_dev_2014-2DJuly_004053.html=DwMGaQ=LFYZ-o9_HUMeMTSQicvjIg=xtmPik_TP2fjPVGWP4yBRQ=aZEDgF0tlbar805wM4Q3Wv9REl7NtxOKgv3pc4OCP8o=qjrS29TkRD7cXDCmax9ogrKEVhswY9qaazFj8wui3S4=>

So I added above additional code as highlighted in RED. Recompiled DPDK library 
as well as contrail-vrouter-dpdk binary and tried to run it. However still same 
error is received

Br, Deepak

"DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-26 Thread CARVER, PAUL
Deepak,

I don’t know what platform you’re running on that doesn’t support SSE4.2, but 
just in case it’s a VirtualBox VM running on a computer with a physical CPU 
that DOES support SSE4.2, take a look at 
https://www.virtualbox.org/manual/ch09.html#sse412passthrough


From: Dev [mailto:dev-boun...@lists.opencontrail.org] On Behalf Of Deepak Tiwari
Sent: Monday, April 10, 2017 01:57
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Raja,

As I updated last week, I am no longer getting this error (after I switched 
from trunk to 3.2 and back to trunk) now for some unknown reason. Now when I 
start the contrail-dpdk binary, I get following error—

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
ERROR: this system does not support “SSE4_2”.
Please check that RTE_MACHINE is set correctly.

After debugging the root-cause of above issue, I found that in file 
“third_party/dpdk/mk/machine/native/rte.vars.mk”, following check (marked in 
red) is missing. I came to this conclusion because—


1.   On my setup, compiler doesn’t report SSE4_2 support

a.   checked with command “gcc -march=native -dM -E - < /dev/null | grep 
SSE4_2”



2.   File “/var/run/dmesg.boot” is not present

Based on above points and following code, “MACHINE_CFLAGS” will get set to 
“-march=corei7”

# on FreeBSD systems, sometimes the correct cputype is not picked up.
# To get everything to compile, we need SSE4.2 support, so check if that is
# reported by compiler. If not, check if the CPU actually supports it, and if
# so, set the compilation target to be a corei7, minimum target with SSE4.2
SSE42_SUPPORT=$(shell $(CC) -march=native -dM -E - < /dev/null | grep SSE4_2)
ifeq ($(SSE42_SUPPORT),)
  CPU_SSE42_SUPPORT=$(shell if [ -f /var/run/dmesg.boot ] ; then grep SSE4\.2 
/var/run/dmesg.boot ; fi)
  ifneq ($(CPU_SSE42_SUPPORT),)
MACHINE_CFLAGS= -march=corei7
  endif
endif

Ref: 
http://dpdk.org/ml/archives/dev/2014-July/004053.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__dpdk.org_ml_archives_dev_2014-2DJuly_004053.html=DwMGaQ=LFYZ-o9_HUMeMTSQicvjIg=xtmPik_TP2fjPVGWP4yBRQ=aZEDgF0tlbar805wM4Q3Wv9REl7NtxOKgv3pc4OCP8o=qjrS29TkRD7cXDCmax9ogrKEVhswY9qaazFj8wui3S4=>

So I added above additional code as highlighted in RED. Recompiled DPDK library 
as well as contrail-vrouter-dpdk binary and tried to run it. However still same 
error is received

Br, Deepak

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode - with Bond interface

2017-04-21 Thread Deepak Tiwari
Hi,


The ping started working once the mode is changed from active-standby to 
"round-robin". Now after changing it ping started working.

Thanks for all your help []


Br, Deepak


From: Dev  on behalf of Deepak Tiwari 

Sent: Friday, April 21, 2017 11:43 AM
To: Rajagopalan Sivaramakrishnan; dev@lists.opencontrail.org
Subject: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode - with Bond interface


Hi Raja,


Note: Initiating another thread of this mail for setting up vrouter with a bond 
interface


I need to setup vrouter where two slave members are added to a bond interface. 
For this I followed below manual steps which were completed successfully. 
However I am not able to ping other machines over vhost0 interface. I have 
connected both slave ports to the switch.


Please provide some clue for this issue so that we can proceed with testing the 
"vifdump-for-bond-slaves" feature changes


1. Bring up vrouter-dpdk binary and provide bond/slave information as --vdev 
option:-


=> sudo taskset -c 2 /usr/bin/contrail-vrouter-dpdk --no-daemon --vdev 
"eth_bond0,mode=4,xmit_policy=l34,socket_id=0,mac=00:15:1a:6e:2e:ca,slave=:01:00.0,slave=:01:00.1"
 --socket-mem 1024


Please note that mac for bond is kept same as that of first slave. I think that 
is how it should be?


2. Add bond and vhost0 interfaces to vrouter:-


=> sudo vif --create vhost0 --mac 00:15:1a:6e:2e:ca

=> sudo vif --add 0 --mac 00:15:1a:6e:2e:ca --vrf 0 --vhost-phys --type 
physical --pmd --transport pmd --id 0

=> sudo vif --add vhost0 --mac 00:15:1a:6e:2e:ca --vrf 0 --xconnect 0 --type 
vhost --pmd --transport pmd --id 1


When adding bond interface to vrouter (2nd command), vrouter was giving as 
error. The reason was that bond interface API "bond_ethdev_info" returns 
max_rx_queues = 128 and max_tx_queues = 512 which is limited to max_rx_queues = 
1 and max_tx_queues = 128 by vrouter (i.e. dpdk_ethdev_info_update procedure). 
Later on "slave_configure" procedure goes on to setup same number of queues 
(rx=1, tx=128) for the slaves. However slave have max_rx_queues and 
max_tx_queues configured as 1 so it fails.


So to proceed further, I did a temporary change in DPDK bond pmd API 
"bond_ethdev_info" to return max_rx_queues = max_tx_queues = 1. After this 
change bond was created successfully and slaves got added to it.


Then I added vhost interface as well


3. Bring up vhost0 interface with IP/gateway etc:-



=> sudo ifdown -i /tmp/interfaces vhost0
=> sudo ifup -i /tmp/interfaces vhost0



Logs


1. Vrouter console output

contrail@contrail-23:~/dev/contrail-installer$ sudo gdb --args taskset -c 2 
/usr/bin/contrail-vrouter-dpdk --no-daemon --vdev 
"eth_bond0,mode=4,xmit_policy=l34,socket_id=0,mac=00:15:1a:6e:2e:ca,slave=:01:00.0,slave=:01:00.1"
 --socket-mem 1024
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from taskset...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/taskset -c 2 /usr/bin/contrail-vrouter-dpdk 
--no-daemon --vdev 
eth_bond0,mode=4,xmit_policy=l34,socket_id=0,mac=00:15:1a:6e:2e:ca,slave=:01:00.0,slave=:01:00.1
 --socket-mem 1024
process 11961 is executing new program: /usr/bin/contrail-vrouter-dpdk
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2017-04-21 10:35:35,066 VROUTER: vRouter/DPDK version: {"build-info": 
[{"build-time": "2017-04-21 04:37:16.403027", "build-hostname": "contrail-23", 
"build-user": "root", "build-version": "4.0.0.0"}]}
2017-04-21 10:35:35,122 VROUTER: Bridge Table limit:  262144
2017-04-21 10:35:35,122 VROUTER: Bridge Table overflow limit: 53248
2017-04-21 10:35:35,122 VROUTER: Flow Table limit:524288
2017-04-21 10:35:35,122 VROUTER: Flow Table overflow limit:   105472
2017-04-21 10:35:35,122 VROUTER: MPLS labels limit:   5120
2017-04-21 10:35:35,122 VROUTER: Nexthops limit:  65536
2017-04-21 10:35:35,122 VROUTER: VRF tables limit:4096
2017-04-21 10:35:35,122 VROUTER: Packet pool size:16384
2017-04-21 10:35:35,122 VROUTER: Maximum packet size: 9216
2017-04-21 10:35:35,122 VROUTER: 

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-18 Thread Deepak Tiwari
 Filtering 
Offload, Mon=Interface is Monitored
   Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload, Df=Drop New 
Flows, L=MAC Learning Enabled
   Proxy=MAC Requests Proxied Always, Er=Etree Root

vif0/0  PMD: 0 (Speed 1000, Duplex 1)
Type:Physical HWaddr:bc:30:5b:cb:03:8d IPaddr:0
Vrf:0 Flags:XL3L2Dpdk MTU:1514 QOS:0 Ref:8
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:0  bytes:0 errors:0
TX packets:0  bytes:0 errors:0
Drops:0

vif0/1  PMD: 0
Type:Host HWaddr:bc:30:5b:cb:03:8d IPaddr:0
Vrf:0 Flags:XL3L2Dpdk MTU:1514 QOS:0 Ref:8
RX queue errors to lcore 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RX packets:0  bytes:0 errors:0
TX packets:0  bytes:0 errors:0
Drops:0


However IP is shown as 0 and no data transfer is happening due to that.


Can you please provide some clue here on how to add IP address to these 
interfaces? I don't see any log in /var/log/vrouter.log file. And there is no 
"/var/log/contrail/contrail-vrouter* file available.


Br, Deepak


From: Rajagopalan Sivaramakrishnan <r...@juniper.net>
Sent: Friday, April 14, 2017 11:25:08 AM
To: Deepak Tiwari; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode


Hi Deepak,

In the agent config file, can you try setting the platform to dpdk as below?



platform=dpdk



This file is read by utilities such as “vif” (please see get_platform() in 
utils/ini_parser.c)



Raja



From: Deepak Tiwari <deepak.tiw...@aricent.com>
Date: Thursday, April 13, 2017 at 4:53 AM
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>, 
"dev@lists.opencontrail.org" <dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode



Hi Raja,



>>> The target machine might have a different CPU than the build machine, so 
>>> this may not work

[DT]: Ok, yes this is correct.





>> Can you please try something like (from vrouter-functions.sh)



vif --add 0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --vhost-phys --type physical --pmd 
--id 0

vif --add vhost0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --type vhost --xconnect 0 
--pmd --id 1

Also, please insert the KNI kernel module as it is used by vhost0.

If you would like to do this from the vrouter agent, the agent config file must 
specify the PCI address/MAC

of the physical interface. This would usually be setup by fab provisioning.



[DT]: Yes, IGB_UIO and KNI kernel modules were inserted before I start the 
vrouter-dpdk. Also the agent conf file contains



[VIRTUAL-HOST-INTERFACE]

physical_interface = eth4

gateway = 192.168.1.1

name = vhost0

ip = 192.168.1.23/24

physical_interface_mac = bc:30:5b:cb:03:8d

physical_interface_address = :02:00.0





I also tried above commands to add interfaces, however it fails too. Following 
error is received.



"Error registering NetLink client: Success (0)"





>> This is unlikely to be related to the vhost0 issue. You can try “sysctl -w 
>> net.core.wmem_max=916”

(from vrouter-fucntions.sh) before starting vrouter-dpdk.



[DT]: this solved the socket send size failure log writing during vrouter-dpdk 
startup



Br, Deepak

________

From: Rajagopalan Sivaramakrishnan <r...@juniper.net>
Sent: Thursday, April 13, 2017 6:10:55 AM
To: Deepak Tiwari; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode



Hi Deepak,

Please see below.



Raja



From: Deepak Tiwari <deepak.tiw...@aricent.com>
Date: Wednesday, April 12, 2017 at 2:41 AM
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>, 
"dev@lists.opencontrail.org" <dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode



Hi Raja,



I was able to proceed further on this. The root-cause is that processor on my 
setup doesn't support SSE4.2 instruction set. I had to do change in 
vrouter/dpdk/SConscript file:-



#Deepak
#env.Append(CCFLAGS = '-msse4.2')
env.Append(CCFLAGS = '-msse4.1')



After this change, the binary didn't crash on __builtin_popcountll call because 
the compiler would have used less optimized SSE4.1 instructions instead of 
SSE4.2 instructions.



Question: should there be a change in the SConscript file to detect the 
supported instruction sets and set SSE4.1 or SSE4.2 flags automatically?



>>> The target machine might have a different CPU than the build machine, so 
>>> this may not work.



Now, voruter-dpdk binary is able to come up successfully. It is able to detect 
the ethernet devices. However when I try to create vhost0 interface it fails--



contrail@contrail-23:~/dev/contrail-installer$ sudo vif --create vhost

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-13 Thread Rajagopalan Sivaramakrishnan
Hi Deepak,
In the agent config file, can you try setting the platform to dpdk as below?

platform=dpdk

This file is read by utilities such as “vif” (please see get_platform() in 
utils/ini_parser.c)

Raja

From: Deepak Tiwari <deepak.tiw...@aricent.com>
Date: Thursday, April 13, 2017 at 4:53 AM
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>, 
"dev@lists.opencontrail.org" <dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode


Hi Raja,



>>> The target machine might have a different CPU than the build machine, so 
>>> this may not work

[DT]: Ok, yes this is correct.




>> Can you please try something like (from vrouter-functions.sh)

vif --add 0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --vhost-phys --type physical --pmd 
--id 0
vif --add vhost0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --type vhost --xconnect 0 
--pmd --id 1
Also, please insert the KNI kernel module as it is used by vhost0.
If you would like to do this from the vrouter agent, the agent config file must 
specify the PCI address/MAC
of the physical interface. This would usually be setup by fab provisioning.

[DT]: Yes, IGB_UIO and KNI kernel modules were inserted before I start the 
vrouter-dpdk. Also the agent conf file contains

[VIRTUAL-HOST-INTERFACE]
physical_interface = eth4
gateway = 192.168.1.1
name = vhost0
ip = 192.168.1.23/24
physical_interface_mac = bc:30:5b:cb:03:8d
physical_interface_address = :02:00.0


I also tried above commands to add interfaces, however it fails too. Following 
error is received.

"Error registering NetLink client: Success (0)"


>> This is unlikely to be related to the vhost0 issue. You can try “sysctl -w 
>> net.core.wmem_max=916”
(from vrouter-fucntions.sh) before starting vrouter-dpdk.


[DT]: this solved the socket send size failure log writing during vrouter-dpdk 
startup



Br, Deepak


From: Rajagopalan Sivaramakrishnan <r...@juniper.net>
Sent: Thursday, April 13, 2017 6:10:55 AM
To: Deepak Tiwari; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,
Please see below.

Raja

From: Deepak Tiwari <deepak.tiw...@aricent.com>
Date: Wednesday, April 12, 2017 at 2:41 AM
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>, 
"dev@lists.opencontrail.org" <dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode


Hi Raja,



I was able to proceed further on this. The root-cause is that processor on my 
setup doesn't support SSE4.2 instruction set. I had to do change in 
vrouter/dpdk/SConscript file:-

#Deepak
#env.Append(CCFLAGS = '-msse4.2')
env.Append(CCFLAGS = '-msse4.1')



After this change, the binary didn't crash on __builtin_popcountll call because 
the compiler would have used less optimized SSE4.1 instructions instead of 
SSE4.2 instructions.



Question: should there be a change in the SConscript file to detect the 
supported instruction sets and set SSE4.1 or SSE4.2 flags automatically?



>>> The target machine might have a different CPU than the build machine, so 
>>> this may not work.



Now, voruter-dpdk binary is able to come up successfully. It is able to detect 
the ethernet devices. However when I try to create vhost0 interface it fails--


contrail@contrail-23:~/dev/contrail-installer$ sudo vif --create vhost0 --mac 
bc:30:5b:cb:03:8d
vhost_create: Unknown error -95

>> Can you please try something like (from vrouter-functions.sh)

vif --add 0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --vhost-phys --type physical --pmd 
--id 0
vif --add vhost0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --type vhost --xconnect 0 
--pmd --id 1
Also, please insert the KNI kernel module as it is used by vhost0.
If you would like to do this from the vrouter agent, the agent config file must 
specify the PCI address/MAC
of the physical interface. This would usually be setup by fab provisioning.


contrail-vrouter-dpdk binary start-up logs are as follows. I see following 
error there. Could this be the reason for this error



2017-04-12 14:58:02,565 USOCK: usock_alloc[7fffee445700]: setting socket FD 41 
send buff size failed.



>> This is unlikely to be related to the vhost0 issue. You can try “sysctl -w 
>> net.core.wmem_max=916”

(from vrouter-fucntions.sh) before starting vrouter-dpdk.



-
contrail@contrail-23:~/dev/contrail-installer$ sudo gdb --args taskset -c 0-2 
/usr/bin/contrail-vrouter-dpdk --no-daemon --socket-mem 1024
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-12 Thread Rajagopalan Sivaramakrishnan
Hi Deepak,
Please see below.

Raja

From: Deepak Tiwari <deepak.tiw...@aricent.com>
Date: Wednesday, April 12, 2017 at 2:41 AM
To: Rajagopalan Sivaramakrishnan <r...@juniper.net>, 
"dev@lists.opencontrail.org" <dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode


Hi Raja,



I was able to proceed further on this. The root-cause is that processor on my 
setup doesn't support SSE4.2 instruction set. I had to do change in 
vrouter/dpdk/SConscript file:-

#Deepak
#env.Append(CCFLAGS = '-msse4.2')
env.Append(CCFLAGS = '-msse4.1')



After this change, the binary didn't crash on __builtin_popcountll call because 
the compiler would have used less optimized SSE4.1 instructions instead of 
SSE4.2 instructions.



Question: should there be a change in the SConscript file to detect the 
supported instruction sets and set SSE4.1 or SSE4.2 flags automatically?



>>> The target machine might have a different CPU than the build machine, so 
>>> this may not work.



Now, voruter-dpdk binary is able to come up successfully. It is able to detect 
the ethernet devices. However when I try to create vhost0 interface it fails--


contrail@contrail-23:~/dev/contrail-installer$ sudo vif --create vhost0 --mac 
bc:30:5b:cb:03:8d
vhost_create: Unknown error -95

>> Can you please try something like (from vrouter-functions.sh)

vif --add 0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --vhost-phys --type physical --pmd 
--id 0
vif --add vhost0 --mac 90:e2:ba:5a:8d:4c --vrf 0 --type vhost --xconnect 0 
--pmd --id 1
Also, please insert the KNI kernel module as it is used by vhost0.
If you would like to do this from the vrouter agent, the agent config file must 
specify the PCI address/MAC
of the physical interface. This would usually be setup by fab provisioning.


contrail-vrouter-dpdk binary start-up logs are as follows. I see following 
error there. Could this be the reason for this error



2017-04-12 14:58:02,565 USOCK: usock_alloc[7fffee445700]: setting socket FD 41 
send buff size failed.



>> This is unlikely to be related to the vhost0 issue. You can try “sysctl -w 
>> net.core.wmem_max=916”

(from vrouter-fucntions.sh) before starting vrouter-dpdk.



-
contrail@contrail-23:~/dev/contrail-installer$ sudo gdb --args taskset -c 0-2 
/usr/bin/contrail-vrouter-dpdk --no-daemon --socket-mem 1024
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from taskset...(no debugging symbols found)...done.
(gdb) b rte_eal_mp_remote_launch
Function "rte_eal_mp_remote_launch" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) r
Starting program: /usr/bin/taskset -c 0-2 /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024
process 3213 is executing new program: /usr/bin/contrail-vrouter-dpdk
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2017-04-12 14:58:00,551 VROUTER: vRouter/DPDK version: {"build-info": 
[{"build-time": "2017-04-11 09:21:28.357096", "build-hostname": "contrail-23", 
"build-user": "root", "build-version": "4.0.0.0"}]}
2017-04-12 14:58:00,610 VROUTER: Bridge Table limit:  262144
2017-04-12 14:58:00,610 VROUTER: Bridge Table overflow limit: 53248
2017-04-12 14:58:00,610 VROUTER: Flow Table limit:524288
2017-04-12 14:58:00,610 VROUTER: Flow Table overflow limit:   105472
2017-04-12 14:58:00,610 VROUTER: MPLS labels limit:   5120
2017-04-12 14:58:00,610 VROUTER: Nexthops limit:  65536
2017-04-12 14:58:00,610 VROUTER: VRF tables limit:4096
2017-04-12 14:58:00,610 VROUTER: Packet pool size:16384
2017-04-12 14:58:00,610 VROUTER: Maximum packet size: 9216
2017-04-12 14:58:00,610 VROUTER: EAL arguments:
2017-04-12 14:58:00,610 VROUTER:-n  "4"
2017-04-12 14:58:00,610 VROUTER:  --socket-mem  "1024"
2017-04-12 14:58:00,610 VROUTER:  --lcores  
"(0-2)@(0-3),(8-9)@(0-3),10@0,11@1,12@2

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-09 Thread Deepak Tiwari
Hi Raja,

As I updated last week, I am no longer getting this error (after I switched 
from trunk to 3.2 and back to trunk) now for some unknown reason. Now when I 
start the contrail-dpdk binary, I get following error—

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
ERROR: this system does not support “SSE4_2”.
Please check that RTE_MACHINE is set correctly.

After debugging the root-cause of above issue, I found that in file 
“third_party/dpdk/mk/machine/native/rte.vars.mk”, following check (marked in 
red) is missing. I came to this conclusion because—


1.  On my setup, compiler doesn’t report SSE4_2 support

a.  checked with command “gcc -march=native -dM -E - < /dev/null | grep 
SSE4_2”



2.  File “/var/run/dmesg.boot” is not present

Based on above points and following code, “MACHINE_CFLAGS” will get set to 
“-march=corei7”

# on FreeBSD systems, sometimes the correct cputype is not picked up.
# To get everything to compile, we need SSE4.2 support, so check if that is
# reported by compiler. If not, check if the CPU actually supports it, and if
# so, set the compilation target to be a corei7, minimum target with SSE4.2
SSE42_SUPPORT=$(shell $(CC) -march=native -dM -E - < /dev/null | grep SSE4_2)
ifeq ($(SSE42_SUPPORT),)
  CPU_SSE42_SUPPORT=$(shell if [ -f /var/run/dmesg.boot ] ; then grep SSE4\.2 
/var/run/dmesg.boot ; fi)
  ifneq ($(CPU_SSE42_SUPPORT),)
MACHINE_CFLAGS= -march=corei7
  endif
endif

Ref: http://dpdk.org/ml/archives/dev/2014-July/004053.html

So I added above additional code as highlighted in RED. Recompiled DPDK library 
as well as contrail-vrouter-dpdk binary and tried to run it. However still same 
error is received

Br, Deepak

From: Rajagopalan Sivaramakrishnan [mailto:r...@juniper.net]
Sent: 08 April 2017 05:29
To: Deepak Tiwari <deepak.tiw...@aricent.com>; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,
It might be worth hardcoding core_mask_count just to see if the issue is 
with using __builtin_popcountll
in the gcc version you are using. Do you still see the crash without the call 
to __builtin_popcountll?

Raja

"DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-07 Thread Rajagopalan Sivaramakrishnan
Hi Deepak,
It might be worth hardcoding core_mask_count just to see if the issue is 
with using __builtin_popcountll
in the gcc version you are using. Do you still see the crash without the call 
to __builtin_popcountll?

Raja

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-07 Thread Deepak Tiwari
Yesterday I had moved on to try with R3.2 (so that’s why I couldn’t check or 
attach the content of “/var/log/contrail/contrail-vrouter-dpdk-stdout.log” file 
yesterday) ; but I faced some compilation error there so I reverted back to 
trunk (stable versions)
However this time, crash is not observed. It gives following error instead—

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
ERROR: this system does not support “SSE4_2”.
Please check that RTE_MACHINE is set correctly.

After debugging the root-cause of above issue, I found that in file 
“third_party/dpdk/mk/machine/native/rte.vars.mk”, following check (marked in 
red) is missing. I came to this conclusion because—


1.  On my setup, compiler doesn’t report SSE4_2 support

a.  checked with command “gcc -march=native -dM -E - < /dev/null | grep 
SSE4_2”



2.  File “/var/run/dmesg.boot” is not present

Based on above points and following code, “MACHINE_CFLAGS” will get set to 
“-march=corei7”

# on FreeBSD systems, sometimes the correct cputype is not picked up.
# To get everything to compile, we need SSE4.2 support, so check if that is
# reported by compiler. If not, check if the CPU actually supports it, and if
# so, set the compilation target to be a corei7, minimum target with SSE4.2
SSE42_SUPPORT=$(shell $(CC) -march=native -dM -E - < /dev/null | grep SSE4_2)
ifeq ($(SSE42_SUPPORT),)
  CPU_SSE42_SUPPORT=$(shell if [ -f /var/run/dmesg.boot ] ; then grep SSE4\.2 
/var/run/dmesg.boot ; fi)
  ifneq ($(CPU_SSE42_SUPPORT),)
MACHINE_CFLAGS= -march=corei7
  endif
endif

Ref: http://dpdk.org/ml/archives/dev/2014-July/004053.html

So I added to the line above content as highlighted in RED. Recompiled DPDK 
library as well as contrail-vrouter-dpdk binary and tried to run it. However 
still same error is received


PS: I had tried with GDB with the generated core and it crashed on the 
following statement only. Cpu_core_mask value was 15, i.e. 0x0F. I tried 
changing it to some toher value but same result. If I set it as 0 then only it 
didn’t crash—

287core_mask_count = __builtin_popcountll((unsigned long 
long)cpu_core_mask);

Br, Deepak

From: Rajagopalan Sivaramakrishnan [mailto:r...@juniper.net]
Sent: 06 April 2017 23:42
To: Deepak Tiwari <deepak.tiw...@aricent.com>; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,
3.2 would be a better although the issue is probably due to provisioning 
not being complete.
Can you please send the log file? Also, did you try stepping through 
contrail-vrouter-dpdk in gdb?

Raja

From: Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>
Date: Thursday, April 6, 2017 at 3:35 AM
To: Rajagopalan Sivaramakrishnan <r...@juniper.net<mailto:r...@juniper.net>>, 
"dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>" 
<dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>>
Subject: RE: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Raja,

Yes, I had setup huge-pages through following commands—

cat /proc/meminfo
sysctl -w vm.nr_hugepages=2048
mount -t hugetlbfs nodev /mnt/huge/

Initially I had tried using taskset command only but when I got into this error 
I tried without taskset just in case… ☺

I was wondering if trunk/master branch (I am using last stable commits of trunk 
as current trunk is broken) works with DPDK enabled? Or should I try with R3.2 
branch

Br, Deepak

From: Rajagopalan Sivaramakrishnan [mailto:r...@juniper.net]
Sent: 06 April 2017 11:00
To: Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>; 
dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,
Did you set up huge pages (in sysctl.conf or from the shell)? We usually 
spawn the vrouter-dpdk process using taskset to bind it to a specific
set of CPU cores, but the command line below should work, so I suspect it is 
not correctly provisioned. Can you please take a look at the logs in
/var/log/contrail/contrail-vrouter-dpdk-stdout.log for any clues?

Raja

From: Dev 
<dev-boun...@lists.opencontrail.org<mailto:dev-boun...@lists.opencontrail.org>> 
on behalf of Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>
Date: Tuesday, April 4, 2017 at 5:02 AM
To: "dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>" 
<dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi,

With reference to the original query about how to setup and provision, DPDK 
based vRouter, I have the contrail-vrouter-dpdk binary compiled.
Next in contrail.sh,

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-06 Thread Deepak Tiwari
Hi Raja,

Yes, I had setup huge-pages through following commands—

cat /proc/meminfo
sysctl -w vm.nr_hugepages=2048
mount -t hugetlbfs nodev /mnt/huge/

Initially I had tried using taskset command only but when I got into this error 
I tried without taskset just in case… ☺

I was wondering if trunk/master branch (I am using last stable commits of trunk 
as current trunk is broken) works with DPDK enabled? Or should I try with R3.2 
branch

Br, Deepak

From: Rajagopalan Sivaramakrishnan [mailto:r...@juniper.net]
Sent: 06 April 2017 11:00
To: Deepak Tiwari <deepak.tiw...@aricent.com>; dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,
Did you set up huge pages (in sysctl.conf or from the shell)? We usually 
spawn the vrouter-dpdk process using taskset to bind it to a specific
set of CPU cores, but the command line below should work, so I suspect it is 
not correctly provisioned. Can you please take a look at the logs in
/var/log/contrail/contrail-vrouter-dpdk-stdout.log for any clues?

Raja

From: Dev 
<dev-boun...@lists.opencontrail.org<mailto:dev-boun...@lists.opencontrail.org>> 
on behalf of Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>
Date: Tuesday, April 4, 2017 at 5:02 AM
To: "dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>" 
<dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi,

With reference to the original query about how to setup and provision, DPDK 
based vRouter, I have the contrail-vrouter-dpdk binary compiled.
Next in contrail.sh, I replaced the command to bring-up kernel based vrouter 
with the command to bring-up vrouter-dpdk binary—

/usr/bin/contrail-vrouter-dpdk –no-daemon –socket-mem 1024,1024

I also loaded the igb_uio and rte_kni modules and bound the NICs to DPDK

However the binary fails to come-up. All other contrail components came-up 
successfully except vrouter-agent because vrouter binary crashed and hence 
vrouter-agent couldn’t connect to it and it exits.

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
2017-04-04 17:21:52,196 VROUTER: vRouter/DPDK version: {"build-info": 
[{"build-time": "2017-04-04 09:06:01.548355", "build-hostname": "contrail-23", 
"build-user": "root", "build-version": "4.0.0.0"}]}
Illegal instruction (core dumped)
contrail@contrail-23:~/dev/contrail-installer$ gdb 
/usr/bin/contrail-vrouter-dpdk core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/contrail-vrouter-dpdk...done.

warning: core file may not match specified executable file.
[New LWP 26874]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/contrail-vrouter-dpdk --no-daemon --socket-mem 
1024,1024'.
Program terminated with signal SIGILL, Illegal instruction.
#0  dpdk_core_mask_get (system_cpus_count=4) at vrouter/dpdk/dpdk_vrouter.c:287
287core_mask_count = __builtin_popcountll((unsigned long 
long)cpu_core_mask);
(gdb) bt
#0  dpdk_core_mask_get (system_cpus_count=4) at vrouter/dpdk/dpdk_vrouter.c:287
#1  dpdk_argv_update () at vrouter/dpdk/dpdk_vrouter.c:491
#2  dpdk_init () at vrouter/dpdk/dpdk_vrouter.c:674
#3  main (argc=4, argv=0x7ffcc8e13668) at vrouter/dpdk/dpdk_vrouter.c:1162
(gdb)

Can anyone provide any clue on how do I proceed further?

Br, Deepak

From: Jakub Pavlik [mailto:jpav...@mirantis.com]
Sent: 20 March 2017 21:07
To: Deepak Tiwari <deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>
Cc: dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,

sorry put there oc311

root@ea05e1fe2291:/# apt-cache policy contrail-vrouter-dpdk-init
contrail-vrouter-dpdk-init:
  Installed: (none)
  Candidate: 3.1.1.x~2017031

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-05 Thread Rajagopalan Sivaramakrishnan
Hi Deepak,
Did you set up huge pages (in sysctl.conf or from the shell)? We usually 
spawn the vrouter-dpdk process using taskset to bind it to a specific
set of CPU cores, but the command line below should work, so I suspect it is 
not correctly provisioned. Can you please take a look at the logs in
/var/log/contrail/contrail-vrouter-dpdk-stdout.log for any clues?

Raja

From: Dev <dev-boun...@lists.opencontrail.org> on behalf of Deepak Tiwari 
<deepak.tiw...@aricent.com>
Date: Tuesday, April 4, 2017 at 5:02 AM
To: "dev@lists.opencontrail.org" <dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi,

With reference to the original query about how to setup and provision, DPDK 
based vRouter, I have the contrail-vrouter-dpdk binary compiled.
Next in contrail.sh, I replaced the command to bring-up kernel based vrouter 
with the command to bring-up vrouter-dpdk binary—

/usr/bin/contrail-vrouter-dpdk –no-daemon –socket-mem 1024,1024

I also loaded the igb_uio and rte_kni modules and bound the NICs to DPDK

However the binary fails to come-up. All other contrail components came-up 
successfully except vrouter-agent because vrouter binary crashed and hence 
vrouter-agent couldn’t connect to it and it exits.

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
2017-04-04 17:21:52,196 VROUTER: vRouter/DPDK version: {"build-info": 
[{"build-time": "2017-04-04 09:06:01.548355", "build-hostname": "contrail-23", 
"build-user": "root", "build-version": "4.0.0.0"}]}
Illegal instruction (core dumped)
contrail@contrail-23:~/dev/contrail-installer$ gdb 
/usr/bin/contrail-vrouter-dpdk core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/contrail-vrouter-dpdk...done.

warning: core file may not match specified executable file.
[New LWP 26874]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/contrail-vrouter-dpdk --no-daemon --socket-mem 
1024,1024'.
Program terminated with signal SIGILL, Illegal instruction.
#0  dpdk_core_mask_get (system_cpus_count=4) at vrouter/dpdk/dpdk_vrouter.c:287
287core_mask_count = __builtin_popcountll((unsigned long 
long)cpu_core_mask);
(gdb) bt
#0  dpdk_core_mask_get (system_cpus_count=4) at vrouter/dpdk/dpdk_vrouter.c:287
#1  dpdk_argv_update () at vrouter/dpdk/dpdk_vrouter.c:491
#2  dpdk_init () at vrouter/dpdk/dpdk_vrouter.c:674
#3  main (argc=4, argv=0x7ffcc8e13668) at vrouter/dpdk/dpdk_vrouter.c:1162
(gdb)

Can anyone provide any clue on how do I proceed further?

Br, Deepak

From: Jakub Pavlik [mailto:jpav...@mirantis.com]
Sent: 20 March 2017 21:07
To: Deepak Tiwari <deepak.tiw...@aricent.com>
Cc: dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,

sorry put there oc311

root@ea05e1fe2291:/# apt-cache policy contrail-vrouter-dpdk-init
contrail-vrouter-dpdk-init:
  Installed: (none)
  Candidate: 3.1.1.x~20170317154826
  Version table:
 3.1.1.x~20170317154826 0
500 http://apt-mk.mirantis.com/trusty/ nightly/oc311 amd64 Packages


Jakub

On Mon, Mar 20, 2017 at 1:54 PM, Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>> wrote:
Hi Paul,

Thanks for the response.
I checked the packages, but there I don’t see 'contrail-vrouter-dpdk-init' 
package there

Br, Deepak

From: Jakub Pavlik [mailto:jpav...@mirantis.com<mailto:jpav...@mirantis.com>]
Sent: 20 March 2017 15:51
To: Deepak Tiwari <deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>
Cc: dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,

you can try our repository:

deb [arch=amd64] http://apt-mk.mirantis.com/trusty nightly mitaka oc3111

We have all those dpdk packages there.

jakub

On Mon, Mar 20, 2017 at 8:38 AM, De

Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled mode

2017-04-04 Thread Deepak Tiwari
Hi,

With reference to the original query about how to setup and provision, DPDK 
based vRouter, I have the contrail-vrouter-dpdk binary compiled.
Next in contrail.sh, I replaced the command to bring-up kernel based vrouter 
with the command to bring-up vrouter-dpdk binary—

/usr/bin/contrail-vrouter-dpdk –no-daemon –socket-mem 1024,1024

I also loaded the igb_uio and rte_kni modules and bound the NICs to DPDK

However the binary fails to come-up. All other contrail components came-up 
successfully except vrouter-agent because vrouter binary crashed and hence 
vrouter-agent couldn’t connect to it and it exits.

contrail@contrail-23:~/dev/contrail-installer$ /usr/bin/contrail-vrouter-dpdk 
--no-daemon --socket-mem 1024,1024
2017-04-04 17:21:52,196 VROUTER: vRouter/DPDK version: {"build-info": 
[{"build-time": "2017-04-04 09:06:01.548355", "build-hostname": "contrail-23", 
"build-user": "root", "build-version": "4.0.0.0"}]}
Illegal instruction (core dumped)
contrail@contrail-23:~/dev/contrail-installer$ gdb 
/usr/bin/contrail-vrouter-dpdk core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/contrail-vrouter-dpdk...done.

warning: core file may not match specified executable file.
[New LWP 26874]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/contrail-vrouter-dpdk --no-daemon --socket-mem 
1024,1024'.
Program terminated with signal SIGILL, Illegal instruction.
#0  dpdk_core_mask_get (system_cpus_count=4) at vrouter/dpdk/dpdk_vrouter.c:287
287core_mask_count = __builtin_popcountll((unsigned long 
long)cpu_core_mask);
(gdb) bt
#0  dpdk_core_mask_get (system_cpus_count=4) at vrouter/dpdk/dpdk_vrouter.c:287
#1  dpdk_argv_update () at vrouter/dpdk/dpdk_vrouter.c:491
#2  dpdk_init () at vrouter/dpdk/dpdk_vrouter.c:674
#3  main (argc=4, argv=0x7ffcc8e13668) at vrouter/dpdk/dpdk_vrouter.c:1162
(gdb)

Can anyone provide any clue on how do I proceed further?

Br, Deepak

From: Jakub Pavlik [mailto:jpav...@mirantis.com]
Sent: 20 March 2017 21:07
To: Deepak Tiwari <deepak.tiw...@aricent.com>
Cc: dev@lists.opencontrail.org
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,

sorry put there oc311

root@ea05e1fe2291:/# apt-cache policy contrail-vrouter-dpdk-init
contrail-vrouter-dpdk-init:
  Installed: (none)
  Candidate: 3.1.1.x~20170317154826
  Version table:
 3.1.1.x~20170317154826 0
500 http://apt-mk.mirantis.com/trusty/ nightly/oc311 amd64 Packages


Jakub

On Mon, Mar 20, 2017 at 1:54 PM, Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>> wrote:
Hi Paul,

Thanks for the response.
I checked the packages, but there I don’t see 'contrail-vrouter-dpdk-init' 
package there

Br, Deepak

From: Jakub Pavlik [mailto:jpav...@mirantis.com<mailto:jpav...@mirantis.com>]
Sent: 20 March 2017 15:51
To: Deepak Tiwari <deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>>
Cc: dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled 
mode

Hi Deepak,

you can try our repository:

deb [arch=amd64] http://apt-mk.mirantis.com/trusty nightly mitaka oc3111

We have all those dpdk packages there.

jakub

On Mon, Mar 20, 2017 at 8:38 AM, Deepak Tiwari 
<deepak.tiw...@aricent.com<mailto:deepak.tiw...@aricent.com>> wrote:
Hi,

I have been trying to setup a single node development environment for Contrail 
with DPDK based vRouter. I am facing issues there and struggling to understand 
the overall process as I don’t find any online documentation in this regard. 
All information that I get is related to configuring DPDK based vRouter in 
binary-packages based setup. I would really appreciate if anyone out there can 
help me here

Following are the steps I followed—

Initially I followed contrail-installer guidelines as a reference—

https://github.com/Juniper/contrail-installer

Using above approach, though