aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
AgeCommit message (Collapse)AuthorFilesLines
2021-11-08perfmon: fix iio-bw coverity issuesRay Kinsella1-3/+1
Fixes an number of coverity issues associated with the iio-bw feature. Type: fix Fixes: e15c999c3 Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9ad2b336694132545d90a3483200a510226e9198
2021-11-07crypto-native: fix uninitialized variableGabriel Oginski1-1/+1
Type: fix Fixed coverity-issue CID 208547. Originally using uninitialized value when calling one function. This patch fixes the problem by initializing value for one variable. Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com> Change-Id: Iccfae1e825b4ca4d95a6f724d9b5c51c5addd1b2
2021-11-07perfmon: numa node list probing should use '/online' instead of '/has_cpu'Xiaoming Jiang1-1/+1
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I85e41d58884af71afba960d20604bb1b01876d26
2021-11-06unittest: remove clib_count_equal_* testsDamjan Marion1-97/+3
Due to multiarch nature of that code, those tests doesn't bring much value. New tests will be addes as part of refactor. Type: refactor Change-Id: I41056dc99d08cd6ca38f9e00e8cf6a465c90edb7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05dpdk: remove dead codeDamjan Marion1-4/+1
Type: refactor Change-Id: I76ccf8970ebb3f180ce745d8b515c5e0724784d6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05snort: default logging level should not be debugDamjan Marion1-1/+0
Type: fix Fixes: 839b147 Change-Id: I6315c866237ddc65a8d67e412c6eb70396c8172f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05snort: fix unused result warning for gcc-10Tianyu Li1-2/+1
make build-release CC=gcc-10 src/plugins/snort/daq_vpp.c:606:14: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 606 | (void) read (qp->enq_fd, &ctr, sizeof (ctr)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc void cast cannot suppress __attribute((warn_unused_result)), use __attribute__((unused)) instead. Type: fix Fixes: 839b1473e968 ("snort: snort3 plugin and DAQ") Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I7c7c8c2dbdc47c200b091c23ec2d992266596992
2021-11-05unittest: gcc-11 errors for clib_strcpy, clib_strstr, clib_strcat, and ↵Steven Luong1-340/+30
clib_strncat There are 3 versions of the string functions. For example, for strcpy, they are 1. strcpy(dst, src) -- the legacy unsafe version 2. strcpy_s(dst, dmax, src) -- C11 safeC version which has an addition argument named dmax. 3. clib_strcpy(dst,src) -- clib version to enable legacy code that uses strcpy to make use of strcpy_s without adding the additional argument, dmax, which is required by the C11 safeC version. The implementation for the clib version is to artificially provide dmax to strcpy_s. In this case, it uses 4096 which assumes that if the legacy code works without blowing up, it is likely to work with the clib version without problem. gcc-11 is getting smarter by checking if dmax is within the object's boundary. When the object is declared as static array, it will flag a warning/error if dmax is out of bound for the object since the real size of dst can be determined at compile time. There is no way to find the real size of dst if the object is dynamically allocated at compile time. For this reason, we simply can't provide support for the clib version of the function anymore. If any code is using the clib version, the choice is to migrate to the safeC version. Type: fix Fixes: b0598497afde60146fe8480331c9f96e7a79475a Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I99fa59c878331f995b734588cca3906a1d4782f5
2021-11-03wireguard: reduce memcopy and prefetch headerGabriel Oginski6-35/+48
Originally wireguard implementation does memory copy of the whole packet in encryption and decryption. This patch removes unnecessary packet copy in wireguard. In addition, it contains some performance improvement such as prefetching header and deleting unnecessary lock and unlock for decryption. Type: improvement Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com> Change-Id: I1fe8e54d749e6922465341083b448c842e2b670f
2021-11-03linux-cp: Cleanup any existing pairs when an interface is deletedNeale Ranns1-0/+17
Type: fix This only happens when the user deletes the physical before they delete the pair, that's not supoosed to be the case, but don't crash if it is. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8c2317b360d897775dde23833d04430f88531cbd
2021-11-02snort: fix inconsistent snort input modeSivaprasad Tummala1-1/+2
Type: fix Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: If42bb9924fa8298b5fac679bc1f2dc1f5b1ad58c
2021-11-02build: remove unnecessary executable bitsRay Kinsella15-0/+0
Run 'find src -executable -type f', remove unnecessary executable bits from the source tree. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I070e22c8fb2ef8712bc3ea620727ee5ab3d9a9fb
2021-11-02perfmon: added bundle to measure pci bandwidthRay Kinsella2-0/+259
Added an Intel Ice Lake specific bundles to measure pci bandwidth through the Intel IO PMU. The "PCI" bundle measures read/writes from pci devices. The "CPU" bundle measure read/writes from cpus to pci devices. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Id48cef5988113e8dc4690b97d22243311bfa7961
2021-11-02perfmon: added intel internal io pmu supportRay Kinsella2-9/+82
Added support for the Intel Internal IO Uncore PMU, along with the ability to format PMU Unit specific names. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I2939f8ade5e5ed63ccf7f3ccd0279d7c72e95a6e
2021-11-02flowprobe: missing headerDamjan Marion1-0/+1
Change-Id: I7a6df4317beed78e394dc4ba8edd350ca5b2bc80 Type: fix Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02build: clang-13 supportDamjan Marion2-2/+2
Type: make Change-Id: I20770650d7e0475ee7791da4d5df941792bf7741 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02lisp: fix outside array boundsDamjan Marion1-1/+1
Reported by gcc-11... Type: fix Change-Id: I30262f6496217335aa45cca2f541846a69bc15ee Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-10-31interface: handoff refactor and optimizationsFlorin Coras3-3/+0
- move existing ethernet hash functions to hash infra (no l4 awareness) - refactor code to use hash infra and add apis to request l4 aware hashing functions - hashing functions per interface - code cleanup Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia9f44db98d83f0f027aeb37718585a2e10ffd2c6
2021-10-30nat: fix coverity warningKlement Sekera1-1/+1
Fix coverity warning by initialising proto variable to a dummy value. This value is never used because consuming function uses this parameter value only if is_addr_only flag is not set and this flag is always set if proto value is not provided by user. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I041bc821a392f0746ef9f07f9b259d62884305b7
2021-10-28vrrp: fix coverity warning/NULL dereferenceKlement Sekera1-4/+25
Add error handling for unlikely case where getting IP address of an interface fails. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ief8642af79fb1d25f061357cd716b93cfdf23fc8
2021-10-28perfmon: fix coverity warningKlement Sekera1-0/+8
Check that cpumask is initialised properly to avoid possible NULL pointer dereference. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I8df5a718104fe703d6baf3f1294b4a6d2ca01619
2021-10-28ioam: fix coverity warning/NULL dereferenceKlement Sekera1-9/+12
Add a NULL check and missing array index to avoid multiple NULL derefences. Runnning: set ioam ip6 sr-tunnel-select disable on a fresh VPP no longer crashes. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ia85f92024f3b14ef1c4cdb9fcf794b962cad9422
2021-10-27tcp: fix use of invalid local sw_if_indexFlorin Coras1-4/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id58ac44d45fb8b8a0d803f02e0242ec6f4b3db05
2021-10-26perfmon: properly unmap mmapped pagesKlement Sekera1-1/+1
Add missing array index so that actual mmapped pages are unmpapped instead of attempting to unmap array holding those pages. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ib8709cce1bcbfb505307c140266834b284af796c
2021-10-22session: fix minor issueFilip Tehlar1-1/+1
Type: fix Change-Id: I2f7579980f081d3b0a8d19baade0a6599d55cf80 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-10-21fib: respect mfib entry flags on create with pathsPaul Atkins8-122/+88
When an mfib entry was created with both paths and entry_flags then the entry flags were being ignored. If there are no paths then the flags were passed into mfib_table_entry_update, but in the case where the entry didn't exist and there were paths and flags, the entry was created within mfib_table_entry_paths_update() which used a default of MFIB_ENTRY_FLAG_NONE. Pass the flags through into the mfib_table_entry_paths_update fn. All existing callers other than the create case will now pass in MFIB_ENTRY_FLAG_NONE. Type: fix Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: I256375ba2fa863a62a88474ce1ea6bf2accdd456
2021-10-20gso: add support for gso perf unittestMohsin Kazmi2-0/+380
Type: test Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I5d44a6ea24e4aa0842024a0961f1fb22c6e6419a
2021-10-20nat: nat44-ei configuration improvementsFilip Varga6-1027/+1574
nat44-ed core configuration improvements & fixes [0-5] adjusted for nat44-ei plugin. Improvements: * repeating code converted to functions * simplified functions used for pool address, static mapping and interface configuration. Clean up: * remove obsolete code and logic persisted after plugin separation from old SNAT plugin. Fixes: * [0] return correct API behavior changed in [5] Type: improvement [0] https://gerrit.fd.io/r/c/vpp/+/33622 [1] https://gerrit.fd.io/r/c/vpp/+/33431 [2] https://gerrit.fd.io/r/c/vpp/+/33337 [3] https://gerrit.fd.io/r/c/vpp/+/33249 [4] https://gerrit.fd.io/r/c/vpp/+/32796 [5] https://gerrit.fd.io/r/c/vpp/+/32951 Signed-off-by: Filip Varga <fivarga@cisco.com> Change-Id: Ie197faa576cb49acb3d218f14e00cb7d13ad9342
2021-10-20nat: NAT44-ED api fix and improvementFilip Varga4-16/+14
This patch fixes issue with NAT_API_IS_TWICE_NAT and NAT_API_IS_ADDR_ONLY flags. Because of control plane code change - move from boolean parameters to flags in https://gerrit.fd.io/r/c/vpp/+/32796 patch these api flags weren't correctly set. Type: fix Change-Id: Ieec5fe6bdcca314da027f2d23e3a24f174391a6f Signed-off-by: Filip Varga <fivarga@cisco.com>
2021-10-18interface: add api test fileFilip Tehlar2-21/+1
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
2021-10-16memif: Enhance show memif descriptors to display regionSteven Luong1-14/+13
memif descriptors table may have more than one shared memory region. To see whether a descriptor's memory address is valid or not, it is beneficial to also display the descriptor's region. While at it, fix the truncation problem for the offset field. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ia3b7062ac0323c39ade6f3a58333c6405889148f
2021-10-16perfmon: topdown lvl 2 support on sapphire rapidsRay Kinsella2-11/+167
Added topdown level 2 support on sapphire rapids, including ability to indentify a sapphire rapids cpu. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9f99a92fa0886b98bb5185cff32bebd5a094f329
2021-10-16perfmon: additional perf counters on icelakeRay Kinsella2-1/+31
The Intel Icelake uArch supports measuring up to 12 counters, comprised of 4 fixed and 8 general counters. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I68369ea55a0c95d6a4a280a464e69502bbf5474f
2021-10-14pppoe: fix coverity warningKlement Sekera1-6/+12
Initialise variable used in tracing code in case of early error so that tracing doesn't use this uninitialised variable. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I6b1cef07e1f126cee56e1116606869dd667274d2
2021-10-14nat: static mappings in flow hashKlement Sekera27-1475/+1086
Put static mappings in flow hash, drop existing hash tables used for static mappings. Drop refcount variables and use hash table as a single point of truth. Allow creating a static mapping conflicting with dynamic mapping, which will take precedence after dynamic mapping is freed, so that the existing flow can finish transferring data. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Idfde8efabc09971be38921d4b0ca5ccf4e9fe412
2021-10-14misc: fix coverity warning in ila pluginKlement Sekera1-1/+1
Remove non-null check for a pointer which cannot be null to avoid dead code warning. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I5ff40a4f80db7bb0dff9928c90ff757b763902fd
2021-10-13docs: convert plugins doc md->rstNathan Skrzypczak56-3184/+3706
Type: improvement Change-Id: I7e821cce1feae229e1be4baeed249b9cca658135 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-13nat: fix coverity warningKlement Sekera1-1/+1
Fix coverity warning by initialising proto variable to a dummy value. This value is never used because consuming function uses this parameter value only if is_addr_only flag is not set and this flag is always set if proto value is not provided by user. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I9b5e8c08346bea1e2b460bb09e962c4b8d3b6947
2021-10-13nat: fix static mapping segvJoshua Roys1-1/+1
Adding a nat44 static mapping during startup on a DHCP interface leads to a segv via this path: - dhcp_client_acquire_address - ip4_add_del_interface_address - ip4_add_del_interface_address_internal - nat44_ed_add_del_interface_address_cb - nat44_ed_add_static_mapping - ip4_interface_first_address Type: fix Signed-off-by: Joshua Roys <roysjosh@gmail.com> Change-Id: I38dac8a096b052550f2b87b4e13a950d2cd868b0
2021-10-13dpdk: fix vmbus device name parsingBenoît Ganne1-2/+3
unformat_init_vector() expects a vector, not a NULL-terminated C-string. Type: fix Change-Id: I20a266243f63d94b0c6fe24e25ee8346c08c8ff2 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-10-12dhcp: fix coverity warningFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2367e86fb22176881d118342f6e991dbc708b1f2
2021-10-12unittest: fix crypto key len coverity warningFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id41e22345be3ec401813ba43ddc7d92666784eb4
2021-10-12memif: fix the memif crash when slave disconnectMohsin Kazmi1-1/+2
Type: fix Fixes: 3effb4e63068 ("memif: integrate with new tx infra") memif is recently integrated with new tx infra. But it introduces a crash when slave disconnect from master but interface is not deleted. Disconnect routine was missing unregister of all tx queues. This patch fixes it. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I81c59cc1a03561248ec8595d5e3caa54f421833e
2021-10-12Revert "nat: static mappings in flow hash"Ole Troan27-1058/+1457
This reverts commit 69b7599e4b061a8996205f0304232ede84cb70d4. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: If531b122ae5a9f91c2fe6eaa0da69922a91f16d3
2021-10-12nat: static mappings in flow hashKlement Sekera27-1457/+1058
Put static mappings in flow hash, drop existing hash tables used for static mappings. Drop refcount variables and use hash table as a single point of truth. Allow creating a static mapping conflicting with dynamic mapping, which will take precedence after dynamic mapping is freed, so that the existing flow can finish transferring data. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ieeba691d83a83887d0a0baccd5f3832f66126096
2021-10-11l3xc: skip load balancing if not multipathBenoît Ganne1-5/+5
Type: improvement Change-Id: I3d8e1c7a83530bbc4b1751358ad7d034476ff13f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-10-11ip: fix fib and mfib locksNathan Skrzypczak4-12/+7
This patches fixes an issue that could cause fib locks to underflow: if an API user deletes a fib and quickly recreates it, the fib may not have been actually deleted. As a result, the lock would not be incremented on the create call leading to the fib potentially disappearing afterwards - or to the lock to underflow when the fib is deleted again. In order to keep the existing API semantics, we use the locks with API and CLI source as flags. This means we need to use a different counter for the interface-related locks. This also prevents an issue where an interface being bound to a vrf via API and released via CLI could mess up the lock counter. Finally, this will help with cleaning up the interface-related locks on interface deletion in a later patch. Type: fix Change-Id: I93030a7660646d6dd179ddf27fe4e708aa11b90e Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-10-11docs: nitfixes in FEATURE.yamlNathan Skrzypczak6-7/+7
Type: improvement Change-Id: Iec585880085b12b08594a0640822cd831455d594 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-11af_xdp: ensure at least one queue is createdJoshua Roys1-1/+4
Attempting to create an af_xdp interface with zerocopy where the underlying driver didn't support it would lead to a crash due to queue creation silently failing. Type: fix Signed-off-by: Joshua Roys <roysjosh@gmail.com> Change-Id: Ifd9070b8c2b3023d71120c5cf20f7e89d04e4cb3
2021-10-08tls: shutdown openssl context on app closeFlorin Coras1-0/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie0fde16fb4e41637169474628808fddf343884f3