summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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-02vlib: retrieve the root bus of a given pci deviceRay Kinsella3-3/+70
Added a function to parse sysfs, determine the root bus & domain of a given pci device. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I36778116ecaa2d591617450fe5ae0bdb46b4424b
2021-11-02vlib: add format pci link portRay Kinsella2-0/+14
Added a function to nicely format pci link ports. Similar to the existing link_speed etc format functions. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ic1f104e0cb34dad274f6c959e776a32c0bab697d
2021-11-02vlib: allocate pci product_name with vec_allocRay Kinsella1-1/+1
The pci device product_name array was being allocated with vec_validate, not vec_alloc. This was allocating an additional byte at the end of the array, which was causing a spurious '\0' to be returned in the middle of format strings. Type: fix Fixes: cef87f1a5e Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I21e0aa4f0455ee03bd0acc675d0deae02eddea2b
2021-11-02vppinfra: initial RISC-V supportDamjan Marion4-1/+65
Type: feature Change-Id: I1314d60fc420366526efaddd1ed215cf5f8b75dd Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02interface: avoid dependency on crc32 for eth handoffFlorin Coras3-21/+32
Make sure the infra works on platforms without crc32, like risc-v Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5f267497bb4e73a91a5320822ca42388f1f8b037
2021-11-02ip: fix build without vector unitDamjan Marion1-0/+13
Change-Id: I102f84d6d72a7f17e62fb8c16a1d4a3234753476 Type: fix Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02classify: fix build on systems without crc32f and vector unitDamjan Marion1-2/+6
Change-Id: I4229239ed6b81c10362faa1aa9f658c3fccfd31b Type: fix Signed-off-by: Damjan Marion <damarion@cisco.com>
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 Marion3-2/+3
Type: make Change-Id: I20770650d7e0475ee7791da4d5df941792bf7741 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02l2: fix outside array bounds errorsDamjan Marion2-2/+2
Reported by gcc-11... Type: fix Change-Id: Ia00001a6334722a6ae9cc771e6861c1f709df286 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-11-02vppinfra: add CLIB_ASSUME() macroDamjan Marion1-0/+7
This macro privides a way to tell compiler that it is safe to assume that specified expression is true so it can optimize code accordingly. i.e. CLIB_ASSUME (n < 3); while (n) { /* ... */ } Will tell compiler that n is never going to be >= 3 so instead of creating loop it will just unroll loop 2 times. Type: improvement Change-Id: I718a9b95ff7980d7ac68eb9a88357a4ab6eee74a Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02tcp: fix uninitializad valueDamjan Marion1-1/+1
May not be valid error but gcc-11 complains. Type: fix Change-Id: I207b8b4966c5eadd534495e29c873663249a377f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02vppinfra: fix calljmp testDamjan Marion1-14/+12
Change-Id: Id1b380880c6509d983727f6fb57e7db97e66655a Type: fix Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02hash: check if crc32c is availableDamjan Marion1-0/+4
Type: fix Change-Id: I2f87ed4b151ecd5034b69d6f060626be6fd74e85 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-10-31ipsec: silence gcc-11 parentheses warningDamjan Marion1-1/+1
Type: fix This reverts commit 5ecda99d673298e5bf3c906e9bf6682fdcb57d83. Change-Id: I393c7d8a6b32aa4f178d6b6dac025038bbf10fe6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-10-31interface: handoff refactor and optimizationsFlorin Coras6-65/+171
- 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-30build: add missing fib headers in packagesBenoît Ganne2-0/+9
Type: fix Fixes: d6953332db225d5355f50348ef3b09f0525d5282 Change-Id: Ib85fee40e71ebe5bc2b84c62e37298b5e390d520 Signed-off-by: Benoît Ganne <bganne@cisco.com>
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-29policer: fix coverity warning/NULL dereferenceKlement Sekera1-2/+10
Add a NULL check in case of hash lookup failure to make coverity happy. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I3cfa5960458d3618f1277ba442b4ca5ca15064ea
2021-10-29devices: default mode eth in the apiNathan Skrzypczak2-2/+4
Type: fix https://gerrit.fd.io/r/c/vpp/+/34027 added support for l3 mode, but as the eth_mode constant was set to 1 we did default to l3 mode in the api. This reverts to the original logic. Change-Id: If8b90b300d3868de5233dfa1f33ec975853cba11 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-28interface: refactor interface output node in different processing levelsMohsin Kazmi1-13/+9
Type: refactor Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I4f29e6118630146876b7f58f1afe6b6733401047
2021-10-28ip: improve csum fold on x86_64Damjan Marion1-1/+15
New code seems to be 1.5 clocks faster. old: mov eax,edi shr rdi,0x20 add rdi,rax movzx edx,di shr rdi,0x10 add rdx,rdi movzx eax,dx shr rdx,0x10 add rax,rdx mov rdx,rax shr rdx,0x10 add eax,edx new: mov rax,rdi shr rax,0x20 add eax,edi mov edi,0x10 shrx edi,eax,edi adc ax,di adc ax,0x0 Type: improvement Change-Id: I3c565812c67ff4c3db197a9d4137a6c131b5b66c Signed-off-by: Damjan Marion <damarion@cisco.com>
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-28tap: handle null namespace and bridge correctlyMatthew Smith1-2/+4
Type: fix In tap_create_if(), if args->host_namespace or args->host_bridge are null because no values were set for those, the virtio_if_t entry in virtio_main.interfaces ends up getting populated with values of "(nil)" in net_ns or host_bridge, respectively. Check whether args->host_namespace and args->host_bridge are null before trying to set the corresponding fields on virtio_if_t. Change-Id: I8e1e66a6d7b246e7c66fece406d116ffb1312c64 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-10-28vppinfra: A bitmap copy functionNeale Ranns1-0/+18
Type: improvement Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Id7a7788b41dbcf280e025e5256c41729b0c95f39
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-27devices: fix coverity warning/don't leak fdKlement Sekera1-1/+2
Move socket creation past code which returns from function to avoid leaking the socket in case of an early error return. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I9e18bd32022441c17ca920d1c2458b058b76c3c0
2021-10-27tcp: fix use of invalid local sw_if_indexFlorin Coras2-5/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id58ac44d45fb8b8a0d803f02e0242ec6f4b3db05
2021-10-27vppinfra: improve clib_array_mask_u32Damjan Marion1-33/+52
Type: improvement Change-Id: Ibdb79a0a1c3ba56f9b2f0f2536aafcdeda5cb6d6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-10-27vppinfra: use bzhi in pow2_mask when availableDamjan Marion1-0/+3
Saves one clock.... Type: improvement Change-Id: I43da40fb4887b77ac851f759c50a7ca2814f8f40 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-10-27api: fix buffer overflow in vl_msg_replay_jsonBenoît Ganne1-0/+4
cJSON_Parse() and vlib_cli_output() expect a NULL-terminated C-string. Type: fix Fixes: 36217e3ca8a1ca2e7a341b6b44ffc25e6497191c Change-Id: Id9819314fcd332c6076d1330b3433885fff07e36 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-10-27libmemif: fix gcc strict-proto errorMatthew Giassa1-3/+3
- Changing function prototypes for a couple libmemif functions so that gcc will successfully compile with the "-Wstrict-prototypes" flag enabled. - Re-ran unit tests via "make test" locally on Ubuntu 20.04 LTS x64. One issue (likely unrelated to patch): * Testcase name: Bidirectional Forwarding Detection (BFD) ERROR: put session admin-up and admin-down [test_bfd.BFD4TestCase.test_admin_up_down] Type: fix Change-Id: Ibcb7210873d39aec9348fe8ac7eebc78d089d8e0 Signed-off-by: Matthew Giassa <mgiassa@cisco.com>
2021-10-26crypto: add barrier in crypto key addGabriel Oginski1-0/+12
Originally the pool of keys can be expand and cache with pointer for key can be invalid. For example in Wireguard during handshake process this pool can be expand and pointer for these keys in cache can be invalid for workers or can has incorrect value (poison memory). The fixes add barrier if the pool needs be to expand to ensure that cache in function will be valid and avoid situation when cache has invalid pointer for these keys. Type: fix Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com> Change-Id: Ida8f300213dfebb91ecaf1937fb08de81c20ba7b
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-25tcp: fix: TCP timewait port reuse rfc complianceMichal Kalderon2-4/+84
This patch provides a fix for early-kill of timewait sockets that is based on rfc's 1122, 6191. The following commits provided a solution for port re-use. However, they are not fully compliant with rfc 1122 4.2.2.13 ( Closing a connection ) and rfc 6191 (Reducing the TIME-WAIT State Using TCP Timestamps) commit b092b77cf238ba ("tcp: Enable TCP timewait port use") introduced a significant improvement by enabling TCP timewait port re-use. commit ee1cb469b2dd ("tcp: fix port reuse with multiple listeners") fixed usage of the wrong value for connection_index when searching for a listener, by storing the state in tcp.flags. Implementation details: When a SYN is received during time-wait state, the code checks whether all the requirements for accepting the SYN packet are met. If they aren't, the SYN can't be accepted and the packet is dropped, otherwise, connection is deleted and a new connection with same port is opened. Type: fix Signed-off-by: Ofer Heifetz <oferh@marvell.com> Signed-off-by: Yuval Caduri <cyuval@marvell.com> Signed-off-by: Michal Kalderon <mkalderon@marvell.com> Change-Id: I38a33c6e321c760d45ebec9154399e1c90dd0250
2021-10-25bier: Disposition paths don't set the next-hopNeale Ranns1-14/+9
Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3c4152219e5307ac0fe773e16d597f0e4b9a7d4c
2021-10-23arp: fix for source address selectionEd Warnicke1-1/+1
Type: fix Ticket: VPP-1970 Ticket: VPP-1992 Fixes: 9e17887db97bb9f6507270f9fa9923c10816e0df https://gerrit.fd.io/r/c/vpp/+/33495/7 introduced a bug where ND responses are inproperly dropped. This fixes that bug. Signed-off-by: Ed Warnicke <hagbard@gmail.com> Change-Id: Iec4b07646332ced292e2211408c4f7af3088ac28 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2021-10-22vcl: fix cfg parser handling of empty linesFlorin Coras1-0/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibef04947c3a2f4e700233157d581ed54558b51ed
2021-10-22session: fix minor issueFilip Tehlar1-1/+1
Type: fix Change-Id: I2f7579980f081d3b0a8d19baade0a6599d55cf80 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-10-22devices: add support for l3 af_packet interfaceMohsin Kazmi5-37/+106
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ia6b9d4ac55be2216887bfdb99be4021f6a96f166
2021-10-22ipsec: add api test fileFilip Tehlar2-0/+598
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ib3fe4f306f23541a01246b74ad0f1a7074fa03bb
2021-10-22fib: Don't back walk from a path-list when a child fist attaches.Neale Ranns2-12/+18
Type: fix If the walk is triggered when the child is added, then that child is visited in the walk. However, since it is just attahcing to the path-list it may not, or indeed cannot, have all the context it needs to successfully handle the walk. In the case of MPLS tunnel, it does not have the path extensions ready, and cannot since the path extensions need to resolve on the path-list. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I027af8cf2f522d2f6e37931bea60c767f0cb667d
2021-10-21fib: respect mfib entry flags on create with pathsPaul Atkins18-149/+125
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-21ip: Add ip46-local node for local swif[rx]Nathan Skrzypczak5-44/+132
Type: improvement This adds a new ip[46]-receive node, sibling of ip[46]-local. Its goal is to set vnet_buffer (b)->ip.rx_sw_if_index to the sw_if_index of the local interface. In dependant nodes further down the line (e.g. hoststack) we then set sw_if_idx[rx] to this value. So that we know which local interface did receive the packet. The TCP issue this fixes is that : On accepts, we were setting tc->sw_if_index to the source sw_if_index. We should use the dest sw_if_index, so that packets coming back on this connection have the right source sw_if_index. And also setting it in the tx-ed packet. Change-Id: I569ed673e15c21e71f365c3ad45439b05bd14a9f Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-21l2: add api test fileFilip Tehlar2-0/+1419
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ie79a2deac03c04c0697e482a649ff151142126ed
2021-10-21ip6: set local flag on outbound echo replyMatthew Smith1-0/+4
Type: fix When VPP generates an ICMP echo reply in response to an incoming echo request to a local address, set VNET_BUFFER_F_LOCALLY_ORIGINATED on the buffer. It will prevent ip6-rewrite from decrementing the hop limit. Outbound IPv4 echo replies also get this flag set. Change-Id: Iaa229294eb158edb58cf1bf1b7a90da281321406 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-10-21cnat: improve testsNathan Skrzypczak1-737/+562
Type: improvement This is an attempt to make the cnat tests more readable by hiding the scapy packet generation under a common context concept. This in order to add tests covering a wider range of scenarios. As of now, only VIP, snat & DHCP being covered Change-Id: Ia84868984506bbb652fe974e9a6f54f7a3cc0bd9 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>