aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2022-06-29ipsec: add/delete ipsec fast path policyPiotr Bronowski6-59/+717
This patch introduces functions to add and delete fast path policies. Type: feature Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I3f1f1323148080c9dac531fbe9fa33bad4efe814
2022-06-28session: fix connected udp acceptsFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0963bae4b56b08c0a9ab4ee1f2738013217e1fb7
2022-06-28session quic: allow custom config of rx mqs seg sizeFlorin Coras1-2/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Idc0fdebfea29c241d8a36128241ccec03eace5fd
2022-06-28ipsec: introduce spd fast path typesPiotr Bronowski1-0/+63
This patch introdcues basic types supporting fast path lookup. Fast path performs policy matching with use of hash lookup (particularly bihash tries has been used for that purpose). Fast path lookup addresses situation where huge number of policies is created (~100k or more). In such scenario adding/removing a policy and policy matching is not efficient and poorly scales (for example adding 500k policies takes a few hours. Also lookup time increases significantly). With fast path adding and matching up to 1M flows scales up linearly (adding 1M of policies takes about 150s on the test machine vs many hours in case of original implementation, also matching time is significantly improved). Fast path will not deal well with a huge number of policies that are spanning large ip/port ranges. Large range will be masked out almost entirely leaving only a few bits for calculating the hash key. Such keys will tend to gather much more policies than other keys and hash will match most of the packets anihilating advantages of hashing. Having said that we also think that it is not the real life scenario. Type: feature Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I600dae5111a37768ed4b23aa18426e66bbf7b529
2022-06-28ipsec: change wildcard value for any protocol of spd policyPiotr Bronowski8-58/+300
Currently 0 has been used as the wildcard representing ANY type of protocol. However 0 is valid value of ip protocol (HOPOPT) and therefore it should not be used as a wildcard. Instead 255 is used which is guaranteed by IANA to be reserved and not used as a protocol id. Type: improvement Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I2320bae6fe380cb999dc5a9187beb68fda2d31eb
2022-06-14ip: reassembly - Add node level stats, fix customapp behaviorVijayabhaskar Katamreddy2-16/+77
Type: fix Added stats for success and failure cases Fixed Custom app behaviors for the error / drop cases Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: Id6e981c7be5c5b3cee5af2df505666d5558da470
2022-06-10ip: improve ip ACL tracesBenoît Ganne3-10/+26
Type: improvement Change-Id: I85c73cb940d81d0b249eda0d57de135bcd798418 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-06-08udp: add cli to dump registered portsBenoît Ganne1-0/+93
Type: improvement Change-Id: Ic949e3136a7cf27011d098a50e91920f83226ea9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-06-07classify: fix sesssion details apiNathan Skrzypczak1-1/+1
We were not allocating space for the variable length payload in the response message. Type: fix Change-Id: I345102f4555f66c5632ab0882ca1dd178e98eb7b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-06-07sr: SRv6 TEF behavior supportAhmed Abdelsalam3-3/+87
Adding support for the SRv6 TEF (Timestamp, Encapsulation and Forward) behavior defined in draft-filsfils-spring-path-tracing (https://datatracker.ietf.org/doc/draft-filsfils-spring-path-tracing/). Type: feature Change-Id: I7f38b593147daf8d27af9c983448cf82947e5bed Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
2022-06-03session: fix double free in CLIFilip Tehlar1-7/+2
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I646ac946d0b07929dfdd1966a4f4a3b697768040
2022-06-02ipfix-export: Fix frame leak in flow_report_process_send()Jon Loeliger1-1/+9
The flow_report_process_send() function always allocates a frame. However, when no template_send is needed, template_bi is ~0. When this happens, no vectors are placed in the frame. When the frame is then "put", a check for n_vectors == 0 prevents the frame from actually being placed back on the free list. Fix that by using a direct call to vlib_frame_free() when there are no frame vctors. Type: fix Signed-off-by: Jon Loeliger <jdl@netgate.com> Change-Id: I936b5cea4cb3c358247c3d2e1a77d034a322ea76
2022-06-01session: make sure fifos are freed on right threadFlorin Coras1-0/+4
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3c573641bd95fe899823b66f6c59a2525a18d293
2022-06-01ip: unformat_ip_address should no modify its argument on failureBenoît Ganne1-8/+9
When failing to match an ip address, we should not reset the ip address that could have been initialized by a previous match. Type: fix Change-Id: I026766391eb3eb8230f75f66bf4b681e774741d9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-27ip: reassembly - Fixing buffer leaks, corruption in v6 reasmVijayabhaskar Katamreddy2-42/+117
Type: fix *Buffer leaks and corruptions during internal errors, either overriding or missing to add the buffer to the list Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I1ead1eca1cde10a36d60dbfcfe36ca6375690b03
2022-05-26ip: reassembly - pacing reassembly timeouts for v6Vijayabhaskar Katamreddy1-9/+35
Type: fix Pace the main thread activity for reassembly timeouts, to avoid barrier syncs Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: Iebe9a38d2a7a6471afa6621f12bb545668dc8384
2022-05-25docs: update spelling word list and fix typosDave Wallace1-5/+5
- update wordlist and fix typos so that 'make docs-spell' passes - sort spelling_wordlist.txt - update docs maintainers list Type: docs Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I38ac7850c604c323427d2bb6877ea98bd10bcc38
2022-05-24devices: add af-packet v3 apiMohsin Kazmi2-0/+114
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I4679acbe4fd4400d57c0a79b0a6c74c8f1639703
2022-05-24flow: support generic flow and RSS action in vapiTing Xu4-3/+232
Add generic flow type and rss action type to vapi. It is to support creating generic flow rule via vapi. Type: feature Signed-off-by: Ting Xu <ting.xu@intel.com> Change-Id: Ifeaa007679487e02bd2903dc591d80a1caba33bc
2022-05-23ip: reassembly - fixing stepping index in a better wayVijayabhaskar Katamreddy1-8/+8
Type: fix pool_is_free_index() check is performed only for the first element Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: Icadc715a9b54761ec69805a134a69a262137536d
2022-05-23ip: reassembly - adding custom reassembly nodeVijayabhaskar Katamreddy1-13/+75
Type: fix Custom node functionality is missing in v6, so bringing in similar to v4 functionality into ip6 as well Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I28b0be2fc55a00bfc0b456b1caaa1dcf5641a44e
2022-05-20virtio: use the internal hdr offsets of buffer metadata for offloadsMohsin Kazmi2-39/+23
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ie63c360f2e42e9e5799f5c536453823ea95ed3b8
2022-05-19api: refactor api data storageDamjan Marion8-25/+31
single struct to hold all api handler, flags, etc. Provide functions to toggle flags instead of writing directly to internal data. Type: refactor Change-Id: I4730d7290e57489de8eda34a72211527e015b721 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-19 ip: reassembly - pacing reassembly timeoutsVijayabhaskar Katamreddy1-4/+29
Type: fix Pace the main thread activity for reassembly timeouts, to avoid barrier syncs Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: If8c62a05c7d28bfa6ac530c2cd5124834b4e8a70
2022-05-19ip: reassembly - increasing the nbuckets for reassVijayabhaskar Katamreddy2-47/+84
Type: fix Adding stats from debugging point of view Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I3118d3fd5d630fad80a42ab960e30459789123cf
2022-05-18ip: reassembly - increasing the nbuckets for reassVijayabhaskar Katamreddy2-2/+6
Type: fix as number of reass contexts increasing based on workers, increasing the number of nbuckets for bihash Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I83d061a709ecb8845ce745b18d03fdefc795787f
2022-05-17interface: fix overflow of link speed.Anton Nikolaev1-1/+1
Type: fix There were several places where mbps were converted to kbps for link_speed, but often drivers of devices set link speed to unknown (0xFFFFFFFF) on initialization, so there was multiplication of link_speed equal 0xFFFFFFFF(UINT32_MAX) by 1000, this provides overflow of unsigned int, and as result link_speed was equal 4295 Gbps, but actually link_speed is unknown. Signed-off-by: Anton Nikolaev <anikolaev@netgate.com> Change-Id: Ib462ed6ed685654af4687041e115bfb74e640f13
2022-05-16ip: format table ids with %uNathan Skrzypczak1-2/+2
Type: fix Change-Id: I69f7e23b23e8cfcfe57ba019862470e0eb4b06db Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-05-16vlib: exec cli line-by-line processing and script updatesDamjan Marion1-5/+5
Type: improvement Change-Id: I82e7c0acc547794bcc7c42f4b8881a8251bf7a9b Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-14session: revert "fix session cli maybe parse wrong args if executed in files"Damjan Marion1-38/+27
Fixed at infra level. Type: improvement Change-Id: I43cf16870c1d2e12189073f7786d62375c46e2c2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-13vlib: process startup config exec scripts line by lineDamjan Marion1-1/+1
This fixes long standing annoyance that CLIs with optional args cannot be executed from file, as they cannot distinguish between valid optional args and next line in the file. Multiline statements can be provided simply by using backslash before \n. Also comments are supported - everything after # is ignored up to the end of the line. Example: # multiline cli using backslash show version \ verbose # end of line comment packet-generator new { \ name x \ limit 5 \ # comment inside cmultiline cli \ size 128-128 \ interface local0 \ node null-node \ data { \ incrementing 30 \ } \ } Type: fix Change-Id: Ia6d588169bae14e6e3f18effe94820d05ace1dbf Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-13ip: reassembly - Fixing buffer leaks, corruptionVijayabhaskar Katamreddy1-50/+126
Type: fix *Buffer leaks and corruptions during internal errors, either overriding or missing to add the buffer to the list Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I6c2406cff53a741e800e2d05593696f3e9fd6ff5
2022-05-10ip: reassembly: add documentationKlement Sekera1-0/+221
Type: docs Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I23008cde47d8b7a531346eab02902e2ced18742a
2022-05-10ip: fix buffer leaks in reassemblyKlement Sekera2-29/+32
Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I952ba7e042779855e29628d048da7edec1caaafd
2022-05-09vhost: memory leak upon deleting vhost-user interfaceSteven Luong1-3/+1
We allocate vring_spinlock for all vrings in the vui, not just the ones being used. So when we free the vui, we have to free vring_spinlock for all vrings, not just the one being used. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I3951fda71ce6e11474b04302116ea9e08b404758
2022-05-08devices: fix crash on invalid interfaceGabriel Ganne1-2/+5
Type: fix A simple "create host-interface name xxx" is enough to trigger the bug: The interface is not found, and we goto error with apif=NULL Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com> Change-Id: I2f894176d39b3d15efab054dc7340e7a0600a2e8
2022-05-06session: fix session cli maybe parse wrong args if executed in filesXiaoming Jiang1-29/+28
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: Id19a52df4f237cf5d85d305fdc279ab7df2d6f4b
2022-05-05policer: output interface policerStanislav Zaikin5-24/+140
Type: improvement Change-Id: Ibc1b5059ed51c34334340534e9eb68121f556bce Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
2022-05-05udp: remove buggy assert in udp encapBenoît Ganne1-2/+0
It looks like in a distant past we were using a vnet_rewrite but this no longer the case. Type: fix Change-Id: Ib8d336aec7d5abd7749f543739f531144e76e551 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-04tls: free app session if connect notify refusedFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iee6784c37a835b49d962ae6f87c279cbe65dde15
2022-05-04vhost: use_custom_mac set in create_vhost_user_if_v2Fahad Naeem1-0/+1
Type: fix set use_custom_mac for args in create_vhost_user_if_v2 API Add testcase for custom mac-address Signed-off-by: Fahad Naeem <fahadnaeemkhan@gmail.com> Change-Id: Iac64d818e0f1e6d36187fe769ee33d202aaafd05 Signed-off-by: Fahad Naeem <fahadnaeemkhan@gmail.com>
2022-05-03ipsec: support per next-header next-nodesBenoît Ganne3-36/+100
Type: feature Change-Id: I940b6c9d206e407f3e17d66c97233cd658984e61 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-02vapi: support api clients within vpp processOle Troan1-12/+16
Add vapi_connect_from_vpp() and vapi_disconnect_from_vpp() calls to allow API clients from within VPP process. Add a new memclnt_create version that gives the user a knob to enable or disable dead client scans (keepalive). Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Id0b7bb89308db3a3aed2d3fcbedf4e1282dcd03f Signed-off-by: Ole Troan <ot@cisco.com>
2022-04-28session: fix coverity warningFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I67f5a2c8902dd14c09472c25599b3b1b493a6948
2022-04-26linux-cp: sync addr and neigh only for lcp interfacesStanislav Zaikin4-4/+8
Type: fix Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com> Change-Id: I792467b73449074e59c4232b1f82d134c399624c
2022-04-26flow: enable RSS queue group action for 5G enhancementTing Xu2-1/+22
Enable the flow action for RSS queue group. Packets can be distributed among queues in group based on specific fields. Queues must be continous in the group. This feature is to support 5G enhancement requirement. Type: feature Signed-off-by: Ting Xu <ting.xu@intel.com> Change-Id: I74fdc617659bcb61f00b3b1934c95ab1c73bb8f3
2022-04-26session: export session counts to stats segmentFlorin Coras1-0/+40
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I02aec410eaa7ccb999159b6967414fbaf4e76a3f
2022-04-26stats: string vector and node collector improvementsDamjan Marion1-26/+12
Type: improvement Change-Id: Ibdadeb4e685f45a93f45504a84709391489abb6a Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-22session: fix ctrl evt rpc elt pool reallocFlorin Coras1-5/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I79bfe91e81983b619c61a32285d8e038c2654147
2022-04-21session svm: fix mq producer wait on q and ringFlorin Coras2-7/+5
Make sure producer drops lock when it waits for empty ring slot. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id77d54ee8c01bed20c9eaf5ad372ed4b1e9fa712