rangan [Thu, 17 Mar 2016 22:01:17 +0000 (03:31 +0530)]
* Added support to configure trace type as a
configuration parameter. This can be any combination
of nodeid, interface indices, timestamp and appdata.
This configuration is passed through packet header by
encap node to all other nodes. Rewrite buffer is resized
accordingly. Trace function modified accordingly.
* Added CLI 'show ioam summary' command to display various
configuration.
* Added CLI 'clear ioam rewrite'
Change-Id: Ide4c85f8b22561303df48519c5ea59668a300188
Signed-off-by: rangan <rangan@cisco.com>
Dave Barach [Sat, 19 Mar 2016 12:53:58 +0000 (08:53 -0400)]
cosmetic: indent code
Gerrit wouldn't merge the previous attempt, so let's just make the
pain go away...
Change-Id: Ia008d43f755b6e3a5f4c699de365d241bf361aa9
Signed-off-by: Dave Barach <dave@barachs.net>
Nagaprabhanjan Bellari [Fri, 18 Mar 2016 13:40:21 +0000 (19:10 +0530)]
Add llc_init in osi_init to ensure init order dependency
Change-Id: I5cb2a319384e49a072d75f3ea05e6fb92e381c23
Signed-off-by: Nagaprabhanjan Bellari <nagp.lists@gmail.com>
Keith Burns (alagalah) [Fri, 18 Mar 2016 14:22:15 +0000 (07:22 -0700)]
Adminis-trivia - rename skel files
- rename skels so M-x skel-<tab> gives catalog
Change-Id: Ice25a4ce4d02d09e076f0de51e8443cfab20688d
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Damjan Marion [Thu, 17 Mar 2016 16:53:03 +0000 (17:53 +0100)]
add ctags and cscope files to .gitignore
Change-Id: I047cc41a5d0c4a6e4191ca35c505ff21236abcfa
Signed-off-by: Damjan Marion <damarion@cisco.com>
Ed Warnicke [Fri, 18 Mar 2016 03:37:27 +0000 (20:37 -0700)]
Add -y to apt-get install for install-dep target
This allows install-dep to be run non-interactively
Change-Id: I5c3e55958ed16dd3d128bbad9f317d9f2428d41a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Dave Barach [Fri, 18 Mar 2016 13:48:16 +0000 (09:48 -0400)]
Fix longstanding next-frame clone bug
Do not propagate flags into cloned vlib_next_frame_t's.
vlib_next_frame_init(...) sets nf->frame_index to ~0. If it turns out
that the original flags include VLIB_FRAME_IS_ALLOCATED, the wheels
fall off. And so on.
Change-Id: I8de18653acfcc8eb20cee36f4eb5b9e82234f21b
Signed-off-by: Dave Barach <dave@barachs.net>
Pierre Pfister [Wed, 16 Mar 2016 09:14:28 +0000 (09:14 +0000)]
vnet_classify: Handle non-aligned vectors and various bugfixes
classifier used to crash when packet data was not aligned.
This commit also includes:
- writer lock initialization bugfix
- CLI help was missing opaque-index
- ip_input_acl was applying the mask on buffer->data instead of packet head
On a side note, my tests failed to show any improvements
when using SSE. Further tests might be interesting to see if they
actually perform better.
Change-Id: Ic34eecd6a2226919121ffce2fe4324506deee52f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Dave Barach [Tue, 15 Mar 2016 09:21:54 +0000 (10:21 +0100)]
Make adjacencies shareable
Change-Id: I620871ca715b751d2e487f37341b7118797c9176
Signed-off-by: Damjan Marion <damarion@cisco.com>
Todd Foggoa [Thu, 17 Mar 2016 18:22:34 +0000 (14:22 -0400)]
Bring back p1.c so plugins can see DPDK symbols
Change-Id: Ia450c9bc6d00fbd054d41a462366f826121d781d
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
Damjan Marion [Thu, 17 Mar 2016 09:28:23 +0000 (10:28 +0100)]
Reincarnate call to unix_physmem_init() for non-dpdk use
Change-Id: Iaa3da32060e78bbc505ee84a2a6393f899aa110e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 17 Mar 2016 11:46:57 +0000 (12:46 +0100)]
Don't stop binding pci device if write to new_id fails
In some cases write to new_id fails but binding is still
possible.
Change-Id: I1944eab4326a08e85e83cd5cd7379c6a4d03d98d
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 16 Mar 2016 21:49:05 +0000 (22:49 +0100)]
Few additions to top-level Makefile
* Added option to specify target platform (e.g. export PLATFORM=vpp_lite)
* Added ctags targed to (re)build ctags database
* Added cscope targed to (re)build cscope database
Change-Id: I93feb7b458abe9fbd93000f75b7be24e3865f089
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 16 Mar 2016 21:59:21 +0000 (22:59 +0100)]
af_packet: vec functions should not be used on pool
Change-Id: Ifc67db0575a7517ac24519894996906ea44ead67
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Wallace [Tue, 15 Mar 2016 05:28:58 +0000 (01:28 -0400)]
Add VLIB_INIT_FUNCTION() to dual-loop-skel
Change-Id: I4aafad8a3e4c0c57eef1940fac8debfb80bbb137
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Damjan Marion [Mon, 29 Feb 2016 12:09:30 +0000 (13:09 +0100)]
Add vpp native linux kernel AF_PACKET interface support
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>
Damjan Marion [Mon, 14 Mar 2016 19:02:35 +0000 (20:02 +0100)]
Declare node, hw_interface_class and device_class instances as external
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>
Jean-Mickael Guerin [Fri, 4 Mar 2016 13:14:21 +0000 (14:14 +0100)]
fix declaration of symbol of different size
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>
Jean-Mickael Guerin [Wed, 2 Mar 2016 18:05:05 +0000 (19:05 +0100)]
dpdk: fix link error
/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>
Yoann Desmouceaux [Tue, 8 Mar 2016 13:54:28 +0000 (14:54 +0100)]
Better match vhost-user specification for live migration
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>
Dave Wallace [Mon, 14 Mar 2016 04:10:24 +0000 (00:10 -0400)]
Fix skel files to use <vppinfra/*.h> instead of <clib/*.h> when
including vppinfra header files.
Change-Id: I961c602e0ccd2048fac633b5aeebb8c3cd0899fb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Stefan Kobza [Fri, 11 Mar 2016 14:18:42 +0000 (15:18 +0100)]
Do not use hugepages if none are available.
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>
Vincent JARDIN [Fri, 4 Mar 2016 23:56:06 +0000 (00:56 +0100)]
lex - yylval undeclared
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>
Pierre Pfister [Wed, 9 Mar 2016 18:22:32 +0000 (18:22 +0000)]
Set hardware iface state for loopback interfaces
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>
Vincent JARDIN [Sat, 5 Mar 2016 00:41:05 +0000 (01:41 +0100)]
lt-*m4 - remove auto generated files
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>
John Lo [Wed, 9 Mar 2016 03:15:20 +0000 (22:15 -0500)]
More updated match to ENIC PMD for DPDK 2.2.0 including rx path optimization.
Change-Id: I756940c9c1b2bb71d47caeb08ab34a2e954ddff6
Signed-off-by: John Lo <loj@cisco.com>
Pierre Pfister [Wed, 9 Mar 2016 15:56:31 +0000 (15:56 +0000)]
Fix IPv6 NDP and bridge BVI and restore NDP and ARP when BVI move is changed.
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>
Dave Barach [Mon, 7 Mar 2016 22:10:36 +0000 (17:10 -0500)]
Fix longstanding cleanup-flag bug
Change-Id: I9b325b454ef80ffff80a0b0e23b24e3313127376
Signed-off-by: Dave Barach <dave@barachs.net>
Dave Barach [Mon, 7 Mar 2016 20:37:18 +0000 (15:37 -0500)]
Packet filter control-plane API bugfix
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>
Pavel Kotucek [Thu, 3 Mar 2016 12:27:11 +0000 (13:27 +0100)]
Add sw_interface_clear_stats API call
Change-Id: I0731357744ddcb890efaebd81aac5370449a90e3
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Jean-Mickael Guerin [Wed, 2 Mar 2016 21:34:50 +0000 (22:34 +0100)]
build: fix call to mkdir
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>
Bud Grise [Wed, 24 Feb 2016 21:09:05 +0000 (16:09 -0500)]
Allow dpdk linkstate and stat polling intervals to be set dynamically.
Change-Id: I6aa662e060f7ce01a4dd80ae2498dc91a8b65a8e
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
rangan [Fri, 4 Mar 2016 16:53:25 +0000 (22:23 +0530)]
Modified ioam CLI syntax to conform with other CLIs
Change-Id: I384d7b2cdbb63b5ca904db5a11c8b8748f7197b9
Signed-off-by: rangan <rangan@cisco.com>
Shesha Sreenivasamurthy [Wed, 2 Mar 2016 18:33:26 +0000 (10:33 -0800)]
Collect per Q stats for vhost-user interface
Change-Id: I394960c300ff7a81c4c8e05afd5a4175e66666eb
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
Jean-Mickael Guerin [Fri, 4 Mar 2016 13:27:39 +0000 (14:27 +0100)]
vppinfra: remove generated config.h.in
Change-Id: I04f53789bf1f39fdf16bc813280b24144fedd020
Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
Maros Marsalek [Wed, 24 Feb 2016 10:30:00 +0000 (11:30 +0100)]
gitignore
Change-Id: I59c4711fce1999b4bd23f0a0bac41aa14ca716f5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Damjan Marion [Fri, 4 Mar 2016 11:44:14 +0000 (12:44 +0100)]
Add CPU detection functions
Change-Id: Id7ea0410d6a789000c747c36a7e50076e31dc29a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 4 Mar 2016 12:39:38 +0000 (13:39 +0100)]
Use xxhash in map code when SSE4.2 not available
Change-Id: If4fb86cfeeaf35f3ae89946b437ce5160adbce94
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 3 Mar 2016 19:19:02 +0000 (20:19 +0100)]
Refuse to start if binary requires unavailable CPU extensions
Change-Id: I4d0d152b6f5d4ba566398fcccaa6a1f96625f864
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Thu, 3 Mar 2016 17:13:11 +0000 (12:13 -0500)]
Change default L3 MTU to allow jumbo packets for non-DPDK interfaces.
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>
Nikhil P Rao [Thu, 3 Mar 2016 16:56:19 +0000 (22:26 +0530)]
Copy flags when cloning next_frames
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>
Damjan Marion [Thu, 3 Mar 2016 17:22:02 +0000 (18:22 +0100)]
Use CRC32 instruction only when build for SSE4.2 enabled platforms
This fixes SIGILL crash observed on Penryn CPU
Change-Id: I960878d88f0f088847d4d86605ef082f6600e2c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Thu, 3 Mar 2016 05:25:54 +0000 (00:25 -0500)]
Fix UDP length check for local IP/UDP lookup and error handling.
Change-Id: If6695e19e5a1e5471e56099e2cf31794c73f3303
Signed-off-by: John Lo <loj@cisco.com>
Ole Troan [Wed, 2 Mar 2016 09:01:43 +0000 (10:01 +0100)]
TAP: Jumbo-frame support.
Change-Id: I3a0726d7645f775738253d0a47ee04d94d138c9a
Signed-off-by: Ole Troan <ot@cisco.com>
Todd Foggoa [Wed, 2 Mar 2016 18:52:53 +0000 (10:52 -0800)]
Always showing DPDK physical memory on bootup
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>
Bud Grise [Wed, 24 Feb 2016 21:14:22 +0000 (16:14 -0500)]
Add rotates to v6 worker hash to prevent SIP/DIP synchronizing.
Change-Id: Ibe8ec6271b3f04290a60c0145e59a01d3130500f
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
Dave Barach [Wed, 2 Mar 2016 14:48:04 +0000 (09:48 -0500)]
Remove spurious call to unix_physmem_init(...)
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>
Sean Hope [Mon, 22 Feb 2016 20:21:31 +0000 (15:21 -0500)]
Dump DPDK physmem to stdout before allocating mbufs
Change-Id: I9dac27dc8b6b95cfb0ee77e3cff18240b4ec21d6
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
Christian Dechamplain [Fri, 19 Feb 2016 17:26:57 +0000 (12:26 -0500)]
Add ability to filter and change MACs
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>
Georgi Savov [Thu, 25 Feb 2016 17:56:03 +0000 (12:56 -0500)]
Fix for TX and RX descriptor queue lockup
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>
Sean Hope [Mon, 22 Feb 2016 20:12:01 +0000 (15:12 -0500)]
Add ability to override the interface name.
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>
Pavel Kotucek [Mon, 29 Feb 2016 14:03:08 +0000 (15:03 +0100)]
Fixed vxlan link status.
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>
Dave Barach [Mon, 29 Feb 2016 14:45:08 +0000 (09:45 -0500)]
-O3 warnings be gone
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>
Damjan Marion [Fri, 26 Feb 2016 23:12:55 +0000 (00:12 +0100)]
Invert matching logic for *_uses_dpdk in build-data/packages/*.mk
Change-Id: If07a74afd92196c035d720cedaac36493a09e400
Signed-off-by: Damjan Marion <damarion@cisco.com>
Bud Grise [Fri, 19 Feb 2016 17:10:33 +0000 (12:10 -0500)]
Add packet tracing hint
This avoids checking the buffer flags bit if tracing is not enabled.
Change-Id: I32e1a90b5fd10318254c611344488bc2a441c71e
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
Pavel Kotucek [Wed, 24 Feb 2016 14:52:42 +0000 (15:52 +0100)]
Fixed issue with json output in vpp_api_test.
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>
John Lo [Fri, 26 Feb 2016 19:48:54 +0000 (14:48 -0500)]
Fix ENIC PMD not sending the first packet on TX.
Change-Id: I615e9ca6f445092baa211098eb64f9553dd4c407
Signed-off-by: John Lo <loj@cisco.com>
John Lo [Fri, 26 Feb 2016 19:46:05 +0000 (14:46 -0500)]
Fix link bonding PMD slave status polling path used by VIC ENIC driver.
Change-Id: Ic9fc952b618477beb246974b33d753bf6fd47dde
Signed-off-by: John Lo <loj@cisco.com>
Damjan Marion [Fri, 26 Feb 2016 12:46:57 +0000 (13:46 +0100)]
Update PowerPC (qppc) platform to build with Ubuntu cross-tools
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>
Damjan Marion [Thu, 25 Feb 2016 22:17:38 +0000 (23:17 +0100)]
Add support for native vpp_lite (non-dpdk) platform
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 25 Feb 2016 15:00:11 +0000 (16:00 +0100)]
Move dpdk (un)format functions to separate c file
Change-Id: Idb1b1bf6c1b3b3d66672cc715e45aec299fb7592
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Thu, 25 Feb 2016 16:17:55 +0000 (11:17 -0500)]
Add support of Ethernet link bonding utilizing DPDK link bonding
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>
Damjan Marion [Thu, 25 Feb 2016 15:26:01 +0000 (16:26 +0100)]
add install-dep target to toplevel Makefile
Change-Id: I9dbe6676086ef083729bec1774f544498d1ec3e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Thu, 25 Feb 2016 15:17:30 +0000 (10:17 -0500)]
Fix indexing error in init.c for vnet dpdk.
Change-Id: I1bab9e8cf428b0d27edf98fa54ffc3edc32fd4f5
Signed-off-by: John Lo <loj@cisco.com>
Yoann Desmouceaux [Wed, 24 Feb 2016 21:51:00 +0000 (22:51 +0100)]
Add live migration support to (non-dpdk) vhost-user driver
This patch adds live migration support to vhost interfaces, by supporting the VHOST_F_LOG_ALL feature. When qemu starts a migration, it will negotiate this feature, and provide a fd for a "dirty log" shared mem space. This log is a bitmap representing pages in the device memory.
Whenever we touch memory pointed by a "desc" vring, or modify a "used" vring, we log the corresponding page in the bitmap. This allows qemu to send the dirty page to the destination host.
See https://github.com/qemu/qemu/blob/master/docs/specs/vhost-user.txt, ยง "Live migration" for more details.
In addition to this, this code provides support for the VHOST_USER_F_PROTOCOL_FEATURES feature, and to VHOST_USER_{GET,SET}_PROTOCOL_FEATURES and VHOST_USER_SET_VRING_ENABLE messages, required for live migration.
Change-Id: I7577efce8bd67653218f4291af1d651de451e552
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
Dave Barach [Wed, 24 Feb 2016 16:29:06 +0000 (11:29 -0500)]
Link the vpp application against libvnet.so, not libvnet.a
Turn of srp, mainly as an example of how to restructure a featurette
for selective disablement.
Change-Id: Id3364c58a8711b103939f4434adfa67177380f67
Signed-off-by: Dave Barach <dave@barachs.net>
Shesha Sreenivasamurthy [Tue, 23 Feb 2016 21:52:31 +0000 (13:52 -0800)]
Enable all vrings if PROTOCOL_FEATURES are not negotiated
Change-Id: Ib785a2ffd2fcbe3a836dd59ad419bcc2fa298686
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
Shesha Sreenivasamurthy [Fri, 19 Feb 2016 21:36:53 +0000 (13:36 -0800)]
Handle dynamic enable/disable VHOST_USER interface
If number of Qs enabled by the guest is less
than number of Qs exported to guest, then all
threads route packet to Q0 with the assumption
that guest is not interested in performance.
If all Qs are enabled, each thread queues packet
in their own TX-Q of the VHOST_USER interface,
boosting performance.
Change-Id: Ic24bb8c0505b11c7513aeecd21c9ec5da5f90138
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
Damjan Marion [Tue, 23 Feb 2016 21:04:50 +0000 (22:04 +0100)]
Few improvements in toplevel Makefile
Change-Id: I896aed32499cd7159c4b6f3b165cab4e579f6153
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 23 Feb 2016 18:20:28 +0000 (19:20 +0100)]
Enable DPDK KNI code based on DPDK config
Change-Id: Iab579c4a7e615c723d10acf0532490cdaa6db05a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 23 Feb 2016 18:23:44 +0000 (19:23 +0100)]
Fix warnings in vhost-user code with older version of DPDK
Change-Id: If76ef977e3914b51da0d6bb5e4089acb0bd67baa
Signed-off-by: Damjan Marion <damarion@cisco.com>
Yoann Desmouceaux [Fri, 19 Feb 2016 20:30:09 +0000 (21:30 +0100)]
dpdk: fix enic pmd driver tx function
Adding a patch to fix DPDK 2.2.0 enic PMD driver TX function.
The enic PMD driver send function uses a constant offset instead of relying on the data_off in the mbuf to find the start of the packet.
Change-Id: Ic4f3be83865367306785a57e2694e0ccfa295c7b
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
Pavel [Wed, 17 Feb 2016 14:10:04 +0000 (15:10 +0100)]
Added MTU information to sw_interface_dump
Change-Id: Ie69837fd6903b715cb7b840b67c869a9b12c84a7
Signed-off-by: Pavel <pavel.kotucek@pantheon.tech>
Robert Varga [Sun, 14 Feb 2016 01:10:18 +0000 (02:10 +0100)]
Rebalance checkConnected()
AtomicBoolean forces the enclosed boolean to be cache-aligned,
needlessly hitting a cacheline. Since we only flip state only once,
when the connection is severed, we can turn this into a volatile
boolean.
Doing that is costing us a synchronized close(), but that is perfectly
acceptable, as that is called only once.
Change-Id: I76fda3d3f65a5f800e7d3970b0b8fe99fb3e8b6d
Signed-off-by: Robert Varga <nite@hq.sk>
Damjan Marion [Fri, 19 Feb 2016 15:23:45 +0000 (16:23 +0100)]
Handle dpdk packet_types properly
Change-Id: Ie13f92a21ed8b81775b1e9cbbf2619e752ab6a04
Signed-off-by: Damjan Marion <damarion@cisco.com>
Pierre Pfister [Fri, 19 Feb 2016 13:52:44 +0000 (13:52 +0000)]
Add custom mac address option to vhost interfaces.
Generating a new MAC address everytime vpp reboots can quickly
become cumbersome (e.g. in test scenarios).
This commit allows vhost mac addresses to be configured
manually.
Change-Id: Ic6d16a2d14cdf8e49dc29041bbafde39d9fc8370
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Dave Barach [Fri, 19 Feb 2016 14:06:23 +0000 (09:06 -0500)]
Serialize and upload the data plane node graph
Include node names and graph arcs. Prep work for uploading node
runtime data, so the latter can be reported in a comprehensible
manner.
Change-Id: I215b1f8cff244200c37c7e088f1f22229dc97eb6
Signed-off-by: Dave Barach <dave@barachs.net>
Dave Barach [Wed, 17 Feb 2016 22:52:26 +0000 (17:52 -0500)]
Per-interface, per-address-family fast packet filter
Change-Id: I122aa8edfb16a433a8ccdfb72ee8463c48c56d6d
Signed-off-by: Dave Barach <dave@barachs.net>
Yoann Desmouceaux [Fri, 19 Feb 2016 10:18:29 +0000 (11:18 +0100)]
dpdk: fix enic pmd driver tx function
Adding a patch to fix DPDK enic PMD driver TX function.
The enic PMD driver send function uses a constant offset instead of relying on the data_off in the mbuf to find the start of the packet.
Change-Id: I74dbcce949f08e39070a369d992a90586af140a6
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
Keith Burns (alagalah) [Fri, 19 Feb 2016 05:18:46 +0000 (06:18 +0100)]
Add GDB and GDB Server to bootstrap files
Validated following images used do not contain gdb, gdbserver:
puppetlabs/centos-7.0-64-nocm
puppetlabs/ubuntu-14.04-64-nocm
Note that centos7 does not include emacs
Change-Id: I091a64a7c667e081574763537de724f9feaae0dc
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Pierre Pfister [Fri, 12 Feb 2016 13:18:42 +0000 (13:18 +0000)]
Add jumbo frames support to non-dpdk vhost interfaces.
This code provided inter-VM (2 cores per VM) throughput of
22Gbps using iperf through VPP (1 core) with 9k frames.
With the same setup and pktgen running on both sides, it
reached 5Mpps with no packets drop (Equivalent to before the patch).
During the tests the average vector length was about 1, which
likely means that VPP is not the bottleneck.
The patch also includes some generic functions for vlib buffers
allowing for chained buffer construction whether or not DPDK is enabled.
Change-Id: Icfd1803e84b2b4578f305ab730576211f6242d6a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Damjan Marion [Sat, 6 Feb 2016 18:16:21 +0000 (19:16 +0100)]
Increase number of per-cpu mheaps to 256
It also includes check to ensure that number of
per-cpu mheaps is not lower than number of cpus.
Change-Id: Ibc68b34dda130f922243f9ea15b03e44bbcac269
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 16 Feb 2016 16:32:34 +0000 (17:32 +0100)]
Remove vec_sort macro
vec_sort macro was using gcc proprietary nested functions that
require a executable stack and they are considered as unsafe.
Also, nested functions are not supported by other compilers.
vec_sort_with_function() should be used instead.
Change-Id: I05959da63d222ec71c090ba63420b427ce10c79b
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 16 Feb 2016 11:29:57 +0000 (12:29 +0100)]
Show DPDK EAL cmdline args in 'show version verbose'
Change-Id: I88a8038a36e7e5060f354cd66a2532ef8c996b67
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Barach [Mon, 15 Feb 2016 16:34:13 +0000 (11:34 -0500)]
Disable for-us udp/tcp checksum validation by default
This patch alters behavior for dpdk rx packets. Depending on test
results, it may be necessary to extend the scheme to packets received
on non-dpdk paravirtualized interfaces, and packets originating in the
vpp stack itself.
Change-Id: I8444232a90ff176e7d6a688e36801174575251a1
Signed-off-by: Dave Barach <dave@barachs.net>
Damjan Marion [Fri, 12 Feb 2016 17:00:23 +0000 (18:00 +0100)]
Implement multiple TX queue sharing
Maximum number of TX queues ca be defined by NIC driver
or configured manualy with 'dpdk { max-tx-queues X }'.
If system have more worker threads than TX queues they will
be shared between them. Before this change only one tx
queue was used in such cases.
Change-Id: Iab68170ab45fa6b9925fc4e79ccab9222f095e7e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sat, 6 Feb 2016 18:16:21 +0000 (19:16 +0100)]
Increase VLIB_MAX_CPUS to 256
Change-Id: Iac68b38dda1a0f9e2242f9eab5b03e44bbcac269
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 5 Feb 2016 23:54:12 +0000 (00:54 +0100)]
Make size of per-thread mini counter vector equal to number of threads
Change-Id: Icfd91cca3cd686e5efa8a988f04483238605e1cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
Oleg A. Arkhangelsky [Sat, 13 Feb 2016 17:32:12 +0000 (20:32 +0300)]
Remove duplicate vlib_call_init_function() for tuntap init
Change-Id: Ie642d15d2843f02a01448afe91aa7311e6131047
Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru>
Damjan Marion [Fri, 5 Feb 2016 14:44:54 +0000 (06:44 -0800)]
Increase number of dpdk lcores to 256
Change-Id: Ia0e228d02fd9f180ed9ca468074ab38d575e415e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Keith Wiles [Fri, 12 Feb 2016 01:21:10 +0000 (19:21 -0600)]
Fix ARP show exception when not ARP entries as found.
The fix tests if the ARP table exist before attempting to
interate over the entries.
Change-Id: I22cad5ba3a01c3fba1feac33745a29ff1f7f8fe1
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Dave Barach [Fri, 12 Feb 2016 00:28:19 +0000 (19:28 -0500)]
Performance tools, initial check-in
Change-Id: I9fb4f4babecbe02d171f38c4d089634e90141937
Signed-off-by: Dave Barach <dave@barachs.net>
Josh Gahm [Wed, 10 Feb 2016 23:03:08 +0000 (18:03 -0500)]
Pull in some additional symbols that may be needed by plugins.
Ensure that some additional rte_* symbols (from the dpdk library) and
pulled into the vpp image so that they will be available to plugins.
Also, provide vlib's dpdk configuration function so that plugins that
need to make dpdk calls during initialization/configuration may ensure
that dpdk itself is initialized first.
Change-Id: Iff8b518c6fc23e9e2f24a85944e5b246c80e5f67
Signed-off-by: Josh Gahm <jgahm@cisco.com>
Damjan Marion [Fri, 5 Feb 2016 22:33:21 +0000 (23:33 +0100)]
Use vppinfra bitmap for dpdk coremask
Change-Id: Iec5ebadf120f742f43a681c4d394aa97ad2ae1e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Robert Varga [Wed, 10 Feb 2016 14:57:23 +0000 (15:57 +0100)]
Remove strcasecmp(3) declaration
This should be coming from string.h.
Change-Id: Id88bb1d2a4681a9dcf6db9c7de2580a5219869d1
Signed-off-by: Robert Varga <nite@hq.sk>
Robert Varga [Wed, 10 Feb 2016 15:01:58 +0000 (16:01 +0100)]
GetStringUTFChars() may fail
GetStringUTFChars() can fail, returning NULL. Make sure we do not trip
over it.
Change-Id: I2d6b9c72c353c2423042fd035087f0d57fdc08ca
Signed-off-by: Robert Varga <nite@hq.sk>
Robert Varga [Wed, 10 Feb 2016 15:00:16 +0000 (16:00 +0100)]
newIntArray() may fail
Allocation of the integer array may fail, guard against NPE.
Change-Id: I3e860153597638392c9b669a6ad586fd2e03a64d
Signed-off-by: Robert Varga <nite@hq.sk>
Dave Barach [Wed, 10 Feb 2016 14:13:23 +0000 (09:13 -0500)]
Compile with -Werror, so Jenkins will catch warnings
Change-Id: I9255c75b6c6cbc638cdcc411632a924cb06f28c0
Signed-off-by: Dave Barach <dave@barachs.net>
Robert Varga [Wed, 10 Feb 2016 13:39:57 +0000 (14:39 +0100)]
Indent vppjni.c to be consistent
Pure cleanup of indentation and brace placement, so the file ends up
being consisteny.
Change-Id: Idd2f20deda486d16b455f3e13cacbc2f3baa50f1
Signed-off-by: Robert Varga <nite@hq.sk>
Dave Barach [Wed, 10 Feb 2016 13:42:59 +0000 (08:42 -0500)]
Replace AC_PROG_LIBTOOL with LT_INIT
Change-Id: I642c4b8e83dd07708658a10ad46e9fd2c28a7f1f
Signed-off-by: Dave Barach <dave@barachs.net>