aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/drop.c
AgeCommit message (Collapse)AuthorFilesLines
2022-09-09vlib: don't leak node frames on reforkDmitry Valter1-1/+1
Free node frames in worker mains on refork. Otherwise these frames are never returned to free pool and it causes massive memory leaks if performed under traffic load Type: fix Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru> Change-Id: I15cbf024a3f4b4082445fd5e5aaa10bfcf77f363
2022-08-29vlib: use error description when dropping packetsArthur de Kerhor1-1/+1
Using the error name makes it less explicit in the packet trace than the error description when a packet is dropped. Example of the trace when the TTL is <=1: 01:03:17:015278: drop ip4-input: time_expired We should have "ip4 ttl <= 1" instead of "time_expired" Type: fix Change-Id: Ic9decf10d609cc938e39d0f449359e41c406267e Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2022-06-07vlib: fix crash on packet on deleted interfacePim van Pelt1-3/+6
If ip4_neighbor_probe (or any other) is sending packet to a deleted interface, ASSERT trips and dataplane crashes. Example: create loopback interface instance 0 set interface ip address loop0 10.0.0.1/32 set interface state GigabitEthernet3/0/1 up set interface state loop0 up set interface state loop0 down set interface ip address del loop0 10.0.0.1/32 delete loopback interface intfc loop0 set interface state GigabitEthernet3/0/1 down set interface state GigabitEthernet3/0/1 up comment { the following crashes VPP } set interface state GigabitEthernet3/0/1 down This sequence reliably crashes VPP: (gdb)p n->name $4 = (u8 *) 0x7fff82b47578 "interface-3-output-deleted” If the interface doesn't exist, return ~0 and be tolerant of this in the two call sites of counter_index() Type: fix Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I90ec58fc0d14b20c9822703fe914f2ce89acb18d
2021-11-06vppinfra: move clib_count_equal_* codeDamjan Marion1-0/+1
Type: refactor Change-Id: Ib9e8abdbf745ad6563fc79c9ebb6b2ea65917d08 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-13stats: counters data modelOle Troan1-1/+1
This adds a new data model for counters. Specifying the errors severity and unit. A later patch will update vpp_get_stats to take advantage of this. Only the map plugin is updates as an example. New .api language: A new "counters" keyword to define counter sets. counters map { none { severity info; type counter64; units "packets"; description "valid MAP packets"; }; bad_protocol { severity error; type counter64; units "packets"; description "bad protocol"; }; }; Each counter has 4 keywords. severity, which is one of error, info or warn. A type, which is one of counter64 or gauge64. units, which is a text field using units from YANG. paths { "/err/ip4-map" "map"; "/err/ip6-map" "map"; "/err/ip4-t-map" "map"; "/err/ip6-t-map" "map"; }; A new paths keyword that maps the counter-set to a path in the stats segment KV store. Updated VPP CLI to include severity so user can see error counter severity. DBGvpp# show errors Count Node Reason Severity 13 ethernet-input no error error Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib2177543f49d4c3aef4d7fa72476cff2068f7771 Signed-off-by: Ole Troan <ot@cisco.com>
2019-07-31vlib: fix format_error_traceDave Barach1-1/+2
Error index calculation is error_code + error_node->error_heap_index. Type: fix Fixes: gerrit 20802 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I66cf05a29b3cfd9ef9c5468e399290e862b784af
2019-07-23vlib: address vlib_error_t scaling issueDave Barach1-6/+6
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>
2019-03-13Move the punt/drop nodes into vlibNeale Ranns1-0/+283
The core VLIB library now has a means to dispoe of buffers. the vlib punt/drop node counts node errors. the vnet punt/drop node counts interface errors. speed up both nodes with the usual reciepe. before: error-drop 8.33e1 after: drop 4.51e1 error-drop 6.81e0 Change-Id: If2e919458a3f2e9d71dbf9c6f1352dafb186a05b Signed-off-by: Neale Ranns <nranns@cisco.com>