aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-05-07mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,stable/1810Steven 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> (cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
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-13FIB: 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-03-12FIB: path parsing, table-id not fib-index (VPP-1586)Neale Ranns1-1/+11
Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-07assign flood_class to vnet_sw_interface_t template in subif api handle functionJoe Zhou1-0/+2
Change-Id: I352f4a4adcf8771c21530657efcaecb532416612 Signed-off-by: Joe Zhou <zhouyoucn@qq.com> (cherry picked from commit 715f94ed94638ea883f919361bff7a3f46fd1d1b)
2019-03-05Fix 'show interface span' field lengthIgor Mikhailov (imichail)1-2/+2
Allow to display longer interface names, e.g. VirtualEthernet0/0/0.102 The field length (32) is now the same as for 'show interface'. Change-Id: I1cb1efd459acb800bfaeeec40b672c8b17cd8c3d Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com> (cherry picked from commit 0ac827e15c5ee2134a15bf5e023e03967ddcbaa8)
2019-03-011810 version of VPP-1573 fix crash in ip6 reassemblyOle Troan1-7/+4
Change-Id: I20d15ee45957e9fb5a7b3e7edd10cd34b308b664 Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-01VPP-1529: check hop-by-hop header lengthDave Barach1-7/+37
Fix a single packet-of-death case, caught by vlib_buffer_advance() in debug images. Change-Id: I9c107f20d7c053c3e40a0756dd7ca1c3be276a1a Signed-off-by: Dave Barach <dave@barachs.net>
2019-02-28reassembly fixes merged into one for stable/18.10.Ole Troan2-181/+260
Change-Id: Ic389807abaa10433c4ba6f111c5c27d035731fa8 Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-18vhost: VPP stalls with vhost performing control plane actionsSteven 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>
2019-01-23bond: packet drops on VPP bond interface [VPP-1544]Steven2-20/+21
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> (cherry picked from commit e43278f75fe3188551580c7d7991958805756e2f)
2019-01-23virtio: fix kick race issue [VPP-1489]Damjan Marion3-10/+29
Change-Id: I25b2a28513821bc5eab9ac6890a3964d412b0399 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit e40231b1ecf4b49faaa9ce7b615a7d867104825b)
2018-12-14Fix vat dependenciesjuraj.linkes1-0/+2
Needed for arm machines in CI. Change-Id: Ib16a8b63e145116c7cb22376243e9026d9545c8a Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech> (cherry picked from commit a409f2729ac2431aeee5a18889b4d2e5634c713f)
2018-12-13ip4_rewrite_inline: fix variable errorZhiyong Yang1-2/+2
Change-Id: I0470b4b13095583fe018f565f100342fab45715e Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> (cherry picked from commit b2ecc5d4156467c785c28493d614e874bc287cbd)
2018-12-12Delete shared memory segment files when vpp startsDave Barach1-0/+22
Should have been done this way years ago. My bad. Change-Id: Ic7bf937fb6c4dc5c1b6ae64f2ecf8608b62e7039 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit b2204671dad112e3195771854b4ef00bb388d4e6)
2018-12-10Add UDP encap flagFilip Tehlar2-0/+3
Change-Id: Ic6a8b9aaec7e5dee4fb1971168988dbe4f931f86 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2018-12-05MPLS: buffer over-run with incorrectly init'd vector. fix VAT dumpNeale Ranns2-3/+3
Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 44cea225e2238a3c549f17f315cd1fbc6978c277)
2018-11-30IPSEC-AH: fix packet dropNeale Ranns2-7/+0
Change-Id: I45b97cfd0c3785bfbf6d142d362bd3d4d56bae00 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-23acl-plugin: fix coverity error that the fix related for [VPP-1502] has triggeredAndrew Yourtchenko1-9/+13
Fix the trivial use-before-check copypaste error. There was a more subtle issue with that patch that Coverity didn't notice: namely, vec_validate(v, len-1) is a terrible idea if len happens to be == 0. Fix that. Change-Id: I0fab8b1750e9e9973eefb5d39f35e4c3a13fc66f Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit e0152461cbc84d6d4df3f05dddabe992c1c59052)
2018-11-23NAT44: improve expired sessions reuse (VPP-1503)Matus Fabian2-79/+65
Change-Id: Iab506f127136c94a641df31ded108016de26260b Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-22acl-plugin: optimize hash memory usage + fix the startup config parsing for ↵Andrew Yourtchenko3-7/+33
memory sizes [VPP-1502] In a couple of places vec_add1()-style was repeatedly called in a loop for smallish vectors where the number of additions was known in advance. With a test with large number of ACEs these numbers contribute to heap fragmentation noticeably. Minimize the number of allocations by preallocating the known size and then resetting the length accordingly, and then calling vec_add1() Also unify the parsing of the memory-related startup config parameters. Change-Id: If8fba344eb1dee8f865ffe7b396ca3b6bd9dc1d0 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 94f509615eb97cebc9192e7290c84cf166518039)
2018-11-22NAT44: Apply transitory timeout on TCP RST (VPP-1494)Matus Fabian2-0/+9
RFC7857 section 2.2. Change-Id: I031af5fe379b72262e83fd8565c34fa1b772f2c8 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit 15e8e681813a2e88dad107b5fe238bc8abee17d2)
2018-11-20NAT44: fix virtual fragmentation reassembly in forwarding mode (VPP-1501)Matus Fabian1-0/+8
Change-Id: Id86d8aa8753b9b2ff4c709b11e3901ba8d552918 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit 111add7e5d6581bb4eca05cc862a651ff6a09792)
2018-11-19NAT44: fix bug in TCP close with output-feature interface (VPP-1493)Matus Fabian4-4/+82
Change-Id: If8c883d6b1ee58de9a03012d3567ec82211a0225 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit 6c01dceea5c612373453db7f1ccda589a2cd782e)
2018-11-07NAT44: fix undesired dependency between static mapping and address from the ↵Matus Fabian2-1/+9
pool (VPP-1485) Change-Id: Iaa404361eac2a6612dcdaba3f73bae41a35c5446 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-02VPP-1450: binary api call for dumping SPD to interface registrationFilip Varga2-1/+81
Change-Id: Idd4a5f8bab5d39e5f33f5c130601175af70a20d4 Signed-off-by: Filip Varga <filip.varga@pantheon.tech> Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-02vlib: define minimum chained buffer segment sizeDamjan Marion4-5/+15
Change-Id: I9b5f7b264f9978e3dd97b2d1eb103b7d10ac3170 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit bd0da97e5ac0f84e1ea8e6e7f9549dd4e1a6a4ab)
2018-11-02Use throttle_t for ND throttling (VPP-1480)Neale Ranns6-48/+36
Change-Id: I93c6b7bccd1a1ab71625ae29c99c974581186c4d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-23vmxnet3: add logging support to the control plane [VPP-1470]Steven4-17/+87
There are different flavors of vmxnet3 device, esxi server, vm fusion, vmware workstation, and vmware player, that we need to communicate with. Each of them also has different versions. We really need the control plane logging to debug when things don't work as expected. Change-Id: Idab6896e3d8bf841f1cd877c13a21531fa110568 Signed-off-by: Steven <sluong@cisco.com>
2018-10-22Fix buffer overflow when fragmenting packets (VPP-1383)Juraj Sloboda1-2/+3
Change-Id: Idcda9ae55fa2efb0b2e928bac3e8e86ff8d19eba Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-22stats: Add wrapper for vec_freeOle Troan3-0/+8
The result vector from stat_segment_ls must be freed by the caller. Add wrapper for non-C language bindings. Change-Id: I7eee7f80ec98b41696d354add47b26978e12ef0f Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit 8254018c21bbdbbc11225ebc444b1d072606caf7)
2018-10-22lisp-gpe: register udp port only if enabled (VPP-1468)Florin Coras1-5/+7
Change-Id: I7d0930a19d927bbd7ba3fc879d5a0c8064827629 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-21tcp: count first lost hole (VPP-1465)Florin Coras2-17/+46
Change-Id: I3ac136e2a10796d8fa86ddb6f0d6cabe5fa749f8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-19NAT44: fix ICMP virtual fragmentation reassembly (VPP-1466)Matus Fabian4-63/+122
Change-Id: I8006bca02948d9121f474a3d14f0576747bb3c51 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-19tls: fix connection failures/interrupts at scale (VPP-1464)Florin Coras5-29/+45
Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit c01d578a625fb136bc33b0eb9c19907769a67989)
2018-10-19tcp: fix sacks lost bytes counting (VPP-1465)Florin Coras2-50/+118
Change-Id: Ie46b3a81de4ed39b7b40e3879436f7e5a2908d98 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-18tcp: fix cleanup of non established connections (VPP-1463)Florin Coras2-1/+5
- fix delete of connection in syn-received - fix delete of half-open connection Change-Id: I72ff4b60406a2762d998328c52f41adea40d2c1b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-17tcp: fix multiple fin retries (VPP-1461)Florin Coras2-10/+10
Change-Id: I1be7c59df7b48875f81ebeebf5f39ed15a43d2d8 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit c977e7c100f5727183f9452e2c0d086623a21d15)
2018-10-17vxlan:decap caching error (VPP-1462)Eyal Bari1-1/+1
Change-Id: I3ef0725684bcb8ea526abe0ce62562b35a0070f5 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-17fix ip6 prefix check for tap_v2Michal Cmarada1-1/+1
Change-Id: Ifbb1393fc3c50c140c09e8baedcd4a92189ba56e Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2018-10-17tcp: avoid sack processing when not needed (VPP-1460)Florin Coras3-4/+7
Change-Id: If81ee34e1f1e929de1a5b758ddb9aede4002e858 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-17VPP-1459:Ip4 lookup fail when exist prefix cover.v18.10-rc2mu.duojiao1-3/+1
Change-Id: I4ba0aeb65219596475345e42b8cd34019f5594c6 Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn> (cherry picked from commit 9744e6d0273c0d7d11ab4f271c8694f69d51ccf3)
2018-10-17tls: fix multi threaded medium scale test (VPP-1457)Florin Coras7-11/+52
- ensure session enqueue epoch does not wrap between two enqueues - use 3 states for echo clients app, to distinguish between starting and closing phases - force tcp fin retransmit if out of buffers while sending a fin Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-16acl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per ↵Andrew Yourtchenko1-0/+2
each collision in split_partition() (VPP-1458) A pointer to hash-ready ACL rules is only set once, which might cause a crash if there are colliding entries from more than one ACL applied. Solution: reload the pointer based on the element being processed. Change-Id: I7a701c2c3b4236d67293159f2a33c4f967168953 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-16vcl: fix bidirectional tests (VPP-1455)Florin Coras4-37/+41
- add epoll dequeued events beyond maxevents to unhandled - filter multiple epoll rx events Change-Id: I618f5f02b19581473de891b3b59bb6a0faad10b5 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit aa27eb95b7ee3bb69b62166d5e418e973cbbdcfa)
2018-10-15vmxnet3: show vmxnet3 with filtering capability [VPP-1452]Steven3-12/+234
show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each table may have 1000 entries. It would not be very useful to debug problem. We need filtering capability for the subject show command. We need to be able to display the descriptor table per interface, per interface per table, and per interface per table per slot. The latter is the most useful. tested the following valid combinations show vmxnet3 show vmxnet3 desc show vmxnet3 vmxnet3-0/13/0/0 show vmxnet3 vmxnet3-0/13/0/0 desc show vmxnet3 vmxnet3-0/13/0/0 rx-comp show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 show vmxnet3 vmxnet3-0/13/0/0 tx-comp show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1 show vmxnet3 vmxnet3-0/13/0/0 tx-desc show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1 negative tests and command is rejected show vmxnet3 abc show vmxnet3 desc abc show vmxnet3 vmxnet3-0/13/0/0 abc show vmxnet3 vmxnet3-0/13/0/0 desc abc show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb Signed-off-by: Steven <sluong@cisco.com>
2018-10-15vmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr ↵Steven1-1/+9
[VPP-1456] When using vpp_api_test, there is an undefined symbol error for format_vlib_pci_addr when vmxnet3_test_plugin.so is loaded. The cause is due to vlib not included in vpp_api_test. Remove the reference for vlib.so in vmxnet3_test. Change-Id: I37c00dfe2f843d99ad6c4fc7af6ed10bac4c2df8 Signed-off-by: Steven <sluong@cisco.com>
2018-10-15VPP-1448: Fix error when recurse on down the trie.mu.duojiao1-21/+19
Change-Id: Idfed8243643780d3f52dfe6e6ec621c440daa6ae Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn> (cherry picked from commit 59a829533c1345945dc1b6decc3afe29494e85cd)
2018-10-14vxlan:fix ip6 tunnel deletionEyal Bari1-1/+2
Change-Id: I70fb7394f85b26f7e632d74fc31ef83597efdd16 Signed-off-by: Eyal Bari <ebari@cisco.com> (cherry picked from commit f8d5e214687c17fba000607336295e054672459d)
2018-10-14vcl: fix empty epoll returns (VPP-1453)Florin Coras1-0/+3
Change-Id: I0b191ddb749b1aa132c2d33b8359c146b36d27af Signed-off-by: Florin Coras <fcoras@cisco.com>