aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gtpu/gtpu_api.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion1-2/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-10gtpu: support non-G-PDU packets and PDU SessionRune E. Jensen1-3/+243
Updated the gtpu plugin code to support the PDU Session user plane protocol, required for 5G, as specified in 3GPP TS 38.415 version 17.0.0. This enables some initial support of 5G gNodeB's with the gtpu plugin. New features: - Basic support for the GTP-U Extension Header Flag. Packets with one extension can now be decapsulated. This enables basic support of the PDU Session user plane protocol (3GPP TS 38.415 version 17.0.0). New tunnels can be created with a PDU enable flag and a 6-bit QoS Flow Identifier (QFI). With this, encapsulated packets will have the PDU Session extension header, and the QFI set. - Ability to forward GTP-U packets that are not handled by the plugin directly. Only GTP-U packets with a message type of 255 (G-PDU) are handled directly. However, 3GPP TS 29.281 defines several other message types like echo and error indication. A new feature is added to optionally forward unknown or unsupported packets to a new IP address. This works separately for unknown GTP-U message types, unknown TEIDs, and packets with an unknown GTP-U header. This allows both echo and error indications from a 5G gNodeB to be handled by a different system outside VPP. - Simple way to get metrics for active tunnels and on tunnel close. In 5G session/tunnel lifetime is often short and created frequently. The normal API becomes too slow and inaccurate when too many tunnels are created and deleted every second. Improvements: - A clean ground structure to handle multiple message type in the future. The code path for G-PDU packets is optimized for performance, representing the typical case. Unsupported GTP-U packets enter a slow path that decodes the nature of the error. This presents a easy hook to handle other message types in the future. - Improved error reporting When using traces there is more details in the tunnel descriptions. - Updated the API with several enums. Fixes: - gtpu0->length field in IPv6 was computed with IPv4 header lengths in the encapsulation code. - vec_set_len (t->rewrite, ...) size was computed with the IPv4 header size also for IPv6 tunnels. Issues: - This PR does not enable full support of the 3GPP specification. In particular it only supports a single QoS/QFI flow for each tunnel. It ignores all incoming extension header flags. - API functions might change again when/if more support of the 3GPP TS 38.415 spec is added. Note that I have bumped the API version to 2.1.0 as it seems to be the correct approach based on my API changes. Type: feature Signed-off-by: Rune E. Jensen <runeerle@wgtwo.com> Change-Id: I91cd2b31f2561f1b3fb1e46c4c34a5a3c71b4625
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-3/+3
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-16gtpu: support separate rx-decap and encap-tx teid valuesJohn Lo1-12/+43
Support separate local and remote TEIDs, with local (or RX) one used for GTPU tunnel RX/decap and remote (or TX) one used encap/TX. Updated current gtpu API to support seperate RX/TX TEIDs and added new gtpu_tunnel_update_tteid API to allow changing TX-TEID of an existing GTPU tunnel. The current tunnel field "teid" is used for RX-TEID and a new field "tteid" is used for TX-TEID. Type: improvement Signed-off-by: John Lo <loj@cisco.com> Change-Id: I549d79750a34bb965036da298c0ca894d15c2c20
2020-05-05gtpu: RX offload for IPv6 payload supportingChenmin Sun1-1/+2
this patch adds the offloading capability for the IPv4 GTPU tunnel which the next-node is assigned as IPv6 Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: Ie39cd43058d36514656351dc6e906a19d5de89c0
2020-02-17gtpu: offload RX flowChenmin Sun1-0/+59
ip4 gtpu cli/api (using flow infra) to create flows and enable them on different hardware (currently tested with ice) to offload a gtpu tunnel onto hw: set flow-offload gtpu hw TwentyFiveGigabitEthernet3/0/0 rx gtpu_tunnel0 to remove offload: set flow-offload gtpu hw TwentyFiveGigabitEthernet3/0/0 rx gtpu_tunnel0 del TODO:ipv6 handling Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I8e356feeb0b16cfeadc1bbbe92f773aa2916e715
2019-12-09gtpu: use explicit types in apiOle Troan1-17/+13
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I16fcbd5e63526dbf062a3032701479324fe2a4f5
2019-10-23gtpu: msg id fix in send_gtpu_tunnel_details apiMiklos Tirpak1-1/+2
Type: fix _vl_msg_id must start at msg_id_base. Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com> Change-Id: Id3f05683c873fcac47667a9736e45e85849b740c
2019-09-27gtpu: remove api boilerplateOle Troan1-67/+4
Type: refactor Change-Id: I08d200fbec805af3109e738eee32c3ecfd61c7cc Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-11api: remove transport specific code from handlersFlorin Coras1-10/+8
This does not update api client code. In other words, if the client assumes the transport is shmem based, this patch does not change that. Furthermore, code that checks queue size, for tail dropping, is not updated. Done for the following apis: Plugins - acl - gtpu - memif - nat - pppoe VNET - bfd - bier - tapv2 - vhost user - dhcp - flow - geneve - ip - punt - ipsec/ipsec-gre - l2 - l2tp - lisp-cp/one-cp - lisp-gpe - map - mpls - policer - session - span - udp - tap - vxlan/vxlan-gpe - interface VPP - api/api.c OAM - oam_api.c Stats - stats.c Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-09api: refactor vlibmemoryFlorin Coras1-2/+2
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03Repair vlib API socket serverDave Barach1-1/+0
- Teach vpp_api_test to send/receive API messages over sockets - Add memfd-based shared memory - Add api messages to create memfd-based shared memory segments - vpp_api_test supports both socket and shared memory segment connections - vpp_api_test pivot from socket to shared memory API messaging - add socket client support to libvlibclient.so - dead client reaper sends ping messages, container-friendly - dead client reaper falls back to kill (<pid>, 0) live checking if e.g. a python app goes silent for tens of seconds - handle ping messages in python client support code - teach show api ring about pairwise shared-memory segments - fix ip probing of already resolved destinations (VPP-998) We'll need this work to implement proper host-stack client isolation Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-02Add l3 routing for GTP-U decapHongjun Ni1-1/+1
Change-Id: Ic3c8cd58cb2b02622299cf74c9efcabd2ef2b513 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-15Add GTP-U plugin. VPP-694Hongjun Ni1-0/+256
Basic GTP-U feature Change-Id: I31226f890a92c5303ac06e112ed7820cae52d9bd Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>