aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-09-09api: enforce vla is last and fixed string typeOle Troan20-256/+260
Enforce that variable length fields are the last element of API messages. Add a 'fixed' version of string type, since dealing with multiple variable length strings turned out too painful for the C language bindings. The string type is now: { string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64] string name[]; // Variable length string with embedded len field (vl_api_string_t) }; The latter notation could be made available to other types as well. e.g. { vl_api_address_t addresses[]; } instead of { u32 n_addr; vl_api_address_t addresses[n_addr]; }; Type: fix Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit e5ff5a36dd126ee57dca4e0b03da2f7704e0a4f5) Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-07ip: fix udp/tcp checksum corner casesDave Barach12-5/+1035
When checksumming chained buffers with odd lengths: insert a NULL byte, or the calculation fails. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: John Lo <loj@cisco.com> Change-Id: I380f7c42897bdb28c8c29aa1c4cdaaa849cc9ecc (cherry picked from commit c4abafd83df38051765352785b146277734701f4)
2019-09-05tap: revert clean-up when linux will delete the tap interfaceMohsin Kazmi2-43/+0
Type: fix Ticket: VPP-1766 revert e4ac48e792f4eebfce296cfde844ee73b1abd62f Change-Id: I03feea4008a47859d570ad8d1d08ff3f30d139ef Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-09-05crypto: add '-maes' compile switchBenoît Ganne2-2/+2
AES intrinsics use builtins available only with the -maes and GCC 9 just started to enforce it. Type: fix Change-Id: Ia6825ea3eae7191a4bfee47f9fa93fad16ccf76c Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 561be280feb6a10834bf50e0813cc0ad3c635067)
2019-09-05gbp: add unknown remote EP redirect unit testBenoît Ganne1-6/+27
Type: test Change-Id: I1dfbeef08a4f112551450682fc4040820251485b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-05gbp: add remote EP redirect to remote SEP unit testBenoît Ganne1-1/+94
Type: test Change-Id: I4dd685f9acd4d467e0967e6fdd428558ffc8b209 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-04quic: handle session migration notificationsAloys Augustin1-63/+38
Rely on the migrate callback to move quic connections to follow the underlying udp connection placement. Change-Id: Ia1cf3a16187bbe48f5afb3d1f444427f288ff79c Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit 243e1933bbecce0a251a5ff71c12dced9e30823f)
2019-09-04ethernet: fix dmac check avx2 loop conditionMatthew Smith1-1/+1
In eth_input_process_frame(), a loop which checks the destination MAC address of received packets had a different condition for avx2 than it did for the non-avx2 version of the loop. It could result in one unnecessary execution of the loop body after all packets had been processed. Type: fix Fixes: 8d6f34e2b1cbfde5702e88686631527d5e1e10a0 Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit a6d4e3135b70db1b1df3f8852e1e229d13c24e72)
2019-09-03vppinfra: add bihash_init2Dave Barach2-20/+53
Add controls to list / not list a specific bihash in clib_all_bihashes, to immediately initialize a bihash. clib_bihash_init2 is now the primary API. It takes a typical args_t structure. clib_bihash_init becomes a compatibility widget. It fabricates an args_t and calls init2... Type: refactor Ticket: VPP-1758 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib3e1304884997cf7025af20bdc67a7dda290f15b (cherry picked from commit bdf9b97774f02458ede6b7c7ae2d5728bddba000)
2019-09-03tap: interface rx counter not increment correctSteven Luong1-1/+1
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Ticket: VPP-1759 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6db042186eeeacf32250f7ef261af8cd6f5ce56e (cherry picked from commit efa119db3910e77f79eb005c67f8c01b473b40a1)
2019-09-03vmxnet3: interface rx counter not increment correctlySteven Luong1-1/+1
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Ticket: VPP-1760 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: If50412dc1e84c4f1f5b977b58d0e1aeb5ab8ebe6 (cherry picked from commit ddf625d6035d9e472bcb1a2b0197f6fd30278583)
2019-09-03nat: handoff traffic matching for dynamic NATFilip Varga9-222/+493
Type: feature Change-Id: I5c5af6f9acb340cc674323305104b8ce23e6d21d Signed-off-by: Filip Varga <fivarga@cisco.com> (cherry picked from commit 22bb417e91c7bdf639b24b5edd321028f56ea04a)
2019-09-02acl: perform a sanity check of ACL rules before creating ACLAndrew Yourtchenko1-0/+65
Adding acl with incorrect arguments like 1.1.1.1/24 (instead of 1.1.1.0/24) don't cause a disaster, but doesn't match either, as some might expect. Add an explicit sanity check which returns an error. Type: fix Change-Id: Id1601f4b9c9887d3e7e70aac419d1f1de0c0e012 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-09-02ip: ip6_preflen_to_mask incorrect result for prefix len > 64Andrew Yourtchenko1-0/+1
The as_u64[0] in the result was not correctly filled in for longer prefix lengths. Type: fix Fixes: 1c7104514c Change-Id: I871772c618475396d1c1c4c699ff77e35097f07e Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 59ac9c23c47962fbbd935e7075ff7ee89e955847)
2019-09-02gso: fix segmentation when gso_size greater than vlib buffer sizeMohsin Kazmi1-1/+4
Type: fix Ticket: VPP-1751 Change-Id: I5ffb078492adc97374290de404f2ec0102b75184 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 3f1964d2d2847c5307694fe8daea0a7eef1e2733)
2019-08-30dpdk: enable checksum offload for Intel SRIOV NIC driversJohn Lo1-0/+8
Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2 (cherry picked from commit 03598c4bcc639cbfc9afa13c5b4e52440f9eae2b)
2019-08-26avf: properly set irq queue masksDamjan Marion1-1/+2
Type: fix Fixes: ae91180 Change-Id: I9c55c3fdf41089d337b998e2e28abb23d81525ef Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit 2ca9a84bd00f2aee642d0147c1b99d4be5725a70)
2019-08-23tests: move plugin tests to src/plugins/*/testDave Wallace33-0/+30016
- Relocate plugin tests for 'make test' into src/plugins/*/test so that plugin test cases are co-located with the plugin source code. Type: refactor Ticket: VPP-1754 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I503e6a43528e14981799b735fa65674155713f67 (cherry picked from commit a43c93f8554ad7418e31be3791b3fb71232f60ac)
2019-08-23dns: cherry-pick 21444, 21468 from masterDave Barach16-405/+789
Type: refactor Ticket: VPP-1752 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ieaec721056531ba0c70538c9bf97769a0e80aefd
2019-08-20devices: skip checksum calculation if guest supports checksum offloadSteven Luong1-3/+7
Set VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD for the interface to skip checksum calculation if guest supports checksum offload. Type: fix Ticket: VPP-1750 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie933c3462394f07580ef7f2bec1d2eb3b075bd0c (cherry picked from commit a75ad876401a700127ebf234fc422e76fcd57b4c)
2019-08-20tcp: default to debug disabledFlorin Coras1-1/+1
Type:fix Ticket:VPP-1737 Change-Id: Ib5c33f0bdb3a8b1c2585135fcc8c07b151e47df3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-20dns: handle multiple replies for single requestsDave Barach3-59/+121
The world is a mess. A single DNS request may yield multiple, subtly different responses; all with the same DNS protocol-level ID. Last response wins in terms of what ends up in the cache. First response wins in terms of the response sent to the client. Hard to do otherwise since we have no clue that more than one answer will be forthcoming. Type: fix Ticket: VPP-1749 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I3175a40eb1fea237048d16b852a430f5ab51eaef (cherry picked from commit e8d2dcb6a619f0884ece2284a286f21b3aa77e5a)
2019-08-19dhcp: resolver process node index in main_tDave Barach4-5/+3
Remove the (unused) node_registration_t, don't try to use it to signal resolution events. Type: fix Ticket: VPP-1746 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ice975e32152892ac4100b9e758412d48a43f09f1 (cherry picked from commit 018c14b7dbc5a910693f150045bfa803c4ae4eec)
2019-08-19gso: fix l3 and l4 header offset in case of tagged interfaceMohsin Kazmi2-0/+28
previously, PG and virtio interfaces calculate wrong l3 and l4 header offset. This patch fixes this issue. Type: fix Ticket: VPP-1739 Change-Id: I5ba978e464babeb65e0711e1027320d46b3b9932 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 14bea1bb6505c0134dd5d2a18bcc436ce72cd149)
2019-08-18gso: fix the segmentation to use current_data offsetMohsin Kazmi1-15/+16
Type: fix Ticket: VPP-1740 Change-Id: If3e34b5b8260e4c50af338895066c2c96f4603af Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 0a5734372d7176146126f83f51b0b9062f90fe94)
2019-08-17gso: remove the ip checksum flag in case of ipv6Mohsin Kazmi2-2/+0
Type: fix Ticket: VPP-1727 Change-Id: Icfee35c5ab5e1c65079d1ca7bb514162319113e5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 7dfcf7f1f504f5e8283c54a428805cc3a4aa8da9)
2019-08-16tcp: fix cc algo name parsingFlorin Coras1-1/+1
Type: fix The initial config parser passed a pointer to the field algo id field in tcp main. Because the field is a u8 and it was interpreted as a uword, it ended up overwrting other tcp configuration fields. Change-Id: Ie9020051c8fca40e14cf42a9888daa87360e5038 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit d25d364d2bc146d3e17ab7c4d558bcb0ce138b89)
2019-08-15vlib: copy trace_handle in vlib_buffer_copy/clone() functionsJohn Lo7-19/+3
Since vlib_buffer_copy() and vlib_buffer_clone() both preserve VLIB_BUFFER_IS_TRACED bit in flags field, it should also copy trace_handle which would add minimal overhead. Thus, callers of these functions do not have to call vlib_buffer_copy_trace_flags() to copy trace_handle. Type: refactor Ticket: VPP-1745 Signed-off-by: John Lo <loj@cisco.com> Change-Id: Iff6a3f81660dd62b36a2966033eb380305340310 (cherry picked from commit 6631780422787166550b9871c46a94c160416324) Signed-off-by: John Lo <loj@cisco.com>
2019-08-15acl: fix stats-segment counters validation on acl updateAndrew Yourtchenko2-8/+46
The stats-segment validation/clear logic for acl counters was wrong, fix it. Also add the code to the unittests to cover that case, add a vat command to enable/disable counters, clean up the unnecessary endian conversion and remove the stray clib_warning() Change-Id: I421297a92e4aeb885c468c72a97cec25981df615 Type: fix Ticket: VPP-1744 Fixes: f995c7122ba0d024b17bc3232e8edd18d5e25088 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-14tcp: extend protocol configurationv19.08-rc2Florin Coras5-133/+195
Type: feature Ticket: VPP-1736 Expose more configuration parameters and refactor some of the existing ones. Change-Id: If44c31ff77ce3d7e8da67d39a4ff61346bdf5ccc Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 9094b5c319d3f072d3c248fe7c876e4048c13ac2)
2019-08-14svm: fix svmtool and svmdbtool segment fault.Guanghua Zhang2-0/+4
Type: fix Ticket: VPP-1741 Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com> Change-Id: Ifd3abaa5ec912378dbc7b73c4863aad26777dd7e (cherry picked from commit 60f16c22b44625d517830b4266a225d3abaccefc)
2019-08-14gbp: do not scan gbp bihash if not instantiatedBenoît Ganne1-0/+6
Type: fix Fixes: 32dcd3b2f227dec638c39ade0c58d6741d83ec30 Change-Id: I42550fcc5b3fa486a05770d3e220d7a86315628e Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-13session: fix enqueue notification on 32bit systemsFlorin Coras1-3/+10
Type: fix Ticket: VPP-1736 Change-Id: I7b5566525fc30fe0d3cc8cd991960f6ed2f1fc27 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 5d8a806144fbf46c0575ef24ae081724dfbdbe75)
2019-08-13fib: add adj_midchain.h to the list of files to install in the include pathAlberto Compagno1-0/+1
Type: fix Ticket: VPP-1735 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Change-Id: I7063516a60bb211ad91ef04041b2751ca3f6598e
2019-08-12http_static: manual cherry-pick 21231,21246Dave Barach1-51/+94
Type: fix Ticket: VPP-1736 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ie34d1b7d7030c160972f3173a4401ef632e38633
2019-08-12tcp: handle fin+rst+syn in closing stateFlorin Coras1-0/+2
Type: fix Ticket: VPP-1736 Change-Id: I32d4d4a5de04e89087f4ab4a5c425eda572932a8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-12http_static: tls supportDave Barach1-100/+356
Type: refactor Ticket: VPP-1736 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I45745e568cd943293d0015a61f67ec799b6804d8 (cherry picked from commit 6b53fd5163de7d1f452b472ec3ad945f4dbd694c)
2019-08-12api: vppapitrace JSON/API trace converterOle Troan10-203/+664
Usage: vppapitrace.py [-h] [--debug] [--apidir APIDIR] {convert,replay} ... optional arguments: -h, --help show this help message and exit --debug enable debug mode --apidir APIDIR Location of JSON API definitions subcommands: valid subcommands {convert,replay} additional help convert Convert API trace to JSON or Python and back replay Replay messages to running VPP instance To convert an API trace file to JSON: vppapitrace convert /tmp/api.trace trace.json To convert an (edited) JSON file back to API trace for replay: vppapitrace convert trace.json api-edited.trace To generate a Python file that can be replayed: vppapitrace convert /tmp/api.trace trace.py vppapitrace convert trace.json trace.py Replay it to a running VPP instance: vppapitrace replay --socket /tmp/api.trace In VPP that file can be replayed with: vpp# api trace replay api-edited.trace This patch also modifies the API binary trace format, to include the message id to message name table. Ticket: VPP-1733 Change-Id: Ie6441efb53c1c93c9f778f6ae9c1758bccc8dd87 Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit edfe2c0079a756f5fb1108037c39450e3521c8bd) Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-10vlib: fix vlib_buffer_copy to preserve buffer flags bitJohn Lo1-3/+8
Make vlib_buffer_copy() preserve buffer flags bit the same way as that of vlib_buffer_clone() so both are consistent. Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I6c32aa1e88724b482ce2439d82019e690311b664 (cherry picked from commit 8ed2d524aa401a89547a1e059528f8a34bb8895f)
2019-08-09tls: mark as no lookup transportFlorin Coras3-15/+27
Type:fix Also fix transport close while handshake is ongoing. Change-Id: I004c56d2297d0847c2cb77202f8fba3edaacad29 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit d09236d17d86a5d50166b2017f8f30a560c6e1b8)
2019-08-09udp: fix rx event generationFlorin Coras1-6/+20
When session is owned by another thread, avoid postponing the generation of the rx event. Type:fix Change-Id: Ie6afc8116ce40e83d8aae0432b48e19b31287d8b Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 9cbf6818b37275199b6c0ebef0ef3d8ecaac0a3b)
2019-08-09session: allow closed transports to sendFlorin Coras1-4/+16
Type:fix Transports like tcp may notify session layer of a close but they may defer the connection's deletion (e.g., tcp time-wait). During that time, transports may still want to send packets. So, unless the session has no transport (transport-deleted state), allow the transport to send. Change-Id: I3ae335c7b951ff64be8529a5e3f3ad790feddc84 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit a678974cc52ac61dd6094c3f6649f9e3202be1cb)
2019-08-09tls: handle transport resetFlorin Coras1-1/+6
Type:fix Change-Id: I5994fb53dc4b9fd58920b3d67472c38b41db27c2 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit f03c49413f270386d46a82dd9a3bce819cf81250)
2019-08-09svm: fix fifo max writeable chunk computationFlorin Coras1-1/+1
Type:fix Change-Id: I60fdd7651a3d3fac505e7aec7a41f9d096022895 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit fcd26a039409e2697a6797e74b0c45544503e853)
2019-08-09tls: fix close with dataFlorin Coras3-13/+63
Type:fix Also changes the way the ctx is freed. TLS now waits for tcp delete notification before freeing the ctx. Change-Id: I2f606a9ce7b3755ae9d11d6fe714fe11b65dcb98 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit ef2b3357b4b2a682ef81ffa2c71cec14f83101d6)
2019-08-09tcp: fix zero rwnd sent checkFlorin Coras1-1/+1
Type:fix Change-Id: I1e6f2cb28c1bf544cc3d060b11c8935f9edb0eed Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit d1ba3d257788f1a65016a50a53d85f2b905874bb)
2019-08-09tcp: cleanup timersFlorin Coras4-142/+98
Type:refactor Change-Id: I37dbc8b55827d66c2578d6ab8b86ed7e18198aa6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-08udp: fix connections moveAloys Augustin2-1/+32
Without this the use of uc0 is racy between the current thread and the thread that owns it and will delete it. This also ensures we don't trigger a read event on the session before moving it to the right thread and notifying the application. Type: fix Change-Id: Icb1ca3ee5805ea3c0d2d424d4b23511465deb3b6 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit b3392334942ed5459edfa7f11e098f4eab3aa29a)
2019-08-07rdma: add missing symbolsBenoît Ganne1-2/+4
rdma-core-25.0 move some symbol to another library, make sure we link to it. Type: fix Fixes: ec757593859bd8c16839ea8a81a2ef4eb8b29539 Change-Id: I6b8a56ea5fc7787d3de0982015ed47b767557c06 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-07interface: fix checksum flagsFlorin Coras1-0/+3
Type:fix Fixes:4208a4c Change-Id: I7077788cd14f539b06ead5dc65d8411940438bae Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>