aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2023-09-06virtio: add support for tx-queue-sizeMohsin Kazmi5-10/+27
Type: improvement DBGvpp# set loggin class virtio level debug DBGvpp# create int virtio 0000:00:03.0 tx-queue-size 1024 show virtio pci ``` Virtqueue (TX) 1 qsz 1024, last_used_idx 0, desc_next 0, desc_in_use 0 avail.flags 0x1 avail.idx 0 used.flags 0x0 used.idx 0 ``` show logging ``` 2022/07/22 23:20:22:557 debug virtio 0000:00:03.0: tx-queue: number 1, default-size 256 2022/07/22 23:20:22:557 debug virtio 0000:00:03.0: tx-queue: number 1, new size 1024 ``` Change-Id: Ib1a3ebe742b3a6c9fe72bd1c5accfe07682cbdd1 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2023-09-06ip: punt add punt socket support for icmp6Ole Troan3-31/+77
Punt support for ICMP6 messages allows for an external IPv6 RA advertisement agent. Type: feature Change-Id: I0cc928b747ac1f8335ee9f7c42a3231424825dbc Signed-off-by: Ole Troan <otroan@employees.org>
2023-09-06api: fix mp-safe mark for some messages and add moreVladislav Grishenko2-10/+15
Several api messages were not mp-safe although marked as such because non-zero base id was not taken into account, and therefore some other (from zero base id) were falsely mp-safe instead. Keep messages as mp-safe, as they falsely were before: 10 get_first_msg_id 0 1 12 api_versions 0 1 Messages that are no longer mp-safe as they weren't marked: 15 sockclnt_create 0 1 33 proxy_arp_intfc_dump 0 1 Fix messages to be really mp-safe: 809 bridge_domain_dump 0 1 920 ip_route_add_del 0 1 921 ip_route_add_del_v2 0 1 1362 get_node_graph 0 1 1671 create_vhost_user_if 0 1 1675 create_vhost_user_if_v2 0 1 Additionally mark messages as mp-safe, seems they need no barrier: 1360 show_threads 0 1 1370 show_version 0 1 1372 show_vpe_system_time 0 1 Type: fix Change-Id: Ie6c1e3aa89f26bf51bfbcb7e7c4d9fee885487b7 Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
2023-09-04udp: buffer packets for connections in accepting stateFlorin Coras1-1/+2
Type: fix Fixes: 0242d30 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6e313000bccce749b813f20a52432154bfd494ed
2023-09-04session: fix allocation of proxy fifosFlorin Coras5-1/+7
Fifos need to be synchronously allocated once a transport like tcp accepts a session. Since events are now delivered asynchronously, proxy apps must explicitly register a cb function that manages fifo allocation prior to being notified of connect event. Type: fix Fixes: 0242d30 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7df973b7014e53e0766ea2bdc61e9871160bc18b
2023-08-31session: fix compilation when SESSION_DEBUG is onFlorin Coras1-3/+7
Wrap SESSION_EVT in do loop to avoid complaints about if statement having no arguments which can happen if debugging for groups is not enabled. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35af179b806ed47a1e20816a19291c31fdb7566a
2023-08-29mpls: add mpls_interface_dumpPim van Pelt2-0/+68
Add an API call mpls_interface_dump() which returns a list of mpls_interface_details: - If no sw_if_index is given, all MPLS enabled sw_if_index are returned. - If a particular sw_if_index is given, and it doesn't exist, an empty list is returned. - If a sw_if_index exists and has MPLS enabled, a list of that one sw_if_index is returned. Tested: - Create 3 loopback interfaces - Call for ~0 and for sw_if_index 0..5 all return empty lists - set int mpls loop0 enable - set int mpls loop1 enable - Call for ~0 returns 2, and the call for sw_if_index=1 and =2 (the loopbacks) returns each a list of one sw_if_index 1 resp 2, the other values of sw_if_index return empty list - set int mpls loop0 disable - Call for ~0 returns 1, and the call for sw_if_index=2 (loop1) returns both a list of one sw_if_index=2, the other values of sw_if_index return empty list - set int mpls loop1 disable - Call for ~0 and for sw_if_index 0..5 all return empty lists Example Python3 API program: ``` api_response = vpp.api.mpls_interface_dump() print(f"Response is {api_response}") for i in [ 0, 1, 2, 3, 4, 5 ]: api_response = vpp.api.mpls_interface_dump(sw_if_index=i) print(f"Response[{i}] = {api_response}") ``` Type: improvement Change-Id: If87f7d7f8972d99260e859757dbcb251c6fa54a8 Signed-off-by: Pim van Pelt <pim@ipng.nl>
2023-08-22l2: fix prefetchVratko Polak1-5/+5
This is a clone of Gerrit 35419. (It is abandoned and I am not the owner so I cannot reopen.) Ticket: CSIT-1816 Type: fix Fixes: 5e0ea09d96010e99a7ce0d2f3370f0de50c46c83 Change-Id: I2265cf38a9ce3155460a1025821c2749afca0add Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-08-21sr: SRv6 Path Tracing midpoint processing performance improvementJulian Klaiber1-2/+4
Moved the kernel call for the timestamp outside of the inner loop to improve the batch proccessing, and minimizing the kernel calls. Type: improvement Change-Id: I0245c223fc8a178724bb8c5df2b98083be046c26 Signed-off-by: Julian Klaiber <julian@klaiber.me>
2023-08-16l2:Add doc for l2 rewrite, and add examplesyanlong1-18/+46
Supplemented the documentation of "l2 rewrite", and added examples Type:docs Change-Id: If49ae0b22989b3cd1c88a27a4e51b74be32d75e7 Signed-off-by: yanlong <dyl_wlc@163.com>
2023-08-11session: fix coverity warningsFlorin Coras1-40/+23
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I910c8ce1713c6d346cc5ea4eb58a89c1c30a10a1
2023-08-09session: async rx event notificationsFlorin Coras15-607/+851
Move from synchronous flushing of io and ctrl events from transports to applications to an async model via a new session_input input node that runs in interrupt mode. Events are coalesced per application worker. On the one hand, this helps by minimizing message queue locking churn. And on the other, it opens the possibility for further optimizations of event message generation, obviates need for rx rescheduling rpcs and is a first step towards a fully async data/io rx path. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id6bebcb65fc9feef8aa02ddf1af6d9ba6f6745ce
2023-08-08ipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMACBenoît Ganne8-9/+85
Type: improvement Change-Id: I830f7a2ea3ac0aff5185698b9fa7a278c45116b0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-07-31ipsec: fix IPv6 IPsec tunnel puntingSylvain Cadilhac1-0/+1
Type: fix Buffer needs to be rewinded before being passed to punt-dispatch node. Change-Id: I43d103515d372e425f4c3b08ca1779398f1fced4 Signed-off-by: Sylvain Cadilhac <sylvain.cadilhac@freepro.com>
2023-07-28session: regrab evt llist elt for app transports txFlorin Coras1-0/+6
App transports like TLS can close sessions on tx and consequently generate new events. That can realloc the event pool. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I58a97502acc1182b3d051ba1aa9e0e98c16f4593
2023-07-28vnet: add vnet_register_device_class functionDamjan Marion2-21/+25
To allow dynamic registration of device classes..." Change-Id: Ie8435e8c55b7e300be06abe97b653c0c3ce7f732 Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-27session: remove unused codeFilip Tehlar1-17/+0
Type: improvement Change-Id: I7525aa81acf073707550b23541fdcc358b9bf49c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-27ipsec: fix sa bind cliMaxime Peim1-1/+1
Small mistake was made, reported by coverty scan. Type: fix Change-Id: I98ca16c0275a94b2def99831f9353d4ff3fe93a9 Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-07-26stats: remove extra format lineSteven Luong1-2/+1
The extra format line was added for no reason from patch ff27c9f8e. Type: fix Fixes: ff27c9f8e Change-Id: Ib25149cc8a17c29d0c8a0dbc06f0ea12ca4f328c Signed-off-by: Steven Luong <sluong@cisco.com>
2023-07-26session: use session error type instead of vnet errorFilip Tehlar13-91/+116
Type: improvement Change-Id: Ie0bad9e03ac2e29da23af01ee7f63cb44489ad9c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-25classify: add bpf support to pcap classifierMaxime Peim7-3/+126
Type: feature Change-Id: I28fb38e49c89f4c4d4cc58c1a5c0aa8502678472 Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-07-21vcl: ldp support SO_ORIGINAL_DSTqinyang6-10/+60
Type: improvement Support SO_ORIGINAL_DST socket option to get original dst_ip4 and dst_port if nat44 rule enabled. Change-Id: If00e00d03e48f3b78a23a68f1b078954d79dd0f7 Signed-off-by: qinyang <qiny@yusur.tech>
2023-07-21ipsec: fix logic in ext_hdr_is_pre_espPiotr Bronowski1-3/+3
When _VEC128 instructions are not enabled logic is buggy. The function always returned 1. Type: fix Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I603200637e8d65813f4e49ef15d798e74b79b9cf
2023-07-14ipip: populate mode in tunnel detailsMatthew Smith1-2/+19
Type: improvement There is a mode field in ipip_tunnel_details. The handler for the dump API does not do anything to populate it so it always contains 0 (TUNNEL_API_MODE_P2P). This is correct for p2p tunnels but is wrong for multipoint tunnels. Populate the field with the correct mode. Signed-off-by: Matthew Smith <mgsmith@netgate.com> Change-Id: I6c1288a0d3929db0f67100748b5760c36b594f97
2023-07-07stats: fix duplicate /if/names entrySteven Luong1-3/+7
stats entries /if/names are never deleted as it is a vector of the sw_if_index value. When the interface is deleted and then created again later, and if the new interface takes a different sw_if_index, we may end up with duplicate entries for the same interface name. For example, the following configuration sequence causes problem create loopback interface create loopback interface delete loopback interface intfc loop0 delete loopback interface intfc loop1 create loopback interface vpp_get_stats dump /if/names [0]: local0 /if/names [1]: loop0 /if/names [2]: loop0 /if/names The fix is to set the delete /if/names entry to deleted when the interface is deleted. Type: fix Change-Id: I7d811b12d56e3cf8c7deffe14736ea0f24814d02 Signed-off-by: Steven Luong <sluong@cisco.com>
2023-07-06api: ip - Mark old message versions as deprecatedOndrej Fabry1-0/+5
List of changed messages: - ip_punt_redirect_dump - ip_punt_redirect_details This change is part of VPP API cleanup initiative. Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: Icf91f760b9bd328110b0f9fc2e421bb954033d21
2023-07-06api: pg - Mark old message versions as deprecatedOndrej Fabry1-0/+4
List of changed messages: - pg_create_interface - pg_create_interface_reply This change is part of VPP API cleanup initiative. Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: I574927f0820c54d748f27fd96a45afec5243b645
2023-07-06api: sr - Mark old message versions as deprecatedOndrej Fabry1-0/+2
List of changed messages: - sr_policies_dump This change is part of VPP API cleanup initiative. Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: I16ae1bed83ad8c73e3254b6d195251702de84f97
2023-07-06api: ipsec - Mark old message versions as deprecatedOndrej Fabry1-0/+12
List of changed messages: - ipsec_sad_entry_add_del_v2 - ipsec_sad_entry_add_del_v2_reply - ipsec_sa_v2_dump - ipsec_sa_v2_details This change is part of VPP API cleanup initiative. Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: I8fd6906e9684ef7ebc0688dc8b0637ae2dc8d0a2
2023-06-30bpf_trace_filter: plugin for BPF Trace FilteringMohammed Hawari1-0/+2
Change-Id: I342de0a375b783725aa2b621c1c70bc8bf646450 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2023-06-30vlib: introduce trace filter functionsMohammed Hawari1-1/+6
Change-Id: I7a988fafe98599e4fcf7cdaa307a69b9d76650f0 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2023-06-29ip-neighbor: add api for getting neighbor db configAlexander Chernavin4-1/+74
There is an API call to change neighbor database configuration (i.e. limit on peer number, aging, and recycling). With this change, make getting current values of these settings available via the API. Type: improvement Change-Id: Ie9394e086b68cf9b28ad98dea162f203f8043cbb Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-06-27session udp: add len check for tx dgramsFlorin Coras3-2/+22
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35391fb8c39defbe0e57a241a357c3c98e8cef54
2023-06-27api: tapv2 - Mark old message versions as deprecatedOndrej Fabry1-0/+4
List of changed messages: - tap_create_v2 - tap_create_v2_reply This change is part of VPP API cleanup initiative. Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: I7b1b22cc4a0e31f5c19fe48e7a0f30631576f9df
2023-06-27virtio: use fast-path for ethernet-input if possibleStanislav Zaikin1-1/+26
If a frame should be sent to 'ethernet-input' set the ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX flag. It will force 'ethernet-input' to use a fast-path for such frames. This patch also aligns the behaviour with other input nodes. Type: improvement Change-Id: Icff0fa31204d5304a2ea0a4f4e7bc418dedbfe32 Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
2023-06-26udp: pass cless hdr to transport through bufferFlorin Coras3-39/+60
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I7177ada23e5a69ec8e362ec98b98010c3b44b3d7
2023-06-25tcp: avoid initializing counters multiple timesFlorin Coras2-2/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia98dae5fdde16426d5457742aff0a1b04db4d034
2023-06-23ipsec: manually binding an SA to a workerMaxime Peim6-6/+272
An SA is normally bound to the first thread using it. However, one could want to manually bind an SA to a specific worker. Type: improvement Signed-off-by: Maxime Peim <mpeim@cisco.com> Change-Id: I05cbbf753e44a01d9964ee47812c964db9bbb488
2023-06-23fib: walk over adj glean per tableStanislav Zaikin1-24/+33
Type: fix Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com> Change-Id: I07f54bb643c24b1839a2d0e93acc593d13a43fed
2023-06-22tcp: add simple stats collectorFlorin Coras2-0/+51
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I435ff10fa3af15b0bed83607aca508a1c087a159
2023-06-22tcp: options support into pgMaxime Peim2-58/+210
Packet-generator does not support TCP options. Along with its support, a formatting function has been added. Further work will be needed to update header formatting functions to take into account TCP connection options. For now, TCP options are taken on a per-packet basis. Type: improvement Change-Id: Id800887853c4941d893be353ce6d8624ed8bbc5d Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-06-21session: mark half-open transport closed on ntfFlorin Coras1-3/+3
Make sure half-open sessions are marked as transport closed once connected notification is provided. This ensures that if they've been scheduled for tx, the event is ignored. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8c44584e843d93365ec737ae4e1bcb74eba35506
2023-06-13vppapigen: fix crash with autoendian arraysDave Wallace1-2/+1
Type: fix Ticket: VPP-2078 Change-Id: I418269632bdfc823c5f0ba7652957277276d294d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-06-08tcp: cleanup next nodes and drop logicFlorin Coras2-136/+60
TCP nodes consume the buffers so they have no nexts. To avoid long drop path through vlib graph, add drop node. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibe6e075e83612ed16270934398c6a013f236ae35
2023-06-08crypto: use fixed crypto frame poolgaoginskx5-8/+42
The async frames pool may be resized once drained. This will cause 2 problems: original pool pointer is invalidated and pool size changed, both problems will confuse the crypto infra user graph nodes (like IPsec and Wireguard) and crypto engines if they expect the pool pointers always valid and the pool size never changed (for performance reason). This patch introduces fixed size of the async frames pool. This helps zeroing surprise to the components shown above and avoiding segmentation fault when pool resizing happened. In addition, the crypto engine may take advantage of the feature to sync its own pool/vector with crypto infra. Type: improvement Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com> Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I2a71783b90149fa376848b9c4f84ce8c6c034bef
2023-06-05udp: improve port validity checkBenoît Ganne2-13/+14
- do not allocate port sparse vector when only checking if a port is already in use - do not display port that have been unregistered by default Type: improvement Change-Id: I6cc94e35806dd8d415cd5d1c1c51e6b066ac26a1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-06-02session: cleanup cless listeners from session lookupFlorin Coras1-1/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I46b8194ff00c6a0a4a2bc19df9991f037856cede
2023-06-01crypto: make crypto-dispatch node working in adaptive modeXiaoming Jiang9-216/+30
This patch can make crypto dispatch node adaptively switching between pooling and interrupt mode, and improve vpp overall performance. Type: improvement Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I845ed1d29ba9f3c507ea95a337f6dca7f8d6e24e
2023-05-31fib: fix memory leak in fib_attached_export_purgeStanislav Zaikin1-0/+1
Type: fix Change-Id: I879594fcade4e081190e8dfb1dbcfc53e8431edf Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2023-05-30virtio: fix the packet buffering initialization orderMohsin Kazmi2-11/+21
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Idada695432d2bfac8808f35f1e8cd16f84d963c6