Hi Raja,
Thanks, this solves the issue and now I am able to do following:-
-----------------------------------
1. Create vhost0 interface
==> sudo vif --create vhost0 --mac bc:30:5b:cb:03:8d
-----------------------------------
2. Add eth4 to vrouter
=> sudo vif --add eth4 --mac bc:30:5b:cb:03:8d --vrf 0 --vhost-phys --type
physical --pmd --id 0
vrouter console output
2017-04-17 16:47:52,385 VROUTER: Adding vif 0 (gen. 1) eth device 0 (PMD) MAC
00:15:1a:6e:2e:ca (vif MAC bc:30:5b:cb:03:8d)
2017-04-17 16:47:52,385 VROUTER: setup 1 RSS queue(s) and 0 filtering
queue(s)
2017-04-17 16:47:52,385 VROUTER: error setting vif MAC to eth dev eth4:
Operation not supported (95)
2017-04-17 16:47:52,793 VROUTER: lcore 10 TX to HW queue 0
2017-04-17 16:47:52,793 VROUTER: lcore 11 TX queue 0 to SW ring in lcore 10
2017-04-17 16:47:52,793 VROUTER: lcore 10 now has 1 ring(s) to push
2017-04-17 16:47:52,793 VROUTER: lcore 12 TX queue 0 to SW ring in lcore 10
2017-04-17 16:47:52,793 VROUTER: lcore 10 now has 2 ring(s) to push
2017-04-17 16:47:52,793 VROUTER: lcore 13 TX queue 0 to SW ring in lcore 10
2017-04-17 16:47:52,794 VROUTER: lcore 10 now has 3 ring(s) to push
2017-04-17 16:47:52,794 VROUTER: lcore 8 TX queue 0 to SW ring in lcore 10
2017-04-17 16:47:52,794 VROUTER: lcore 10 now has 4 ring(s) to push
2017-04-17 16:47:52,794 VROUTER: lcore 9 TX queue 0 to SW ring in lcore 10
2017-04-17 16:47:52,794 VROUTER: lcore 10 now has 5 ring(s) to push
2017-04-17 16:47:52,794 VROUTER: lcore 10 RX from HW queue 0
Vrouter console logs show this error "error setting vif MAC to eth dev eth4:
Operation not supported (95)" but vif add command gives no error.
I tried to debug it, the issue seems to be that the mac_addr which is returned
by 'rte_eth_macaddr_get' is different than what we see in ifconfig command
output (this might be possible as following code comment also says). However
when it tries to set the MAC address fo that eth device it fails
dpdk_vif_attach_ethdev (struct vr_interface *vif, struct vr_dpdk_ethdev *ethdev)
..........
/*
* On some hardware (e100e, virtual functions, etc) the MAC is random,
* so we check if vif and NIC MACs are match and set the NIC MAC.
*/
rte_eth_macaddr_get(ethdev->ethdev_port_id, &mac_addr);
if (memcmp(vif->vif_mac, mac_addr.addr_bytes, ETHER_ADDR_LEN) != 0) {
/* No match, so set vif MAC to NIC. */
ret = rte_eth_dev_default_mac_addr_set(ethdev->ethdev_port_id,
(struct ether_addr *)vif->vif_mac);
if (ret == 0) {
RTE_LOG(INFO, VROUTER, " eth dev %s now use vif MAC "
MAC_FORMAT "\n",
vif->vif_name, MAC_VALUE(vif->vif_mac));
} else {
RTE_LOG(ERR, VROUTER, " error setting vif MAC to eth dev %s:
"
"%s (%d)\n",
vif->vif_name, rte_strerror(-ret), -ret);
}
}
-----------------------------------
3. Add vhost0 to vrouter
=> sudo vif --add vhost0 --mac bc:30:5b:cb:03:8d --vrf 0 --xconnect 3 --type
vhost --pmd --id 1
vrouter console output
2017-04-17 17:20:36,693 VROUTER: Adding vif 1 (gen. 2) device vhost0 at eth
device 0 MAC 00:15:1a:6e:2e:ca (vif MAC bc:30:5b:cb:03:8d)
2017-04-17 17:20:36,714 VROUTER: initializing KNI with 5 maximum interfaces
2017-04-17 17:20:36,715 KNI: pci: 01:00:00 8086:105e
2017-04-17 17:20:36,732 VROUTER: lcore 11 TX to HW queue 0
2017-04-17 17:20:36,732 VROUTER: lcore 12 TX queue 0 to SW ring in lcore 11
2017-04-17 17:20:36,732 VROUTER: lcore 11 now has 1 ring(s) to push
2017-04-17 17:20:36,732 VROUTER: lcore 13 TX queue 0 to SW ring in lcore 11
2017-04-17 17:20:36,732 VROUTER: lcore 11 now has 2 ring(s) to push
2017-04-17 17:20:36,732 VROUTER: lcore 8 TX queue 0 to SW ring in lcore 11
2017-04-17 17:20:36,732 VROUTER: lcore 11 now has 3 ring(s) to push
2017-04-17 17:20:36,732 VROUTER: lcore 9 TX queue 0 to SW ring in lcore 11
2017-04-17 17:20:36,732 VROUTER: lcore 11 now has 4 ring(s) to push
2017-04-17 17:20:36,732 VROUTER: lcore 10 TX queue 0 to SW ring in lcore 11
2017-04-17 17:20:36,732 VROUTER: lcore 11 now has 5 ring(s) to push
2017-04-17 17:20:36,732 VROUTER: lcore 11 RX from HW queue 0
-----------------------------------
Now vif --list shows these two interfaces, i.e. corresponding to eth4 and vhost0
contrail@contrail-23:/opt/stack/contrail/contrail-fabric-utils$ vif --list
Vrouter Interface Table
Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror
Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2
D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged
Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive 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 <[email protected]>
Sent: Friday, April 14, 2017 11:25:08 AM
To: Deepak Tiwari; [email protected]
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 <[email protected]>
Date: Thursday, April 13, 2017 at 4:53 AM
To: Rajagopalan Sivaramakrishnan <[email protected]>,
"[email protected]" <[email protected]>
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 = 0000: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=9160000”
(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 <[email protected]>
Sent: Thursday, April 13, 2017 6:10:55 AM
To: Deepak Tiwari; [email protected]
Subject: Re: [opencontrail-dev] Need help in setting up vRouter in DPDK-enabled
mode
Hi Deepak,
Please see below.
Raja
From: Deepak Tiwari <[email protected]>
Date: Wednesday, April 12, 2017 at 2:41 AM
To: Rajagopalan Sivaramakrishnan <[email protected]>,
"[email protected]" <[email protected]>
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=9160000”
(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"
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: Support maximum 128 logical core(s) by configuration.
EAL: Detected 4 lcore(s)
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffea600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffea200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe9e00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe9a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe9600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe9200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe8e00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe8a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe8600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe8200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe7e00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffe7a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x3aa00000 bytes
EAL: Virtual area found at 0x7ffface00000 (size = 0x3aa00000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffaca00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffac600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffac200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffabe00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffaba00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffab600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffab200000 (size = 0x200000)
EAL: Ask a virtual area of 0x400000 bytes
EAL: Virtual area found at 0x7fffaac00000 (size = 0x400000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffaa800000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffaa400000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffaa000000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa9c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa9800000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa9400000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa9000000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa8c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa8800000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffa8400000 (size = 0x200000)
EAL: Ask a virtual area of 0x3a800000 bytes
EAL: Virtual area found at 0x7fff6da00000 (size = 0x3a800000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6d600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6d200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6ce00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6ca00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6c600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6c200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fff6be00000 (size = 0x200000)
EAL: Requesting 512 pages of size 2MB from socket 0
[New Thread 0x7ffff0449700 (LWP 3219)]
EAL: TSC frequency is ~2659982 KHz
EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable
clock cycles !
EAL: Master lcore 0 is ready (tid=f7fd9b00;cpuset=[0,1,2,3])
[New Thread 0x7fffefc48700 (LWP 3220)]
EAL: lcore 1 is ready (tid=efc48700;cpuset=[0,1,2,3])
[New Thread 0x7fffef447700 (LWP 3221)]
EAL: lcore 2 is ready (tid=ef447700;cpuset=[0,1,2,3])
[New Thread 0x7fffeec46700 (LWP 3222)]
EAL: lcore 8 is ready (tid=eec46700;cpuset=[0,1,2,3])
[New Thread 0x7fffee445700 (LWP 3223)]
EAL: lcore 9 is ready (tid=ee445700;cpuset=[0,1,2,3])
[New Thread 0x7fffedc44700 (LWP 3224)]
EAL: lcore 10 is ready (tid=edc44700;cpuset=[0])
[New Thread 0x7fffed443700 (LWP 3225)]
[New Thread 0x7fffecc42700 (LWP 3226)]
EAL: lcore 11 is ready (tid=ed443700;cpuset=[1])
EAL: lcore 12 is ready (tid=ecc42700;cpuset=[2])
EAL: PCI device 0000:01:00.0 on NUMA socket -1
EAL: probe driver: 8086:105e rte_em_pmd
EAL: PCI memory mapped at 0x7fffea800000
EAL: PCI memory mapped at 0x7fffea820000
PMD: eth_em_dev_init(): port_id 0 vendorID=0x8086 deviceID=0x105e
EAL: PCI device 0000:01:00.1 on NUMA socket -1
EAL: probe driver: 8086:105e rte_em_pmd
EAL: PCI memory mapped at 0x7fffea840000
EAL: PCI memory mapped at 0x7fffea860000
PMD: eth_em_dev_init(): port_id 1 vendorID=0x8086 deviceID=0x105e
2017-04-12 14:58:02,518 VROUTER: Found 2 eth device(s)
2017-04-12 14:58:02,518 VROUTER: Using 3 forwarding lcore(s)
2017-04-12 14:58:02,518 VROUTER: Using 0 IO lcore(s)
2017-04-12 14:58:02,518 VROUTER: Using 5 service lcores
2017-04-12 14:58:02,518 VROUTER: Max HOLD flow entries set to 1000
2017-04-12 14:58:02,518 VROUTER: set fd limit to 4096 (prev 1024, max 4096)
2017-04-12 14:58:02,563 VROUTER: Starting NetLink...
2017-04-12 14:58:02,564 USOCK: usock_alloc[7fffee445700]: new socket FD 41
2017-04-12 14:58:02,565 USOCK: usock_alloc[7fffee445700]: setting socket FD 41
send buff size failed.
Buffer size set to 425984 (requested 9216000)
2017-04-12 14:58:02,565 VROUTER: Lcore 10: distributing MPLSoGRE packets to
[11,12]
2017-04-12 14:58:02,565 VROUTER: NetLink TCP socket FD is 41
2017-04-12 14:58:02,565 VROUTER: uvhost Unix socket FD is 42
2017-04-12 14:58:02,565 VROUTER: Lcore 11: distributing MPLSoGRE packets to
[10,12]
2017-04-12 14:58:02,566 VROUTER: Lcore 12: distributing MPLSoGRE packets to
[10,11]
2017-04-12 14:58:02,566 UVHOST: Starting uvhost server...
2017-04-12 14:58:02,566 UVHOST: server event FD is 43
2017-04-12 14:58:02,567 UVHOST: server socket FD is 44
2017-04-12 14:58:03,565 VROUTER: Retrying connection for socket 42...
2017-04-12 14:58:03,565 UVHOST: Handling connection FD 44...
2017-04-12 14:58:03,565 UVHOST: FD 44 accepted new NetLink connection FD 45
Br, Deepak
________________________________
From: Dev <[email protected]> on behalf of Deepak Tiwari
<[email protected]>
Sent: Monday, April 10, 2017 11:27:05 AM
To: Rajagopalan Sivaramakrishnan; [email protected]
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
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:[email protected]]
Sent: 08 April 2017 05:29
To: Deepak Tiwari <[email protected]>; [email protected]
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."
"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."
"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."
"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
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org