aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-02-06ipsec: fix AES CBC IV generation (CVE-2022-46397)stable/1904Benoît Ganne2-2/+30
For AES-CBC, the IV must be unpredictable (see NIST SP800-38a Appendix C). Chaining IVs like is done by ipsecmb and native backends for the VNET_CRYPTO_OP_FLAG_INIT_IV is fully predictable. Encrypt a counter as part of the message, making the (predictable) counter-generated IV unpredictable. Fixes: VPP-2037 Type: fix Change-Id: If4f192d62bf97dda553e7573331c75efa11822ae Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-29misc: fix the MAKE_PARALLEL_JOBS for 'make verify' targetAndrew Yourtchenko1-4/+2
MAKE_PARALLEL_JOBS was prepending "-j", which in case of nested targets like "verify" resulted in ninja being executed with "-j -j" flags. Solution: prepend -j only at the moment of setting the MAKE_PARALLEL_FLAGS variable, this keeps MAKE_PARALLEL_JOBS intact regardless of depth of the job call tree. Type: make Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I10a69fe527758e5a862852a9f2102aeaca30e88f (cherry picked from commit 56ac770df97065ea705ff2f3070055a410113b9f)
2019-12-17fib: Adjacency walk fix for IPv6Neale Ranns1-1/+1
Type: fix Change-Id: Id3a1950e49d5eb1883af06a14df97e98f55162a8 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit e7ee300923d23b6a6eab42676c8dcce85da89bed)
2019-12-12stats: memory leak with per-node-counters onOle Troan1-0/+3
vlib_node_get_nodes() creates a duplicate node structure which was never freed. Type: fix Fixes: 1ddbc0138b Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib1200854937faaa694b398607d2f0ba65aa81c01 (cherry picked from commit b6fde4a8bae474c6b73d08d223028f42e396d452)
2019-11-14fib: Copy the prefix before use in case the underlying entry reallocs.Neale Ranns3-6/+19
Type: fix all other uses of the fib_entry_get_preifx in the code base don't pass the prefix into recursive functions. Change-Id: Ic1c56acd406a733b215ee2fd98b6bed58b490a4f Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 320dfcf2aa8f4617b51a2bb15f3d0f93ee62d4dc)
2019-10-30vlib: convert frame_index into real pointersAndreas Schultz10-90/+52
The fast path almost always has to deal with the real pointers. Deriving the frame pointer from a frame_index requires a load of the 32bit frame_index from memory, another 64bit load of the heap base pointer and some calculations. Lets store the full pointer instead and do a single 64bit load only. This helps avoiding problems when the heap is grown and frames are allocated below vm->heap_aligned_base. Type: refactor Change-Id: Ifa6e6e984aafe1e2755bff80f0a4dfcddee3623c Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 58b2eb1af562c292feb6d3cdce4656746e61da75)
2019-10-29VPP 19.04.3 docs build infov19.04.4-rc0Dave Wallace1-2/+2
Change-Id: I6f7387f8a79fa4288bc125404b40ebaa44f55fcf Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-10-2819.04.3 Release Notesv19.04.3Dave Wallace1-0/+9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I43a236be5289c50dafbede08beabe4c09ff3c892
2019-10-28ebuild: Unite default build platform to vppjuraj.linkes1-1/+1
Top level makefile is using vpp as the default platform. The other place where platform is specified has native as the default. Unite them to the only currently supported platform - vpp. Type: make Change-Id: Idb12ccc3056dd6be640a2d6763dc30e4f789d2ac Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech> (cherry picked from commit 664ec91fdea75c90c3b9c8086a9a97df32a6f91b)
2019-10-25vlib: address vlib_error_t scaling issueDave Barach7-51/+48
Encoding the vpp node index into the vlib_error_t as a 10-bit quantity limits us to 1K graph nodes. Unfortunately, a few nodes need 6 bit per-node error codes. Only a very few nodes have so many counters. It turns out that there are about 2K total error counters in the system, which is (approximately) the maximum error heap index. The current (index,code) encoding limits the number of interfaces to around 250, since each interface has two associated graph nodes and we have about 500 "normal, interior" graph node This patch adds an error-index to node-index map, so we can store error heap indices directly in the vlib_buffer_t. Type: refactor Change-Id: I28101cad3d8750819e27b8785fc0cf71ff54f79a Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 687c9021fda009caa2b7eb17bea2eaa51d275bde)
2019-10-25devices: vhoost cpu->copy array overflow on tcp jumbo frame (65535 bytes)Steven Luong2-2/+8
We reserve 40 slots in cpu->copy array prior to copy out to avoid overflowing the array. However, 40 is not enough for the jumbo frame because desceiptor buffer len is likely at 1536. Change the reserve to 200 and add ASSERT to avoid encountering the same problem in the future. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ibf0c03c4b4f33e781d5be8679ccd6c3a4b4a646d (cherry picked from commit 7331005c16d0e1499080899b2a0676a0cd945595)
2019-10-23lacp: add actor steady state check prior to skip processing lacp pduSteven Luong4-19/+23
In a rare event, we may be skipping processing lacp pdu's when the it is not in steady state. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0872c49e10bbd3538398030a2aa0fa4c3b7e9426
2019-10-15fib: recursive calculation leads to delegate pool reallocNeale Ranns1-4/+14
Type: fix Change-Id: Ib7ac53d1b59b641ccd3b1d733107d7f1ba174314 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit a66020becd7d01eefea55244cbcf5df9679a9443)
2019-10-07devices: vhost not reading packets from vringSteven Luong2-0/+25
In a rare event, after the vhost protocol message exchange has finished and the interface had been brought up successfully, the driver MAY still change its mind about the memory regions by sending new memory maps via SET_MEM_TABLE. Upon processing SET_MEM_TABLE, VPP invalidates the old memory regions and the descriptor tables. But it does not re-compute the new descriptor tables based on the new memory maps. Since VPP does not have the descriptor tables, it does not read the packets from the vring. In the normal working case, after SET_MEM_TABLE, the driver follows up with SET_VRING_ADDRESS which VPP computes the descriptor tables. The fix is to stash away the descriptor table addresses from SET_VRING_ADDRESS. Re-compute the new descriptor tables when processing SET_MEM_TABLE if descriptor table addresses are known. Type: fix Ticket: VPP-1784 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I3361f14c3a0372b8d07943eb6aa4b3a3f10708f9
2019-10-04bonding: traffic traversing the wrong interfaceSteven Luong1-0/+1
Missing an increment in the while loop. Hashes not stored in the array. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I603027f5a7305478f48a102ac8035ffde9102c53
2019-09-18build: fix rpm python 3 dependsEd Kern1-1/+1
Type: fix Change-Id: Ie6eaccb27779bb14c0a23764a16cd22f0a72e379 Signed-off-by: Ed Kern <ejk@cisco.com>
2019-09-09dpdk: initialize rte_mbuf during mempool dequeueDamjan Marion2-1/+47
In some cases it may happen that buffer is allocated by DPDK, and freed by VPP native code. In such cases dpdk metadata is not reset, so we need to do that during mempool dequeue. Template approach is taken to reduce cost of that operation. Type: fix Fixes: 910d369 Change-Id: Ic239007cfc8fbceb965021c56963cda9d53f63be Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-09-04ethernet: fix dmac check avx2 loop conditionMatthew Smith1-1/+1
In eth_input_process_frame(), a loop which checks the destination MAC address of received packets had a different condition for avx2 than it did for the non-avx2 version of the loop. It could result in one unnecessary execution of the loop body after all packets had been processed. Type: fix Fixes: 8d6f34e2b1cbfde5702e88686631527d5e1e10a0 Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit a6d4e3135b70db1b1df3f8852e1e229d13c24e72)
2019-09-03tap: interface rx counter not increment correctSteven Luong1-1/+1
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Ticket: VPP-1759 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6db042186eeeacf32250f7ef261af8cd6f5ce56e (cherry picked from commit efa119db3910e77f79eb005c67f8c01b473b40a1)
2019-08-30bonding: incorrect RX counters for bond interfaceSteven Luong2-44/+36
show interface does not display the RX counters for the bond interfaces. It displays rx-no-buf instead. The problem is VNET_INTERFACE_COUNTER_RX is a combined counter, not a simple counter. Change the code to use vlib_increment_combined_counter passing it with n_rx_packets and n_rx_bytes. Type: fix Ticket: VPP-1757 Change-Id: I8121ad7e546447049fa13da62481b6c8f5575bec Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit c94afaade0a8fec724d051a202591f5b37dd0f49)
2019-08-26avf: properly set irq queue masksSteven Luong1-1/+2
Manual port from master due to conflict. Type: fix Ticket: VPP-1755 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ieb1211f828e60e2bd9e038009939248761cb8370
2019-08-06ip tests: Fixes and UT for MPLS 6PENeale Ranns4-9/+95
Type: fix Change-Id: I48650473591aa181167cf3a86ed2f5da58a81072 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-05ip: fix ip6/udp checksum for pkts using buffer chainingJohn Lo2-4/+15
Fix ip6_tcp_udp_icmp_compute_checksum to work properly for packets with multiple buffers. Fix ip4_tcp_udp_compute_checksum to exit upon detecting error. Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I673547f4479d72cd60757383343fc562cff10265 (cherry picked from commit 3bc6bc21fb79a9da4ec674f5e6a3303e7e2be625)
2019-07-31fib: Add some path-list flags to its keyNeale Ranns2-1/+11
Type: fix Ticket: 1729 The flags that are permanently set on a path-list should form part of its key in the path-list DB. Otherwise, if shared, they will not behave as expected. Change-Id: I0aa7c7c5d270c97b08014e4a47ddbdcee2358706 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 80d1ef96f92c15f4fd357af9845a0a3c602c2ffe)
2019-07-2419.04.2 Release Notesv19.04.2Dave Wallace1-0/+9
Change-Id: I1ee3909e042e56fd4caf3732762e9a9276aa6db1 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-07-24api: binary api cleanupDave Barach23-41/+91
Multiple API message handlers call vnet_get_sup_hw_interface(...) without checking the inbound sw_if_index. This can cause a pool_elt_at_index ASSERT in a debug image, and major disorder in a production image. Given that a number of places are coded as follows, add an "api_visible_or_null" variant of vnet_get_sup_hw_interface, which returns NULL given an invalid sw_if_index, or a hidden sw interface: - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || memif_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a memif interface"); Rename two existing xxx_safe functions -> xxx_or_null to make it obvious what they return. Type: fix Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 3940de36728b768574a3e998389bb90d55f690d1)
2019-07-23devices: vhost handling VHOST_USER_SET_FEATURESSteven Luong1-0/+1
Some combinations of new qemu (2.11) and old dpdk (16.10) may send VHOST_USER_SET_FEATURES at the end of the protocol exchange which the vhost interface is already declared up and ready. Unfortunately, the process of VHOST_USER_SET_FEATURES will cause the interface to go down. Not sure if it is correct or needed. Because there is no additional messages thereafter, the hardware interface stays down. The fix is to check the interface again at the end of processing VHOST_USER_SET_FEATURES. If it is up and ready, we bring back the hardware interface. Type: fix Change-Id: I490cd03820deacbd8b44d8f2cb38c26349dbe3b2 Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 545866b5b3115b7de114bdb7883f5ece59b702d4)
2019-07-23api: Disable tracing of memclnt_keepalive messagesDave Barach1-6/+11
A waste of binary API trace space; an otherwise idle control-plane will eventually fill the api trace buffer with them. Type: fix Ticket: VPP-1725 Change-Id: Id8338ea4070cd76481595005986efc558f0694e6 Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-22gso: Fix the l3 packet gso segment sizeMohsin Kazmi2-1/+9
Type: fix Ticket: VPP-1721 Change-Id: I7a5d4f1440048ddc9f599ac11d06e5a7df20440e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 0f09a47f10e29cabeb98f571e5c4f0c18a54564d)
2019-07-18misc: 19.01.3 Release NotesAndrew Yourtchenko1-0/+9
Type: docs Change-Id: I3f9d243d6f5d99faea67c24c9bf5c42c7a4dc3b0 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-07-11ip: Punt node does not free iovecsNeale Ranns2-9/+19
Type: fix Fixes: f7a55ad74c Change-Id: Ic3474e746887f880a8f6246bebc399715bac8e80 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11ipsec: Revert "IPSEC: remove byte swap operations in DP during SPD classify"Neale Ranns5-31/+35
Type: fix Fixes: 231c4696872cb344f28648949603840136c0795d This reverts commit 231c4696872cb344f28648949603840136c0795d. Change-Id: I136344555983dd10a31dbc000ee40e2de2c91291 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11ipsec: Revert "IPSEC: remove double byte swap of IP addresses"Neale Ranns1-10/+18
This reverts commit 9b208ced585d3b4620d6fde586cd047fe2027ecf. Type: fix Fixes: 9b208ced585d3b4620d6fde586cd047fe2027ecf Change-Id: I94a17039b4727bff0877423da5ba6cfceb188b17 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit d2029bc9c5947a8a676208bada9386e07ec16c97)
2019-07-08VPP-1718: fix dangling reference to stats seg directoryDave Barach1-0/+2
Change-Id: If6da62e5a49064ba27a3e0bb6e5d31b9b4d04ea3 Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-03dlmalloc: honor 8 byte alignment requestsFlorin Coras1-1/+1
Change-Id: Ie504603c2e42cae3ad592952b2b166919420e5f7 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit f5dc9fbf814865b31b52b20f5bf959e9ff818b25)
2019-07-02tcp: reject out-of-order finsFlorin Coras1-0/+4
Type:fix Change-Id: Iab2c308739f7733dbf70953e0ea87dcc404c60da Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit f73d4c2084c9cb6df4a1f8582acef523e4ba0cb2)
2019-06-28tcp: fix close-waiting check for outstanding tx dataFlorin Coras1-1/+2
Type: fix Change-Id: I9e0e1bb933c38b17ac9fb8bf11b81e2fed021bf8 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 182bbc1c5ab3d8607153dd19f0a24baaf5cbfc88)
2019-06-26avf: fix clear hw statsFilip Tehlar3-2/+14
AVF plugin is missing a handler for clearing stats. This patch will implement it. Ticket: VPP-1701 Type: fix Change-Id: If4b4354da442065896bb001deda23f64ddc18fb4 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-06-24avf: fix adminq enqueue errorsDamjan Marion2-5/+9
Type: fix Fixes: b4ff07a Change-Id: I2578ae3e093961fa8765568b5fedcf75ae9487f6 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit 39488c8d3064f8940ec4f826629ebb700649e6b5)
2019-06-21stats: fix memory leakage when adding / deleting interfacesOle Troan2-13/+30
This fixes two leaks in registering errors in the stats segment. - The error name created by vlib_register_errors() was not freed. - Duplicate error names (when interface readded) was added to the vector. Change-Id: If5fe371e8059cf6678fc785cbf673707b4f4a655 Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-21interface: fix the incorrect sizes/offsets in the tso segmentationAndrew Yourtchenko1-2/+2
The copying of the first segment copied too small amount of data. The copying of the second and subsequent segments used the wrong data offset - for the case of GSO enabled it starts from 12 bytes earlier. Change-Id: I3adc532c175babc1ca1e121c7e12e6cafbdb9974 Type: fix Ticket: VPP-1700 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 4f740c8f0085c0cd576744c00bf50a9d9b111470)
2019-06-18vppinfra: dlmalloc records wrong offset for tracingWei CHEN1-1/+1
Fix a bug that mheap_get_trace is called with the wrong pointer when mspace_get_aligned allocates a chunk with alignment greater than 16 but less than 4k. Type: fix Change-Id: Ic3b91fc9532248482662f019bbfa073da18645ed Signed-off-by: Wei CHEN <weichen@astri.org> (cherry picked from commit 5e282e93ad9f961d332cac9a033be33542979848)
2019-06-18acl vnet vlib: memory leaksSteven Luong3-11/+14
Fix memory leaks in acl, vnet, and vlib components. Type: fix Change-Id: I61c84ebbacbbf3215db0d4aaa7699e8d5f8df2da Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 4221c8de596f3f3f66b4cbb36ad2d0c23486030c)
2019-06-18vppinfra: optimize elog_stringDave Barach2-5/+33
Add a string hash to make sure that strings in the string table are unique. This optimization has been coded piecemeal in multiple places, we should have made the underlying function do the work years ago. Ticket: VPP-1707 Type: fix Change-Id: I5010fd4926b9b80ce3a168748f6de64e333ef498 Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-17vlib: cherry-pick "memory-trace stats-segment"Dave Barach6-61/+225
and "leak-check { <debug-cli-cmd> }" Ticket: VPP-1703 Type: feature Change-Id: Ie020fd7e2618284a63efbeb9895068f27c0fb9ab Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-12NAT: interface fib fix (VPP-1691)Filip Varga1-8/+16
Change-Id: I2d1e2addb2e440c23c255ac7709169f7909cb0be Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-06-06avf: enable promiscuous modeSteven Luong3-1/+18
In order to receive multicast packets from the VF interface, promiscuos mode must be enable. Type: fix Fixes: b4ff07a Change-Id: I549bc37a05895d3355f2832c200e9262c95a27b5 Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 607a23a1753ee8dc7e9150f09bb376553ed62639)
2019-06-06Fix stat seg average vector rate computationDave Barach2-14/+53
Add the number of worker threads and per worker thread vector rates to the stats segment. Change-Id: I3040108ec9fcdf5fdb6b9a950060dea9b3c88fd1 Signed-off-by: Dave Barach <dbarach@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit f89a6de8f032536080c4a11b267bf921093d3740)
2019-06-03tcp: handle disconnects in rcv-processv19.04.2-rc0Florin Coras1-0/+1
Change-Id: I005f96480e81f3e750c18261e78d0e401da7528e Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 79fdfd61245a112ff08f5c3bc3fb1afd5db55fb9)
2019-05-31VPP-1692: move NULL pointer checkv19.04.1Dave Barach1-5/+5
TBH, this looks like merge damage or some such. Perfectly fine NULL pointer check, about three lines after it was needed. Change-Id: I52831062e30533a59fb76b644ee5ae389676d2ae Signed-off-by: Dave Barach <dave@barachs.net>