summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-03-16Add VLIB_INIT_FUNCTION() to dual-loop-skelDave Wallace1-0/+13
Change-Id: I4aafad8a3e4c0c57eef1940fac8debfb80bbb137 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2016-03-16Add vpp native linux kernel AF_PACKET interface supportDamjan Marion9-1/+920
This is 1st drop of VPP native driver for linux AF_PACKET. New CLI: create host-interface name <host-if-name> [hw-addr <mac-address>] References: - Documentation/networking/packet_mmap.txt in the Linux kernel tree - man 7 packet Known issues: - attaching to linux bridge doesn't work - it is not expected to work in multicore setup Change-Id: I1cb1c3d305f349759e90e76e25696718b73bd73d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14Declare node, hw_interface_class and device_class instances as externalDamjan Marion10-13/+13
This fixes issue observed on Ubuntu 16.04 where dynamic loader is not finding correct instance of specific structure. Change-Id: I618d0933c7e171b8a9b40495b36894785af7790a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14fix declaration of symbol of different sizeJean-Mickael Guerin27-64/+58
I got many warnings at the link step with gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2): /usr/bin/ld: Warning: size of symbol `cop_input_node' changed from 112 in vnet/cop/.libs/cop.o to 168 in vnet/cop/.libs/node1.o /usr/bin/ld: Warning: size of symbol `ethernet_input_node' changed from 112 in vnet/.libs/interface.o to 136 in vnet/ethernet/.libs/node.o /usr/bin/ld: Warning: size of symbol `l2output_node' changed from 112 in vnet/l2/.libs/l2_efp_filter.o to 120 in vnet/l2/.libs/l2_output.o /usr/bin/ld: Warning: size of symbol `srp_input_node' changed from 112 in vnet/srp/.libs/format.o to 136 in vnet/srp/.libs/node.o /usr/bin/ld: Warning: size of symbol `vxlan_encap_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 128 in vnet/vxlan/.libs/encap.o /usr/bin/ld: Warning: size of symbol `vxlan_input_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 144 in vnet/vxlan/.libs/decap.o ... Looking at vlib_node_registration_t, I think the reason is that the char * next_nodes[] could be bigger where the variable is defined in .c file. We should mark global variables as external in header files. Some of them can be made static. Change-Id: Ieb6961fd08180c9a69e1d884852703f3eb23f23f Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-14dpdk: fix link errorJean-Mickael Guerin1-1/+1
/usr/bin/ld: -f may not be used without -shared collect2: error: ld returned 1 exit status Indeed an extra "-fPIC" is given to ld, see the -Wl,-fPIC below: gcc -pie -fPIC -pthread -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2,RTE_CPUFLAG_AES,RTE_CPUFLAG_PCLMULQDQ,RTE_CPUFLAG_AVX -I/home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/include -include /home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/rte_config.h -O3 -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -D_GNU_SOURCE -Wl,-Map=test.map,--cref -o test commands.o test.o test_pci.o test_prefetch.o test_byteorder.o test_per_lcore.o test_atomic.o test_malloc.o test_cycles.o test_spinlock.o test_memory.o test_memzone.o test_ring.o test_ring_perf.o test_pmd_perf.o test_rwlock.o test_mempool.o test_mempool_perf.o test_mbuf.o test_logs.o test_memcpy.o test_memcpy_perf.o test_hash.o test_thash.o test_hash_perf.o test_hash_functions.o test_hash_scaling.o test_debug.o test_errno.o test_tailq.o test_string_fns.o test_cpuflags.o test_mp_secondary.o test_eal_flags.o test_eal_fs.o test_alarm.o test_interrupts.o test_version.o test_func_reentrancy.o test_cmdline.o test_cmdline_num.o test_cmdline_etheraddr.o test_cmdline_portlist.o test_cmdline_ipaddr.o test_cmdline_cirbuf.o test_cmdline_string.o test_cmdline_lib.o test_red.o test_sched.o test_meter.o test_kni.o test_common.o test_devargs.o virtual_pmd.o packet_burst_generator.o test_link_bonding.o test_link_bonding_mode4.o test_link_bonding_rssconf.o test_pmd_ring.o test_pmd_ring_perf.o test_cryptodev_perf.o test_cryptodev.o test_kvargs.o -Wl,-pie -Wl,-fPIC -Wl,--no-as-needed -Wl,-export-dynamic -L/home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib -Wl,-g -L/home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib -Wl,--whole-archive -Wl,-ldpdk -Wl,--start-group -Wl,-lrt -Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive Fixed by unsetting the flags -pie -fPIC out of LDFLAGS, these are not options for the linker. $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2) Change-Id: Iffbebfbb625e8831822ec092bea88dea42f12930 Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-14Better match vhost-user specification for live migrationYoann Desmouceaux2-2/+10
The specification requires logging of used vring writes to only happen when VHOST_VRING_F_LOG flag is present in VHOST_USER_SET_VRING_ADDR message; take that into account. Change-Id: I9bf4b9eb43a1783b39909b1a3ea1a3bdf50d91a8 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-03-14Fix skel files to use <vppinfra/*.h> instead of <clib/*.h> whenDave Wallace4-9/+8
including vppinfra header files. Change-Id: I961c602e0ccd2048fac633b5aeebb8c3cd0899fb Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2016-03-14Do not use hugepages if none are available.Stefan Kobza1-2/+2
In case socket-mem was set to <1024 and no 1G page long hupepages were available, the condition was evaluated in unexpected manner. In other words use_1g == 1, and that fails later in mount(). This patch makes sure this is prevented - if there are no pages_available, do not even try to use that pagesize. Change-Id: I30675aa017d97b99d84d5db926e62f0acb54deb6 Signed-off-by: Stefan Kobza <skobza@cisco.com>
2016-03-14lex - yylval undeclaredVincent JARDIN1-0/+1
Fix compilation with Ubuntu 16.04/yacc: $ yacc -V yacc - 1.9 20140715 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Xenial Xerus (development branch) Release: 16.04 Codename: xenial Change-Id: Ib1a6d7b7f9485db893465041ac6bce2a98ded2f7 Signed-off-by: Vincent JARDIN <vincent.jardin@6wind.com>
2016-03-11Set hardware iface state for loopback interfacesPierre Pfister1-0/+10
So unless I have missed something, loopback interfaces are spawned hardware-down and never set up. This patch uses the same process as tapcli interfaces by mirroring sw state to hw state. Change-Id: I94198c1c880de773daccbb63ca8d32c4c7e26a74 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-11lt-*m4 - remove auto generated filesVincent JARDIN4-628/+0
The files are installed by libtoolize: libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' No need to keep them into the repository. Change-Id: Ic24d51f7e7680161ac8c780f34e76bc21435b3c1 Signed-off-by: Vincent JARDIN <vincent.jardin@6wind.com>
2016-03-10More updated match to ENIC PMD for DPDK 2.2.0 including rx path optimization.John Lo2-14/+1366
Change-Id: I756940c9c1b2bb71d47caeb08ab34a2e954ddff6 Signed-off-by: John Lo <loj@cisco.com>
2016-03-09Fix IPv6 NDP and bridge BVI and restore NDP and ARP when BVI move is changed.Pierre Pfister1-3/+12
Both ARP and NDP need to be called when hi->output_node_index is changed. It does not look like a perfect solution though. Maybe an actual up-down call would be better... Change-Id: If2988d131e77f4fc522f34f3ffe2d5ba9c1d506c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-07Fix longstanding cleanup-flag bugDave Barach1-12/+9
Change-Id: I9b325b454ef80ffff80a0b0e23b24e3313127376 Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-07Packet filter control-plane API bugfixDave Barach1-4/+14
Don't complain about unknown fib-id's unless actually trying to use the indicated per-address-family fib. Change-Id: Ie8c28dbf7dac9c38193a02ff15a8529d0f90d99a Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-07Add sw_interface_clear_stats API callPavel Kotucek4-6/+134
Change-Id: I0731357744ddcb890efaebd81aac5370449a90e3 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-03-07build: fix call to mkdirJean-Mickael Guerin2-2/+2
Seen during build: /bin/bash: line 1: @mkdir: command not found Remove the extra prefix '@', this line is part of a single operation actually. Change-Id: I5fc265ae7c2dda01c61b369803d3c30a42a91f70 Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-04Allow dpdk linkstate and stat polling intervals to be set dynamically.Bud Grise2-5/+43
Change-Id: I6aa662e060f7ce01a4dd80ae2498dc91a8b65a8e Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-04Modified ioam CLI syntax to conform with other CLIsrangan1-10/+10
Change-Id: I384d7b2cdbb63b5ca904db5a11c8b8748f7197b9 Signed-off-by: rangan <rangan@cisco.com>
2016-03-04Collect per Q stats for vhost-user interfaceShesha Sreenivasamurthy5-9/+87
Change-Id: I394960c300ff7a81c4c8e05afd5a4175e66666eb Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-03-04vppinfra: remove generated config.h.inJean-Mickael Guerin1-62/+0
Change-Id: I04f53789bf1f39fdf16bc813280b24144fedd020 Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-04gitignoreMaros Marsalek1-0/+5
Change-Id: I59c4711fce1999b4bd23f0a0bac41aa14ca716f5 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-03-04Add CPU detection functionsDamjan Marion5-8/+151
Change-Id: Id7ea0410d6a789000c747c36a7e50076e31dc29a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-04Use xxhash in map code when SSE4.2 not availableDamjan Marion1-1/+1
Change-Id: If4fb86cfeeaf35f3ae89946b437ce5160adbce94 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-03Refuse to start if binary requires unavailable CPU extensionsDamjan Marion1-0/+29
Change-Id: I4d0d152b6f5d4ba566398fcccaa6a1f96625f864 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-03Change default L3 MTU to allow jumbo packets for non-DPDK interfaces.John Lo2-2/+2
Note that L3 MTU for DPDK interfaces is derived from DPDK port_conf in vnet/devices/dpdk/init.c. Change-Id: I9633a1887347a18d05598435baceb6a62cd7b19a Signed-off-by: John Lo <loj@cisco.com>
2016-03-03Copy flags when cloning next_framesNikhil P Rao1-0/+6
The VLIB_FRAME_NO_FREE_AFTER_DISPATCH flag is not preserved when cloning next_frames, as a result VLIB_FRAME_FREE_AFTER_DISPATCH can erroneously be set for a frame (see vlib_get_next_frame_internal()) Change-Id: Ice1d7ddcb807e1168aa0c157d9474be492d102c2 Signed-off-by: Nikhil P Rao <nikhil.rao@intel.com>
2016-03-03Use CRC32 instruction only when build for SSE4.2 enabled platformsDamjan Marion1-1/+1
This fixes SIGILL crash observed on Penryn CPU Change-Id: I960878d88f0f088847d4d86605ef082f6600e2c7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-03Fix UDP length check for local IP/UDP lookup and error handling.John Lo1-10/+21
Change-Id: If6695e19e5a1e5471e56099e2cf31794c73f3303 Signed-off-by: John Lo <loj@cisco.com>
2016-03-02TAP: Jumbo-frame support.Ole Troan4-75/+79
Change-Id: I3a0726d7645f775738253d0a47ee04d94d138c9a Signed-off-by: Ole Troan <ot@cisco.com>
2016-03-02Always showing DPDK physical memory on bootupTodd Foggoa1-17/+2
Fixing a previous commit to remove the commandline option and just always display the DPDK physical memory on startup. Also remove the DPDK args for the dbeug image. Change-Id: I9336a2a26ebab84c3b50ae0610025c29da7995f2 Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-03-02Add rotates to v6 worker hash to prevent SIP/DIP synchronizing.Bud Grise1-3/+3
Change-Id: Ibe8ec6271b3f04290a60c0145e59a01d3130500f Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-02Remove spurious call to unix_physmem_init(...)Dave Barach2-13/+0
It turns out that unix_physmem_init(...) has been effectively disabled for a very long time. The vnet library supplied a weak symbol override for the vlib_app_physmem_init(...) which returned 1, meaning "do nothing." When we switched libvnet.a -> libvnet.so, the symbol override stopped working. Presto: unix_physmem_init(...) romps all over the data set up by vlib_buffer_pool_create(...), leading to ASSERT failures and/or bus errors, but only when using worker threads. Even then, the failure depended in some complicated way on library dynamic load order. We should remove .../vlib/vlib/unix/physmem.c entirely once we're sure we'll never want it back. Change-Id: I27747edbeb0de88d2f2d8728f7f8eb3135e7f0cf Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-01Dump DPDK physmem to stdout before allocating mbufsSean Hope1-0/+19
Change-Id: I9dac27dc8b6b95cfb0ee77e3cff18240b4ec21d6 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-01Add ability to filter and change MACsChristian Dechamplain3-1/+42
Added new functions to change the MAC address and filter multicast MAC addresses. Change-Id: Iddf518e57dc889800a2f706fda51ee4e5c5142f2 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-01Fix for TX and RX descriptor queue lockupGeorgi Savov2-12/+38
On admin up/down changes the TX and RX queues were getting locked up for VNET_DPDK_PMD_VMXNET3 interfaces. The fix is to ensure the interface is in admin down before touching the hardware. Change-Id: Ia264d95355a860607bff7ada00d2be48f91e6dd9 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-02-29Add ability to override the interface name.Sean Hope4-12/+54
Export interface format functions to plugin and allow ability to show a single hardware interface index. Change-Id: If52fae2d63e97da91e1ac9a9a6fb73389b526ebc Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-02-29Fixed vxlan link status.Pavel Kotucek1-0/+12
Vxlan interface link status corresponds to admin status. When vxlan interfcae is set "admin-up" link status is "link-up" and if interface is set "admin-down" link status is "link-down" also. Change-Id: Iaa85fa8dcd672519312cc7ee6a17df6f4498259d Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-02-29-O3 warnings be goneDave Barach3-3/+3
Note that compiling -O3 doesn't improve performance as of this writing, might as well clean up warnings in any event. Change-Id: Ic2f4982d12fbbf36f5324075183982731759dc94 Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-27Invert matching logic for *_uses_dpdk in build-data/packages/*.mkDamjan Marion3-3/+3
Change-Id: If07a74afd92196c035d720cedaac36493a09e400 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-26Add packet tracing hintBud Grise3-27/+40
This avoids checking the buffer flags bit if tracing is not enabled. Change-Id: I32e1a90b5fd10318254c611344488bc2a441c71e Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-02-26Fixed issue with json output in vpp_api_test.Pavel Kotucek1-1/+2
When it runs 'exec' command string "(nil)" is appended to the end of the console output. Change-Id: I7cdae78b2166829dd2160e92ed8181203eb491ed Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-02-26Fix ENIC PMD not sending the first packet on TX.John Lo1-0/+26
Change-Id: I615e9ca6f445092baa211098eb64f9553dd4c407 Signed-off-by: John Lo <loj@cisco.com>
2016-02-26Fix link bonding PMD slave status polling path used by VIC ENIC driver.John Lo1-0/+34
Change-Id: Ic9fc952b618477beb246974b33d753bf6fd47dde Signed-off-by: John Lo <loj@cisco.com>
2016-02-26Update PowerPC (qppc) platform to build with Ubuntu cross-toolsDamjan Marion7-135/+22
Standard Ubuntu PowerPC toolchain can be installed with: apt-get install crossbuild-essential-powerpc And code can be built with: make PLATFORM=qppc TAG=qppc ... Change-Id: I247355fc89fd61aedb8693156e84c454ca86eb75 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-26Add support for native vpp_lite (non-dpdk) platformDamjan Marion19-50/+105
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-26Move dpdk (un)format functions to separate c fileDamjan Marion7-767/+806
Change-Id: Idb1b1bf6c1b3b3d66672cc715e45aec299fb7592 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-25Add support of Ethernet link bonding utilizing DPDK link bondingJohn Lo4-4/+63
poll mode driver library. The bonded interfaces to be created on VPP startup is specified in the dpdk section of startup.conf or qn.conf, using DPDK EAL command. Following is an example of a dpdk section white listing PCI addressses of 4 ethernet interfacess to be under VPP control plus two bonded interface and the PCI addresses of the slaves in each: dpdk { socket-mem 1024,1024 dev 0000:0f:00.0 dev 0000:10:00.0 dev 0000:11:00.0 dev 0000:12:00.0 vdev eth_bond0,mode=2,slave=0000:0f:00.0,slave=0000:11:00.0,xmit_policy=l34 vdev eth_bond1,mode=2,slave=0000:10:00.0,slave=0000:12:00.0,xmit_policy=l34 } Note that only balance XOR (mode 2) is supported and "xmit_policy=l34" specifies to use layer 3 SIP/DIP and layer 4 Sport/Dport for load balance. Using "xmit_policy=l2" for SMAC/DMAC or "xmit_policy=l23" for SMAC/DMAC and SIP/DIP should also work. Change-Id: Iaf6438686fa20cce893cb5a823b76e2886b4360b Signed-off-by: John Lo <loj@cisco.com>
2016-02-25add install-dep target to toplevel MakefileDamjan Marion1-0/+9
Change-Id: I9dbe6676086ef083729bec1774f544498d1ec3e5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-25Fix indexing error in init.c for vnet dpdk.John Lo1-2/+2
Change-Id: I1bab9e8cf428b0d27edf98fa54ffc3edc32fd4f5 Signed-off-by: John Lo <loj@cisco.com>