aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion13-350/+315
Type: improvement Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion24-456/+469
Type: refactor Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_elog_main()Damjan Marion15-85/+88
Type: improvement Change-Id: I73383eb15186021cd6527d112da8443a0082f129 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion43-137/+166
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26tests: move ping tests to src/plugin/ping/testDave Wallace1-0/+0
- Refactor make test code to be co-located with the vpp plugin source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I09d55301665449b3f183191537749435f806fb15
2021-03-26avf: flow support enhancementChenmin Sun1-49/+219
This patch enables ip4, ip6, ip6-n-tuple, l2tpv3 esp ah flows in avf plugin Type: improvement Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I92c6d4217a6cce4085ee83e8beb4b037c8d7da5f
2021-03-26avf: handle flow id in data pathChenmin Sun3-27/+122
Type: improvement Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I24fa52fee88dabad8f0b84446f796ee055819617
2021-03-26avf: add avf flow frameworkChenmin Sun7-34/+2430
This patch adds the flow support to VPP avf_plugin. Currently only IP4-N-TUPLE and GTPU flow are supported as a reference. More flows will be added later. Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I563dbfacecd3eba31e8c3c7769142ea6adba54b6
2021-03-25svm: add producer wait functionFlorin Coras3-14/+47
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9488ad7e045c908b60b5821d9c48583f6d513c2f
2021-03-25acl: fix the integer overflow bug in API message length validation logicAndrew Yourtchenko1-4/+4
Sending the bogus acl_add_replace message with count=~0 will result in an overflow of "expected_len" field which is a u32, thus the message will pass the validation when it should not. Solution - make the expected_len a u64 to avoid overflow. The bug was found while experimenting with libfuzzer as part of https://gerrit.fd.io/r/c/vpp/+/31763 Type: fix Change-Id: I4a866d48f2418148236f1b1d77c487b869c7c43d Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-25svm: fix producer deadlock in svm_msg_q_wait()nandfan1-5/+9
1. When producer invokes svm_msg_q_wait() in svm_msg_q_lock_and_alloc_msg_w_ring(), queue mutex is held by itself. 2. Sometimes, svm msg queue is not full and ring is full, svm_msg_q_wait() do nothing with mutex held, consumer will blocking at svm_msg_q_send_signal(). Type: fix Signed-off-by: nandfan <fanyufei521@outlook.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib90b87ab76534cd42e9a4c3e11703e80d93ca678
2021-03-25nat: allocate enough space for full port usageKlement Sekera1-1/+1
Type: fix Change-Id: I068bfeaf22b9e6cce967c27acdd46d4b8541bdf8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-25rdma: fix buggy cqe parsing (truncated packets)Mohammed Hawari1-3/+2
Change-Id: I17228bd35cc7aa0d207a16502bf1376c75675302 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2021-03-25nat: fix bihash kvp printKlement Sekera1-2/+3
Type: fix Change-Id: I392d348b1a38affac8761b0614b117cd991958d7 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-25avf: introduce program flow eventChenmin Sun3-37/+86
This patch introduces a 'program flow' virtchannel event. The parameter is_add is used to identify adding or deleting the rule from avf Type: improvement Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I1f5545ddc23e4494a25afa36ff601607405a8c3d
2021-03-25tests: move vppinfra tests to src/vppinfra/testDave Wallace1-0/+0
- Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Iceaeab769c08e541b31546663d0e402ced862e5b
2021-03-25nat: prevent usage of ED nodes in EI codeKlement Sekera2-44/+118
Type: fix Change-Id: I84d511c30eb5878a1867f5e9d2207a39d4f0926c Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-25nat: fix vnet_feature_next in source hairpinningKlement Sekera1-3/+11
Avoid erroneous double vnet_feature_next if routing buffer manually. Type: fix Change-Id: I3f56c12bf57f59a1e5ddad63a2565fa195934cf6 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-25tests: introduce test-checkstyle-diffKlement Sekera2-2/+22
Make test-checkstyle-diff is a new target which checks PEP8 compliance only for changed files. This makes it faster to execute and also more readable as most of the time, only changed files will fail. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I71baca76ab3a21a7a3790617cbfb0d48aacbd9ec
2021-03-25stats: python vpp_stats rewrite to access stat segment directlyOle Troan11-419/+567
This module implement Python access to the VPP statistics segment. It accesses the data structures directly in shared memory. VPP uses optimistic locking, so data structures may change underneath us while we are reading. Data is copied out and it's important to spend as little time as possible "holding the lock". Counters are stored in VPP as a two dimensional array. Index by thread and index (typically sw_if_index). Simple counters count only packets, Combined counters count packets and octets. Counters can be accessed in either dimension. stat['/if/rx'] - returns 2D lists stat['/if/rx'][0] - returns counters for all interfaces for thread 0 stat['/if/rx'][0][1] - returns counter for interface 1 on thread 0 stat['/if/rx'][0][1]['packets'] - returns the packet counter for interface 1 on thread 0 stat['/if/rx'][:, 1] - returns the counters for interface 1 on all threads stat['/if/rx'][:, 1].packets() - returns the packet counters for interface 1 on all threads stat['/if/rx'][:, 1].sum_packets() - returns the sum of packet counters for interface 1 on all threads stat['/if/rx-miss'][:, 1].sum() - returns the sum of packet counters for interface 1 on all threads for simple counters Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I1fe7f7c7d11378d06be8276db5e1900ecdb8f515 Signed-off-by: Ole Troan <ot@cisco.com>
2021-03-24tests: add vpp test dirs to PYTHONPATHDave Wallace1-4/+10
- Required to relocate test infra modules to be co-located in feature test directory. - Remove/regenerate build-root/build-test/src/ soft links when running make test to allow re-running 'make test' after moving source files. - Suppress annoying 'ls' error message when gathering test source files caused by 'c' test application directory being named 'test'. - Use PYTHONPYCACHEPREFIX to generate all compiled source under build-root/build-test. This only works for python 3.8 or greater, but existing 'make test-wipe' target cleans up in-situ __pycache__ directories for older python versions. Type: fix Change-Id: If3c3ff0c58fb26a17395babc34783e06b1dd84e7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2021-03-24tls: fix cleanup on app close with dataFlorin Coras1-0/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35b5ae5a58ab38cc4328f9f438938fab4fbd7942
2021-03-24interface: do subif or feature arc work in interface-output only if neededDamjan Marion1-42/+61
Type: improvement Change-Id: If3b44682e5bbf68b83adc12fb6c71899aecf8a98 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-24virtio: improve compilation timeDamjan Marion1-64/+57
Type: improvement Change-Id: I56dadb852f63da0597ddf4db395a22afdf2d9cc0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-24misc: fuse fs for the stats segmentArthur de Kerhor5-0/+661
This extra allows to mount a FUSE filesystem reflecting the state of the stats segment. Type: feature Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I692f9ca5a65c1123b3cf28c761455eec36049791
2021-03-23interface: simplify and optimize interface-output nodeDamjan Marion1-204/+121
Type: improvement Change-Id: I58a7d75da2db0ec84c7c1f08fd1ca7a72946f14d Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-23misc: allow explicitelly setting CLANG_FORMAT_VERDamjan Marion1-1/+1
Type: improvement Change-Id: I356b1b1804a2b09b25f5a285ada12db6879e2f6a Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-23vlib: add node adaptive mode flagFlorin Coras4-8/+37
Don't switch nodes from interrupt to polling state unless adaptive mode flag set. For starters, flag set only on interface input nodes with no polling rx queue and at least one in adaptive mode. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ica1c75f605ead82b7cf74c45c6a774461008f054
2021-03-23interface: reduce duplicate code in the interface-output nodeDamjan Marion1-42/+41
Type: improvement Change-Id: I46459a0c0a79677092aa9f8c92b67c0d06f7242e Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-22tls: fix tlsopenssl for remaining bufferSivaprasad Tummala1-3/+4
Type: fix 1. added additional checks for pending data in openssl_ctx_read_tls(). 2. fixed read/write typo issues. Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: Id018c62bb9e02bf0d5f9abf929b6030b965a5d61
2021-03-22vcl: fix libc epoll pwait starvedwanghanlin2-1/+5
We call vls_epoll_wait with 0 timeout to process unhandled_evts_vector in ldp_epoll_pwait_eventfd. But vls_epoll_wait will then call vppcom_epoll_wait_eventfd to process events in event queue. If there are continuous events to be handled, then libc_epoll_pwait have no chance to be called. Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Ia4f61d0d438a3475bfde9f6715805274671d4e75
2021-03-22vlib: graphviz upgrade to allow filtersArthur de Kerhor5-34/+206
Possibility to draw only the active nodes on the graph. These are scaled and colored according to their utilization. Type: improvement Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I7ddb7b62b3a141cb03750dca24f044138fcc577f
2021-03-21gre: Multipoint GRE fixesNeale Ranns4-7/+86
Type: fix - the CLI was broken when a nh-table-id was present, since it overwrote the next-hop address - bouncing interface state stacked the adjacencies on the tunnel's destination (which is all zeros) - don't crash in the switch path if the interface has no hw-address Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I1ba9fdc9b2185899b753a2d40f23afa847a3ef4f
2021-03-20tests: add support for worker awarenessKlement Sekera13-59/+64
VppTestCase now has vpp_worker_count property set to number of workers. This can be overriden by child classes. Also overriden by VPP_WORKER_CONFIG variable for legacy reasons. Type: improvement Change-Id: Ic328bacb9003ddf9e92815767653bd362aa7f086 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-19vxlan: add tunnel cache to graph nodeJunfeng Wang9-47/+49
Type: improvement Signed-off-by: Drenfong Wong <drenfong.wang@intel.com> Change-Id: Ia81aaa86fe071cbbed028cc85c5f3fa0f1940a0f
2021-03-19api: Avoid the usage of the freed registration by the API callsAndrew Yourtchenko2-23/+52
This issue happens if: - the API client connects via Unix socket - the client issues the *_dump API call and immediately disconnects What happens after is that the API handler keeps sending the *_details messages, however at some point the write fails, and the socket is deleted. The attempt of a use of the registration pointer results in interpreting the socket as a shared memory socket. This results in a crash, because the data in this structure then does not make sense, like the below: | |Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault. |__GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67 |67 ../nptl/pthread_mutex_lock.c: No such file or directory. |(gdb) bt |#0 __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67 |#1 0x00007ffff500f957 in svm_queue_lock (q=0x0) at /home/ubuntu/vpp/src/svm/queue.c:101 |#2 svm_queue_add (q=0x0, elem=0x7fffa76c2de0 "\210\365\006\060\001", nowait=0) at /home/ubuntu/vpp/src/svm/queue.c:274 |#3 0x00007ffff6e131e3 in vl_api_send_msg (rp=<optimized out>, elem=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/api.h:43 |#4 send_sw_interface_details (am=<optimized out>, rp=<optimized out>, swif=0x7fffb957a0bc, interface_name=<optimized out>, context=<optimized out>) | at /home/ubuntu/vpp/src/vnet/interface_api.c:353 |#5 0x00007ffff6e0edeb in vl_api_sw_interface_dump_t_handler (mp=<optimized out>) at /home/ubuntu/vpp/src/vnet/interface_api.c:412 |#6 0x00007ffff7daeb48 in msg_handler_internal (am=<optimized out>, the_msg=0x7fffb839a5e0, trace_it=<optimized out>, do_it=1, free_it=0) | at /home/ubuntu/vpp/src/vlibapi/api_shared.c:501 |#7 vl_msg_api_socket_handler (the_msg=0x7fffb839a5e0) at /home/ubuntu/vpp/src/vlibapi/api_shared.c:790 |#8 0x00007ffff7d7c608 in vl_socket_process_api_msg (rp=<optimized out>, input_v=0x7fffa76c2de0 "\210\365\006\060\001") at /home/ubuntu/vpp/src/vlibmemory/socket_api.c:212 |#9 0x00007ffff7d89ff1 in vl_api_clnt_process (vm=<optimized out>, node=<optimized out>, f=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/vlib_api.c:405 |#10 0x00007ffff53bf9a7 in vlib_process_bootstrap (_a=<optimized out>) at /home/ubuntu/vpp/src/vlib/main.c:1490 |#11 0x00007ffff4da0b2c in clib_calljmp () from /home/ayourtch/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.06 |#12 0x00007fffa99a4d90 in ?? () |#13 0x00007ffff53b6cb2 in vlib_process_startup (vm=0x7ffff56a9880 <vlib_global_main>, p=0x7fffb5d41380, f=0x0) at /home/ubuntu/vpp/src/vlib/main.c:1515 |#14 dispatch_process (vm=0x7ffff56a9880 <vlib_global_main>, p=0x7fffb5d41380, f=0x0, last_time_stamp=<optimized out>) at /home/ubuntu/vpp/src/vlib/main.c:1571 |#15 0x0000000000000000 in ?? () |(gdb) frame 3 |#3 0x00007ffff6e131e3 in vl_api_send_msg (rp=<optimized out>, elem=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/api.h:43 |43 vl_msg_api_send_shmem (rp->vl_input_queue, (u8 *) & elem); |(gdb) l |38 { |39 vl_socket_api_send (rp, elem); |40 } |41 else |42 { |43 vl_msg_api_send_shmem (rp->vl_input_queue, (u8 *) & elem); |44 } |45 } |46 |47 always_inline int |(gdb) | The approach in this change is to avoid the closing operations "here and now", but instead mark the the registration as a zombie and place a forced RPC towards a callback that does the actual cleanup work. Forced RPC is handled via the API processing loop with barrier sync, so we are guaranteed not to have any API processing in-process. Type: fix Change-Id: I1972d42da620bdb4fd773c83262863c2781d9005 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-19policer: Add CLI for all equivalent API functionsNeale Ranns1-6/+162
Type: improvement Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ic17096c80fbde89f9bb74c29256abbe845130992
2021-03-19interface: add capabilities flagsMohsin Kazmi21-88/+150
Type: improvement This patch adds flags to represent the modern NICs capabilities. Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-03-18dpdk: don't mask interrupts for some driversMohammed Hawari4-9/+38
It is well known that for some NICs, masking interrupts results in delaying desc writebacks, which breaks poll mode. This fix introduces an "int-unmaskable" dpdk device flag to identify such devices (typically Intel FVL). For such devices, interrupts are masked by a call to file_update(...,UNIX_FILE_UPDATE_DELETE) instead of rte_eth_dev_rx_intr_disable (...) Change-Id: Ifbc701aebe8572319b7aae19382bd683a47fc3cf Type: fix Fixes: 19ff0c3699342b512c03362b3815df684a661f49 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-03-18tests: remove shm files created by vpp on resetKlement Sekera1-0/+1
Even though we don't use shm transport anymore, vpp still populates shm. Add cleanup before running tests to avoid the nuisance of running out of space on /dev/shm. Type: fix Fixes: eb506becd038f081bc7ac340412d3685425bb8b4 Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I2ef87e991223ee60892d56af1482025d91e77d46
2021-03-17session: fix populating chained buffersIvan Shvedunov1-3/+5
Type: fix Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: I3fdc1711d508bc5b0c2f56b3bd3fb4a56056eb54
2021-03-17tests: remove shm handlingKlement Sekera3-49/+4
Not used anymore with socket transport. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I7061048dee21ce02637e34f73fb9984bd241f7df
2021-03-17dpdk: cryptodev session managementpibr1-108/+377
Ensure that dpdk_cryptodev engine async handlers are registered for the set of algorithms supported by all cryptodevices in the system. Type: improvement Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I8293d87c6f07e935a1a0637704f24918cd3e132a
2021-03-16perfmon: fixes for cache hierarchyRay Kinsella1-8/+12
Account for occasional instances with the misses rates between caches are inconsistent. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Idfb8bb7543401405cfe04291ad201c28be030cc9
2021-03-16perfmon: add support for raw and timestampsRay Kinsella3-1/+24
Add perfmon plugin support to output raw counter and timestamps, both are useful for debug. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ia5a73d1f05e3464c18991c2346f0ed8b7ef63099
2021-03-16misc: fix checkstyle on fedoraRay Kinsella2-6/+51
The fedora clang-format command helpfully does not include the version suffix, and places clang-format-diff in /usr/share/clang. Have summited #1939018 in Fedora, to fix upstream. https://bugzilla.redhat.com/show_bug.cgi?id=1939018 Until then ... Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ibceae0fc15e7461c24288ee04f4d28943f889c36
2021-03-16docs: ikev2 usecasesFilip Tehlar6-2/+537
Type: docs Change-Id: Ib607b9426572585c1c7bfc4fcbbb1591ff5d9d42 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-03-16fib: Allow the creation of new source on the APINeale Ranns13-34/+703
Type: feature an client can dump the existing sources, examine their priorities, then define thier own source. Usefull if a client wants to distingusih between say, static, ospf, bgp, etc routes it has added over the API. Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I5158b4fa1ebe87381ff8707bb173217f56ea274a
2021-03-16api: allow specifying no timeoutKlement Sekera1-1/+1
This functionality is used in make test when DEBUG=gdb is used. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I1339e6460aa624a3bcb4b03db46991590e126f92
2021-03-15nat: get rid of worker selection callbacksKlement Sekera8-81/+77
Make code easier to read and debug. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ib52a4cdd3bcdcc475053aa32af3964c00859e1cd