5688 Commits

Author SHA1 Message Date
Andrew Yourtchenko
bef25c30a1 misc: 19.01.3 Release Notes
Type: docs

Change-Id: I3f9d243d6f5d99faea67c24c9bf5c42c7a4dc3b0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v19.01.3
2019-07-18 13:27:32 +00:00
Neale Ranns
c2c090a4e3 ip: Punt node does not free iovecs
Type: fix
Fixes: f7a55ad74c

Change-Id: Ic3474e746887f880a8f6246bebc399715bac8e80
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 13a6ddf353261fd0439646b71c832f4f44c9de71)
2019-07-12 06:54:27 +00:00
Wei CHEN
822dadf478 vppinfra: dlmalloc records wrong offset for tracing
Fix a bug that mheap_get_trace is called with the wrong pointer when
mspace_get_aligned allocates a chunk with alignment greater than 16
but less than 4k.

Type: fix

Change-Id: Ic3b91fc9532248482662f019bbfa073da18645ed
Signed-off-by: Wei CHEN <weichen@astri.org>
(cherry picked from commit 5e282e93ad9f961d332cac9a033be33542979848)
2019-06-18 18:44:11 +00:00
Ole Troan
ae945592b2 stats: fix memory leakage when adding / deleting interfaces
This fixes two leaks in registering errors in the stats segment.
- The error name created by vlib_register_errors() was not freed.
- Duplicate error names (when interface readded) was added to the vector.

Change-Id: If5fe371e8059cf6678fc785cbf673707b4f4a655
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18 13:55:11 +00:00
Dave Barach
4d0c663c0a vlib: cherry-pick "memory-trace stats-segment"
and "leak-check { <debug-cli-cmd> }"

Ticket: VPP-1703
Type: feature

Change-Id: Ie020fd7e2618284a63efbeb9895068f27c0fb9ab
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-17 20:26:50 +00:00
Dave Barach
33052bfd8c vppinfra: optimize elog_string
Add a string hash to make sure that strings in the string table are
unique. This optimization has been coded piecemeal in multiple places,
we should have made the underlying function do the work years ago.

Ticket: VPP-1707
Type: fix

Change-Id: I5010fd4926b9b80ce3a168748f6de64e333ef498
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-17 16:43:32 +00:00
Steven Luong
4221c8de59 acl vnet vlib: memory leaks
Fix memory leaks in acl, vnet, and vlib components.

Type: fix

Change-Id: I61c84ebbacbbf3215db0d4aaa7699e8d5f8df2da
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-14 16:01:42 -07:00
Florin Coras
f61a1a8995 tcp: handle disconnects in rcv-process
Change-Id: I86b025d36aedad2bf4afd6137f5b708677720f0e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-25 07:28:59 +00:00
Florin Coras
378213974e tcp: handle fin+rst in same frame
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-25 07:25:45 +00:00
John Lo
6af8243814 Fix congestion recovery check
Change-Id: Ia9347c8cb6175c6bec3f9c27a7e0a71c4e58fe28
Signed-off-by: John Lo <loj@cisco.com>
v19.01.3-rc0
2019-05-24 07:16:12 -04:00
Andrew Yourtchenko
fa63602fcb 19.01.2 Release Notes
Change-Id: Ia68372d397504ede789e40e9f7e1b939d09bc81a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v19.01.2
2019-05-17 14:35:08 +00:00
Simon Zhang
84a53bc5fe Add rte_flow_validate to verify the flow before calling rte_flow_create.
Change-Id: I817580963e38bafcc53cc6502b9c58f567070244
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-05-17 12:57:27 +00:00
Dave Wallace
cfd30860fb plugins: clean up plugin descriptions
- Make plugin descriptions more consistent
  so the output of "show plugin" can be
  used in the wiki.

Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 1d1985de91833a5483a6b7ee96ef4090d530a7a6)
2019-05-08 11:50:46 -04:00
Dave Barach
e1062522d5 Clean up multi-thread barrier-sync hold-down timer
Main thread: don't bother with the barrier sync hold-down timer if
none of the worker threads are busy.

Worker threads: avoid epoll_pwait (10ms timeout) when the
control-plane has been active in the last half-second.

Cherry-pick a recent dangling reference fix: pool_elt_at_index after
e.g. rx callback is required, in case the unix file pool expands.

DO NOT cherry-pick the patch into master!

Change-Id: I130dc72fd95c8a22716fa2f0f98ce35cdccc52d7
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-02 22:33:37 +00:00
Steven Luong
15c31921a6 mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,
BRIDGE_DOMAIN_DUMP, CONTROL_PING, CONTROL_PING_REPLY, and show interface CLI

Change-Id: I2927573b66bb5dd134b37ffb72af0e6676750917
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-02 19:52:31 +00:00
Florin Coras
95c5267ea1 vlib epoll: protect against clib file pool expansion
Change-Id: I320e7c2fdacb3056bc448c73fec08d9e2978ee5e
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit c67078e007c8a9b91def387ba345efa805e45fc5)
(cherry picked from commit fd2cd9c8993d646d025e05f18f36c9fc22776eb8)
2019-05-01 10:01:09 -07:00
Artem Belov
0f36ef60d8 Fix memory corruption faulting [VPP-1639]
File pool may be reallocated on epoll events processing. 
*f* pointer shows to already freed address and corrupting 
memory chunk on clib_file_t property change.

Change-Id: I751bddce27325452862b939c1a3eec2ccd9b71bb
Signed-off-by: Artem Belov <artem.belov@xored.com>
(cherry picked from commit 32b07c31876ece35cff1b9ab99a74a631a88e35a)
2019-04-19 12:17:05 +00:00
Andrew Yourtchenko
1dbebfa462 cmake: fix errors in external when building past point-release
Change-Id: I23b4816e4ef2c6a2fa825fbd063ea25ff2024151
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e36f44ad923f4e64266fd3e4dee6e2716e687504)
2019-04-11 18:42:48 +00:00
Igor Mikhailov (imichail)
2f4c7ec46f SPAN: Add pending frame on current thread, not on main
Previously, all frames were put for next node on the main thread,
even if the execution was happening on a worker thread.

Also, refactor to use API function vnet_get_main()

Change-Id: Ibefb1b3871563a78aa30352a37b9216537e15bf7
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
(cherry picked from commit 2d6fc6b082c9b4bf9481b58f68def13792822805)
2019-03-30 04:57:24 +00:00
Neale Ranns
8d67239689 Callback functions must have the correct signature
Change-Id: I642823bdc3c7006a0b719ec1e3a9cd75b2b37253
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 8f215b4a03a98bf94931a09b23ab0fbd8ccd1ab9)
2019-03-26 20:40:46 +00:00
Dave Barach
327fbae595 Ignore SIGTERM during the vpp boot sequence
Call setjmp and mark the setjmp context valid just prior to entering the
vpp main loop.

Change-Id: I26d5cd6a624cb2a497d81eb85a62365621b3b469
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit d1e17d00bb81659bf9e45caa62482bf7029d98f7)
2019-03-25 23:08:09 +00:00
Neale Ranns
0d961549c0 ADJ: more thorough link up check
Change-Id: I04dbfb914706b25fcc3bd6ee0d19cfdc810234ae
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 3e2e1907d485ed321f99350dd46e6822db6ac4d4)
2019-03-24 17:28:27 +00:00
Kingwel Xie
50a392f5a0 crypto-input: fix crash bug
as this node is refactored in new style with
vlib_buffer_enqueue_to_next, we have to check if the 'count'
is greater than 0. otherise, the next_index would be invalid
then lead to a crash

Change-Id: If7c323b59c02b5c16bd9d77b65c946512cc972c1
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
(cherry picked from commit 955ee280280e09b73621119f5753a38ce5173989)
2019-03-14 08:09:46 +00:00
Simon Zhang
3e59d2eb20 Fix ASSERT usage issue in cryptodev
Change-Id: I764c6565f96e0cb9078503e54e3cf3bb3fd9ff3f
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
(cherry picked from commit a704f5b2a97346eaaeec466cda6169406a313490)
2019-03-13 13:59:42 +00:00
Neale Ranns
03982d8924 FIB: path parsing, table-id not fib-index (VPP-1586)
Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-13 08:29:09 +00:00
Steven Luong
ec950c23a7 vhost: potential crash in map_guest_mem using debug image
map_guest_mem may be called from worker-thread/dataplane. It has a call
to vlib_log and may crash inside vlib_log's ASSERT statement

  /* make sure we are running on the main thread to avoid use in dataplane
     code, for dataplane logging consider use of event-logger */
  ASSERT (vlib_get_thread_index () == 0);

The fix is to convert the vlib_log call in map_guest_map to event logger

Change-Id: Iaaf6d86782aa8a18d25e0209f22dc31f04668d56
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit b0789106cb4f4c7ac529c02a5ff1ac346f0913dd)
2019-03-13 08:23:25 +00:00
Steven Luong
3938297670 vhost-user: restart vpp may cause vhost to crash
Fix a typo in vhost_user_rx_discard_packet which may cause
txvq->last_avail_idx to go wild.

Change-Id: Ifaeb58835dff9b7ea82c061442722f1dcaa5d9a4
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-03-13 08:21:37 +00:00
Simon Zhang
295630deb6 fix dpdk cryptodev enable issue
Change-Id: I47d021522cfc92cfb3877449333cbf31022c06f4
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
(cherry picked from commit ef080e1f9bad884b95ef23307b0d856c971dfcc2)
2019-03-13 06:43:49 +00:00
Ole Troan
d0dcf76853 Remove local REPLY_MACRO so that socket transport works.
memif, lacp, nsh and cdp used local REPLY_MACROs.
Remove and use those in api_helper.h

Change-Id: Ib01d6ae5cff0b6f1cef90996a54b3177f0c53463
Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-07 17:25:50 +00:00
Joe Zhou
67a3e2d130 assign flood_class to vnet_sw_interface_t template in subif api handle function
Change-Id: I352f4a4adcf8771c21530657efcaecb532416612
Signed-off-by: Joe Zhou <zhouyoucn@qq.com>
(cherry picked from commit 715f94ed94638ea883f919361bff7a3f46fd1d1b)
v19.01.2-rc0
2019-03-07 14:32:53 +00:00
Dave Wallace
cbd68cb711 19.01.1 Release Notes
Change-Id: Id71e0ce821e84634d24a550188d0ed5ed7164849
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
v19.01.1
2019-03-06 15:56:36 -05:00
Damjan Marion
3262adc55c cmake: fix out-of-git-tree build
Cherry picked from master: 6077c97a

JIRA: VPP-1577

Change-Id: Ib94637ec09799c23f3179599b54a2be6e2768425
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-05 12:08:05 -05:00
Artem Belov
d302022440 Fix vpp crashing when attempting to run in kubernetes Pod
mmap does not fail but writing to mapped memory is causing sigbus.

Change-Id: I5135f32eede67fccb4aaa07a501cd262d254ed8d
Signed-off-by: Artem Belov <artem.belov@xored.com>
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
(cherry picked from commit f6defa113e2e10a70c5a92ce7e14b7a532154409)
2019-03-02 09:20:05 +00:00
Florin Coras
6342e48dc1 tcp: allow future acks if in window
Change-Id: I84ad1830b8db43f6031cf2876cd94f6a71216b83
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5fd3210be3a043c12c598df3d75dbe0aa606bfe5)
2019-03-01 23:26:33 +00:00
Neale Ranns
46ee286753 IPSEC: crash on SA dump when SA are bound to tunnels
Change-Id: I1c8256af838e6d4f371549ca91b8b0a4c0c44c65
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-02-28 12:46:07 +00:00
Damjan Marion
bad0bcd442 Fix crash in barrier sync when vlib_worker_threads is zero
Change-Id: I6819dd9dbfc15c17740bdb98b51bdd639ef8c4d2
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 8343ee5665942353e57ee074da62b9d07c1c510b)
2019-02-27 15:25:21 +00:00
Klement Sekera
372a33efe8 buffer chain linearization
Rewrite vlib_buffer_chain_linearize function so that it works as intended.
Linearize buffer chains coming out of reassembly to work around some
dpdk-tx issues. Note that this is not a complete workaround
as a sufficiently large packet will still cause the resulting chain to
be too long.

Drop features from reassembly code which relies on knowing which and how
many buffers were freed during linearization, buffer counts and tracing
capabilities for these cases.

Change-Id: Ic65de53ecb5c78cd96b178033f6a576ab4060ed1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-02-27 12:48:13 +01:00
Ed Kern
7f1cc2c2c1 Makefile: correct opensuse 15.0 dep naming
This covers both naming option for opensuse leap15
dep package naming

Change-Id: I2ade004e44e75c08afde0f3af42b33cd97ce0ebc
Signed-off-by: Ed Kern <ejk@cisco.com>
2019-02-27 12:48:08 +01:00
Steven Luong
5880ec02d6 vhost: VPP stalls with vhost performing control plane actions [VPP-1572]
Symptom
-------
With NDR traffic blasting at VPP, bringing up a new VM with vhost
connection to VPP causes packet drops. I am able to recreate this
problem easily using a simple setup like this.

TREX-------------- switch ---- VPP
    |---------------|  |-------|

Cause
-----
The reason for the packet drops is due to vhost holding onto the worker
barrier lock for too long in vhost_user_socket_read(). There are quite a
few of system calls inside the routine. At the end of the routine, it
unconditionally calls vhost_user_update_iface_state() for all message
types. vhost_user_update_iface_state() also unconditionally calls
vhost_user_rx_thread_placement() and vhost_user_tx_thread_placement().
vhost_user_rx_thread_placement scraps out all existing cpu/queue mappings
for the interface and creates brand new cpu/queue mappings for the
interface. This process is very disruptive and very expensive. In my
opinion, this area of code needs a makeover.

Fixes
-----
* vhost_user_socket_read() is rewritten that it should not hold
  onto the worker barrier lock for system calls, or at least minimize the
  need for doing it.
* Remove the call to vhost_user_update_iface_state as a default route at
  the end of vhost_user_socket_read(). There is only a couple of message
  types which really need to call vhost_user_update_iface_state(). We put
  the call to those message types which need it.
* Remove vhost_user_rx_thread_placement() and
  vhost_user_tx_thread_placement from vhost_user_update_iface_state().
  There is no need to repetatively change the cpu/queue mappings.
* vhost_user_rx_thread_placement() is actually quite expensive. It should
  be called only once per queue for the interface. There is no need to
  scrap the existing cpu/queue mappings and create new cpu/queue mappings
  when the additional queues becomes active/enable.
* Change to create the cpu/queue mappings for the first RX when the
  interface is created. Dont remove the cpu/queue mapping when the
  interface is disconnected. Remove the cpu/queue mapping only when the
  interface is deleted.

The create vhost user interface CLI also has some very expensive system
calls if the command is entered with the optional keyword "server"

As a bonus, This patch makes the create vhost user interface binary-api and
CLI thread safe. Do the protection for the small amount of code which is
thread unsafe.

Change-Id: I4a19cbf7e9cc37ea01286169882e5603e6d7eb77
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit 67f935ec6eb9ec37b7d73029c5afa89cbf4a9aa2)
2019-02-22 23:41:14 +00:00
Florin Coras
d0f4dec52b tcp: free sack block list on connection cleanup
Change-Id: I7152b4ae64528082765726d5844580aad54c0c70
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-22 20:44:42 +00:00
Damjan Marion
be0e482019 avf: fix eat own tail issue on tx
Change-Id: Ie14ca18bab47ac6765ff0799475d0c2a4d936f90
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-22 17:15:43 +00:00
Damjan Marion
903c21b470 physmem: keep physmem VA in 39-bit address space on x86_64
Some x86 CPUs have IOMMU capable dealing only with 39-bit address space
This patch also adds option to specify physmem base address from
startup.conf

Change-Id: I9e8abd26efb60e9c4ad54c035fb1751a4a61f4dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-22 16:46:08 +00:00
Damjan Marion
c41559afe5 Add no-append flag to vlib_frame_t
Change-Id: I01c4f5755d579282773ac227b0bc24f8ddbb2bd1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-22 11:31:43 +01:00
Neale Ranns
dc2a250f06 IP route local and connected
allow routes that are local and connected to be added via the API.
this emulates the addition of a second address in the same subnet
added to an interface.

Change-Id: Ib18a08c26956be9a07b3360664210c8cf6734c84
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 7425f9289bdc17d330044b0df0fc31cdeeca626b)
2019-02-20 14:40:52 +00:00
Neale Ranns
4c696abc8c FIB: pass a copy the walk context
since it can realloc when new ctx are added. If
not we can get some nasty memory corruption.

Change-Id: I617709c3013acbcb8aee07dc147894f0de896555
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 58085f2f6757e464196b283cc8335ab5cf34a012)
2019-02-20 08:53:15 +00:00
Peter Mikus
c01d7488f2 Revert "bond: problem switching from l2 to l3"
During CSIT testing we discovered that LACP tests were failing and
producing coredumps. Reverting this patch fix the problem with VPP
crashing.

This reverts commit f23890138e02d4218c828c427f687f8ecdb0e165.

Change-Id: Icf97053ce1473350add885cbebe591f7f3efcbea
Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-02-19 16:32:38 +00:00
Florin Coras
cd56f69af9 tcp: fix reset sending in syn-sent
Change-Id: I468b1015bca5f95b162fb49e904aa4e4d38db75e
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d4c49be5e20406220cf89083c9df86c3c0761a81)
2019-02-07 16:53:01 +00:00
Yichen Wang
63132185d0 Fix borken install-dep on RHEL
Change-Id: I247cca88e33f782e1acb72eb2c0e1515faf2f030
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2019-02-04 22:27:39 -08:00
Andrew Yourtchenko
67d9475ae3 19.01 Release Notes
Change-Id: I43fd3aac9039c6d551fac8607374a0ebfdc6f74a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v19.01
2019-01-30 21:59:49 +01:00
Klement Sekera
827d4e568b ipsec: fix check support functions
Change-Id: If94c57fbb07a7376a9f2873e1489c00b28152620
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 4fd5a9d3e6abdf61f266da8400a299fe5b0eb0ed)
2019-01-30 20:36:33 +00:00