aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
6 dayssession: track number of tries to alloc lcl portFlorin Coras6-8/+71
Track number of tries to alloc local port and report it in stats segment. Could be used to gauge how busy the port allocator is. Also add cli to dump trasport sub-layer state. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3736a48488c491dee85aa2b074b87519a3857057
12 dayssr : enable SRv6 uSID in the SRv6 APIAhmed Abdelsalam4-29/+44
Type: improvement Change-Id: I026b1a8fd1df0e6ac1dba8df78b12cde95aae419 Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
13 daystcp: handle multiple syns in time-waitFlorin Coras1-1/+1
If multiple syns are received in one dispatch for the same time-wait connection, the first removes the connection while subsequent packets either lookup a nonexistent or an unrelated connection. Avoid the former with a check. Type: fix Change-Id: Ia5f1b3bbd568566eaf36121206aa12363a15b418 Signed-off-by: Florin Coras <fcoras@cisco.com>
13 dayssr : adding support to SRv6 uA behaviorAhmed Abdelsalam3-52/+116
Type: feature Change-Id: I81f6b07226eeaa6c3cd62487c9665629f4d2a834 Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
2024-11-08session: validate appns index in vnet_session_rule_add_delSteven Luong3-1/+12
vnet_session_rule_add_del may be called with a bogus appns index from the API. Validate the appns index is indeed valid. Type: fix Change-Id: Ife1b5b9ab0b180ececa74008d2ef92045a9e8b58 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-11-07dev: secondary interfaces supportDamjan Marion11-183/+765
Type: feature Change-Id: I6cc4340431b8273022955fca1600061a722e3ace Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-11-07dev: introduce consistent_qp featureMohammed Hawari6-5/+14
For some devices, queues are organized as pairs (rx/tx). In this case, it is desirable that a worker receives packet and send packets for the same pair. This patch enables this by assigning txq to workers first and ending with main. Change-Id: I3de4afbf74a265d5275c6a5d9a905b51dd661b22 Type: feature Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2024-11-06session: session table holding free appns indexSteven Luong8-23/+403
session table may be shared among multiple appns's. app ns add id blue secret 1 if tap0 app ns add id red secret 1 if tap0 session table holds the last added app_ns's appns_index. If the last app_ns is deleted, session table is not free since there is still an appns which uses the same session table. In that case, session table is holding the free app_ns's appns_index and it can cause problem. The fix is to modify appns_index in session table to hold a vector of appns_index's instead of just the appns_index that was last added. When the app ns is deleted, remove the deleted appns_index from the session table's vector of appns_index's. Type: fix Change-Id: Ied8bc97f185071dc89b9b56656e18efbd2995131 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-10-31virtio: introduce the consistent-qp featureMohammed Hawari8-15/+29
In certain usecases related to Linux legacy pinning of flows on queue pairs, it is desirable that, for a given index, the rx and tx virtio queue be handled by the same worker. This change introduces a flag for virtio and tap interfaces that allow such a mapping. Example with two workers rxq 0 and txq 0 on worker 0 rxq 1 and txq 1 on worker 1 txq 2 on main thread Change-Id: I1b74a4788843fd1d0e8dcb4e9da30e609e088fe3 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2024-10-30session: sesssion_rule_add_del API parsing port in wrong orderSteven Luong1-6/+6
The convention in the binary API is that fields encoded in network order. For some reason, port was parsed in host order. Type: fix Change-Id: I31ea313937097e2547226566b7869be4e28251b8 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-10-30ipsec: fix UDP flow in ipsec inbound policyGabriel Oginski1-25/+52
This patch fixes handle with UDP packages for UDP-Encapsulated ESP and IKE traffic in inbound policy. Orignally IKE traffic on UDP with port 4500 is dropped inside inbound look-up. Type: fix Change-Id: I071adf18cb82da8cd000b93914078e51e393104c Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
2024-10-29udp: connected mode only for connectsFlorin Coras1-10/+1
Treat all connects as connected udp sessions. Connectionless udp is only possible with listeners. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0a75b7c85b72274df909ed3b114eed4f6519477e
2024-10-29session: improve migration rx ntfFlorin Coras1-3/+1
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0dd002f923908c4b9244c2c47fc85fa8855d54e1
2024-10-25http: pass timeout using extended configMatus Fabian2-3/+2
App can now pass http connection timeout using extended configuration, ext cfg type TRANSPORT_ENDPT_EXT_CFG_HTTP, value (in seconds) set in ext cfg member opaque. It is optional, default value is 60 seconds. Type: improvement Change-Id: Ibeff4bbd3153421be350ff564ec3c8e52e5b9639 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-25session: support of multiple extended configsMatus Fabian5-19/+105
This allow configuration for each transport protocol when combined, e.g. HTTPS=HTTP+TLS. Extended config of session endpoint config is now chunk of memory, which allow seamless integration with VCL, and internal representation is hidden behind APIs, which is better for future improvements. By default chunk is allocated to 512B if the app doesn't do so before. Type: improvement Change-Id: I323f19ec255eba31c58c06b8b83af45aab7f5bb1 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-23ip: fix port extractionKlement Sekera1-4/+11
Replace a hard-coded constant of 64 with 56, which is a more appropriate value for when ICMP echo request is returned in ICMP error. Previously, the size of such message would be smaller than 64 and parsing would not return the correct value. Type: fix Change-Id: I1bdf8a2a23b1e6762b64210c71927c926f4547ad Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-10-23dev: use typedefs in dev.hDamjan Marion1-28/+26
Type: refactor Change-Id: Ieb50d79bd7b9f0a59faf26a4f5bce3f89f25b287 Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2024-10-23dev: keep dev_instance data in structDamjan Marion4-12/+24
Type: refactor Change-Id: I05d04e2e9872d025384524b1bc133d909581e18a Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2024-10-23dev: fix typo in function nameDamjan Marion4-5/+6
vnet_dev_get_port_rx_node_idex -> vnet_dev_get_port_rx_node_index Type: fix Change-Id: I9a90e5822cbc93bcf2f91244b4eb4e5fff53c212 Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2024-10-23dev: _with_ptr process node callsDamjan Marion2-0/+60
Type: improvement Change-Id: Ib392d74e7629cef5d335e4320a71ceec25ddb020 Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2024-10-23dev: add more units for countersDamjan Marion3-4/+9
Type: improvement Change-Id: If6f70fc34f47c31a986ba837c9a35ce139decfb1 Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2024-10-22pg: fix the buffer leak when pa steams are deletedMohsin Kazmi2-6/+4
Type: fix vpp# sh buffers Pool Name Index NUMA Size Data Size Total Avail Cached Used default-numa-0 0 0 2304 2048 128270 125968 1108 1194 default-numa-1 1 1 2304 2048 128270 128270 0 0 vpp# sh pa Name Enabled Count Parameters pg0-test-0 No 60900431 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 0, pg1-test-0 No 60900385 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 0, pg0-test-1 No 60898008 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 1, pg1-test-1 No 60897934 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 1, pg0-test-2 No 60900278 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 2, pg1-test-2 No 60900184 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 2, pg0-test-3 No 60900431 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 3, pg1-test-3 No 60900387 limit -1, rate 1.00e6 pps, size 64-64, buffer-size 2048, worker 3 vpp# pa delete pg0-test-0 vpp# pa delete pg0-test-1 vpp# pa delete pg0-test-2 vpp# pa delete pg0-test-3 vpp# pa delete pg1-test-0 vpp# pa delete pg1-test-1 vpp# pa delete pg1-test-2 vpp# pa delete pg1-test-3 vpp# sh buffer trace verbose Pool Name Index NUMA Size Data Size Total Avail Cached Used default-numa-0 0 0 2304 2048 128270 126650 1620 0 default-numa-1 1 1 2304 2048 128270 128270 0 0 Node Allocated Freed In Out Buffered unix-cli-process-0 0 1194 0 0 -1194 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I03051a8f529df7801cf08f8374a994dbc00fc972
2024-10-15bfd: add support for multihopAbdel Baig9-329/+635
Type: feature Change-Id: If23f9cc9317e7528f3c8d66303457206843a12c5 Signed-off-by: Abdel Baig <abdbaig@cisco.com>
2024-10-14ip: fix ip_local_reassembly_get handlerStanislav Zaikin1-1/+1
Type: fix Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com> Change-Id: I6431557d01756174005df26350c28299f83fcee0
2024-10-08dev: add helper functionsDamjan Marion2-9/+33
Type: improvement Change-Id: I7c9e882b1cdf141b34e84dbfed46b392624d1f62 Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-10-08pg: fix the coverity warningMohsin Kazmi1-5/+5
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ida88c304f110b05051211ce243fd04ce811a9d4d
2024-10-07ip: add extended shallow reassemblyKlement Sekera6-584/+1061
This patch adds some fixes and improvements: Fixes bug where save_rewrite_length gets overwritten on reassembly handoff. Fixes bug where duplicate fragments could cause a reassembly context to be lost, because the race losing thread would remove bihash entry created by winning thread. Improves tracing by adding more events. Adds extended shallow reassembly. This is a toggleable option, which if turned on will cause reassembly to wait for both first and last fragments to calculate total IP payload length. Furthermore it'll store a local copy of first fragment and necessary data to retrieve it in vnet_buffer2. This allows downstream features to access full L3/L4 headers when dealing with fragments. Type: fix Change-Id: I81695070533410c5815291dbc65ea71c87e3ae05 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-10-07ip: fix feature logicKlement Sekera1-6/+8
This fixes ip6 feature logic, so error and handoff packets are no longer sent to next feature instead of being dropped/handed off. Type: fix Change-Id: If280de5345d9ed3b553dd3b3fa40274619d333ae Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-10-07ip: add ip6 shallow reassembly output featureKlement Sekera2-42/+172
Type: improvement Change-Id: I0cb4014f03abdd0e55d4bb7ff40ae293a6ed3562 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-10-07ip: fix ip4 shallow reassembly output feature handoffKlement Sekera2-70/+103
Use a new frame queue for output feature instead of passing frames to standard feature. Fixes bug where save_rewrite_length gets overwritten on reassembly handoff. Type: fix Change-Id: I6c6191aec5f1c89e1ca0510a08781e390d327bbf Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-10-07pg: add support to delete pg interfaceMohsin Kazmi5-3/+126
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3102fded415c644673fb79a0fdb7a7448ce20f26
2024-10-04session vcl: add support for vcl transport attributesFlorin Coras2-1/+3
Session layer can push transport attributes to vcl sessions which are stored as vector for session lifetime. Store original_dst_ip and port when available in vcl session attribute vector. Type: feature Change-Id: Iab6c65ddcfed220fc919f564cd19083561812faf Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-10-03session: use proper name for ct transportFlorin Coras4-11/+13
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iebf5155a429c77143df9eb44f504fea28cddaf98
2024-10-03session: allow session input rpcsFlorin Coras1-0/+3
Type: improvement Change-Id: Ib8e9f9fb6dfc553cc9e344544961832fecbea8c1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-10-02session: incomprehensible error message for adding sdl and rule-table entrySteven Luong2-39/+19
1. When the backend engine is not enable, adding an entry returns a confusing error message. DBGvpp# session sdl add 191.1.1.30/32 action 1 tag blue-v4-rule1 session sdl add 191.1.1.30/32 action 1 tag blue-v4-rule1 unknown input `add 191.1.1.30/32 action 1 ta...' DBGvpp# 2. When the sdl or rule-table entry is already present, adding the duplicate entry returns a confusing error message. DBGvpp# session sdl add 8.8.8.1/32 action 0 session sdl add 8.8.8.1/32 action 0 DBGvpp# session sdl add 8.8.8.1/32 action 0 session sdl add 8.8.8.1/32 action 0 session: session is already enable. Must disable first DBGvpp# The problem is because there are multiple cli commands start with "session". When the command is failed with the best match chain, it passes the command to the other parser chains which start with the keyword "session". The other cli chain also fails to parse the command. The error message that the previous parser chain returned may be overwritten by the newest error message. The fix is to not return an error in sdl and rule-table parser command chain. Type: fix Change-Id: If0165324a763f47ec98ab79a41c3ee9b10057454 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-28session: fix SDL to use remote instead localSteven Luong4-31/+230
The language is local == VPP local interface remote == sender prefix to VPP node SDL acts on remote prefix. Type: fix Change-Id: I82917c6ef801fc67430dfdd15c5630cb7a6347e0 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-26tls: cleanup engine hs cb and improve ctx formattingFlorin Coras3-20/+15
Handshake completion is now tracked via a ctx flag so we no longer need ctx_handshake_is_over. Also, as we no longer prealloc application sessions, improve ctx state formatting. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If48588ecde13e56fb99d1a46238bda53ed4eae1b
2024-09-26dev: dev process node scheduling improvementsDamjan Marion1-52/+108
Type: improvement Change-Id: If39e4d2b46820d5c0465fcc40d255fa95d137d38 Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-09-25session: set dgram mss when not constrained by transportFlorin Coras1-0/+1
Type: fix Change-Id: I12ddcd56f2fecb504180cdc044a3b3c3d1db7e3c Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-09-25build: add missing fib_walk.h to VNET_HEADERSRadislav Chugunov1-0/+1
Type: fix Change-Id: Ie64ce16ea512b855a1b886eceb94c0e6ba33df05 Signed-off-by: Radislav Chugunov <chgnrdv@gmail.com>
2024-09-24ipsec: cleanup tun protect on interface removalStanislav Zaikin1-11/+39
when a protected tunnel gets deleted it's necessary to run a proper cleanup Type: fix Change-Id: I9d2c60ecbf97c4df299ac5c2228b036bf3478a56 Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-09-20udp: node counter for connected sessionsFlorin Coras2-0/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4c0c1b27adb3e3ea3c3ff6353b068447db19fa85
2024-09-19l2: fix DVR test failure on AWS Graviton on Ubuntu 22.04Andrew Yourtchenko1-8/+5
The AWS Graviton make test fails in dvr_test.py on Ubuntu 22.04, due to a mismatching source MAC address. Debian 11 tests run fine. The following can be seen in the log.txt trace: 00:00:00:756422: ethernet-input frame: flags 0x1, hw-if-index 3, sw-if-index 3 IP4: 02:03:00:00:ff:02 -> de:ad:00:00:00:00 802.1q vlan 92 00:00:00:756435: l2-input l2-input: sw_if_index 6 dst de:ad:00:00:00:00 src 02:03:00:00:ff:02 [l2-input-vtr l2-learn l2-fwd l2-flood l2-flood ] 00:00:00:756438: l2-input-vtr l2-input-vtr: sw_if_index 6 dst de:ad:00:00:00:00 src 02:03:00:00:00:00 data 08 00 45 00 00 80 00 01 00 00 40 11 00:00:00:756441: l2-learn l2-learn: sw_if_index 6 dst de:ad:00:00:00:00 src 02:03:00:00:00:00 bd_index 1 Note how l2-input-vtr node has the two lowest bytes of the source MAC corrupted. Discussing with Benoit, since this could be caused by unaligned memory accesses, using clib_memcpy_fast. Type: fix Change-Id: I28991e1166335df0edd1e4b84fa72a2b1d0bb9bf Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-09-14session: improve sh session cliFlorin Coras1-75/+194
Add support for: - "sh session verbose thread <n> [lcl|rmt|ep] <ip>[:port]", which can be used to filter sessions based on transport ip:port - "force-print" option to force printing even when it exceeds existing printing thresholds Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iab3e58b8162664b425379d14818b8a4daa0ce345
2024-09-09armada: introduce dev_armada pluginDamjan Marion1-1/+2
Also retires old marvell plugin. Change-Id: Icedec11f5661909058fdfe8d5fc455306adafacd Type: feature Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-09-09ipsec: remove redundant code in ipsec_tun_in traceGarvit1-2/+2
This patch removes redundant sa index value in format_ipsec_tun_protect_input_trace() as sa index value already added by format_ipsec4_tunnel_kv(). Type: fix Change-Id: I7834bda57ba0f7cfe5084b671f6f7da0749ba64d Signed-off-by: Garvit <gvarshney@marvell.com>
2024-09-06session: add Source Deny ListSteven Luong17-263/+1886
With this feature, session enable is now modified to have 3 modes of operation session enable -- only enable session session enable rt-backend sdl -- enable session with sdl session enable rt-backend rule-table -- enable session with rule-table session rule tables are now created on demand, upon adding first rule to the rule table. refactor session table to remove depenency from sesssion rules table. Now session rules table APIs take srtg_handle and transport proto instead of srt pointer. Type: feature Change-Id: Idde6a9b2f46b29bb931f9039636562575572aa14 Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-06linux-cp: auto select tap id when creating lcp pairStanislav Zaikin2-2/+4
Now when lcp pair is created, tap instance is based on hw_id. But tap interface with such instance can already exist. Introduce an offset and auto-selection based on it. Type: fix Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com> Change-Id: I9db39106b0b0d5bf95c445b03e5b7ff52f946dd2
2024-09-05dev: add platform bus and devicetree supportDamjan Marion3-1/+202
Change-Id: Ief8e159b25d4fc4859c7116da6ff22c15bd3fff0 Type: feature Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-08-29virtio: RSS supportSteven Luong9-56/+190
Add RSS support to make use of multiple queues. With 4 RX queues and RSS enabled ping from host to guest vm ip queue use 192.168.2.3 192.168.2.1 2 '' 192.168.2.10 0 '' 192.168.2.5 1 '' 192.168.2.105 3 With 4 RX queues and RSS disabled, queue 0 is always used for all of the above cases Type: improvement Change-Id: I3ca78fd83fce26cbe8f23fee0a9034cb572bacb7 Signed-off-by: Steven Luong <sluong@cisco.com>