summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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-19ikev2: start counting msgid from 0Filip Tehlar1-2/+2
This fixes an issue when initiator is expecting request with intitial msgid being 0 but 1 is received instead which results in retransmission (instead of normally processing the new request). Type: fix Change-Id: I60062276bd93de78128847c5b15f5d6cecf1df65 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-02-19session vppinfra: asan fixesFlorin Coras2-4/+17
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie709d76438542783cbc8c6174b5e712ef18a6276
2021-02-18svm: fix active fifo ll on attachFlorin Coras1-0/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idf44f8d54c97fc43da5d5760e5ce477af07e5fbf
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-18vlib: add a "vpplog" debug CLIDave Barach2-0/+25
To add arbitrary text to the vlib log. Combines nicely with comment/uncomment and the macro expander: define MY_FEATURE uncomment # or comment ... $(MY_FEATURE) { vpplog { My feature was enabled } } Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia019f0a8fa670d8593ae01595f5ef410796e5b1c
2021-02-18vcl: epoll out deq notifications only if fifo existsFlorin Coras1-4/+7
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia37d8474224f6074826c9ffb82feb919b2ef52f7
2021-02-18tests: re-enable NAT44ED tests for multiworkerAndrew Yourtchenko1-1/+0
Re-enable the test for 2-worker config test Change-Id: Ie108c5d244c6704ffa152177ca77f6b6055fe38e Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-18tests: policer test check unformat return valuesBrian Russell1-4/+6
Keep coverity happy by checking the return value of unformat calls. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Iccd0296da527d079f79cc7bd8b57af1b524299bd
2021-02-18vat2: jsonconvert return checking - coverityOle Troan4-58/+66
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I8348645927519800d2390d27e01fae612602a6eb
2021-02-17misc: fix the linux-cp entry for NealeAndrew Yourtchenko1-1/+1
Change-Id: I0f51ddfa10ed38d23617a715f8db5a970960d126 Type: improvement Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-17vat2: add sanity checking - coverity errorsOle Troan2-0/+14
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I3cd56690fe52402d4cfa9ea67f1de53d8d919dee
2021-02-17vppapigen: resource leakage in fromjson array - coverityOle Troan1-1/+1
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I43283c59fd121dcb2486b26151108c90b027748b
2021-02-17linux-cp: fix coverity defectMatthew Smith1-0/+6
Type: fix If no host interface name is passed to the CLI command which creates an interface pair, NULL gets passed to lcp_itf_pair_create() and a seg fault occurs. Check whether a host interface name was provided and fail gracefully if none was given. Change-Id: I82886f4c2ee710e206c751c34a74399112e9062c Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-02-17vppapigen: more _fromjson autogeneration coverity fixesOle Troan4-7/+45
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I9a7bb617a3fa87d6ef49c75277e53425310cdcf9 Signed-off-by: Ole Troan <ot@cisco.com>
2021-02-16hsa: coverity fixFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I30fde452fdeeb9877f3e3fecb0dd723f10f61019
2021-02-16ikev2: fix coverity warningsFilip Tehlar2-100/+117
Type: fix Change-Id: Ia22b1189b82e885eb380f638ea6d05923a858f01 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-02-16stats: coverity errors leaking fdOle Troan1-1/+4
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I21368e37d70c5a64babd904bcf5f79339a5ab064 Signed-off-by: Ole Troan <ot@cisco.com>
2021-02-16vppapigen: coveriy missing check of return valuesOle Troan1-2/+4
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I424c2f283dab99c1856eb8d9a1444486d09e8e29
2021-02-16vppapigen: fix coverity issues in jsonconvertOle Troan4-53/+101
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I92e03a5a3fcbdab6ce4d178193dceb4450ac0f62
2021-02-16cjson: upgrade to new versionOle Troan2-14/+38
See if this fixes the coverity issues. Now at 324a6ac9a9b285ff7a5a3e5b2071e3624b94f2db Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I2cd281ebaeda69e214e6dc93a84888298741d0ee Signed-off-by: Ole Troan <ot@cisco.com>
2021-02-16vapi: add dedicated return code for client timeoutPaul Vinciguerra2-4/+16
Type: refactor Change-Id: I1fbabb743f20e21557c69bdaf97eda6f63584903 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-15svm: fix mq coverity warningFlorin Coras2-3/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1914366c17fa05305d57d842793fad372319256a
2021-02-15session: coverity fixFlorin Coras1-3/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic28ee0e7cd313686b820e7003a47d17b844b8a89
2021-02-15lisp: coverity fixesFlorin Coras1-6/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2a55a2fe0c483359c3b42ebe93cd0e8e279131d1
2021-02-15vlib: refactor checksum offload supportMohsin Kazmi34-264/+377
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 Barach3-7/+6
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I6a3348c7edd1cce6b407d336443103f77392bc5d
2021-02-15papi: add method to retrieve field optionsPaul Vinciguerra1-0/+9
Sample usage: cls.MEMIF_DEFAULT_BUFFER_SIZE = cls.vapi.vpp.get_field_options( 'memif_create', 'buffer_size')['default'] Type: improvement Change-Id: I298f4687623003a78c93a703d32f59a937e37bc2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-15tests: fix import in test/test_pcap.pyPaul Vinciguerra1-4/+5
Type: test Change-Id: Ib9192a12812b40090a0859cb73288aea27a3ca01 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-15ip: Path MTUNeale Ranns26-24/+2003
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 Russell10-34/+29
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-15vppinfra: fix memcpy undefined behaviourBenoît Ganne6-80/+123
Calling mem{cpy,move} with NULL pointers results in undefined behaviour. This in turns is exploited by GCC. For example, the sequence: memcpy (dst, src, n); if (!src) return; src[0] = 0xcafe; will be optimized as memcpy (dst, src, n); src[0] = 0xcafe; IOW the test for NULL is gone. vec_*() functions sometime call memcpy with NULL pointers and 0 length, triggering this optimization. For example, the sequence: vec_append(v1, v2); len = vec_len(v2); will crash if v2 is NULL, because the test for NULL pointer in vec_len() has been optimized out. This commit fixes occurrences of such undefined behaviour, and also introduces a memcpy wrapper to catch those in debug mode. Type: fix Change-Id: I175e2dd726a883f97cf7de3b15f66d4b237ddefd Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-15quic: Coverity fixNathan Skrzypczak1-1/+1
Type: fix Change-Id: I744cedb9c1b57945af5e83057e4759964fd2e104 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-02-15ikev2: fix rekey against strongSwanFilip Tehlar2-52/+94
When strongSwan rekeys it sends create child sa request first and then delete request for the old child sa (or vice versa depending on configuration) as opposed to sending just a single create child sa with rekey notify message. Type: fix Change-Id: I1fa55a607ca623cd3a6d887436207153c6f6bbf6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-02-15tests: test punt policer bound to worker threadBrian Russell3-2/+93
Add to the IP[46] punt policer handoff tests by binding the policer to a particular worker and checking all packets are policed on that thread. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I7fab28659ccb65f13f841cec65a3f808281b3f90
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-15vppapigen: py2 cleanup - remove subclassing of objectPaul Vinciguerra1-3/+3
Type: refactor Change-Id: I7136cb8ba101ea3917dacc31ceb3a76a31328301 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-15tests: explicitly close subprocess filesPaul Vinciguerra1-0/+2
Resolve the following error: /vpp/test/framework.py:657: ResourceWarning: unclosed file <_io.BufferedReader name=6> del cls.vpp Object allocated at (most recent call last): File "/usr/lib/python3.8/subprocess.py", lineno 844 self.stdout = io.open(c2pread, 'rb', bufsize) Type: test Change-Id: Ia2974da594f0582dcff1f4bdf40d25475769c46c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-15rdma: rdma_log__ argument dev is a pointerVratko Polak1-5/+8
Also apply style edits as proprosed by checkstyle. Ticket: VPP-1971 Type: fix Change-Id: I4332a4e32220f3076b4a373da01cc0022cde32f5 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-02-13nat: pnat only use save_rewrite_length on output pathOle Troan1-3/+2
Don't expect save_rewrite_length to be set correctly on RX path. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ieee40d119213f617c3d836181e5879f084b74548 Signed-off-by: Ole Troan <ot@cisco.com>
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-12dpdk: use whole vmbus address as hash key for devconfVladimir Ratnikov2-21/+22
u32[0] is not enough unique for some platforms like azure where several devices(not only network) can have almost the same addresses and this can cause collisions. Change hash to mhash type for vmbus devices with key of whole 16 bytes of vmbus address. Type: improvement Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: Ic6c6a657ae29f45beddd0c69d8e785e702349460
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 Russell6-44/+37
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-12docs: fixing VPP tutorialArthur de Kerhor3-6/+6
Updating ARP table command. Type: fix Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I02d6ac86aed4c83430f9d07bdeaa3e0f5c3ae73f
2021-02-12policer: remove SSE2 prefixBrian Russell11-531/+471
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-12vppapigen: coverity issues in autogenerated code pass 3.Ole Troan3-14/+88
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I5ee2e8aba3ee7281bbca11825dece79983e52f06