summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-06-18vppinfra: dlmalloc records wrong offset for tracingWei CHEN1-1/+1
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-18stats: fix memory leakage when adding / deleting interfacesOle Troan2-13/+30
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-17vlib: cherry-pick "memory-trace stats-segment"Dave Barach6-61/+225
and "leak-check { <debug-cli-cmd> }" Ticket: VPP-1703 Type: feature Change-Id: Ie020fd7e2618284a63efbeb9895068f27c0fb9ab Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-17vppinfra: optimize elog_stringDave Barach2-5/+33
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-14acl vnet vlib: memory leaksSteven Luong3-11/+14
Fix memory leaks in acl, vnet, and vlib components. Type: fix Change-Id: I61c84ebbacbbf3215db0d4aaa7699e8d5f8df2da Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-25tcp: handle disconnects in rcv-processFlorin Coras1-0/+1
Change-Id: I86b025d36aedad2bf4afd6137f5b708677720f0e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-25tcp: handle fin+rst in same frameFlorin Coras1-1/+8
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-24Fix congestion recovery checkv19.01.3-rc0John Lo1-2/+4
Change-Id: Ia9347c8cb6175c6bec3f9c27a7e0a71c4e58fe28 Signed-off-by: John Lo <loj@cisco.com>
2019-05-1719.01.2 Release Notesv19.01.2Andrew Yourtchenko1-0/+9
Change-Id: Ia68372d397504ede789e40e9f7e1b939d09bc81a Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-05-17Add rte_flow_validate to verify the flow before calling rte_flow_create.Simon Zhang1-3/+14
Change-Id: I817580963e38bafcc53cc6502b9c58f567070244 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-05-08plugins: clean up plugin descriptionsDave Wallace29-28/+29
- 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-02Clean up multi-thread barrier-sync hold-down timerDave Barach4-16/+130
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-02mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,Steven Luong4-0/+11
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-01vlib epoll: protect against clib file pool expansionFlorin Coras1-1/+5
Change-Id: I320e7c2fdacb3056bc448c73fec08d9e2978ee5e Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit c67078e007c8a9b91def387ba345efa805e45fc5) (cherry picked from commit fd2cd9c8993d646d025e05f18f36c9fc22776eb8)
2019-04-19Fix memory corruption faulting [VPP-1639]Artem Belov1-3/+3
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-11cmake: fix errors in external when building past point-releaseAndrew Yourtchenko1-1/+1
Change-Id: I23b4816e4ef2c6a2fa825fbd063ea25ff2024151 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit e36f44ad923f4e64266fd3e4dee6e2716e687504)
2019-03-30SPAN: Add pending frame on current thread, not on mainIgor Mikhailov (imichail)1-6/+5
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-26Callback functions must have the correct signatureNeale Ranns3-4/+8
Change-Id: I642823bdc3c7006a0b719ec1e3a9cd75b2b37253 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 8f215b4a03a98bf94931a09b23ab0fbd8ccd1ab9)
2019-03-25Ignore SIGTERM during the vpp boot sequenceDave Barach2-12/+17
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-24ADJ: more thorough link up checkNeale Ranns3-7/+25
Change-Id: I04dbfb914706b25fcc3bd6ee0d19cfdc810234ae Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 3e2e1907d485ed321f99350dd46e6822db6ac4d4)
2019-03-14crypto-input: fix crash bugKingwel Xie1-8/+12
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-13Fix ASSERT usage issue in cryptodevSimon Zhang1-1/+1
Change-Id: I764c6565f96e0cb9078503e54e3cf3bb3fd9ff3f Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> (cherry picked from commit a704f5b2a97346eaaeec466cda6169406a313490)
2019-03-13FIB: path parsing, table-id not fib-index (VPP-1586)Neale Ranns3-8/+44
Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-13vhost: potential crash in map_guest_mem using debug imageSteven Luong1-1/+14
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-13vhost-user: restart vpp may cause vhost to crashSteven Luong1-1/+1
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-13fix dpdk cryptodev enable issueSimon Zhang1-6/+9
Change-Id: I47d021522cfc92cfb3877449333cbf31022c06f4 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> (cherry picked from commit ef080e1f9bad884b95ef23307b0d856c971dfcc2)
2019-03-07Remove local REPLY_MACRO so that socket transport works.Ole Troan3-95/+6
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-07assign flood_class to vnet_sw_interface_t template in subif api handle functionv19.01.2-rc0Joe Zhou1-0/+2
Change-Id: I352f4a4adcf8771c21530657efcaecb532416612 Signed-off-by: Joe Zhou <zhouyoucn@qq.com> (cherry picked from commit 715f94ed94638ea883f919361bff7a3f46fd1d1b)
2019-03-0619.01.1 Release Notesv19.01.1Dave Wallace1-0/+9
Change-Id: Id71e0ce821e84634d24a550188d0ed5ed7164849 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-03-05cmake: fix out-of-git-tree buildDamjan Marion2-11/+2
Cherry picked from master: 6077c97a JIRA: VPP-1577 Change-Id: Ib94637ec09799c23f3179599b54a2be6e2768425 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-02Fix vpp crashing when attempting to run in kubernetes PodArtem Belov1-0/+21
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-01tcp: allow future acks if in windowFlorin Coras1-4/+9
Change-Id: I84ad1830b8db43f6031cf2876cd94f6a71216b83 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 5fd3210be3a043c12c598df3d75dbe0aa606bfe5)
2019-02-28IPSEC: crash on SA dump when SA are bound to tunnelsNeale Ranns1-2/+5
Change-Id: I1c8256af838e6d4f371549ca91b8b0a4c0c44c65 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-02-27Fix crash in barrier sync when vlib_worker_threads is zeroDamjan Marion2-3/+5
Change-Id: I6819dd9dbfc15c17740bdb98b51bdd639ef8c4d2 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit 8343ee5665942353e57ee074da62b9d07c1c510b)
2019-02-27buffer chain linearizationKlement Sekera6-442/+216
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-27Makefile: correct opensuse 15.0 dep namingEd Kern1-4/+3
This covers both naming option for opensuse leap15 dep package naming Change-Id: I2ade004e44e75c08afde0f3af42b33cd97ce0ebc Signed-off-by: Ed Kern <ejk@cisco.com>
2019-02-22vhost: VPP stalls with vhost performing control plane actions [VPP-1572]Steven Luong3-214/+259
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-22tcp: free sack block list on connection cleanupFlorin Coras1-0/+2
Change-Id: I7152b4ae64528082765726d5844580aad54c0c70 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-22avf: fix eat own tail issue on txDamjan Marion1-3/+7
Change-Id: Ie14ca18bab47ac6765ff0799475d0c2a4d936f90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-22physmem: keep physmem VA in 39-bit address space on x86_64Damjan Marion5-6/+45
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-22Add no-append flag to vlib_frame_tDamjan Marion8-4/+20
Change-Id: I01c4f5755d579282773ac227b0bc24f8ddbb2bd1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-20IP route local and connectedNeale Ranns4-7/+51
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-20FIB: pass a copy the walk contextNeale Ranns1-1/+3
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-19Revert "bond: problem switching from l2 to l3"Peter Mikus1-11/+0
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-07tcp: fix reset sending in syn-sentFlorin Coras3-6/+7
Change-Id: I468b1015bca5f95b162fb49e904aa4e4d38db75e Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit d4c49be5e20406220cf89083c9df86c3c0761a81)
2019-02-04Fix borken install-dep on RHELYichen Wang1-0/+3
Change-Id: I247cca88e33f782e1acb72eb2c0e1515faf2f030 Signed-off-by: Yichen Wang <yicwang@cisco.com>
2019-01-3019.01 Release Notesv19.01Andrew Yourtchenko1-0/+389
Change-Id: I43fd3aac9039c6d551fac8607374a0ebfdc6f74a Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-01-30ipsec: fix check support functionsKlement Sekera2-5/+17
Change-Id: If94c57fbb07a7376a9f2873e1489c00b28152620 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 4fd5a9d3e6abdf61f266da8400a299fe5b0eb0ed)
2019-01-30VTL: Fix pep8 test/test_syslog.pyPaul Vinciguerra1-4/+4
Change-Id: I8894a7a8f2be117a4c1cec9ce5134a1572da7ec7 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com> (cherry picked from commit 776e46d77c21899874d156a48b8d89e7133d212c)
2019-01-30Update version (19.01) for API changes scriptAndrew Yourtchenko1-2/+2
Change-Id: I9c39b5076d366b3455a875df32765b2cb8f3eca2 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>