Commit Graph

5743 Commits

Author SHA1 Message Date
Damjan Marion f4901f3d1d extras: vfctl script - bind VF to vfio-pci after VF is created
Change-Id: If6ed71a5f7217363d8e1b2f7a7f20fe4cfdb58af
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-31 19:44:14 +01:00
Klement Sekera e82c73a96e assert on double-free in debug build
The assert allows easier debugging in gdb by aborting instead of exiting
cleanly. Also a core is generated so a stack trace can be obtained.

Change-Id: I2d05488c4522f4d4570fdfe0283130eb4c853d2a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-31 16:27:37 +00:00
Mohsin Kazmi a402b83643 pci: get the number of interrupts
Change-Id: I2cfb81b3c8809d027a3ee5f5f570668e60be08ef
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-01-31 13:12:33 +00:00
Damjan Marion 24dcbe4520 buffers: reinitialize metadata, add additional validation
- DPDK overwrites metadata as part of rte_pktmbuf_init(...) so we need
  reinitialize it

- additional checks added to ensure ref_count is never < 1

Change-Id: Ida336f81c4723e8f2e0ad4a70cb7b1ecfff978a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-31 12:33:16 +01:00
Neale Ranns f6e9b014cb DHCP-test: more robust sleep check
Change-Id: I48c382797239dc305e01cc35124140d6ce16149a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-31 09:19:52 +00:00
Damjan Marion 94519aaed6 buffers: add missing ref_count = 1 in drivers
Change-Id: I6aa030429c1740f7376e95daf82fce49efa6716b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-30 22:16:19 +01:00
Mohsin Kazmi 0e2bc63ba9 virtio: fix the device order (legacy or modern)
Change-Id: I60f88d50f062b004e6dea487bd627d303d0a5e75
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-01-30 19:49:30 +00:00
Neale Ranns 37029305c6 Use IP and MAC API types for neighbors
use address_t and mac_address_t for IPv6 and ARP entries
and all other API calls in ip.api aprat from the route ones,
that will follow in a separate commit

Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-30 19:47:53 +00:00
Neale Ranns 13b2ba2ad5 MPLS tunnel; fix crash when deleting non-existant path
in the case the tunnel is the only user of the shared path list
then removing its dependency removes the path list. hence lock the list

Change-Id: I18318441698ceac16715b1826266a7d19dcd76e1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-30 19:47:36 +00:00
Damjan Marion 910d3694e8 buffers: major cleanup and improvements
This patch introduces following changes:
- deprecated free lists which are not used and not compatible
  with external buffer managers (i.e. DPDK)
- introduces native support for per-numa buffer pools
- significantly improves performance of buffer alloc and free

Change-Id: I4a8e723ae47056717afd6cac0efe87cb731b5be7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-30 16:19:22 +00:00
Klement Sekera 4fd5a9d3e6 ipsec: fix check support functions
Change-Id: If94c57fbb07a7376a9f2873e1489c00b28152620
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-30 12:50:48 +01:00
Florin Coras 2d675d72d3 vls: support passive listeners
If an application worker calls listen on a session, vpp registers the
worker to the listener's work load balance group and, as new connections
are accepted, it may potentially push accept notifications to it.

There are however applications, like nginx, that on some workers may
never accept new connections on a session they've started listening on.
To avoid accumulating accept events on such workers, this patch adds
support for passive listeners. That is, workers that have started
listening on a session but then never call accept or epoll/select on
that listener.

Change-Id: I007e6dcb54fc88a0e3aab3c6e2a3d1ef135cbd58
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-30 09:08:11 +00:00
Florin Coras 822f5a498b lisp: set reachable flag in map-register
Change-Id: I9faaa321113e435844931247f23dbc1d190cc9da
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-30 09:06:56 +00:00
Florin Coras 4dee8cdb4e ldp: initialize clib time
Change-Id: Ie598443f024a677a9c6938b3f3634960fd712b09
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-30 09:06:30 +00:00
Ed Kern 653cd2dc46 test_syslog.py: pep8 overtab
nit tab fix for pep8

Change-Id: I81f62bf5f547497c9aabfb3180ef24f50b7c3283
Signed-off-by: Ed Kern <ejk@cisco.com>
2019-01-30 08:45:00 +00:00
Paul Vinciguerra 776e46d77c VTL: Fix pep8 test/test_syslog.py
Change-Id: I8894a7a8f2be117a4c1cec9ce5134a1572da7ec7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-29 21:10:17 +00:00
Mohsin Kazmi 22c0ece25c virtio: Support legacy and transitional virtio devices
Change-Id: Ib1316482dd7b1ae3c27c7eeb55839ed8af9ca162
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-01-29 16:37:36 +00:00
Florin Coras 0ef8ef2b47 vls: multi-process and multi-threaded apps improvements
- More fine tuning for multi-process applications.
- Experimental support for multi-thread apps. This is meant for app
  whose threads are not vcl workers and the sessions are shared between
  them.

Change-Id: Ie07651da5f2cdcf39f5dead5431f50ad39cf3f74
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-29 16:36:06 +00:00
Dmitry Vakhrushev cac8cfaba9 Fix error while compiling using 'vlib/vlib.h' dependencie.
This variable without any needed 'define' becoming unused.

Change-Id: I661a75a78dba03abb861ed918ad1e634a8ecd0af
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
2019-01-29 16:35:46 +00:00
Klement Sekera bf613955ca make test: remove generic imports
Change-Id: I55b89f0d9fb082c7763b64b09ab14573468c6704
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-29 11:39:57 +01:00
Damjan Marion 6077c97a60 cmake: fix out-of-git-tree build
Change-Id: Ib94637ec09799c23f3179599b54a2be6e2768425
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-29 07:47:01 +00:00
Ping Yu 7da100bd04 update openssl TLS async to align with openssl master branch
Need to align with 3.0.0 version

Change-Id: I4e8aec1f1226ce09963a9bbb3a9170d1863059ec
Signed-off-by: Ping Yu <ping.yu@intel.com>
2019-01-28 17:49:05 +00:00
Dmitry Vakhrushev ee3fb62bc8 Fix issues with order of NAT commands before set VRF table on an interface
Outside FIB index doesn't change in this case. We register
callback for changing of outside FIB if table binding is changed
on an interface.

Change-Id: I1ebbd7c3c547fc999089db07abd2019734395a6e
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
2019-01-28 15:23:03 +00:00
Ping Yu 31dd6090e8 Add Ipsec IKE support to openssl 3.0.0 master branch
Change-Id: I7bd43f57d23b1ecf031530c4a7508f949ddf616f
Signed-off-by: Ping Yu <ping.yu@intel.com>
2019-01-28 15:21:11 +00:00
Damjan Marion 29c0b33401 Less intrusive way to capture numa_node and cpu_id changes
Change-Id: I3a33fb81f31ed473811e9e7a6197b81135913865
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-28 13:44:37 +01:00
Damjan Marion ee721412eb Fix issue with cpu_id and numa_code captured too early
Change-Id: I79b213b34c6071d14acf1922f89037a4a5a36c45
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-27 20:23:17 +00:00
Florin Coras 87c657036a session: properly initialize accepted/connected msgs
Change-Id: I36b3ae56e6ca160081c892367fd6a979751fe717
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-27 16:56:27 +00:00
Dave Barach 53fe4a7926 perfmon: collect data on selected thread(s)
Add missing pre-input node runtime fork and refork code.
unix-epoll-input runs on all threads; each instance needs its own
runtime stats.

Change-Id: I16b02e42d0c95f863161176c4bb9f9917bef809d
Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-27 03:01:59 +00:00
Damjan Marion f23a885b89 cmake: parse DPDK config without compilation
Previous scheme was not cross-compile friendly...

Change-Id: Ib103b136231673157a02b8750312aa6073052c7e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-26 20:32:00 +00:00
Burt Silverman e529732607 Run vpp-configure on change to cmake config files.
Modify the dirs assignment in configure_check_timestamp to
add the build-data/platforms/$(PLATFORM).mk file, all the CMakeLists.txt
files in the $(PACKAGE_SOURCE) tree, and the $(PACKAGE_SOURCE)/cmake
directory.
(For example, for package vpp, $(PACKAGE_SOURCE) is <Top of Tree>/src).
Note that in an earlier era there was no build-data/platforms directory and
no CMakeLists.txt files.
Also, we tacitly assume that $(SOURCE_PATH_BUILD_DATA_DIRS) is only one
directory whereas ebuild has been used in environments where there are two
treetops.

Change-Id: I761219adbdb4c7e675bb12b3e7f052db68f0294c
Signed-off-by: Burt Silverman <burtms@gmail.com>
2019-01-26 18:31:17 +00:00
Florin Coras e0982e56f0 vcl: add api to expose worker message queues epfd
This only works if vcl is configured to do eventd based message queue
notifications, instead of condvars. For that, add "use-mq-eventfd" to
vcl startup conf.

Change-Id: Id0f0288a40ec7d3daef7370f8b88420425867ab6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-26 14:51:55 +00:00
Damjan Marion ff42693005 cmake: add support for linking with DPDK shared libs
Change-Id: I3423191c53ab6100ee9ecc4e24b06506ff1b25c8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-26 14:12:25 +01:00
Damjan Marion 1aaf0e343b deprecate tapcli
Change-Id: I82dceaa27a7b0c96de077cf283e4f64aa426f271
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-25 20:51:37 +00:00
Neale Ranns 514e59dfea MPLS-tunnel: show output to display the tunnel name correctly
Change-Id: I1554d9a4d6e4a4007cda9d0f83b03feb8fdbe853
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-25 19:55:21 +00:00
Neale Ranns 311124e21b IPSEC: tests use opbject registry
this means we test the dumps - to some extent

Change-Id: I8d90745701012012b41a7b3aaf9be97b4dd2bdf8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-25 19:54:49 +00:00
Florin Coras 9e47ac54c9 tcp_echo: support all ctrl msgs and io cleanup
Change-Id: I74d69b8d686ad2395267eaee38cf3a7efc76d127
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-25 15:31:28 +00:00
Kingwel Xie 8eb102c28a pg: bugfix for pg paylod hdr-size
it was specified to 0 after https://gerrit.fd.io/r/16909
causes unformat_pg_ip4_header to wrongly set ip header len.

do more check when assigning e->lsb_bit_offset to avoid
negative value

Change-Id: Ib772c7135cdeb355f0d60f1ee11602f6b5a0ff21
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2019-01-25 15:30:56 +00:00
Neale Ranns 5c1f559b1b IP6 FIB: walk table for dump (VPP-1553)
Change-Id: Iaa57ace6df96bfacd1235c80ec7bb08e5f335530
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-25 14:32:53 +00:00
Damjan Marion a2e29e7705 cmake: execute git from src directory
Thanks Eliot....

Change-Id: I19c9557bf827d4a5b2af344f6f4eedf25cda86d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-25 11:22:58 +01:00
Damjan Marion 69a1d6452f perfmon: enable pmc event before reading rdpmc index
Change-Id: I9b0a101e5d78c10257e3c5d8f5573c3eb29bfdef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-24 22:43:20 +00:00
Florin Coras 5f45e01f5c session/vcl: support worker ownership change for listeners
Change-Id: I2ad54b20b96f10b009c3e651b2a2f885577ca5b6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-24 21:23:42 +00:00
Dave Barach 8704097b9b move misc-drop-errors to vnet
thanks, Eliot...

Change-Id: I8d8fee09bf1fe24933e6ef4e126dba8e22fe62b1
Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-24 15:14:15 -05:00
Neale Ranns 8e4a89bf42 IPSEC Tests: to per-test setup and tearDown
don't do the setup and teardown in class methods so that with
each test the config is added and deleted. that way we test that
delete actually removes state.
more helpful error codes from VPP for existing IPSEC state.

Change-Id: I5de1578f73b935b420d4cdd85aa98d5fdcc682f6
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-24 19:51:37 +00:00
Lollita Liu e18b45caeb add "Mtrie mheap usage" in "show ip fib memory"
Adding "Mtrie mheap usage" in output of "show ip fib memory" command, for displaying the total Mtrie Mheap usage together with memery usage of each node and each table

Change-Id: I2bcc570924e44a2b406f69cfc2f2f8d5abb61a39
Signed-off-by: Lollita Liu <lollita.liu@ericsson.com>
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-24 16:54:37 +00:00
Dave Barach ec595ef026 perfmon plugin: 2-way parallel stat collection
As a FUD reduction measure, this patch implements 2-way parallel
counter collection. Synthetic stat component counter pairs run at the
same time. Running two counters (of any kind) at the same time
naturally reduces the aggregate time required by an approximate
factor-of-2, depending on whether an even or odd number of stats have
been requested.

I don't completely buy the argument that computing synthetic stats
such as instructions-per-clock will be inaccurate if component counter
values are collected sequentially. Given uniform traffic pattern, it
must make no difference.

As the collection interval increases, the difference between serial
and parallel component counter collection will approach zero, see also
the Central Limit theorem.

Change-Id: I36ebdcf125e8882cca8a1929ec58f17fba1ad8f1
Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-24 16:19:04 +00:00
Damjan Marion 22f23ae802 buffers: fix vector types
Change-Id: I9df96264e30806ac3daf7121f314f34f06232413
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2019-01-24 15:36:57 +01:00
Damjan Marion 478839b9ec avf: fix queue enable issue
It is actually a bitmap....

Change-Id: Ie359e085df3f371512f773600f8d7460b2232b3e
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2019-01-24 14:30:51 +00:00
Mohsin Kazmi ddd2183868 virtio: Minor fixes and header cleanup
Change-Id: I2e5fd45abcd07e9eda6184587889bdcd9613a159
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-01-24 09:46:48 +00:00
Steven e43278f75f bond: packet drops on VPP bond interface [VPP-1544]
We register callback for VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION and
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION to add and remove the slave
interface from the bond interface accordingly. For static bonding without
lacp, one would think that it is good enough to put the slave interface into
the ective slave set as soon as it is configured. Wrong, sometimes the slave
interface is configured to be part of the bonding without ever bringing up the
hardware carrier or setting the admin state to up. In that case, we send
traffic to the "dead" slave interface.

The fix is to make sure both the carrier and admin state are up before we put
the slave into the active set for forwarding traffic.

Change-Id: I93b1c36d5481ca76cc8b87e8ca1b375ca3bd453b
Signed-off-by: Steven <sluong@cisco.com>
2019-01-23 21:06:29 +00:00
Damjan Marion 9a8a12a06e buffers: wrap vlib_buffer_t to union and expose vector types
Change-Id: I1c12e2941cae198ededbb65eb5be51a4eabe2c1b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-23 19:57:42 +00:00