aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-23tcp: generate closed notifications whenever tcp closesFlorin Coras1-1/+4
Type: fix This gives the session layer a chance to to cleanup events. Change-Id: I7499e94acf06340e2b19a1d91a4c61a63cd66c52 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-12session: add thread index to all formattersAloys Augustin1-0/+2
Add a thread_index argument to half-open and listener session formatters because QUIC can have listeners and half-open sessions in any thread. Change-Id: I1de60e35ece4c68ba8cfdd6b63f211bc620d687b Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Type: feature
2019-06-27tcp: Setup initial CWND as configuredVladimir Kropylev1-0/+4
Type: feature Change-Id: I7f476f4f81994c9c6cc2e8091de08adff4bcbc77 Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-06-27session: Add transport vft protocol optionsNathan Skrzypczak1-2/+4
Type: refactor Change-Id: I4e0afc206e4871596c2ed8a6ca00914a379f1526 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-25tcp: delivery rate estimatorFlorin Coras1-0/+6
Type: feature First cut implementation with limited testing. The feature is not enabled by default and the expectation is that cc algorithms will enable it on demand. Change-Id: I92b70cb4dabcff0e9ccd1d725952c4880af394da Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-11tcp: allow registration of new cc algo typesFlorin Coras1-1/+9
Type: feature Change-Id: I83e21b508a19df1beb207d961c8f2b52347deca0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-07tcp: add cc cleanup functionFlorin Coras1-25/+33
Type: feature Change-Id: I54521078cf96e459d041c86297c6ca80045bf0a3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-03ARP: add feature arcNeale Ranns1-8/+6
- arp-input, registered with the ethernet protocol dispatcher, performs basic checks and starts the arc - arp-reply; first feature on the arc replies to requests and learns from responses (no functional change) - arp-proxy; checks against the proxy DB arp-reply and arp-proxy are enabled when the interface is appropriately configured. Change-Id: I7d1bbabdb8c8b8187cac75e663daa4a5a7ce382a Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-05tcp: do not delete session on establish popFlorin Coras1-14/+16
Also: - force reset if wait close pops in fin-wait-1 with unsent data - adds more event logging. Change-Id: I4ddada046214fa71e17514cdec57b3026f84a283 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-04tcp: shorten wait in fin-wait-1 with fin rcvdFlorin Coras1-1/+2
Change-Id: Ifddc32ab3da0e691ac3df74ff26e19f6fa00fef7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02tcp: improve rcv process ack processingFlorin Coras1-0/+9
- Avoid doing cc in closing states. - Rest connections closed with unread data Change-Id: I97d46b0459f03ea5439eeb0f233b6c17d3e06dfd Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-27tcp: add cc algo lookup tableFlorin Coras1-7/+14
Change-Id: Ie7be0136c182cdc35193e47dd3249153c2f8d65e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-23tcp: make default mtu configurableFlorin Coras1-1/+5
Change-Id: I56d8d8d67d5590e24c1ddb54b0c63a2cb03798e1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-22tcp: improve handling of snd_nxtFlorin Coras1-2/+2
- avoid changing snd_nxt when doing fast retransmits - use snd_una_max only to keep track of the max seq number sent - simplify future ack testing Change-Id: I3580ad3aefe30128486c3375d0ac3f3f62c04c5e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-12tcp: print congestion control algorithm in cliFlorin Coras1-11/+12
And shuffle some of the other connection variables. Change-Id: Ib5361d0a45537a3bd2421b8e4145ea0f0e525d91 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-08session/tcp/vcl: fixes and optimizationsFlorin Coras1-7/+0
Change-Id: Idc7dfe743399dd8dee0f6b3ec83f194f3fca580b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-02session: cleanup/rename functionsFlorin Coras1-2/+2
- remove unused functions - rename old "stream" functions Change-Id: Icbb03daa9f9f1c58b5be5c38aa8a9cbcf9159b47 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-22tcp: keep snd sack block free listFlorin Coras1-0/+3
Instead of constantly reallocating the new sack block list, keep the old one as a reusable free list. Change-Id: Iad79a72204f97b96352c1c6eea66c2839a35cfe6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-22tcp: send enough dupacks to cover all sack holesFlorin Coras1-1/+1
Make sure we send enough dupacks to cover all the holes created in the last frame received. Also make sure we send all the blocks, not just the first. Change-Id: I9597a34ac14473d1cc3ad07d65bc37043e3d0582 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-18tcp: harden for high scale scenariosFlorin Coras1-3/+5
- Better handle buffer starvation scenarios - Handle case when both peers enter recovery due to packet loss. - Fix passive open establish cleanup Change-Id: I2f28baa2ff0383bb8f5f6d2452b49aa38ce69bce Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-09buffers: fix typoDamjan Marion1-1/+1
Change-Id: I4e836244409c98739a13092ee252542a2c5fe259 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-1/+1
Example: buffers { default data-size 1536 } Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-06transport: cleanupFlorin Coras1-3/+3
- move transport specific types to transport_types - add transport wrapper functions for interaction with transport protocol vfts Change-Id: I93f70d884585fc2f41c4a605e310c80e8a8972f2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-02session: improve show session cliFlorin Coras1-1/+5
Change-Id: If30cea80058752cedcc6ecc38e90bef8732c83d3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-04tcp: fix reset in syn-sentFlorin Coras1-2/+1
Change-Id: I6732adc06fbb3d4b427e671ddcfe6eabc08d4a1b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-03tcp: better randomize issFlorin Coras1-4/+32
Change-Id: I3638221e59024d6b7d82499d57e25b8e609f73cb Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-01buffers: remove unused codeDamjan Marion1-2/+1
Change-Id: If2bbfbc52994f5de0879763e0b7a7864498debb6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-01vcl/ldp: add write msg function and fine tuningFlorin Coras1-3/+5
Allows app to push data. Additionally, ensure reset/close replies are not sent unless vcl closes the session. Change-Id: Icbbf933cf57b55cfbcc7b802af0f83919a066f65 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-28session: free session after transport and app confirmFlorin Coras1-8/+8
In addition to that, a bit of refactoring. Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-26tcp: separate active and passive establish timersFlorin Coras1-36/+44
Change-Id: Ia2241e963cf45765d8d17c65eea781edbf74d4f9 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-24tcp: compute seq_end in tcp_inputFlorin Coras1-9/+10
syn/fin are no longer added to seq_end so they must be considered individually in each state. Change-Id: I5e3047194101c4fca2db9f9ad29a4a6468c397ab Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-22tcp: improve waitclose in closing statesFlorin Coras1-16/+44
Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-21tcp: fix fin_wait_1 condition to send finFlorin Coras1-0/+3
Also add the closed-waiting session state wherein the session still allows the transport to send oustanding data. Change-Id: Ic47807379906ef2010934381ff0b9e53c7e631d8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-20tcp: fix syn-sent resetFlorin Coras1-7/+9
Change-Id: I4a811672b27c70bf0e9652c175c7f4168ec40ed7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-19tcp: fix fin in syn-rcvdFlorin Coras1-6/+6
Change-Id: Iba7c08c9edcf76ea24d00d5ea9e0586e9f94df4e Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-19tcp/session: notify transport of close when tx fifo is not emptyFlorin Coras1-9/+14
Disconnect transport even if tx fifo is not empty and have transport deal with the problem. In case of tcp, add timer to fin_wait_1. If it expires and we're still in established state, cleanup but only after waiting for session tx events to cleanup. Change-Id: I45759a3c43dd096bb2c03daf5372416c30678d62 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17tcp: fix handling of broken syn optionsFlorin Coras1-1/+10
Change-Id: Ia8b2a077ba4897ddd15cf33221b191cd7a3f1d33 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17vcl/session: handle reset/disconnect before app acceptFlorin Coras1-2/+4
Also further improves reset handling. Change-Id: I6e517632f700f181761726b965134e0c217eb06d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13session/tcp: support tx flush markFlorin Coras1-0/+11
For tcp this means that the last enqueued data goes out with a psh bit set. Change-Id: I29d357ecae6f02e748b59a7b799150ec73d14ba2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05session/tcp: postpone cleanup on resetFlorin Coras1-1/+7
Change-Id: I45fd7538853f84c6c8bf804cc20acbc9601db3ba Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-7/+7
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-13tcp: cubic fast convergenceFlorin Coras1-0/+25
Change-Id: I3a15960fe346763faf13e8728ce36c2f3bf7b05a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-12tcp: handle disconnects after enq notificationsFlorin Coras1-0/+2
Make sure that we notify the app of the data enqueued in the burst before notifying of disconnect. Change-Id: I7747a5cbb4c6bc9132007f849c24ce04b7841273 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-09tcp: basic cubic implementationFlorin Coras1-1/+20
Because the code is not optimized, newreno is still the default congestion control algorithm. Change-Id: I7061cc80c5a75fa8e8265901fae4ea2888e35173 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-08tcp: pacer and mrtt estimation improvementsFlorin Coras1-3/+4
- update pacer once per burst - better estimate initial rtt - compute smoothed average for higher precision rtt estimate Change-Id: I06d41a98784cdf861bedfbee2e7d0afc0d0154ef Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-07tcp: consume incoming buffers instead of reusingFlorin Coras1-4/+11
Instead of reusing buffers for acking, consume all buffers and program output for (dup)ack generation. This implicitly fixes the drop counters that were artificially inflated by both data and feedback traffic. Moreover, the patch also significantly reduces the ack traffic as we now only generate an ack per frame, unless duplicate acks need to be sent. Because of the reduced feedback traffic, a sender's rx path and a receiver's tx path are now significantly less loaded. In particular, a sender can overwhelm a 40Gbps NIC and generate tx drop bursts for low rtts. Consequently, tx pacing is now enforced by default. Change-Id: I619c29a8945bf26c093f8f9e197e3c6d5d43868e Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-06tcp: dequeue acked only once per burstFlorin Coras1-3/+5
Avoid dequeuing acked bytes more than once per burst for a connection. Although the fifos do not use locks, size decrements are atomic, so they rely on locked instructions. Change-Id: Id65f4ea40b2c10057461402dfd0393034e6472d5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-05tcp: send unsent data in fast recoveryFlorin Coras1-32/+19
Allows sending of unsent data in fast recovery and consolidates logic in tcp, instead of splitting it between tcp fast retransmit and tcp output path called by the session layer. Change-Id: I9b12cdf2aa2ac50b9f25e46856fed037163501fe Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-02tcp: coverity fixesFlorin Coras1-7/+7
Change-Id: Ib15d629c5fde7849bfa3307f42659e920eb0f463 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-02session: measure dispatch period only if under loadFlorin Coras1-1/+12
Also reset pacer on tcp retransmit timeout Change-Id: I5a9edee4c00d1d169248d79587a9b10437c2bd87 Signed-off-by: Florin Coras <fcoras@cisco.com>