aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2019-05-07mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,stable/1810Steven Luong3-0/+9
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-02-28reassembly fixes merged into one for stable/18.10.Ole Troan1-181/+123
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-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-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 Ranns1-1/+1
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-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 Marion3-5/+4
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-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-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 Coras1-14/+17
Change-Id: I3ac136e2a10796d8fa86ddb6f0d6cabe5fa749f8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-19tls: fix connection failures/interrupts at scale (VPP-1464)Florin Coras4-27/+42
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 Coras1-16/+28
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-17tcp: avoid sack processing when not needed (VPP-1460)Florin Coras2-3/+6
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-16vcl: fix bidirectional tests (VPP-1455)Florin Coras1-24/+24
- 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-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-12session: don't wait indefinitely for apps to consume evts (VPP-1454)Florin Coras1-10/+28
Change-Id: I544b24d2b2c4a09829773cf180d1747f4b087d4c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-12L2-flood: no clone for 1 replicationNeale Ranns1-59/+69
Change-Id: If178dd38e7920f35588f5d821ff097168b078026 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit b9fa29d513bfad0d9f18e8ed8c2da3feaa6d3bf0)
2018-10-11bfd:fix handling session creation batchEyal Bari1-27/+34
when multiple session creating script is ran (via exec) only the first one actually starts Change-Id: I0fc36f65795c8921cf180e0b555c446e5a80be45 Signed-off-by: Eyal Bari <ebari@cisco.com> (cherry picked from commit 0db9b04cf0f9c892a00988e7a61ae703aa83b721)
2018-10-11vnet: complete the fix for l3_hdr_offset calculation for single loop ↵Andrew Yourtchenko1-1/+1
fastpass case (VPP-1444) 20e6d36b has moved the calculation of the l3_hdr_offset into the determine_next_node() function, with the assumption that the current_data in the buffer is at the L3 header. This is not the case for the single loop fastpath, where the vlib_buffer_advance() call is made after the call to determine_next_node(), as a day1 behavior. As a result - that path incorrectly sets the l3_hdr_offset. Solution: move the vlib_buffer_advance() call to before determine_next_node() Change-Id: Id5eaa084c43fb6564f8239df4a0b3dc0412b15de Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-09vnet: ethernet-input incorrectly sets l3_hdr_offset in some casesAndrew Yourtchenko1-26/+26
The issue surfaced when developing the tap GSO code, with an iteration where output path is reliant on vnet_buffer (b0)->l3_hdr_offset being set correctly in the input path, during performance testing. Adding a workaround in the TX path shows that the issue surfaces only for relatively few packets during the test (about 100 out of 600000). Analysis shows the issue arises if the ethernet-input is handling two untagged packets with different sw_if_index values - then the accelerated path punts to slow path, before the setting of the l2.l2_len values is done, thus resulting in them being 0, and l3_hdr_offset being the same as l2_hdr_offset, wreaking havoc on TX path. The solution is to move the l2_hdr_offset calculation into a place where it is done for all the packets, and move the l3_hdr_offset calculation into the determine_next_node() function - as that function is also the one setting the special-case l2.l2_len value for tagged packets and moving the current_data for the L2 case. Change-Id: If728c7715e011930c1887691188c98055bddde67 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-08Adding Multipath support for exclusive DPO based fib path entries via rpathVijayabhaskar Katamreddy2-2/+16
Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-10-08replicate trace fixNeale Ranns1-2/+6
Change-Id: I785ecadbf30812a500629870aa717e64f4cf0cdd Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-06bond: active-backup mode is using the wrong load balance algoSteven1-2/+4
active-backup mode is using l2 load balance algo. It should be using active-backup. Also notice that the output is missing a character. vpp# create bond mode active-backup create bond mode active-backup vpp# sh bond sh bond interface name sw_if_index mode load balance active slaves slaves BondEthernet0 6 xor l34 2 2 BondEthernet1 9 xor l34 1 1 BondEthernet2 10 active-backu l2 0 0 vpp# Change-Id: If5ed0cc6c25f6c2ddabec15ff6188b34923d38e3 Signed-off-by: Steven <sluong@cisco.com>
2018-10-05bond: tx perf improvement, part troisDamjan Marion2-67/+166
Introduce bond_tx_inline which takes lb as a constant for gcc to do the optimization The number appears a tad better for 256 bytes frame. with the patch -------------- Thread 2 vpp_wk_1 (lcore 3) Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61 vector rates in 8.4836e6, out 1.6967e7, drop 0.0000e0, punt 0.0000e0 Name State Calls Vectors Suspends Clocks Vectors/Call BondEthernet0-output active 141054 36109824 0 2.51e1 256.00 BondEthernet0-tx active 141054 36109824 0 2.55e1 256.00 TenGigabitEthernet6/0/0-output active 141054 18055469 0 9.43e0 128.00 TenGigabitEthernet6/0/0-tx active 141054 18055469 0 6.97e1 128.00 TenGigabitEthernet6/0/1-output active 141054 18054355 0 9.54e0 127.99 TenGigabitEthernet6/0/1-tx active 141054 18054355 0 7.05e1 127.99 bond-input active 141054 36109824 0 1.76e1 256.00 dpdk-input polling 70527 36109824 0 5.03e1 512.00 ethernet-input active 141054 36109824 0 6.12e1 256.00 ip4-input active 141054 36109824 0 3.26e1 256.00 ip4-lookup active 141054 36109824 0 2.94e1 256.00 ip4-rewrite active 141054 36109824 0 3.27e1 256.00 without the patch ----------------- Thread 2 vpp_wk_1 (lcore 3) Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61 vector rates in 8.4443e6, out 1.6889e7, drop 0.0000e0, punt 0.0000e0 Name State Calls Vectors Suspends Clocks Vectors/Call BondEthernet0-output active 142744 36542464 0 2.51e1 256.00 BondEthernet0-tx active 142744 36542464 0 2.67e1 256.00 TenGigabitEthernet6/0/0-output active 142744 18270813 0 9.19e0 127.99 TenGigabitEthernet6/0/0-tx active 142744 18270813 0 6.98e1 127.99 TenGigabitEthernet6/0/1-output active 142744 18271651 0 9.43e0 128.00 TenGigabitEthernet6/0/1-tx active 142744 18271651 0 7.02e1 128.00 bond-input active 142744 36542464 0 1.76e1 256.00 dpdk-input polling 71372 36542464 0 5.08e1 512.00 ethernet-input active 142744 36542464 0 6.15e1 256.00 ip4-input active 142744 36542464 0 3.23e1 256.00 ip4-lookup active 142744 36542464 0 2.96e1 256.00 ip4-rewrite active 142744 36542464 0 3.28e1 256.00 Change-Id: I9fd43eda3c735cbff680ac6d2f01ecdae81f0eda Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05session: fix local session tagging and cleanupFlorin Coras3-7/+5
Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-05On interface deletion - make sure any vlan qinq table is clearedJohn Lo1-0/+2
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c Signed-off-by: John Lo <loj@cisco.com>
2018-10-05Improve ip_mroute_add_del documentationIan Wells1-4/+24
Change-Id: Ieb882cc67c37bf591b6c737234263c7c35416e6d Signed-Off-By: Ian Wells <iawells@cisco.com>
2018-10-05vxlan:ip4 decap:remove access to tunnel objectEyal Bari3-183/+190
store local/remote addresses + vrf + vni in hash key store complete decap info in hash value (sw_if_index + next_index + error) this removes the need to access the tunnel object when matching both unicast and mcast. however for mcast handling it requires 3 hash lookups: * one failed unicast lookup (by src+dst addrs) * lookup by mcast(dst) addr . * unicast lookup (tunnel local ip as dst + pkt's src addr) where previously it needed 2: * lookup by src to find unicast tunnel + compare dst to local addr (failing for mcast) * lookup by mcast to find the mcast tunnel Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-04Support reassembly for fragments coming to ip4-local nodeJuraj Sloboda3-0/+9
Change-Id: I3aa4708c1c3cdda344f282d56b617677080eaaa1 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-04udp_echo: fix cut-through server modeFlorin Coras2-19/+26
Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-04MFIB-API: when programming an (S,G) fix the grp-lenNeale Ranns1-0/+4
Change-Id: I97052d29080501de53fe95499c860faf0765e81d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-04VPP-1430: remove unnecessary paddingMarco Varlese1-2/+0
A copy/paste mistake caused to add padding to the buffer used to send data. Change-Id: I04d8dfec4ae195927be1675c5ce8b30230d5b376 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-04Fix handling of mpls_tunnel_add_del APIJohn Lo1-2/+16
Handles next_hop_weight, next_hop_preference and next_hop_table_id properly in vl_api_mpls_tunnel_add_del_t_handler(). Also updated vpp_api_test and custom_dump handling of related APIs. Change-Id: I89e211bfa3b9d8ead396b24b3c46b7c7f6511f44 Signed-off-by: John Lo <loj@cisco.com>