summaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.c
AgeCommit message (Collapse)AuthorFilesLines
2021-02-15quic: Coverity fixNathan Skrzypczak1-1/+1
Type: fix Change-Id: I744cedb9c1b57945af5e83057e4759964fd2e104 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-01-22quic: quicly v0.1.2 updateMathias Raoul1-85/+139
- update quic plugin with new quicly/picotls API - remove packet allocator - remove crypto batching - update picotls plugin - add cli for quicly congestion control configuration Type: feature Change-Id: If76ef31c43b430eea2f7674539b2112aee0f351e Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-10/+10
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-28quic: Fix protip #47 / unformat (input_line)Nathan Skrzypczak1-19/+41
Type: fix Change-Id: Id03f50c46d28c850865cc76692424d063a0c2cfb Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-09-24session tcp udp tls quic: improve cli formattingFlorin Coras1-1/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iae5dbb8aaaf82d8e95c2ee8bbbe6844c9dd49f80
2020-04-10quic: fix clean stream closeAloys Augustin1-9/+25
Properly close the stream sending side instead of resetting the entire stream. Change-Id: I2daca7e507daa7bf9cd6a27fa8828a9ea7d175f9 Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-04-04session tls: support tls deschedulingFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb8bb9c6deb92479fdd3e045778fe5ae4782d1ea
2020-04-03session: improve error reportingFlorin Coras1-9/+11
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-04-03session udp: fix transport flags and migrationFlorin Coras1-4/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f
2020-04-01session udp: support connect on listenersFlorin Coras1-1/+1
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6aaaec20a2b6d4c6ddfbe659d9402acc1be2f7e2
2020-03-30session udp: flag for connected udpFlorin Coras1-2/+4
Type: improvement This can be used as alternative to udpc Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic3f7efe6728b25d4a8a0b61ddb36de66b4672c4f
2020-03-27quic: Check quicly version tag at compile timeMathiasRaoul1-11/+7
- updates the quicly version to 0.1.0-vpp - adds workaround for quicly_send()/assert_consistency() failure Type: feature Change-Id: I4c7e0ffc720ad9a685b89046a83646d59febd6cd Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-03-25session: api to add new transport typesFlorin Coras1-0/+2
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If4dee6dba1ea942daa921d566b35cdecdda680ee
2020-03-24quic: disable vnet_crypto and batching if no crypto engines are loadedMathiasRaoul1-2/+12
Type: fix Change-Id: I95d3f8431b468cefc8777526dd3b988a299f0687 Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
2020-02-25svm: refactor fifoFlorin Coras1-17/+2
Type: refactor Switch from a wrapped byte space to a "continuous" one wherein fifo chunks are appended to the fifo as more data is enqueued and chunks are removed as data is dequeued. The fifo is still subject to a maximum size, i.e., maximum number of bytes that can be enqueued, so the max number of chunks associated to the fifo is also constrained. When enqueueing data, which must fit within the available free space, if not enough "supporting" chunk memory is available, the fifo asks the fifo segment for enough chunk memory to ensure that the write can succeed. To avoid allocating large amounts of small chunks due to small writes, if possible, the size of the chunks requested is lower capped by min_alloc. When dequeuing data, all the chunks that have been completely drained, i.e., head moved beyond the chunks’ end bytes, are unlinked from the fifo and returned to the fifo segment. The one exception to this is the last chunk which is never unlinked. Change-Id: I98c1dbd9135fb79650365c7e40c29238b96cd4ee Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-01-31quic: quicly crypto offloadingMathiasRaoul1-6/+91
- Implement our own quic packet allocator to allocate more memory at the end of the packet to store crypto offloading related data - 1RTT packets offloading encryption/decryption using vnet crypto - Add cli to change max packet per key Type: feature Change-Id: I7557fd457d7ba492329d5d8ed192509cbd727f9c Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
2020-01-31quic: update quicly to v0.0.10-vppMathiasRaoul1-1/+1
Type: feature Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Change-Id: I5452f8bbd0ff9e2a57f7bd7d134a8824efa5f30a
2020-01-06quic: call quic_send_packets only once per ctxAloys Augustin1-3/+7
This prevents unnecessary calls to quic_send_packets. Type: fix Change-Id: I7abe509aa8b7b9d5a01c9876046cf0f4507a79cf Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-01-02session: fix listener global endpoint lookupFlorin Coras1-1/+1
Type: fix Ensure listeners for app transport protocols are added to lookup tables using their session endpoints instead of their transport connections, which can override the network connection id in the transport connection. Change-Id: I56fa3666bb1422c0799fc7143cd099751ff6e2e6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-19quic: fix accept failureNathan Skrzypczak1-23/+23
Type: fix Change-Id: Ic85cedae268a3abc452a2b1d4cc6672a464e2d2c Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-18quic: Hotfix crypto context on migrateNathan Skrzypczak1-0/+17
Type: fix quicly_connections have internal references to crypto contexts which need to be updated when we switch thread as the supporting pools are thread-based. This under the assumption that the new contexts will be exactly identical Change-Id: I38083e59657ff068e347d9e7b47abe91a1167b6c Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-17quic: Implement crypto contextsNathan Skrzypczak1-68/+229
Type: feature Make quic use the crypto contexts. This introduces a crypto context pool backed by a hashtable giving ctx indexes by connect params (ckpair, engine, rx & tx fifo sizes). Applications keep the initialization vector common. Change-Id: I22ed6711196cd70a2f2f74240f12113c7af8dfcd Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-17quic: update quicly to v0.0.8-vppMathiasRaoul1-0/+1
Type: feature Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Change-Id: I7470d79d1e39716ff83ba2d2b320813d79e2554c
2019-12-11quic: Add support for unidirectional streamsNathan Skrzypczak1-5/+14
Type: feature Change-Id: I3a642626a444504594c5e3df40dbc92df54136f0 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-11quic: Use per thread next_cidNathan Skrzypczak1-7/+9
Type: fix Change-Id: Ia89427257b78f6f7ba62c9d1076bf0593ee2dca7 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-11quic: Add aggregated quicly statsNathan Skrzypczak1-67/+186
Type: feature Change-Id: Ice8de7030a0330cfe77a58657701f0703e0695dd Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-11quic: add more detailed statisticsMathiasRaoul1-0/+61
Type: feature Change-Id: I3df7b054ec08c7b307413d24468fc3df6a5aacc3 Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
2019-12-10quic: removing quicly_send call from quic_accept_connectionMathiasRaoul1-9/+21
Type: fix Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Change-Id: I429b50b88c8e029b06854c7433d0bc77619e98a3
2019-12-04quic: fix stream tx_fifo race conditionNathan Skrzypczak1-27/+48
Type: fix There is a race condition in when receiving TX from a client application : As egress_emit writes as much data as possible to the stream, if during egress_emit the app writes to the fifo, the data will be directly passed to quicly. Then TX callback happens and triggers a scheduler update telling quilcy the stream has data to send. When the next egress_emit is called and no more data has come, we have nothing to write, we return len = 0 to quicly which breaks an assert if a loss happens later on. Change-Id: I47e00a14dfc9068b5dac7b5c090a89124aea004f Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-04quic: clean accept/connect error codepathNathan Skrzypczak1-48/+51
Type: fix First attempt to clean the leftover state when accept_notify / connect_notify fails due to mq size constraints. vpp should now be left in a state such that clean state will eventually be reached when timers fire. Change-Id: I9e1166dab2778bf05d5af42d437769651369cae0 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-04quic: refactor connection search fnNathan Skrzypczak1-27/+31
Type: refactor Change-Id: I55aace44773e4fab0470d27b14dd68544f7d99c5 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-04quic: add conn-timeout config optionNathan Skrzypczak1-8/+10
Type: feature Change-Id: Ia9cb57b9f7c2d14a137556d6918763f1cb11850d Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-04quic: fix import typoNathan Skrzypczak1-1/+1
Type: fix Change-Id: Iab96ebc1579b0be5b711f975163f9ac96648d2ad Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-26quic: Refactor for crypto contextsNathan Skrzypczak1-154/+113
Type: refactor Change-Id: I5ec7079d34826edd7a3048ae1d44037386f5d3ff Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-22quic: Refactor quic rx callback for offloadNathan Skrzypczak1-111/+127
Type: refactor Change-Id: I1d90c8807e7eea4a77403bafc0628ec0d393c572 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-22quic: Remove qctx opening poolNathan Skrzypczak1-33/+15
Type: fix We don't need the pool anymore as we store the ctx index in the underlying UDP session opaque Change-Id: Iec9be9c84a1f929d94b084176a143d304b0acb83 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-20quic: Increase loggingNathan Skrzypczak1-29/+40
Type: fix Change-Id: I689649ad163e76fecdabe96a8c2be5be3068ffde Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-19quic: handle duplicate packet from quiclyDave Wallace1-2/+15
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Ia4b1eb3c704374e27b260d88ae6ab628754468d3
2019-11-07quic: Add support for ckpair & crypto engineNathan Skrzypczak1-19/+46
quic choice used ckpair is now the one passed to connect or listen via mq. The crypto engine is chosen with the value passed to connect or listen via mq: * If NONE(0) is provided, we default to quic_main. default_crypto_engine (picotls at init, can be changed via debug cli : quic set crypto api [crypto engine]) * If PICTOLS/VPP is provided, use this one * Other values return an error Type: feature Change-Id: Ifab893d6d03c83f202e6c7e7a9936f546a4b1530 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-06quic: free qctx after udp cleanupNathan Skrzypczak1-22/+58
Type: fix As udp_session.opaque is qctx index, qctx free needs to happen after session cleanup. This patch also introduces * assert timer stop on ctx free * debug cli for listing quic ctx Change-Id: I3a58d226b094a0bbdf090b4f3eccbc2e11c6329b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-11-04quic: enhance error reportingDave Wallace1-6/+19
Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I710d00e4a6c4356d0f00f7592bf14b55596ec6ae
2019-11-04quic: remove redundant function callsDave Wallace1-2/+0
- session_transport_delete_notify() is called before and inside quic_connection_delete() Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I5c79a3269e36c4aab5aa99fdfdac06c1334f0f6f
2019-11-01quic: fifo size is u32Dave Wallace1-10/+27
- Fix cli / config fifo size to only accept u32 size input. - Make cli / config fifo-size input type handling to be the same as vpp hoststack - Update external transfer tests to use new syntax with different fifo sizes for vpp_echo client/server and vpp. Type: fix Change-Id: Ia5ddb2b8d3d9908ab502352819eebeec8ac0971d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-10-31quic: fix wrong error checkingDave Wallace1-6/+1
- Revert error checking to previous ASSERT Type: fix Fixes: 7c7fa9066 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6d915d88bf932c74f9b866aec3bd1531e0cb47f4
2019-10-30quic: fix quicly fifo size mismatchDave Wallace1-3/+13
- This fixes an intermittent failure of the test_quic_ext_transfer test due to quicly being configured with the wrong fifo size which was taken from the cli or startup.conf file. The fifo size from the application context is now used when creating the quicly context. - Emit an error message if the entire chunk of a stream is not enqueued in the svm fifo. Type: fix Change-Id: I03847ea7d4cd7a617b577697dfe3afa969850937 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-10-09hsa: use crypto_engine_type_t for TLSNathan Skrzypczak1-1/+1
Type: refactor This patch does the following conversions TLS_ENGINE_X -> CRYPTO_ENGINE_X tls_engine_type_t -> crypto_engine_t It does not change numbering of engines Change-Id: I872dfaec3a6713bf4229c84d1ffd98b8b2419995 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-10-09session: Add certificate storeNathan Skrzypczak1-9/+9
Type: feature This changes the behavior of both API calls APPLICATION_TLS_CERT_ADD & APPLICATION_TLS_KEY_ADD certificates and keys aren't bound to an app, they are passed to it via connect / listen using the message queue. This should be followed by a per protocol (QUIC/TLS) crypto_context store to save devrived structs Change-Id: I36873bc8b63b5c72776c69e8cd9febc9cae31882 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-10-08hsa: make vpp_echo use mq instead of bapiNathan Skrzypczak1-1/+1
Type: refactor Change-Id: I4f370b09e22dbbc8920272df9a042dae04825bfc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-10-08session: add is_migrating flagNathan Skrzypczak1-49/+37
Type: fix Add SESSION_F_IS_MIGRATING flag for session. It is set by the session layer before poking the transport for migration. It's the transport responsibility to unset the flag & act apropriatly if RX happens on a migrating session. Change-Id: Ie722917f1cf9344d8f041cad4ed8b064fb5853b6 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-10-07quic: fix wrong condition in update_fifo_sizeMathiasRaoul1-1/+1
Type: fix Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Change-Id: If371cde9412be29634164830c58634da248ad0ae