summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
AgeCommit message (Collapse)AuthorFilesLines
2017-05-11Handle RST of TCP connections in SYN-RCVD state, VPP-822Florin Coras1-8/+23
Change-Id: Ieb0c1e690d6ae082cfedb276252a31fab480e561 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-10Multi-thread enablement for the debug cli http serverDave Barach1-1/+20
Change-Id: Iec1f739fe24c722d0db6c10cc81b5e8333067ea1 Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-05-10Improve TCP option handling, VPP-757Florin Coras3-15/+54
Change-Id: Ica634536387d1196366ec96c52770287fcab0768 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-10Builtin debug cli http serverDave Barach1-0/+634
Visit http://<vpp-ip>/show/interface or similar. Change-Id: I076b4661cf19d1b94bb01efdadb5849446be915e Signed-off-by: Dave Barach <dave@barachs.net>
2017-05-10Ignore data in RST segments, VPP-723Florin Coras2-59/+53
Change-Id: I01650b3b10b79ec549be0d5eceb0e318c06fcb50 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-09Fix remaining 32-bit compile issuesDamjan Marion2-9/+12
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-09Add support for tcp/session buffer chainsFlorin Coras2-10/+10
Change-Id: I01c6e3dc3a1b2785df37bb66b19c4b5cbb8f3211 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-07Include TCP options in segment size computationFlorin Coras4-41/+96
Ensure that TCP data plus options does not exceed peer's advertised MSS. Change-Id: I0de824cb3619346f0394dd694942fc1cf33a82b7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-07Fix TCP loss recovery, VPP-745Florin Coras5-48/+72
Allows pure loss recovery retransmits only on timeout. Change-Id: I563cdbf9e7b890a6569350bdbda4f746ace0544e Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-02Fix TCP tx when snd_wnd < smssFlorin Coras1-3/+4
Fixes VPP-728, VPP-729, VPP-730 Change-Id: Ie8c6c0dd006f98527525e87d19b508bb8d39db69 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-01TCP ooo reception fixesFlorin Coras6-37/+186
- Improve svm fifo handling of out-of-order segments - Ensure tsval_recent is updated only if rcv_las falls withing the segments's sequence space - Avoid directly dropping old ACKs - Improve debugging Change-Id: I88dbe2394a0ad7eb389a4cc12d013a13733953aa Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-27[VPP-710] tcp TCP_TIMER_ESTABLISH timeout_handler occur segment faultflyingeagle231-1/+2
Change-Id: Ie43b8f1c91600d44dff67e9348fb2fe83efc60c2 Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
2017-04-25Session/tcp coverity fixesFlorin Coras5-101/+85
Change-Id: Ic5467df16e870b49c49678b1dbb40f4a2390b3c9 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-25Add sack tx unit testFlorin Coras4-18/+185
Change-Id: Ib91db6e531231bdc52b0104673a912bee024872f Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-24Debug CLI to magically create / delete a TCP sessionDave Barach4-55/+127
The session ends up in established state, and is hand-crafted to look like it was created by the builtin_server. This will come in handy for injecting packets into tcp46-established, along with ancillary debug CLI to adjust connection parameters. Immediate applications include screwball window cases, out of order segments, paws checking, and so on and so forth. Debug CLI script: loop create set int ip address loop0 6.0.1.1/8 set int state loop0 up set ip arp loop0 6.0.1.2 feed.face.babe test tcp server test tcp session packet-generator new { name tcp limit 1 node ip4-input size 100-100 interface loop0 no-recycle data { TCP: 6.0.1.2 -> 6.0.1.1 TCP: 11234 -> 1234 ACK window 2000 seqnum 0 acknum 0 incrementing 100 } } Change-Id: I866c2159376064b7d14f70531022c1fe949258c2 Signed-off-by: Dave Barach <dave@barachs.net>
2017-04-24Session layer improvementsFlorin Coras6-46/+41
Among others: - Moved app event queue to shared memory segment - Use private memory segment for builtin apps - Remove pid from svm fifo - Protect session fifo (de)allocation - Use fifo event for session disconnects - Have session queue node poll in all wk threads Change-Id: I89dbf7fdfebef12f5ef2b34ba3ef3c2c07f49ff2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-19Add more svm fifo unit testsFlorin Coras1-59/+246
Change-Id: Ifc07b3f90ac155c26c3a216e073b474b499ebd44 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-18Fix fifo ooo bugs and improve testingDave Barach5-56/+493
Change-Id: If3c01e318bcb740ca5b240c63f712e2167082a80 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-15Set lower bound on persist timerFlorin Coras2-7/+10
Change-Id: Ie98ecb8944e4d27e943797948fad41ec074d6720 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-04-14tcp: completed trace functionsClement Durand2-35/+110
* Populated the trace struct that weren't used before * Modified and created format functions to format tcp packets and connections * Completed the node definitions to add the format_trace function * Filled the tracing parts with `vlib_add_trace' calls in each tcp node function For the nodes in tcp_input.c, there is a verbose trace and a non-verbose trace. Each packet goes through tcp[4-6]-input which is traced with `format_tcp_rx_trace', and the other nodes are traced with `format_tcp_rx_trace_short'. Change-Id: I4f2eed023f5973c14343132a33b06131cf063aa2 Signed-off-by: Pierre Pfister <ppfister@cisco.com> Signed-off-by: Clement Durand <clement.durand@polytechnique.edu>
2017-04-13Session layer refactoringFlorin Coras7-61/+476
Major refactoring of the session layer api - Add attatch api for application binding to the the session layer - Simplify listen/connect calls - Update application CLI - Add transport endpoint to accept callback - Associate segment manager to application and allow for multiple binds/connects per app Additional: - svm fifo cleanup - add fifo free, format fns - add fifo offset enqueue unit test Change-Id: Id93a65047de61afc2bf3d58c9b544339c02065af Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-04-13tcp builtin_client: bug correction and short_helpClement Durand1-1/+2
The missing call to `vnet_session_enable_disable' would cause segfaults because of an uninitialized session pointer. Just as in the builtin server the session needs to be enabled for the client. The `short_help' of the CLI command was also populated with the arguments that are accepted in the parsing function `test_tcp_clients_command_fn'. Change-Id: I88c16efa80597dd19b406e8cf1c87aec1ec73573 Signed-off-by: Clement Durand <clement.durand@polytechnique.edu> Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-04-06Use thread local storage for thread indexDamjan Marion5-21/+21
This patch deprecates stack-based thread identification, Also removes requirement that thread stacks are adjacent. Finally, possibly annoying for some folks, it renames all occurences of cpu_index and cpu_number with thread index. Using word "cpu" is misleading here as thread can be migrated ti different CPU, and also it is not related to linux cpu index. Change-Id: I68cdaf661e701d2336fc953dcb9978d10a70f7c1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-02TCP cc/window management fixes and debuggingFlorin Coras7-114/+299
- added persist timer - update rcv_las whenever sending an ack - moved fifo size to its own cache line - improved session and builtin client debugging Change-Id: Ia649cf942cf0c061a713e8b67f0eb6974a6cd55b Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-28Unscrew builtin clientDave Barach1-4/+8
"test tcp client bytes 750000" deadlocks w/ Pr={1.0} Change-Id: Ifa56b0de7812b9f27aa5bce2874b740c46ab30bd Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-03-27TCP/session improvementsFlorin Coras11-365/+1695
- Added svm fifo flag for tracking fifo dequeue events (replaces event length). Updated all code to switch to the new scheme. - More session debugging - Fix peek index wrap - Add a trivial socket test client - Fast retransmit/cc fixes - tx and rx SACK fixes and unit testing - SRTT computation fix - remove dupack/ack burst filters - improve ack rx - improved segment rx - builtin client test code Change-Id: Ic4eb2d5ca446eb2260ccd3ccbcdaa73c64e7f4e1 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-03-16vlib: make runtime_data thread-localDamjan Marion1-10/+13
Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-13VPP-659 Improve tcp/session debugging and testingFlorin Coras6-130/+485
- event-logging support for tcp and session layer - improvements to uri test code - builtin_server on port 1234 - use the CLOSEWAIT timer when we rx FIN in FIN_WAIT_2 state Change-Id: Ibc445f164b2086b20323bf89c77cffd3059f570f Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dbarach@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-10VPP-659 TCP improvementsFlorin Coras6-54/+238
- builtin test echo server - fix SYN-ACK retransmit canceling - avoid sending spurious ACK if in LAST_ACK - improved client dummy test app - renamed tx fifo dequeuing and sending functions to avoid confusion - improved RST handling Change-Id: Ia14aad3df319540dcf6e6a4e18a9f8d423a4b83b Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-07Register TCP with IP only if session is enabledFlorin Coras2-6/+38
Change-Id: I73154179e78aeae5f879125237bce593d0978fae Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-04Cleanup URI code and TCP bugfixingFlorin Coras5-76/+257
- Add CLI/API to enable session layer, by default it's disabled - Improve rcv wnd computation - Improvements to tx path - URI code cleanup - Builtin test tcp server - Improve src port allocation Change-Id: I2ace498e76a0771d4c31a8075cc14fe33d7dfa38 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-01VPP-598: tcp stack initial commitDave Barach11-0/+6315
Change-Id: I49e5ce0aae6e4ff634024387ceaf7dbc432a0351 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Florin Coras <fcoras@cisco.com>