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? 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 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. --------------------- 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 <dev-boun...@lists.opencontrail.org> on behalf of Deepak Tiwari <deepak.tiw...@aricent.com> Sent: Monday, April 10, 2017 11:27:05 AM To: Rajagopalan Sivaramakrishnan; 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 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." "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