summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2021-03-04crypto: add support for aes-ctr+sha-1 chainsBenoît Ganne1-16/+19
Type: feature Change-Id: I9d4f90bc701d2b9b903a018f8d27cec5e129d7be Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-03-04bonding: coverity woe in bond_dev_class fuctionSteven Luong1-5/+14
Coverity complans the line h = hashes; uses uninitialized variable if the prior ASSERT statement is hit. ASSERT is compiled out coverity as well as in release image. So the complain is legitimate. Change the ASSERT to drop the frame and log an error instead. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ibf0c204fe3626afca69ea84484e606566cf3244c
2021-03-03udp: allocate rx lock only for non-connectedFlorin Coras1-3/+7
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib5395a51fbfb2123549f7c96534fa763b4669243
2021-03-02classify: fix crash if no pcap filter has been configuredBenoît Ganne1-1/+2
If no pcap filters have ever been configured and we try to enable pcap capture with a filter, cm->classify_table_index_by_sw_if_index is not initialized yet. Type: fix Change-Id: I2f509c58f9984951b1ad81c1c8ed912cb594fce1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-03-02classify: fix multiple filters supportBenoît Ganne1-11/+22
This fix the classify filter if we attach several different filters. This also fix some issues with l3 and l4 parsing. Type: fix Change-Id: I9dc6c55049a3bbc0110d1097b40d9da27633626b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-28session svm: segment manager and fifo segment leaksFlorin Coras1-0/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4e00dd7f8ce1e56092dde9a073decae62d5475de
2021-02-26udp: avoid locking connected udp sessions on rxFlorin Coras3-2/+8
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I52aa2322980b51cfc0b282fb37d7f63d30777dee
2021-02-26virtio: place the event fds on worker threads for pci deviceMohsin Kazmi1-0/+11
Type: improvement Change-Id: I8322bca1a9aa75c97c0fe2ff24b2f65fc43242ce Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-02-26interface: Fix rxq deletionNathan Skrzypczak1-2/+11
Type: fix Change-Id: Ie89663de42ec94823b32aa1edf94f2c03df06627 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-02-26interface: fix sh int rxNathan Skrzypczak2-2/+2
Type: fix Change-Id: Iebe2db66af1e769486a117d6284375ce5ffff0b4 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-02-26ipsec: move the IPSec SA pool out of ipsec_mainNeale Ranns13-84/+76
Type: refactor this allows the ipsec_sa_get funtion to be moved from ipsec.h to ipsec_sa.h where it belongs. Also use ipsec_sa_get throughout the code base. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I2dce726c4f7052b5507dd8dcfead0ed5604357df
2021-02-26crypto: fix coverity issue 218445Piotr Bronowski1-3/+0
Fixes coverity issue CID 218445 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return 4294967295U;. Type: fix Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: Ibf8ee0458320d20c3adca2efa2a4bfad7c190dbe
2021-02-25tests: Add tests for IPSec async mode using the crypto SW schedulerNeale Ranns1-1/+2
Type: test Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iabc8f2b09ee10a82aacebd36acfe8648cf69b7d7
2021-02-25ipsec: ipsec.h tidy upNeale Ranns6-56/+86
Type: refactor - remove the extern declaration of the nodes. keep the use of them to the files that declare them - remove duplicate declaration of ipsec_set_async_mode - remove unsued ipsec_add_feature Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I6ce7bb4517b508a8f02b11f3bc819e1c5d539c02
2021-02-25ipsec: enable input features on tunnelsBrian Russell4-30/+93
Make the ipsec[46]-tun-input nodes siblings of device-input so that input features can be enabled on them. Register ipsec-tun for feature updates. When a feature is enabled on the device-input arc and the ifindex is an IPSec tunnel, change the end node of the arc for that ifindex to be the appropriate ESP decrypt node. Set a flag on the tunnel to indicate that the feature arc should be started for packets input on the tunnel. Test input policing on ESP IPSec tunnels. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I3b9f047e5e737f3ea4c58fc82cd3c15700b6f9f7
2021-02-24virtio: enable the interrupt support for uio_pci_genericMohsin Kazmi1-11/+4
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ic25ffe9c8e37826733cfb9e62cefb491bb3322bc
2021-02-24session: init ctrl msg without mq lockFlorin Coras1-102/+96
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I755e6da1fcf6f3bf3c72d6d36c4243b0919b7209
2021-02-24fib: fix sa selection for fib routed destinationsJúlius Milan1-4/+14
The move from ip4(6)_src_address_for_packet to fib_sas4(6)_get changed the behavior, so that the new looked only to adjacent gleans. This caused a problem for destinations routed according to FIB table. To reproduce: vpp# create tap vpp# set interface state tap0 up vpp# set interface ip address tap0 192.168.11.1/24 vpp# ip route add 192.168.20.0/24 via 192.168.11.2 linux$ sudo ip addr add 192.168.20.1/24 dev lo linux$ sudo ip link set tap0 up linux$ sudo ip addr add 192.168.11.2/24 dev tap0 vpp# ping 192.168.20.1 Failed: no source address for egress interface Type: fix Signed-off-by: Július Milan <julius.milan@pantheon.tech> Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I22899f4dbbf8c1c85ccce72f801b92c183195b5d
2021-02-24crypto: A more memory efficient layout of the frame element structNeale Ranns2-18/+26
Type: improvement Also: - state as enum so my GDB life is easier - typo; s/indice/indices/; Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3320f5ef1ccd7d042071ef336488a41adfad7463
2021-02-23l2: coverity woe in l2_api.cSteven Luong1-23/+20
Coverify complains deref_ptr before null check. deref_ptr: Directly dereferencing pointer reg. 1214 vl_reg = vl_api_client_index_to_registration (reg->client_index); 1215 ALWAYS_ASSERT (vl_reg != NULL); 1216 CID 216104 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking reg suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 1217 if (reg && vl_api_can_send_msg (vl_reg)) I believe the check is for vl_reg instead of reg because vl_reg may be NULL after the call vl_api_client_index_to_registration. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ic4eb2284e65c48396f20d5024a4241c80c70c886
2021-02-23vlib: fix offload flags value resetBenoît Ganne1-2/+11
When a buffer is freed and re-allocated for a new packet, opaque2 is not reset, so the offload flags can be set to a stale value. Make sure the offload flags are reset to the current value on 1st set. Type: fix Fixes: 6809538e646bf86c000dc1faba60b0a4157ad898 Change-Id: I4048febedf25b9995dbd080a11495ee7dbe59153 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-22ip-neighbor: add set ip neighbor-config CLI commandIvan Shvedunov1-0/+54
Type: improvement Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: I77ade50425e88d2da979f732d2248bed383f4ba4
2021-02-19tests: add input policer thread handoff testsBrian Russell1-2/+74
Test worker thread handoff on an interface input policer. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I1deddcc9711bccfde377290bc66a00f2cd4163e1
2021-02-19policer: add thread handoff for device inputBrian Russell4-13/+71
Add worker thread handoff for policers on the device input feature arc on an interface. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Ib795457a09a5b3be3c4e6422c91e33100192b8e2
2021-02-19policer: move handoff checks into policer codeBrian Russell4-47/+41
The IP punt policer currently checks if it needs to do worker thread handoff based on the thread index stored in the policer. Move this functionality into the policer code so it can be common for all users of the policer. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Ia8d11e62898a58b19d7b27b296f8369baa3e5aa1
2021-02-19tests: test input policerBrian Russell1-0/+74
Apply a policer to an interface, check it's policing packets. Remove it and check it no longer polices packets. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I6f694c8a9804cadf010b5831770aaae81f42e027
2021-02-19policer: add api to configure input policingBrian Russell4-0/+76
Add a new API to apply a policer to an input interface. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Ie8aff9120149b63d85363a9a5afdcaed60a93700
2021-02-19policer: add policing as device-input featureBrian Russell3-233/+19
Add input per-interface policing as an input feature, repurposing vnet_policer_inline which formermly allowed input policing to be configured via a CLI. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I2fd00e964ae358a05e507c844f5476372124fae1
2021-02-18tests: remove unnecessary setup in policer testBrian Russell1-6/+0
The policer test class overrides setup and teardown methods from VppTestCase but doesn't do anything other than call the parent's method. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I76bac084c4cb5cb5195e34afe95b38affd585942
2021-02-15session: coverity fixFlorin Coras1-3/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic28ee0e7cd313686b820e7003a47d17b844b8a89
2021-02-15vlib: refactor checksum offload supportMohsin Kazmi25-223/+332
Type: refactor This patch refactors the offload flags in vlib_buffer_t. There are two main reasons behind this refactoring. First, offload flags are insufficient to represent outer and inner headers offloads. Second, room for these flags in first cacheline of vlib_buffer_t is also limited. This patch introduces a generic offload flag in first cacheline. And detailed offload flags in 2nd cacheline of the structure for performance optimization. Change-Id: Icc363a142fb9208ec7113ab5bbfc8230181f6004 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-02-15misc: coverity fixesDave Barach2-7/+5
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I6a3348c7edd1cce6b407d336443103f77392bc5d
2021-02-15ip: Path MTUNeale Ranns22-18/+1528
Type: feature Support setting the MTU for a peer on an interface. The minimum value of the path and interface MTU is used at forwarding time. the path MTU is specified for a given peer, by address and table-ID. In the forwarding plane the MTU is enfored either: 1 - if the peer is attached, then the MTU is set on the peer's adjacency 2 - if the peer is not attached, it is remote, then a DPO is added to the peer's FIB entry to perform the necessary fragmentation. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8b9ea6a07868b50e97e2561f18d9335407dea7ae
2021-02-15policer: improve policer structBrian Russell9-33/+28
Ensure policer struct is cache aligned and fits in one cache line. Give it a simpler name to reflect its job as the representation of a policer. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: If1ae4931c818b86eee20306e503f4e5d6b84bd0d
2021-02-15policer: add api to bind policer to workerBrian Russell4-3/+76
Add a new api to allow a policer to be bound to a specific worker thread for thread handoff. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I2623a6827843c3d93c0d7b4ad7c2e13611ec1696
2021-02-15interface: Add promisc on/off in apiNathan Skrzypczak2-32/+76
Type: feature Change-Id: Ib777a5201f1c728438c7a5f2b1aa2246f1344b9b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-02-15fib: Always honour flow hash flagNeale Ranns4-17/+50
Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Id7b27edf3712aaa3c277e752b9ca78bb91d184a1
2021-02-12ipsec: Store thread-index in buffer meta-data during SA handoffNeale Ranns7-32/+22
Type: improvement negates the need to load the SA in the handoff node. don't prefetch the packet data, it's not needed. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I340472dc437f050cc1c3c11dfeb47ab09c609624
2021-02-12policer: tidy upBrian Russell3-162/+50
Convert old logging style to new and remove unused tracepoints. Remove code always conditionally not compiled. Make comment style consistent. Type: improvement Change-Id: I13339f28539cf190fb92be2d5c8020b6249319c8 Signed-off-by: Brian Russell <brian@graphiant.com>
2021-02-12policer: use enum typesBrian Russell5-41/+31
Make the policer action enum packed and use it in the policer code. Use other policer enums where applicable. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I32f9735942af8bca3160b9ef8a75f605d9aba5fa
2021-02-12policer: remove SSE2 prefixBrian Russell9-486/+427
The policer code uses a naming convention of prefixing a lot of its definitions with "SSE2" when in fact there is nothing SSE2 specific about them. This is confusing so remove the prefix. Unfortunately it has to stay in the API definitions for backward compatibility. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I59a7df9fd5ded2575f2e587b2768a025a213b07c
2021-02-11tests: tag the tests that do not work with multi-worker configurationAndrew Yourtchenko3-0/+6
If the multi-worker default VPP configuration is triggered by setting VPP_WORKER_CONFIG="workers 2", some of the tests fail for various reasons. It's a substantial number, so this change marks all of the testsets that have this issue, such that they can be addressed later independently. Type: test Change-Id: I4f77196499edef3300afe7eabef9cbff91f794d3 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-11policer: use ip dscpBrian Russell5-67/+8
Use the common IP definitions of DSCP rather than duplicating in the policer code. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Iff4bc789356edc290b9c31eca33e93cf5b6211bf
2021-02-10vcl: validate seg handle on migrate only if neededFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3c15a465f84f2ceb6bd5f1c459899824d4bc1c90
2021-02-10tests: add policer testsBrian Russell1-0/+123
Add some tests which configure policer params, use the policer test helper CLI to police pretend packets and then check the policer stats. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Ib2688b6f77d84a4bfd3c8185e44c59fa2300716a
2021-02-10ipsec: Use the new tunnel API types to add flow label and TTL copyNeale Ranns14-263/+367
support Type: feature attmpet 2. this includes changes in ah_encrypt that don't use uninitialised memory when doing tunnel mode fixups. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ie3cb776f5c415c93b8a5ee22f22586fd0181110d
2021-02-10nat: fix EI hairpinning thread safetyKlement Sekera1-0/+1
Avoid doing inter-thread reads without locks by doing a handoff before destination address rewrite. Destination address is read from a session which is possibly owned by a different thread. By splitting the work in two parts with a handoff in the middle, we can do both in a thread safe way. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I1c50d188393a610f5564fa230c75771a8065f273
2021-02-09l2: crash on l2_input_is_xconnectSteven Luong1-10/+8
Running vpp without any interface configured and then invoking the binary-api l2_xconnect_dump causes vpp to crash in l2_input_is_xconnect due to l2input_main.configs has no memory allocated to it, not even for the local interface which exists all the times. The reason that l2input_main.configs has no memory allocated to it was due to gerrit patch 29232 which took out a line in l2input_init /* Create the config vector */ vec_validate (mp->configs, 100); The fix is to iterate through l2input_main.configs for each interface in l2 to call l2_input_is_xconnect when dumping l2_xconnect interfaces. Type: fix Fixes: gerrit 29232 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I8d9cba4b7eba4c2e0c60887c4fd57d5ec3b06d3b
2021-02-09tls: dtls initial implementationFlorin Coras4-30/+247
Type: feature Basic dtls transport protocol implementation that relies on openssl wire protocol implementation. Retries/timeouts not yet supported. To test using vcl test apps, first ensure all arp entries are properly resolved and subsequently: server: vcl_server -p dtls 1234 client: vcl_client -p dtls <server-ip> 1234 -U -N 2000000 -T 1460 -X Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I04b4516a8fe9ce85ba230bcdd891f33a900046ed
2021-02-09session: coverity fixesFlorin Coras1-2/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2828287c58115aa08c0a4297c01cea60f41f4749