aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-06-14vcl: fix debug logging of mapped segmentsFlorin Coras2-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I73034cdba51157466713884c3fbeae7054d92ad7
2023-06-14af_xdp: linearize buffer chains before TXShmuel Hazan1-0/+20
The af_xdp plugin does not support chained buffers; attempting to send chain buffers will result truncated packets or even send other packet's data. As a workaround, turn any buffer chain into a single buffer before tx. Type: fix Change-Id: I05dec912455eb2bb6c8122a28cd646f88983aa9a Signed-off-by: Shmuel Hazan <shmuel.h@siklu.com>
2023-06-13vppapigen: fix crash with autoendian arraysDave Wallace2-11/+64
Type: fix Ticket: VPP-2078 Change-Id: I418269632bdfc823c5f0ba7652957277276d294d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-06-13dpdk-cryptodev: introduce sw_ringPiotr Bronowski2-0/+66
This patch introduces sw_ring. This ring is used in next set of patchas and plays role of a buffer for QAT, allowing collecting frame elements in case QAT queue is fully utilized, and assembling frame from QAT dequeued elements. Type: improvement Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com> Change-Id: I20718e200986ab4dba5cbc31c05a904072a6981a
2023-06-13af_xdp: set frame_no_append flagArtem Glazychev1-0/+1
Make sure the same frame is not used for multiple interfaces, otherwise it breaks the ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX promise. Type: fix Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I02546259ceaea36f65cb9f78b9b3ee45ed4075c9
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-08svm: convert fifo want_deq_ntf ops to atomicsFlorin Coras1-11/+42
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iba2e4de24ff0724e31859f5d2f4ffa3cfe2cf284
2023-06-08af_xdp: make sure all packets are transmittedBenoît Ganne2-7/+12
AF_XDP socket will only tx enqueued packets up to a max batch size so we need to retry until everything has been sent. Type: fix Change-Id: Ia487ab63d3e85a478471cd1d679c5fb471804ba3 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-06-08crypto: use fixed crypto frame poolgaoginskx7-8/+46
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-08af_xdp: remove the previous program before loading a new oneArtem Glazychev1-1/+2
Otherwise, we will get an error. The program could remain from the previous run. Type: fix Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I68e4072bd3b327592013804d67ccab7eb0ed3a0e
2023-06-06vcl: fix epoll ctl frequent deq ntf requestsFlorin Coras1-18/+30
SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL should be treated as a config option that is not frequently changed. Or alternatively, it should be set together with SVM_FIFO_WANT_DEQ_NOTIF to elicit a one time tx notification. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie4132c7789ee87227a875ff981eb98f9f4d898a9
2023-06-06misc: fix the license headerMohsin Kazmi3-30/+0
Type: style Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I6b3ecf0bdb6cfdf260cf4ccae89b6bc2335ff54c
2023-06-05vcl: avoid duplicate tx events with epoll ltFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic6436426ead561e47fb77ed9a95afbd85f2998ae
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-05linux-cp: Fix add vs update on routesPim van Pelt3-58/+69
Linux uses NLM_F_REPLACE in the netlink message to signal a FIB update The code invariably does a FIB update for IPv4 and a addition for IPv6. Without this fix, the following: ip route add 2001:db8::/48 via 2001:db8::1 ip route replace 2001:db8::/48 via 2001:db8::2 ends up as two separate FIB entries in VPP. With the fix, there will be one FIB entry (the second one with nexthop ::2). Type: fix Change-Id: I8f98d6ded52ae0c60bfddaa7fc39acbbaa19d34a Signed-off-by: Pim van Pelt <pim@ipng.nl>
2023-06-02vcl: refactor want deq ntf checks for null fifosFlorin Coras2-29/+28
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5d0445ca381f1a4943bb2fe454433b3454043b56
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-02wireguard: add support for chained buffersAlexander Chernavin3-79/+353
Type: feature With this change, packets that are larger than a single buffer can fit will be able to be sent and received over a Wireguard tunnel. Also, cover this with tests. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: Ifaf7325676d728580097bc389b51a9be39e44d88
2023-06-02api: nat44_ed - Mark old message versions as deprecatedOndrej Fabry1-0/+10
List of changed messages: - nat44_add_del_static_mapping - nat44_user_session_dump - nat44_user_session_details - nat44_user_session_v2_dump - nat44_user_session_v2_details This change is part of VPP API cleanup initiative. Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: I317ae93a0e763c3759a8c24fd550e1c97f6f4987
2023-06-01crypto: make crypto-dispatch node working in adaptive modeXiaoming Jiang12-232/+33
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-30misc: fix tracedump APIMaxime Peim1-1/+2
In some cases, in the trace dump v2 dump function, we iterate over the client cache even though this one could be empty. Type: fix Change-Id: Ice5cefa25bb93dabe86fe565347cdc32faa674ac Signed-off-by: Maxime Peim <mpeim@cisco.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
2023-05-29ipsec: fix ipsec_set_next_index set with wrong sa index when async frame ↵Xiaoming Jiang3-27/+39
commit failed Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: Ib4c61906a9cbb3eea1214394d164ecffb38fd36d
2023-05-27vppinfra: add bit_extract_u32 and bit_extract_u64Damjan Marion1-0/+42
Type: improvement Change-Id: Icfaa856aa4b50ad5c6828f1690ce3fb6ba08ec00 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-05-27vlib: add vlib_log_is_enabledDamjan Marion2-20/+34
Type: improvement Change-Id: I052e0d56cc6d89cd66c83a9bb81e2273d396d510 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-05-26linux-cp: update adjs for subifs too when mac changesAlexander Chernavin1-4/+21
The plugin creates and manages adjacencies for the physical interface in each interface pair (they are part of the x-connect feature). When a link update notification is received from the host system, MAC address of the corresponding physical interface is updated (as needed) as well as previously created adjacencies for it (because a new rewrite string needs to be generated). Subinterfaces inherit MAC address from the parent interface. When MAC address of the parent interface changes, it also implies MAC address change for its subinterfaces. The problem is that this is currently not considered in the plugin. After MAC address update on the parent interface, packets sent from subinterfaces might have wrong source MAC address. For example, IPv6 Neighbor Solicitation messages will be sent with the wrong (previous) MAC address and neighbor discovery will fail. With this fix, when the plugin updates adjacencies for a physical interface, it will also update adjacencies for the subinterfaces with existing interface pair. Type: fix Change-Id: Ia5f617197e33cb79b9b025c02c2c126c31a551ec Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-05-26tls: fix memory leak when client/server init errorXiaoming Jiang1-2/+18
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I484f3759b6c27052e08741398ec389729285f035
2023-05-25udp: fix local port reuse checkFlorin Coras1-2/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I323946f7838507110c663f5a904399a74fc76691
2023-05-24hash: add hash documentationMohsin Kazmi1-0/+90
Type: docs Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I36764aa3c0e9657d228413aeafa0a54bbd755e49
2023-05-23vcl: avoid reusing user provided events in lt modeFlorin Coras1-4/+6
Epoll events might not have been cleared by user so always compute event flags locally and assign to user provided epoll event. Type: fix Signed-off-by: Ping Yu <ping.yu@intel.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3b594a0fd7be345a0e0ad81d1d3636e9354cc15d
2023-05-23misc: fix tracedump API to match CLI behaviorMaxime Peim3-4/+227
When dumping packets from multiple threads using the API, first all packets from thread 0 are dumped then all ones from thread 1, etc Until we reach the limit specified by the API call, so we could never get packets trace from threads with higher ids. However, the tracedump CLI dump a maximum number of packets from all threads, which we can expect from the API to do. We also add a trace_clear_cache API so the client gets an answer when he only wants to clear its packet cache. Type: improvement Change-Id: I0d4df8f6210a298ac3f22cd651eb4d8f445e1034 Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-05-23bufmon: ptd should be alloced in main threadXiaoming Jiang1-1/+2
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I7f8c975fae5d71ce1226a8e19761fc75134e61e2
2023-05-22teib: fix nh-table-idStanislav Zaikin1-41/+38
Peer fib index and nh fib index should be different when nh-table-id is specified. Type: fix Change-Id: I4c8296adb5aeab1c0022bfc1046e9559331b79b2 Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2023-05-21mpls: implement state change callbacksAdrian Pistol2-5/+37
There was already a basic type defined, but nothing more. This implements callbacks similar to ip4_enable_disable_interface_callback_t. Type: feature Change-Id: I34fcb146ca68af4eb8cdd244529eb149f884284d Signed-off-by: Adrian Pistol <vifino@posteo.net>
2023-05-21ip-neighbor: fix aged neighbor probeSergio Gonzalez Monroy1-2/+2
The order of the parameters when calling the ip_neighbor_probe_dst for an aged neighbor is wrong and given that it runs on the master thread, probes for IPv6 neighbors were never sent, leading to a certain neighbor strike out and death and its removal from the neighbor cache. Change-Id: Ic021bd0ece05bd2c1c6ab90eab0e2dc27cb10360 Type: fix Fixes: fd2417b2a42 Signed-off-by: Sergio Gonzalez Monroy <monroy@anapaya.net>
2023-05-20hsa: add an option to configure ns in http cliFilip Tehlar1-1/+16
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ia81f1d8e706dbce9e57319d993bff595e6ba6f03
2023-05-19stats: fix memory leak in stat_segment_dump_r()Duncan Eastoe1-0/+2
The built stat_segment_data_t is leaked if stat_segment_access_end() returns false. Type: fix Signed-off-by: Duncan Eastoe <duncan@graphiant.com> Change-Id: I70adabbe7947d3e8a798cdfb3eaa14c683dce9da
2023-05-19fib: fix load-balance and replicate dpos buckets overflowBenoît Ganne5-53/+132
load-balance and replicate dpos both store their number of buckets as u16, which can overflow if too many paths are configured. For load-balance it can happens quite quickly because of weights normalization. Type: fix Change-Id: I0c78c39fc3d40626dfc58b49e7d99d71f9852b50 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-05-19dpdk: fix compatibility with DPDK < 21.11Andrew Ying2-2/+1
Signed-off-by: Andrew Ying <hi@andrewying.com> Type: fix Change-Id: I3c428c90146387ad9ce291c7f646d74f06952b40
2023-05-19tls: flag no app session on handshake failureFlorin Coras1-1/+1
If openssl tls server handshake fails, track the fact that the context does not have an app session. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5f493059a3610067b59caffbbe441ce9e0868252
2023-05-19dpdk: fix format device name using wrong indexDaniel Ding1-10/+10
When I setup vpp by netvsc driver, occurs the following crash: (format_dpdk_device_name) assertion `(i) < vec_len (dm->devices)' fails vnet[100166]: #6 0x00007f434d651f6a _clib_error + 0x2da vnet[100166]: #7 0x00007f430b4bef64 format_dpdk_device_name + 0xf4 vnet[100166]: #8 0x00007f434d6555f3 do_percent + 0xee3 vnet[100166]: #9 0x00007f434d654359 va_format + 0xb9 vnet[100166]: #10 0x00007f434d7ac16e vlib_log + 0x3ce vnet[100166]: #11 0x00007f430b49ebe3 dpdk_device_start + 0x193 vnet[100166]: #12 0x00007f430b4aa233 dpdk_interface_admin_up_down + 0x163 vnet[100166]: #13 0x00007f434d988fc8 vnet_sw_interface_set_flags_helper + 0x378 vnet[100166]: #14 0x00007f434d989338 vnet_sw_interface_set_flags + 0x48 This patch fix it by device_index as a index for devices vec, and not dpdk port_id. Type: fix Change-Id: I84c46616d06117c9ae3b2c7d0473050f1b8ded5f Signed-off-by: Daniel Ding <danieldin95@163.com>
2023-05-19vcl: set want deq flag earlier in epoll ctl modFlorin Coras1-8/+10
On epoll ctl mod, set want deq flag before checking if unhandled events are needed. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id1491837c7156a66c21e0e45af60b04b1c18601c
2023-05-19vcl: always reset deq ntf flag in epoll evt handlerFlorin Coras1-2/+2
Reset deq notification flag even if session is no longer epolled. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4e9aed1849aa2817176f3a54ae41910df5e704a0
2023-05-19interface: add the transmit queue infrastructure documentMohsin Kazmi1-0/+159
Type: docs Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I57f27f8ec4be7f3d8dc3d13ff4ea6b1b21c3cf6b
2023-05-19hsa: make http cli client thread safeFilip Tehlar1-6/+29
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I9e6fd29c0e09406e48215f06977b2d4678650669
2023-05-16hsa: detach app on unsuccessful listenFilip Tehlar1-0/+12
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Idba74f880a251dbeec2205ee41e16b40d4799b06
2023-05-16vcl: avoid skipping last event in epoll ltFlorin Coras1-4/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic89256d16230593b61a7b3e29582444fb3f93e4d
2023-05-16ip_session_redirect: add session redirect pluginBenoît Ganne11-2/+1048
This feature enables the use of the classifier and ip-in-out-acl nodes to redirect matching sessions via arbitrary fib paths instead of relying on additional VRFs. Type: feature Change-Id: Ia59d35481c2555aec96c806b62bf29671abb295a Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-05-16dpdk: fix format rx/tx burst function name failedXiaoming Jiang3-14/+30
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I9971e69135e0652a36e4b4754774a43ea1d92e8b