summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2022-01-05dpdk: remove vlan-strip offload codeFilip Varga3-62/+0
This code was actually never working. It was just used as workaround for Cisco ENIC issue with tagged default vlan frames. Today Cisco ENIC provides solution to this problem with devargs flags... Change-Id: Ia8284274117cb200bf6c7f7911d945d5a093d878 Type: refactor Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05crypto: encrypt/decrypt queues sw_schedulerJakub Wysocki8-270/+391
Type: improvement Previously multiple sw crypto scheduler queues per core design caused unaverage frame processing rate for each async op ID – the lower the op ID is the highly likely they are processed first. For example, when a RX core is feeding both encryption and decryption jobs of the same crypto algorithm to the queues at a high rate, in the mean time the crypto cores have no enough cycles to process all: the jobs in the decryption queue are less likely being processed, causing packet drop. To improve the situation this patch makes every core only owning a two queues, one for encrypt operations and one for decrypt. The queue is changed either after checking each core or after founding a frame to process. All crypto jobs with different algorithm are pushed to thoses queues and are treated evenly. In addition, the crypto async infra now uses unified dequeue handler, one per engine. Only the active engine will be registered its dequeue handler in crypto main. Signed-off-by: DariuszX Kazimierski <dariuszx.kazimierski@intel.com> Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Signed-off-by: Jakub Wysocki <jakubx.wysocki@intel.com> Change-Id: I517ee8e31633980de5e0dd4b05e1d5db5dea760e
2022-01-05dpdk: remove "convenience" varsDamjan Marion8-39/+29
It is actually longer and slower... Type: refactor Change-Id: I0f126d4cdb13ecc60a2d370409f23820d7f7eb72 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05wireguard: fix 'wireguard add peer' cli behaviorMiroslav Miklus1-6/+6
- change 'port' to 'dst-port' to make the input self-explanatory - add empty spaces to short help Type: fix Signed-off-by: Miroslav Miklus <miroslav.miklus@pantheon.tech> Change-Id: I74c783e6e8629e61b1c100e9355d09cf5e35a750
2022-01-04nsim: cli improvementsFlorin Coras2-14/+56
- improve format and unformat of bandwidth and delay - integer packet size - track worker wheel size as config Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I616fa96237c5e06d9c809bb5c2e0bed0447f2c4d
2022-01-04nat: remove nat44-ed relation between SM and addrFilip Varga6-555/+436
Change [1] put static mappings in flow hash. This change also broke relationship between nat pool addresses and static mappings. Port and address are no longer reserved in nat pool address records for a new static mapping. Because of this change both nat objects and their configuration can function independently. This change also removed already broken logic of having static-mapping-only configuration. In this patch i have cleaned up and removed unnecessary logic for static mapping configuration functions, address configuration functions, interface configuraiton functions and all callback functions used for resolving interface address bound records. No more viable configuration option static-mapping-only is also removed because there is no more option to run traffic through vpp for static mappings without having flow hash table allocated. Instead user is now able to create static mapping records without using nat pool addresses. Fixed and improved management of required fib entries (ensuring VPP will reply to ARP for all external addresses on outside interfaces) through holding a refcount for their creation and removal. [1] https://gerrit.fd.io/r/c/vpp/+/34077 Type: improvement Change-Id: Ic16deefbede833d574c2a5972155c9afa5bc62ce Signed-off-by: Filip Varga <fivarga@cisco.com>
2022-01-04nat: nat44-ed pool address allocation improvementFilip Varga4-58/+289
This patch improves algorithm responsible for choosing nat pool address during dynamic session creation. Patch synchronizes nat pool address attributes with vpp interfaces doing so gives nat option to determine correct nat pool address when creating dynamic session. Improvements: * match dst address subnet and src fib with nat pool address * for output-feature also fallback match of tx_sw_if_index with nat pool address Type: improvement Change-Id: I594638bc76fc1153f582add376838b4b72ff573a Signed-off-by: Filip Varga <fivarga@cisco.com>
2022-01-03vrrp: fix support for VRs in different FIBsMatthew Smith1-15/+13
Type: fix Fixes: 4b1b13315a3c When adding or deleting a VR, multicast routes can be added or deleted. When the first VR is added, a local (dpo-receive) route is added. The route is deleted when the last VR is deleted. Perform the check on whether to add or delete the route on a per-FIB basis. Otherwise, if the route is only added after the first VR is added without regards to the FIB being used and a second VR is added later on an interface attached to a different FIB, the necessary route will not be added to the FIB used by the second interface. Change-Id: Ib30925ecf45c714cfe3ac6a223754bea918f10e3 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2022-01-01vppinfra: fix bitmap can't get correct next clear indexjiangxiaoming1-2/+1
when bitmap vec len is 1 and all the bits has been occupied, clib_bitmap_next_clear(ai, 63) will return result:65 which should be 64. It will lead to missing iteration for pool_foreach. Type: fix Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com> Change-Id: Iadac7e6f6b4da357943c4c9d50bf22353c4a8408
2021-12-31fib: Refetech the adj after the walk in case the pool realloc'dNeale Ranns1-1/+1
Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8734c72cf15533d6614fbeb53b95c824dbd251a9
2021-12-31misc: Remove the unused GBP fields from the buffer meta-dataNeale Ranns3-15/+1
Type: refactor Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I92496501360ee073795206bde87f4731a5ce074c
2021-12-31vlib: remove external thread management supportDamjan Marion8-232/+19
Now DPDK have API to register external threads so we can remove this mess... Type: improvement Change-Id: I71a21f0cd94bd668aa406710c75a0bcc63fdc840 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-30svm: merge want deq and leq threshold notificationsFlorin Coras2-20/+8
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2775af35386a4e52ba82991c68bce6c56f13410f
2021-12-29http_static: Fix timeout on large filesMichal Kalderon1-3/+19
When trying to read files that are larger than the fifo a timeout was reached on client side leading to an abort of the request and a retry (sending another GET command). The svm fifo notification request was set to notify when the fifo is no longer full, this lead to an inefficient loop of sending small amounts of data each time with a large overhead of context switch and waiting for the next notification, eventually leading to a timeout. Modifying the trigger on the svm-fifo to be notified on a preset threshold value enabled sending larger amounts of data between context switches and sending large files more efficiently. This solved the timeout issue. In addition, cap the max write from application to 4MB to avoid running into a case of trying to allocate chunks that are too large. Reproduce: Server: http static server www-root /var/www/data uri tcp://0.0.0.0/80 cache-size 5m fifo-size 300 Client: wget http://11.0.0.2/file_of_size_32M Type: fix Change-Id: Idfceedffd935da9486cde820e9dca5dad69d9ca5 Signed-off-by: Yuval Caduri <cyuval@marvell.com> Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
2021-12-29svm: Add support for thresh dequeue notificationMichal Kalderon2-2/+24
Add the ability to set a threshold on the fifo that will be used to notify caller when de-queue from the fifo reached a value that is less than or equal to the threshold. Type: feature Change-Id: I70ba1a05f783ce5247409e9beebe4e336b7c1eb5 Signed-off-by: Michal Kalderon <mkalderon@marvell.com> Signed-off-by: Yuval Caduri <cyuval@marvell.com>
2021-12-26tcp: set sw_if_index in tcp src-address cliMercury1-2/+2
the receive dpo added by tcp src-address cli do not have a valid sw_if_index , ip4_local_check_src() and tcp_input_lookup_buffer() will set ~0 to vnet_buffer(b)->sw_if_index[VLIB_RX], which will cause crash in tcp46_reset_inline, Type: fix Signed-off-by: Mercury <mercury124185@gmail.com> Change-Id: Ie01c31f3575e14187c6380ebcfff96fcb6098cde
2021-12-24ip: remove archaic vector code from mtrieDamjan Marion2-86/+12
Type: improvement Change-Id: Ib39478a2e6991d721c4ba3ea61c97bfb07238016 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-24vlib: introduce vlib frame aux dataDamjan Marion6-117/+122
Type: improvement Change-Id: I53890a13210cfb0d2b2d9d8cfd9b15118d3bb273 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-23tcp: fix endpoint lookup failed caused by key uninitializedMercury1-0/+1
fix ipv4 key uninitialized in local_endpoints_table, which will cause transport_endpoint_cleanup() failed to lookup the endpoint and can not delete it, as for ipv6, clib_memcpy_fast() will change all bytes of lcl_addr and there maybe no need to initalize, Type: fix Signed-off-by: Mercury <mercury124185@gmail.com> Change-Id: I56676493a393b1d64eaa438224e256094ca75d2f
2021-12-23session svm: track fs and seg manager index in fsFlorin Coras4-42/+27
Simplifies allocation of fifos as fifo segment and segment manager indices can be set at alloc time. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibd357b3ff0279d8deefcdcb17010b4068007ccb7
2021-12-22vppinfra: add format_u64_bitmap functionDamjan Marion2-0/+34
Sample output: 60 56 52 48 44 40 36 32 28 24 20 16 12 8 4 0 0x0020 .... .... .... .... .... .... .... .... .... .... .... .... ..11 .... ...1 1... 0x0000000000003018 0x0018 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 111. .1.1 0xffffffffffffffe5 0x0010 .... .... .... .... .... .... ..1. ...1 .1.1 1... 11.. 1... .... .1.. 1111 ..11 0x0000002158c804f3 0x0008 .... .... .... .... .... .... .... .... .... .... .... .... .... .... ..1. 11.. 0x000000000000002c 0x0000 .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ...1 0x0000000000000001 Type: improvement Change-Id: Ib99129866ad5a1d2d52be6855406e2829aa9ec3e Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-22session: fix segment alloc/free worker raceFlorin Coras2-70/+119
Avoid scenarios where a worker allocates a segment but while it drops the segment manager writer lock and acquires the reader lock another worker uses the segment and frees it. Type: fix Thanks to wanghanlin@corp.netease.com for the report. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0a88d738c51b33fd07c34916f125c98806861a06
2021-12-22vppinfra: add bihash 12_4 templateDamjan Marion2-0/+85
Type: feature Change-Id: I8a6b2c7d7682a01c472d7375d444e8b43eb5db04 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-22vppinfra: fix map_lock issueliuyacan1-2/+2
The release of the map_lock is a bit too early, it needs to wrap mprotect(), otherwise the access rights of hdr may be deprived of other worker threads. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I9cb89d49a097ec6d5ae9fd2af2bddf967ec946e9
2021-12-22memif: refactor descriptor handling in the input nodeDamjan Marion3-184/+446
Type: improvement Change-Id: I06130447b4e6f4726c4f5bffbe606385c45b8bd4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-22vlib: null terminate elog stringDamjan Marion1-1/+1
Type: fix Fixes: bc867c3 Change-Id: Ibcdb46d3b322195f5573e5ec93b31e177acaca49 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-21hsi: host stack intercept pluginFlorin Coras5-0/+453
Enable selective punting of flows to host stack Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib31a3abfe3b21a2aa448bfacc4591fa5c840f935
2021-12-21tls: don't add listen to lookup tableFilip Tehlar1-0/+1
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I0432dd0209f9c7702a8497161e21e178ee243bb1
2021-12-21fib: MPLS EOS chains built for attached prefixes should link to a lookup DPONeale Ranns9-66/+57
Type: fix Presently a local label associated with an attached or connected prefix will link to the glean. This is a problem since it will never use the adj-fibs that are installed for that attached prefix. Instead link the local label to a lookup in the table in which the attached link is bound. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iad49fb6168b9ba47216a9a52bd262363b49c3c43
2021-12-20vrrp:fix vrrp vr delete case memory leakjinsh1-0/+1
when vrrp vr delete, vr->config.peer_addrs not free Type: fix Signed-off-by: jinsh <jinsh11@chinatelecom.cn> Change-Id: I9ead188d6409412b475b5f6add767cb58f1af6e0
2021-12-20session: ignore rpc in fifo event lookupsFlorin Coras1-10/+0
RPCs are not associated to sessions. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6b7870a3ebc2e8f32a6c1b10e2552d9e074c7eb3
2021-12-20session: improve sh segment-manager cliFlorin Coras2-67/+87
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5d669fcba609bcdb35103f57c45e0a270213d84a
2021-12-20ip: SVR fix race conditionKlement Sekera2-2/+14
There could be a race condition where two fragments of one chain end up at the same time on different workers, one overwriting others hash entry. Add a check for that and restart processing on the unlucky worker who ends up being second from hash table POV. This will then result in a proper handover to worker now owning this reassembly. Type: fix Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75 Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I9eb29c5cb1ffe3b5eb1d5a638e17ab7ba2628d28
2021-12-19fib: Incorrect logic for IPv6 link-local attached export.Neale Ranns1-1/+1
Type: fix IPv6 link-local FIB entries are never needed for attached export. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I08aad78e754d89ad54d07a211fb7a0d7fbc7a0fe
2021-12-18bfd: fix NULL dereference in bfd_api_verify_commonFrédéric Perrin1-1/+1
ip6_get_link_local_address() may return NULL if the local interface is not (or not yet) configured Type: fix Signed-off-by: Frédéric Perrin <fred@fperrin.net> Change-Id: I42bf2081582c4a36fa4e32145ca2f0ff73488110
2021-12-17vppinfra: missing __clib_exportbenker1-1/+1
Type: fix hash_resize is available in hash.h file, but missing __clib_export in hash.c Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com> Change-Id: Ibb741b532cd1080ec5d8314aae8dbbca87f42502
2021-12-16session: app mq congestion detectionFlorin Coras3-266/+349
Detect mq congestion and handle it by queueing messages in a fifo and postponing handling via rpcs. App workers with congested mqs cannot accept nor connect additional sessions. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I401d971a1a53896758b88fc60f158cbc31e0c7cb
2021-12-16vppinfra: clang doesn't know about attribute nocloneDamjan Marion1-0/+4
Type: fix Fixes: 88019c40 Change-Id: I219597c95883f49b6ff51e65e6c6c80e3c1518b7 Signed-off-by: Damjan Marion <dmarion@me.com>
2021-12-16af_xdp: mark API as stableBenoît Ganne1-6/+1
Type: improvement Change-Id: I55b080f994eafc4ecfe0e774d7cd05218d715526 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-12-16vppinfra: fix clib_fifo_elt_at_indexFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4924420b827bdf7d161a1f723c2bfd5370d43772
2021-12-16api: Fix reaper functions for socket clientsNeale Ranns1-1/+2
Type: fix The pub_sub_handler() stores registrations key'd with the message's client_index (which is in network-order). The socket-client invokes the reaper function (to cleanup these registrations) using the pool index of the registration. hence the pub-sub registration is not removed. change the socket-client to pass the network-order client_index. This approach was chosen in preference to chaning the way the registrations are key'd since the memory-client also uses this registration, and correclty passes the client_index to the reaper. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I6118555c8601149d05801f558e08bcc7aed4fc98
2021-12-15vppinfra: toeplitz hash four in parallelDamjan Marion6-76/+622
Type: improvement Change-Id: Icb3f39f42d01c51d7b03543cb7d6b5dabad11866 Signed-off-by: Damjan Marion <dmarion@me.com>
2021-12-14virtio: integrate with new tx infraMohsin Kazmi11-58/+251
Type: improvement Change-Id: I337ec63d0868f665329d68eadf1744e080b73a0d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-12-14vppinfra: toeplitz hashDamjan Marion5-0/+704
Type: feature Change-Id: I0ccf280c4b769ee624cfb780146b847a0e8e4942 Signed-off-by: Damjan Marion <dmarion@me.com>
2021-12-14vppinfra: display cpu frequency in test_vector_funcs perf testDamjan Marion2-8/+24
Type: improvement Change-Id: I350a30eca0d3d7ec8816e4e7c30889621029c694 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-14interface: Add interface monitor cliNathan Skrzypczak4-0/+141
This adds an interface CLI 'monitor interface <interface>' that periodically reports rx/tx pps & bandwidth for a given interface. Type: feature Change-Id: Ia9d59b3443913520a52b38d7bda012190be6f167 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-12-14crypto-native: fix build error on Arm using clang-13Jieqiang Wang1-2/+2
Building VPP on Arm using clang-13 as compiler will fail with following error message. The root cause is the unmatched alignment of parameter key for functions aes128_key_expand/aes256_key_expand on aarch64. Fix this error by explicitly declaring parameter key as type u8x16u. [285/2593] ccache /home/snowball/tasks/benchmark_compilers/clang_13/bin/clang-13 --target=aarch64-linux-gnu -D_FORTIFY_SOURCE=2 -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src -ICMakeFiles -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins -ICMakeFiles/plugins -fPIC -g -fPIC -Werror -Wall -Wno-address-of-packed-member -O3 -fstack-protector -fno-common -march=armv8.1-a+crc+crypto -MD -MT CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -MF CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o.d -o CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -c /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes_cbc.c FAILED: CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o ccache /home/snowball/tasks/benchmark_compilers/clang_13/bin/clang-13 --target=aarch64-linux-gnu -D_FORTIFY_SOURCE=2 -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src -ICMakeFiles -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins -ICMakeFiles/plugins -fPIC -g -fPIC -Werror -Wall -Wno-address-of-packed-member -O3 -fstack-protector -fno-common -march=armv8.1-a+crc+crypto -MD -MT CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -MF CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o.d -o CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -c /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes_cbc.c In file included from /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes_cbc.c:22: /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes.h:415:40: error: passing 1-byte aligned argument to 16-byte aligned parameter 2 of 'aes128_key_expand' may result in an unaligned pointer access [-Werror,-Walign-mismatch] aes128_key_expand (key_schedule, (u8x16u const *) key); ^ /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes.h:421:40: error: passing 1-byte aligned argument to 16-byte aligned parameter 2 of 'aes256_key_expand' may result in an unaligned pointer access [-Werror,-Walign-mismatch] aes256_key_expand (key_schedule, (u8x16u const *) key); ^ 2 errors generated. Type: fix Fixes: 415b4b0bb ("crypto-native: refactor GCM code to use generic types") Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Reviewed-by: Tianyu Li <tianyu.li@arm.com> Change-Id: Ic99a63526031e60760929238922a6e4547388368
2021-12-14misc: vppctl fix heap-buffer-overflow & memleaksTianyu Li1-0/+8
1. Malloc may return not zero buffer, causing strncat buffer overflow 2. Malloc buffer not freed Type: fix Fixes: 31f192434660 ("misc: vppctl - remove the dependency on vppinfra") Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I5aebaccf3d0f8b7e3617068267f62cc2aa39d827
2021-12-14vxlan: crash on configuring vxlan tunnel on l3 modeSteven Luong2-7/+9
Configure a vxlan tunnel using this CLI and then assign an ip address to the vxlan tunnel cause VPP to crash immediately create vxlan tunnel src x.x.x.x dst y.y.y.y vni 1000 decap-next node ethernet-input l3 set interface ip address vxlan_tunnel0 z.z.z.z/24 It looks like when l3 mode is configured, the code calls the wrong function to register the interface Type: fix Fixes: 3e38422ab905d26ab1625c74268e30c94327ea54 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie1a08efc028f37fb528a7dfd7048ff6836bb8ddc
2021-12-14api: verify message size on receiptKlement Sekera16-88/+280
When a message is received, verify that it's sufficiently large to accomodate any VLAs within message. To do that, we need a way to calculate message size including any VLAs. This patch adds such funcionality to vppapigen and necessary C code to use those to validate message size on receipt. Drop messages which are malformed. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I2903aa21dee84be6822b064795ba314de46c18f4