aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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> (cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
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-02-21vhost: VPP stalls with vhost performing control plane actions [VPP-1572]Steven Luong3-216/+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: I664c57d76dc92a116119221f3d91fa67914e440a Signed-off-by: Steven Luong <sluong@cisco.com>
2019-01-30bond: 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)
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-12-05IPSEC-AH: fix packet dropNeale Ranns2-7/+0
Change-Id: I45b97cfd0c3785bfbf6d142d362bd3d4d56bae00 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit ad5f2de9041070c007cedb87f94b72193125db17)
2018-11-03vhost_user: Fix setting MTU using uninitialized variableJuraj Sloboda1-2/+1
Change-Id: I0caa5fd584e3785f237d08f3d3be23e9bfee7605 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com> (cherry picked from commit 83c46a2c5c97320e029b4dd154a45212530f221d)
2018-10-17VPP-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-17VPP-1459:Ip4 lookup fail when exist prefix cover.mu.duojiao1-3/+1
Change-Id: I4ba0aeb65219596475345e42b8cd34019f5594c6 Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn> (cherry picked from commit 9744e6d0273c0d7d11ab4f271c8694f69d51ccf3) (cherry picked from commit b3aff922ffbddd61b44df50271e4aaee2820a432)
2018-10-17acl-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> (cherry picked from commit 84112dd4f98e5a31a8c7340a741f89e77fd03363)
2018-10-02Fix wrong dependenciesMarco Varlese5-14/+14
I was reported an issue affecting VPP build only with 1 thread (e.g. -j1 option to make). That is quite important from a reproducible build perspective. This patch addresses that issue. Change-Id: Ia8e3b9a9716a260d8b6f1c2d92dd166eddf6716f Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-01IGMP: handle (*,G) report with no source addressesNeale Ranns1-8/+14
Change-Id: I363370b9d4a27b992bad55c48fc930a2fbea2165 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01SCTP: fix overflow issue with timestampMarco Varlese5-23/+29
Change-Id: I03bb47a2baa4375b7bf9347d95c4cc8de37fe510 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-09-28IP ttl check in ip4-input missing for single packet path.Ole Troan1-0/+3
Change-Id: Idc17b2f8794d37cd3242a97395ab56bd633ca575 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-25MPLS tunnel dump fixNeale Ranns3-4/+8
Change-Id: I9d3d5243841d5b888f079e3ea5dc1e2e8befd1dc Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-25BIER; bi-dir to/from underlayNeale Ranns7-59/+110
set and check a special RX interface value as the packet enters and exits a BIER domain Change-Id: I5ff2f0e2d1b3ce0f3598b935f518fc11eb0896ee Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit fe4e48f617f3e0f62880adebdcfb5989aa4e6db7)
2018-09-21GRE: fix 4o6 and 6o4 adj stackingNeale Ranns4-20/+24
Change-Id: I13dc5eab8835c4f3b95906816d42dccfeee8b092 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 2646c80db8d3d1a3cd7555328d5a0038798f861e)
2018-09-15Fix AC_INIT to get same version as everything else.v18.07.1Ed Warnicke1-1/+1
When the version was being set manually in AC_INIT, it would be different form the version in show ver from vpp during releases. This led to breakage in merge jobs leading to the release. This fixes that by having A_INIT use the same version script as everything else. Change-Id: I45c2857b28153ff52afff0ee753d4dea7c6f7f70 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-09-13Release notes and versions for 18.07.01 dot releaseEd Warnicke1-1/+1
Change-Id: I57570eb3a2a397d88e8a223ba25cc04c68dfe736 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-09-12nat: fix busy ports of each threaddongjuan1-4/+15
which can create dead loop in nat_alloc_addr_and_port_default function Change-Id: I468c25ce0f0a0b3f881de564623dea208b2ca700 Signed-off-by: dongjuan <dong.juan1@zte.com.cn> (cherry picked from commit 58f50f1bb64e962e5628e2c1867e07f238036c7b)
2018-09-12Fix create memif socketEd Warnicke1-16/+0
create interface memif [id <id>] [socket-id <socket-id>] ... Can optionally take a socket-id. You create a socket-id with: create memif socket [id <id>] [filename <path>] Unfortunately, this doesn't work because "create memif" was deprecated. It results in: vpp# create memif socket id 0 filename /run/vpp/test.socket command deprecated. Please use 'create interface memif' instead. This fixes it by clipping out the create memif command entirely. Change-Id: If503758706bf758b6cb46e958200527a5856c600 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-09-11fix issue with missing sample_main in sample pluginDamjan Marion1-0/+2
Change-Id: Ia17511e3997cdcf1d0991e62e8e2d3fb8812d133 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-08vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412]Steven1-2/+31
Under rare scenario, epoll may still post an event to VPP although the file descriptor is already deleted via epoll_ctl (EPOLL_CTL_DEL) and the file descriptor is close. VPP tries to access the free file index entry and crash. The fix is to throw away the events which the file descriptor is already deleted. Change-Id: Ieca3a1873aecb28630c3abc42c40341f27c2faa7 Signed-off-by: Steven <sluong@cisco.com>
2018-09-06NAT: fix maximum out of order fragments (VPP-1399)Matus Fabian6-8/+38
All fragments should be dropped when max_frag is 1 and 2 non-initial fragments are received before first fragment. Change-Id: Id0c968f45629698e347e8226c5926f27b48b82d6 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit a7f8b228ff505acc052a77101b12e714ead26536)
2018-09-06acl-plugin: VPP-1400: fix crash when removing a session entryAndrew Yourtchenko1-0/+2
bihash deletion operation may in turn do underlying memory operations, so ensure it is using the correct (private) heap. Change-Id: Ibef7ad7f9db6fa83da02316bf7509072ce579bc0 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-03acl-plugin: VPP-1400: VPP may crash when performing ACL modifications on ↵Andrew Yourtchenko2-61/+91
applied ACLs The partition_split() did not increment the refcount when using a mask type index, thus subsequent modifications potentially resulted in double frees and in the best case immediate crash, in the worst case delayed crash in another place. Introduce the lock_mask_type_index() and call it, move the mask type index related functions closer to the top of the file. Make the assignment of the new mask type indices for the tuplemerge case to use the assign_mask_type_index(). Keep some debugs in case we need to investigate this further at some point. Change-Id: Iae370f5cd92e1fe1442480db34656a8a3442dbc0 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-03acl-plugin: fix the memory leak with colliding entries storageAndrew Yourtchenko1-4/+73
Change-Id: I634971f6376a7ea49de718ade9139e67eeed48e5 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-02NAT44: fix nat44_ed_not_translate_output_feature for multiple VRF (VPP-1404)Matus Fabian1-9/+15
Change-Id: I44acc5aeff59dc25d18369e29618bbe39d30a1b3 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit f96d0a105d357a6b7bb4252b271fbcbab45bc9bd)
2018-09-02VPP-1387:foreach outside address vector to find correct index when free ↵shubing guo3-21/+16
outside address and port Change-Id: Ie5452350a8ebe2c1b62085fcab50dbc0138d3ae2 Signed-off-by: shubing guo <guo.shubing@zte.com.cn> (cherry picked from commit 762a4938900abeedd42676ab2582fcceabdc07fa)
2018-09-02vhost: Fix VPP crash when reloading VM with mixed-type ports [VPP-1406]Yichen Wang2-1/+15
When VM is having mixed type of vhost-user and SRIOV ports, QEMU (RedHat v2.10) will not send disconnect signal to VPP, and just gives the new memory region directly. VPP is not able to handle new memory region mapping without disconnect signal first, which will result in a SEGV. The fix will handle the VM reboot scenario without explict disconnect signal from QEMU. The fix is to invalidate the avail, desc, and used pointers in the txvq when the new memory regions are received. This is because these pointers are not valid anymore with the new memory regions. In the input node, check to make sure the avail pointer is valid and punt if not. Change-Id: Ieb8b427b202f4442a58907dab1661d63a03650de Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-08-31VPP-1381: Fix the incorrect if condition when delete session for static mappingshubing guo1-2/+2
-- The session should not be deleted when either ip address or port doesn't same with static mapping. Change-Id: I09ab7379947654d2780a8c40c5340ce430541b12 Signed-off-by: shubing guo <guo.shubing@zte.com.cn> (cherry picked from commit 060c3a7e5a2d23189a8c6348e767cd2018a58dd6)
2018-08-31NAT44: fix next_src_nat (VPP-1384)Matus Fabian1-6/+7
Use rx_fib_index instead of sm->inside_fib_index for session lookup key. Change-Id: I2d6cce5b9376fa8ac4d75a9bbfa8498be0fd1493 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit 182e37e33f80cc65f3cf27b69e74d855dd858a7e)
2018-08-31SR-MPLS: fixes and testsNeale Ranns4-3/+30
- the FIB path takes a vector of type fib_mpls_label_t not u32 so the untype safe vec_add did not work - write som eSR-MPLS tests - allow an MPLS tunnel to resolve through a SR BSID Change-Id: I2a18b9a9bf43584100ac269c4ebc286c9e3b3ea5 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 7c922dc404c2c0a2d67d53ca05db1c1ae1598f44)
2018-08-31lacp: issue with slave interface admin up after it is added to the bond ↵Steven1-2/+2
group [VPP-1409] When the slave interface is admin up after it is added to the bond group, lacp does not send lacp pdu's to the interface because its periodic timer is not running. The issue was the slave interface's variables got reset after the state machines were initialized. Change-Id: I2942556ce29a4acc97db3be40293e69bed7b6679 Signed-off-by: Steven <sluong@cisco.com> (cherry picked from commit bf21dc85053931bc597e0fab1112061aa60e986b)
2018-08-29SR-mpls: do not pass empty label stack to fibNeale Ranns1-10/+11
Change-Id: Ib1601d01a54296e72be3bbfa057fce965549b02b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-29Consolidate table->index conversion in fib-path CLI processingNeale Ranns3-36/+14
Change-Id: I221cebddc45efbfdec428b7df2af96e2aedff2dd Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 77eb9073b178e8d4375bf0ef274246586f018ddc)
2018-08-28Adjacency walks protected by 'walk in progress' flagNeale Ranns2-2/+12
Change-Id: I3281f65f7dec792d56de48afb39efcc2fed8578b Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 30d53645ded750db3cc84f6fb4a97df038b143a1)
2018-08-28MPLS: allow 16 as a valid output labelNeale Ranns1-1/+1
Change-Id: I7e6045514d58010258889cadd220b7efcef7c1b9 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 9514fab0423725fddcb0a4f5ec070ac8d2764ac8)
2018-08-22IPIP and SIXRD tunnels create API needs table-IDs not fib-indexesNeale Ranns8-58/+146
Change-Id: Ifaef196a24fa9b6924f2b9692318f69763cee5e1 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-17VPP-1392: VXLAN fails with IP fragmentationOle Troan4-2/+6
Not only is it wasteful to send all fragments back through ip4-lookup, but it doesn't work with tunnel mechanisms that don't have IP enabled on their payload side. Change-Id: Ic92d95982dddaa70969a2a6ea2f98edec7614425 Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit b3655e5592e3e8e48eb087632f3fa71915891a9f)
2018-08-13tcp_echo: fix server rx bufferFlorin Coras1-2/+1
Change-Id: I7bb81259008f5d2da6e26405fd0774294181dc6b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-09Fix undefined symbol: fformat_append_cr in vat plugins loadingYi He2-11/+11
Several test plugins report undefined symbol while being loaded by load_one_vat_plugin. Fix this by adding VPP_API_TEST_BUILTIN into CFLAGS for building these plugins. Change-Id: I908720fd0d01da1ead30ba17027ba10358f6bdf1 Signed-off-by: Yi He <yi.he@arm.com> (cherry picked from commit d05ce97724ed8681e80c32a948564d0163994365)
2018-08-09NAT44: fix bug in snat_interface_add_del (VPP-1380)Matus Fabian1-4/+4
Should not enable nat44-hairpinning node in deterministic mode Change-Id: I5790323a6842ee71a62c6c91c49166a2839eac12 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-07Fix dangling reference in l2fib_scan(...)Dave Barach1-0/+8
Deleting a bihash kvp frees the bucket's backing storage when the bucket reference count reaches zero. l2fib_scan MUST check for that condition, and stop scanning the bucket if it occurs. One of the L2 FIB extended "make test" vectors caused this issue 100% of the time. Change-Id: I250bcc4c1518e16042120fbc4032227a759a602e Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 28374cada08df61180044e24cb758fa570e73c9d)
2018-08-06fix dangling reference in foreach_key_value_pairDave Barach1-0/+7
When the user deletes the last entry in a bihash bucket, the bihash infra frees the bucket's backing storage. If this happens under clib_bihash_foreach_key_value_pair - and the freed bucket happens to be the bucket being traversed - the resulting dangling reference can easily make the wheels fall off. Simple fix: if (bucket-is-now-empty) double-break. Change-Id: Idc44247a82ed5d0ba548507b4a53d4c8503ba8bb Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit ca45ee73d7c49c7f659c5cd690d3403d440e50f9)
2018-08-03loop counter to prevent infiinte number of look ups per-packetNeale Ranns5-4/+100
Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-01fix 'sh vxlan tunnels'Neale Ranns1-15/+4
this receipe: /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) return 0; only works if there is more data following the registered command name. So it is not so good for show commands... Change-Id: I54249865a44526ade4b40e2d6207138a2d056e40 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit 16be62e3846750b5b7921c0b4d6408477be434f7)
2018-07-30Reverse the logic of flagging malformed packet in fragmentation code to ↵Rajesh Saluja1-1/+1
allow padding Change-Id: I051c137ae18fd436a798a12a56a9d12f8eaa2e08 Signed-off-by: Rajesh Saluja <rajsaluj@cisco.com> (cherry picked from commit 1f895c9a40f446ca9f1b7803f350c70ebb3ad0fa)
2018-07-27Fix memory leak in processing of ICMPv6 RA event (VPP-1360)Juraj Sloboda1-1/+2
Change-Id: I7c3e5e91391b1c9b36e8ea8bacee9a107da1ae96 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-07-26VPP-1359 Wrong vl_msg_idLukasz Majczak1-1/+1
Wrong vl_msg_id set in vl_api_stats_get_poller_delay_t_handler while reporting stats delay. Change-Id: I7d6ad14359e41c717b976390c58e254e3602e0ff Signed-off-by: Lukasz Majczak <lma@semihalf.com>