aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
AgeCommit message (Collapse)AuthorFilesLines
2018-04-30tcp/session: debug improvements/fixesFlorin Coras2-13/+11
Change-Id: I906e58b4f9827a79a6ab673f8fa2e03036c69820 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-20tcp: make newreno byte instead of acks dependentFlorin Coras4-3/+28
Should be more resilient to ack losses Change-Id: Icec3b93c1d290dec437fcc4e6fe5171906c9ba8a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-20tcp: improve statsFlorin Coras3-128/+177
Change-Id: I9ab11ba9f958c679112eb22c8db39cb269a29dc7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-29tcp: fix fib index buffer taggingFlorin Coras2-13/+18
Change-Id: I373cc252df3621d44879b8eca70aed17d7752a2a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-23tcp/session: sprinkle prefetchesFlorin Coras2-0/+16
Change-Id: Idef3c665580c13d72e99f43d16b8b13cc6ab746f Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-02session: first approximation implementation of tlsFlorin Coras2-1/+3
It consists of two main parts. First, add an application transport type whereby applications can offer transport to other applications. For instance, a tls app can offer transport services to other applications. And second, a tls transport app that leverages the mbedtls library for tls protocol implementation. Change-Id: I616996c6e6539a9e2368fab8a1ac874d7c5d9838 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-02-07Refactor vlib_buffer flagsDamjan Marion1-2/+2
Change-Id: I853386aebfe488ebb10328435b81b6e3403c5dd0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-01tcp: tcp_output.c failed to compile when VLIB_BUFFER_TRACE_TRAJECTORY is enabledSteven1-1/+1
Fixed a typo in tcp_push_header(). The typo only kicks in when the macro VLIB_BUFFER_TRACE_TRAJECTORY is enabled. Change-Id: I62832a4932ec5b14e3063d5eac113780851aae59 Signed-off-by: Steven <sluong@cisco.com>
2018-01-27Fix session/tcp coverity warningsFlorin Coras1-8/+11
Change-Id: I5c404eacb4a6c1e16485a6656168d9171ff49a8b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-27session: disconnect and echo client improvementsFlorin Coras1-1/+1
Change-Id: If421bad17b6cfe8e321257c93bb38931e37d7b64 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-26session: move builtin apps to their own folderFlorin Coras6-2782/+0
This consolidates builtin apps under session-apps folder. It also removes duplicate builtin echo server/client implementations. Change-Id: I75ed879399c5aa9b75b1eb38b33aedf69dd8df3f Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-25session: add support for memfd segmentsFlorin Coras6-33/+10
- update segment manager and session api to work with both flavors of ssvm segments - added generic ssvm slave/master init and del functions - cleanup/refactor tcp_echo - fixed uses of svm fifo pool as vector Change-Id: Ieee8b163faa407da6e77e657a2322de213a9d2a0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-23Fix typo / coverity warningDave Barach1-1/+1
Change-Id: I4a3a6803083f3d707351440486bba59d8194339f Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-0/+2
This is a version of the VPP API generator in Python PLY. It supports the existing language, and has a plugin architecture for generators. Currently C and JSON are supported. Changes: - vl_api_version to option version = "major.minor.patch" - enum support - Added error checking and reporting - import support (removed the C pre-processor) - services (tying request/reply together) Version: option version = "1.0.0"; Enum: enum colours { RED, BLUE = 50, }; define foo { vl_api_colours_t colours; }; Services: service { rpc foo returns foo_reply; rpc foo_dump returns stream foo_details; rpc want_stats returns want_stats_reply events ip4_counters, ip6_counters; }; Future planned features: - unions - bool, text - array support (including length) - proto3 output plugin - Refactor C/C++ generator as a plugin - Refactor Java generator as a plugin Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-11tcp: make proxy server uri cli configurableFlorin Coras2-3/+18
Change-Id: I94c7315558ccc9f3d4bcdefd09a696234bc56227 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-09api: refactor vlibmemoryFlorin Coras6-24/+20
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-22tcp: add builtin server/client transfer testFlorin Coras3-33/+59
Change-Id: Iab0baabf2f27bc7ad7fbf2d2789a493752b07d8a Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-15Fix icmp/udp/tcp punt/drop pathsVijayabhaskar Katamreddy1-10/+14
Send packets to ip4/6_punt/drop nodes instead of error-drop/punt nodes dbarach: clean up an annoying checkstyle issue: indent 2.2.10 (OpenSUSE version) and indent 2.2.11 (Ubuntu / CentOS versions) had an artistic disagreement about ip_frag.c. Change-Id: I660bee28a064af9c6c70371363081e941d1c3a94 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-14session: cleanup attach flagsFlorin Coras4-26/+36
Change-Id: I39d21d15677f57e10b69b8842f2cbca277abddf0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-12tcp/session: add make testsFlorin Coras1-11/+28
Change-Id: Icb93ab80c5a6432d7b2b698a47e8b612c6f06fbd Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-11session: generalize handling of network transportsFlorin Coras3-13/+18
- compute session type out of transport and network protos - make session, session lookup and session queue code network protocol agnostic This does not update the session layer to support non-ip network layer protocols Change-Id: Ifc2f92845e158b649d59462eb7d51c12af536691 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-29session: fix preallocation of local endpoint tableFlorin Coras3-20/+1
Change-Id: I67a73e31bda9e497859297fcc1765e880572884a Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-28tcp: fix retransmissions under buffer shortageFlorin Coras5-32/+82
- add debugging scaffolding for simulating buffer shortage Change-Id: Ice519d74f9c4e4094c4586c548185135b7bb5f2d Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-27tcp: fix proxy connection validationFlorin Coras1-0/+4
Change-Id: Icb0274cd3bcabfab8bdff6dec7440a3a15edfbf1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-21tcp: initialize builtin client nsFlorin Coras1-1/+1
Change-Id: I992f7f60e463b81bbdbd53957f656131fd48632b Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-20session/tcp: filtering improvementsFlorin Coras3-21/+30
- make allow action explicit (-3) - add session lookup is_filtered return flag that is set if lookup hit a deny filter - change tcp logic to drop filtered packets when punting is enabled Change-Id: Ic38f294424663a4e108439b7571511f46f8e0be1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-18test http server: prealloc fifos/segment optionsFlorin Coras1-3/+29
Change-Id: I5e36ea9335a9a633a112c27396997a765f279e06 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-16tcp: register with ip for header parsing by defaultFlorin Coras1-9/+12
Change-Id: I4e420bcc9241b03e179a939911059c0cc3704a51 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-14Fix builtin http server static request freeFlorin Coras1-0/+1
Change-Id: Ice61d4c6c281aa8c4e89447208e0ad047bcce639 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-09tcp: call accept notify after full connection initFlorin Coras1-9/+9
Change-Id: I69998aa4eb587d80fc61d14bb28a9318a318f9ec Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-08http_server_rx_callbackJingLiuZTE1-2/+8
http_server_rx_callback must return -1, if session_rx_request fails. Change-Id: I08e48ea7560dee301958e0babe023bb739b9342c Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
2017-11-02Add builtin http server option to return static replyFlorin Coras1-23/+97
Change-Id: I9f4d1c7ee7b460a93198930a5a935fa90177cdad Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-11-01session: add support for proxying appsFlorin Coras4-5/+5
To enable this, applications set the proxy flag in their attach requests and pass the transport protocols they want to act as proxies for as part of the attach options. When proxy is enabled, session rules that point incoming packets to the proxy app are addedd to the local and global session tables, if these scopes are accessible to the app. In particular, in case of the former, the rule accepts packets from all sources and all ports destined to the namespace's supporting interface address on any port. While in case of the latter, a generic any destination and any port rule is addedd. Change-Id: I791f8c1cc083350f02e26a2ac3bdbbfbfa19ece3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-28session: rules tablesFlorin Coras1-1/+1
This introduces 5-tuple lookup tables that may be used to implement custom session layer actions at connection establishment time (session layer perspective). The rules table build mask-match-action lookup trees that for a given 5-tuple key return the action for the first longest match. If rules overlap, ordering is established by tuple longest match with the following descending priority: remote ip, local ip, remote port, local port. At this time, the only match action supported is to forward packets to the application identified by the action. Change-Id: Icbade6fac720fa3979820d50cd7d6137f8b635c3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace3-2/+4
- Global variables declared in header files without the use of the 'extern' keword will result in multiple instances of the variable to be created by the compiler -- one for each different source file in which the the header file is included. This results in wasted memory allocated in the BSS segments as well as potentially introducing bugs in the application. Change-Id: I6ef1790b60a0bd9dd3994f8510723decf258b0cc Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-16udp: refactor udp codeFlorin Coras8-304/+126
Change-Id: I44d5c9df7c49b8d4d5677c6d319033b2da3e6b80 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-12tcp: do not format sb if not established (VPP-1018)Florin Coras1-2/+3
Change-Id: I011dda118f37cb31a37dda270027612d0af57ca0 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 87f141172212b7568f519653ab32ebd1b5d34344)
2017-10-10session: add support for application namespacingFlorin Coras8-146/+199
Applications are now provided the option to select the namespace they are to be attached to and the scope of their attachement. Application namespaces are meant to: 1) constrain the scope of communication through the network by association with source interfaces and/or fib tables that provide the source ips to be used and limit the scope of routing 2) provide a namespace local scope to session layer communication, as opposed to the global scope provided by 1). That is, sessions can be established without assistance from transport and network layers. Albeit, zero/local-host ip addresses must still be provided in session establishment messages due to existing application idiosyncrasies. This mode of communication uses shared-memory fifos (cut-through sessions) exclusively. If applications request no namespace, they are assigned to the default one, which at its turn uses the default fib. Applications can request access to both local and global scopes for a namespace. If no scope is specified, session layer defaults to the global one. When a sw_if_index is provided for a namespace, zero-ip (INADDR_ANY) binds are converted to binds to the requested interface. Change-Id: Ia0f660bbf7eec7f89673f75b4821fc7c3d58e3d1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-04[aarch64] Fixes CLI crashes on dpaa2 platform.Christophe Fontaine3-3/+3
- always use 'va_args' as pointer in all format_* functions - u32 for all 'indent' params as it's declaration was inconsistent Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79 Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-10-03tcp: updates to connection closing procedure (VPP-996)Florin Coras4-17/+63
- add separate TIME_WAIT time constant - fix output node for TIME_WAIT acks - ensure snd_nxt is snd_una_max after retransmitting fin - debugging improvements Change-Id: Ic947153346979853f2526824b229126e47aead86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03Repair vlib API socket serverDave Barach1-1/+0
- Teach vpp_api_test to send/receive API messages over sockets - Add memfd-based shared memory - Add api messages to create memfd-based shared memory segments - vpp_api_test supports both socket and shared memory segment connections - vpp_api_test pivot from socket to shared memory API messaging - add socket client support to libvlibclient.so - dead client reaper sends ping messages, container-friendly - dead client reaper falls back to kill (<pid>, 0) live checking if e.g. a python app goes silent for tens of seconds - handle ping messages in python client support code - teach show api ring about pairwise shared-memory segments - fix ip probing of already resolved destinations (VPP-998) We'll need this work to implement proper host-stack client isolation Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-27Various fixes for issues found by Coverity (VPP-972)Chris Luke1-1/+2
174267: Revisit this string termination issue 174816: Add check for NULL when trace is enabled 177211: Add notation that mutex is not required here 177117: Added check for log2_page_size == 0 and returns an error if so 163697,163698: Added missing sw_if_index validation Change-Id: I5a76fcf6505c785bfb3269e353360031c6a0fd0f Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-26tcp: update snd_nxt after congestion recoveryFlorin Coras2-9/+7
Change-Id: I2cf4c4850b9c3c093a7dce0cec89b9f710f69393 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-25tcp: do not sample rtt for retransmitted segmentsFlorin Coras3-81/+100
Change-Id: I365c31607332a944ef498369881332b515894ed7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-20session: store tep port in net orderFlorin Coras1-2/+2
Change-Id: Ie3a99f09f44ec081d9b88a213bdb8d987fb462de Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-20TCP: fix "tcp src-address" command with IPv6Yoann Desmouceaux1-1/+1
When given a single IPv6 address, the "tcp src-address" command incorrectly infers the end of the range by copying sizeof(ip4_address_t) bytes from the given address. Change-Id: I100d5c6674d3a3980b8c018588988bdd32ff7269 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2017-09-20tcp: add option to punt trafficPierre Pfister4-6/+57
Until now, if the stack didn't find a connection for a packet, it sent back a reset. With the punt option enabled, packets are now enqueued to error-punt where they can be handed off to the host os. Change-Id: I12dea8694b8bd24c92b0d601412928aa7b8046cb Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-09-19session/tcp: improve preallocated segment handlingFlorin Coras6-70/+129
- add preallocated segment flag - don't remove pre-allocated segments except if application detaches - when preallocating fifos in multiple segments, completely fill a segment before moving to the next - detach server application from segment-managers when deleting app - batch syn/syn-ack/fin (re)transmissions - loosen up close-wait and time-wait times Change-Id: I412f53ce601cc83b3acc26aeffd7fa2d52d73b03 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-15dpdk: cli to check for buffer leakageFlorin Coras1-4/+6
Use buffer pre_data and existing buffer trace trajectory code to find out dpdk buffer leakages. Change-Id: I26a5d8bd2f23d01cb6070ffc3ddcc6d3d863b575 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-12tcp: horizontal scaling improvmentsFlorin Coras7-193/+313
- do not scale syn-ack window - fix the max number of outstanding syns in builtin client - fix syn-sent ack validation to use modulo arithmetic - improve retransmit timer handler - fix output buffer allocator leakeage - improved debugging Change-Id: Iac3bc0eadf7d0b494a93e22d210a3153b61b3273 Signed-off-by: Florin Coras <fcoras@cisco.com>