3803 Commits

Author SHA1 Message Date
Pavel Kotucek
060c6fc0b5 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>
2016-02-26 20:48:04 +00:00
John Lo
8b4d82cd4f Fix ENIC PMD not sending the first packet on TX.
Change-Id: I615e9ca6f445092baa211098eb64f9553dd4c407
Signed-off-by: John Lo <loj@cisco.com>
2016-02-26 20:42:04 +00:00
John Lo
a0fac5ac19 Fix link bonding PMD slave status polling path used by VIC ENIC driver.
Change-Id: Ic9fc952b618477beb246974b33d753bf6fd47dde
Signed-off-by: John Lo <loj@cisco.com>
2016-02-26 20:42:04 +00:00
Damjan Marion
308fb98220 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>
2016-02-26 19:48:10 +01:00
Damjan Marion
e936bbe594 Add support for native vpp_lite (non-dpdk) platform
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-26 13:17:30 +01:00
Damjan Marion
7f620976e2 Move dpdk (un)format functions to separate c file
Change-Id: Idb1b1bf6c1b3b3d66672cc715e45aec299fb7592
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-26 00:16:33 +01:00
John Lo
d9bf9abbab 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>
2016-02-25 17:55:16 +00:00
Damjan Marion
ebb27fb480 add install-dep target to toplevel Makefile
Change-Id: I9dbe6676086ef083729bec1774f544498d1ec3e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-25 15:55:23 +00:00
John Lo
1c32a89ea4 Fix indexing error in init.c for vnet dpdk.
Change-Id: I1bab9e8cf428b0d27edf98fa54ffc3edc32fd4f5
Signed-off-by: John Lo <loj@cisco.com>
2016-02-25 10:22:59 -05:00
Yoann Desmouceaux
4667c229a0 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>
2016-02-25 13:53:14 +00:00
Dave Barach
1f49ed666a 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>
2016-02-24 11:30:44 -05:00
Shesha Sreenivasamurthy
9f50b0b5b1 Enable all vrings if PROTOCOL_FEATURES are not negotiated
Change-Id: Ib785a2ffd2fcbe3a836dd59ad419bcc2fa298686
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-24 12:06:06 +00:00
Shesha Sreenivasamurthy
9ad5adcf08 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>
2016-02-24 12:05:20 +00:00
Damjan Marion
eef4d99bcd Few improvements in toplevel Makefile
Change-Id: I896aed32499cd7159c4b6f3b165cab4e579f6153
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-23 22:05:49 +01:00
Damjan Marion
e90892e063 Enable DPDK KNI code based on DPDK config
Change-Id: Iab579c4a7e615c723d10acf0532490cdaa6db05a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-23 20:41:32 +00:00
Damjan Marion
4ee137baf8 Fix warnings in vhost-user code with older version of DPDK
Change-Id: If76ef977e3914b51da0d6bb5e4089acb0bd67baa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-23 19:23:44 +01:00
Yoann Desmouceaux
ca0f3b3a43 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>
2016-02-22 13:27:50 +00:00
Pavel
84e4ffeaf1 Added MTU information to sw_interface_dump
Change-Id: Ie69837fd6903b715cb7b840b67c869a9b12c84a7
Signed-off-by: Pavel <pavel.kotucek@pantheon.tech>
2016-02-22 09:45:02 +01:00
Robert Varga
e1cfcbcda6 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>
2016-02-19 21:02:59 +00:00
Damjan Marion
9b7057fe36 Handle dpdk packet_types properly
Change-Id: Ie13f92a21ed8b81775b1e9cbbf2619e752ab6a04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-19 18:40:59 +00:00
Pierre Pfister
ef65cb0696 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>
2016-02-19 15:58:07 +00:00
Dave Barach
b44e9bc90b 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>
2016-02-19 09:06:46 -05:00
Dave Barach
c07bf5d503 Per-interface, per-address-family fast packet filter
Change-Id: I122aa8edfb16a433a8ccdfb72ee8463c48c56d6d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-19 11:10:32 +00:00
Yoann Desmouceaux
3c4869cdfa 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>
2016-02-19 10:56:13 +00:00
Keith Burns (alagalah)
525d5957f0 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>
2016-02-19 06:52:26 +01:00
Pierre Pfister
328e99b1e2 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>
2016-02-18 00:50:55 +00:00
Damjan Marion
ce8debfe0f 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>
2016-02-16 17:50:48 +00:00
Damjan Marion
d0386374d6 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>
2016-02-16 17:36:49 +01:00
Damjan Marion
d8ff0e1dc7 Show DPDK EAL cmdline args in 'show version verbose'
Change-Id: I88a8038a36e7e5060f354cd66a2532ef8c996b67
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-16 13:07:20 +01:00
Dave Barach
d81566ff92 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>
2016-02-15 11:36:00 -05:00
Damjan Marion
85cdbd0757 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>
2016-02-14 12:47:50 +00:00
Damjan Marion
3f46baf1bd Increase VLIB_MAX_CPUS to 256
Change-Id: Iac68b38dda1a0f9e2242f9eab5b03e44bbcac269
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-14 00:02:31 +00:00
Damjan Marion
cfb2d804ce Make size of per-thread mini counter vector equal to number of threads
Change-Id: Icfd91cca3cd686e5efa8a988f04483238605e1cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-14 00:02:31 +00:00
Oleg A. Arkhangelsky
1617819889 Remove duplicate vlib_call_init_function() for tuntap init
Change-Id: Ie642d15d2843f02a01448afe91aa7311e6131047
Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru>
2016-02-13 20:32:12 +03:00
Damjan Marion
13f0718e64 Increase number of dpdk lcores to 256
Change-Id: Ia0e228d02fd9f180ed9ca468074ab38d575e415e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-13 00:14:53 +00:00
Keith Wiles
cb46684aac 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>
2016-02-12 13:23:28 -06:00
Dave Barach
52642c3c53 Performance tools, initial check-in
Change-Id: I9fb4f4babecbe02d171f38c4d089634e90141937
Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-12 01:30:48 +00:00
Josh Gahm
3640d537e1 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>
2016-02-11 18:41:58 +00:00
Damjan Marion
14a44d37a3 Use vppinfra bitmap for dpdk coremask
Change-Id: Iec5ebadf120f742f43a681c4d394aa97ad2ae1e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-11 15:02:33 +00:00
Robert Varga
40223daf5e Remove strcasecmp(3) declaration
This should be coming from string.h.

Change-Id: Id88bb1d2a4681a9dcf6db9c7de2580a5219869d1
Signed-off-by: Robert Varga <nite@hq.sk>
2016-02-10 16:29:30 +01:00
Robert Varga
f0f54d8b7c 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>
2016-02-10 16:25:07 +01:00
Robert Varga
ec3034c2ba newIntArray() may fail
Allocation of the integer array may fail, guard against NPE.

Change-Id: I3e860153597638392c9b669a6ad586fd2e03a64d
Signed-off-by: Robert Varga <nite@hq.sk>
2016-02-10 16:24:31 +01:00
Dave Barach
20abdd9b02 Compile with -Werror, so Jenkins will catch warnings
Change-Id: I9255c75b6c6cbc638cdcc411632a924cb06f28c0
Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10 09:14:36 -05:00
Robert Varga
d0f9209d06 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>
2016-02-10 14:04:41 +00:00
Dave Barach
2126b35f5f Replace AC_PROG_LIBTOOL with LT_INIT
Change-Id: I642c4b8e83dd07708658a10ad46e9fd2c28a7f1f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10 08:43:22 -05:00
Damjan Marion
e17fdb5ddf Add Top-Level Wrapper Makefile
Change-Id: Ie3431986ddb42db8d331fcb3d34250a6ec9d9a02
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-10 13:14:39 +00:00
Shesha Sreenivasamurthy
b8f45b3729 Vhost multi-q support
Remove multi-q support patch for DPDK-2.1.0

Change-Id: I685f3886b3883803210221682fa80353670a6970
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-10 13:14:17 +00:00
Dave Barach
1b1695316d Clean up gcc-5.2 warnings
Change-Id: I7b0aa42a61607d4d30fe3627032d3837b2838982
Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10 08:03:44 -05:00
Dave Wallace
ba474a2629 Modify hand-coded JNI function names to match refactoring of
vppConn.java in commit #169

Change-Id: Id9feaebdce199f239741a10d31bf7aa473a62806
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2016-02-09 23:24:32 -05:00
Robert Varga
190efbc0a5 Make cleanup_rx_thread static
The symbol is not referenced outside of the source file, hide it from
the world.

Change-Id: Id5db73efff0767657ebc5a0b25dcccd2b85e354d
Signed-off-by: Robert Varga <nite@hq.sk>
2016-02-09 22:00:27 +00:00