aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion1-2/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-10session: use no for ports in transport port allocatorFlorin Coras1-2/+2
Type: improvement Change-Id: Ia1d8aaa3c51938cfa15dd09102471f52ebe67a3d Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-18udp: use transport port refcnt on acceptFlorin Coras1-0/+8
Use udp transport refcnt instead of local port refcnt when accepting new connections. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibc34677b1138682497f98e96b6fddb5b96094ff9
2024-02-16udp: unregister ports on all cleanupsFlorin Coras1-4/+3
UDP transport port refcount is incremented even if port is shared. So decrement it, by unregistering, whener udp connections are cleaned up. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id0a2c60c5faf4dea8b2cd9ded0334934ad9e918c
2023-06-27session udp: add len check for tx dgramsFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35391fb8c39defbe0e57a241a357c3c98e8cef54
2023-06-26udp: pass cless hdr to transport through bufferFlorin Coras1-27/+57
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I7177ada23e5a69ec8e362ec98b98010c3b44b3d7
2023-05-25udp: fix local port reuse checkFlorin Coras1-2/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I323946f7838507110c663f5a904399a74fc76691
2023-02-28session: consolidate port alloc logicFlorin Coras1-24/+10
Move port allocation logic from transports into generic transport layer. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I55a21f185d00f5e118c36bcc4a6ffba2cbda885e
2023-01-10udp: avoid listener cleanups with active opensFlorin Coras1-0/+11
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibff9f32e4fcaf0344207d8e43f3547180cbd4eef
2022-12-20udp: fix tx handling of non-connected sessionsFlorin Coras1-0/+18
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I659b9914fcfa4619a68e9807ef241f88c96b3bd0
2022-11-29udp: refactor port allocation and sharingFlorin Coras1-63/+24
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4f7314ddf95d26f1939bd3772d29d011fb4cea47
2022-11-29session: transport endpt cleanup on owner threadFlorin Coras1-2/+2
Maintain a single writer multiple readers usage model for transport endpoints pool. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8555700ed725971341f145ea97f031042a298e83
2022-11-28udp: preallocate ports sparse vec mapFlorin Coras1-2/+80
Not ideal. The sparse vector used to map ports to next nodes assumes only a few ports are ever used. When udp transport is enabled this does not hold and, to make matters worse, ports are consumed in a random order. This can lead to a lot of slow updates to internal data structures which in turn can slow udp connection allocations until all ports are eventually consumed. Consequently, reallocate sparse vector, preallocate all ports and have them point to UDP_NO_NODE_SET. We could consider switching the sparse vector to a preallocated vector but that would increase memory consumption for vpp deployments that do not rely on host stack. For reference, populating one of the v4 or v6 sparse vectors in reverse order takes about 9.8s on a skylake cpu. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id795e1805d0d3ba54f56a152a9506a7a2a06ecbc
2022-10-25udp: use new wrk context for connectionsFlorin Coras1-7/+6
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9c4050f96c310f1e6eb2cae8d908c44968526c3c
2022-10-25udp: postpone cleanup of udp connectionsFlorin Coras1-2/+35
Avoid deleting connections in session layer io event handler. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I87b3e53f9039161688467d9716875583ad797c07
2022-10-20udp: support for disabling tx csumFlorin Coras1-1/+7
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I84843eb3a0a66c64cd46536624633e0dae1c4681
2022-10-19udp: explicit udp output nodeFlorin Coras1-12/+7
This allows for custom next node selection on output. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib0fee71a01847184e95c18097bbbfdadfbd9d030
2022-08-31udp: store mss and sw_if_index to udp_connection_tSteven Luong1-2/+5
Store mss and sw_if_index to udp_connection_t and display them via show sessipn verbose 2 Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I32928f3f4195b178873dc1bada702e035d99c464
2022-04-04udp: use pool safe reallocsFlorin Coras1-26/+3
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5bd0b300af07424d1ce4807fa0b17e375001f089
2022-03-18udp: avoid grabbing vlib main if not neededFlorin Coras1-6/+4
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I88a747cac70cb88755f50c7b337207f4ba256530
2022-03-18vppinfra: refactor *_will_expand() functionsDamjan Marion1-3/+1
Type: refactor Change-Id: I3625eacf9e04542ca8778df5d46075a8654642c7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-10session: use transport endpoint cfg for listenFlorin Coras1-1/+1
Makes it similar to connects. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I38c328670054e1a9ba4dc4ea8fe7519a5a09e8be
2022-01-12session: pass tx buffers in bulk to transportsFlorin Coras1-8/+36
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1025cccd784f80b557847f69c3ea1ada5c9de60d
2021-11-17session: support close during migrationFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ife1e046b62bb0679419fd1346e973d0e3ea55489
2021-11-12session: add support for DSCPFilip Tehlar1-2/+3
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I817b1503ada1ae53c1134a85263f9b801d74e88a
2021-05-18tls: fix dtls with no workersFlorin Coras1-3/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iecc33fda7f28c037289775ffe0525a50f89a2b8c
2021-03-03udp: allocate rx lock only for non-connectedFlorin Coras1-3/+7
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib5395a51fbfb2123549f7c96534fa763b4669243
2021-02-26udp: avoid locking connected udp sessions on rxFlorin Coras1-0/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I52aa2322980b51cfc0b282fb37d7f63d30777dee
2020-10-28misc: Break the big IP header files to improve compile timeNeale Ranns1-1/+2
Type: refactor Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: Id1801519638a9b97175847d7ed58824fb83433d6
2020-04-10udp: remove connected udp transport protoFlorin Coras1-60/+0
Type: refactor To reproduce functionality, use udp in combination with TRANSPORT_CFG_F_CONNECTED transport flag set in connect and listen parameters. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id88470c38326f8168b9646b0de49a674e0f4266f
2020-04-08udp: cleanup input nodeFlorin Coras1-2/+2
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ida9daefc20a161b36d6f36c56267123c7f2efc01
2020-04-07udp: move cli to separate fileFlorin Coras1-201/+50
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2057ebb4b6a4af3ef8fd9b73aadfa00d63bae618
2020-04-07udp session: allow dgram ip fragmentationFlorin Coras1-8/+5
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ida8f9e759b4990ea6e34e71dc45bdb3b5eabc27f
2020-04-07udp session: jumbo frames and configurable mtuFlorin Coras1-1/+28
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6b750bef5df0f8544e05177ccd480f87a020832d
2020-04-06session udp: shared local endpointsFlorin Coras1-7/+35
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie7102355b95eefb233ec7d146e61819051a7bf07
2020-04-03session: improve error reportingFlorin Coras1-8/+7
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-04-03session udp: fix transport flags and migrationFlorin Coras1-1/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I840d43e79b1f826380bd56485441510e45bdfc7f
2020-04-02udp session vcl: add udp iperf testFlorin Coras1-9/+18
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib4bc2ce781887a84055a4d5cdb7f453fc7d52c79
2020-04-01udp: improvements to cliFlorin Coras1-9/+46
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2180e8d5cae6f94a256f3b62950cf66b6ee0e59a
2020-04-01udp: track connection port sharingFlorin Coras1-24/+103
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I822ed0596944a554595eb62a45841d216d1ab611
2020-03-30session udp: flag for connected udpFlorin Coras1-3/+13
Type: improvement This can be used as alternative to udpc Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic3f7efe6728b25d4a8a0b61ddb36de66b4672c4f
2020-03-25session: api to add new transport typesFlorin Coras1-0/+4
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If4dee6dba1ea942daa921d566b35cdecdda680ee
2020-03-19session tcp udp: consolidate transport snd apisFlorin Coras1-14/+11
Type: improvement Use only one api to retrieve transport send parameters. Additionally, allow transports to request postponing and descheduling of events. With this, tcp now requests descheduling of sessions when the connections are stuck probing for zero snd_wnd Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I722c974f3e68fa15424c519a1fffacda43af050c
2020-03-09udp: fix UDP socket byte order in lookupAndreas Schultz1-1/+2
The port registry uses host byte order for while the session API uses network order. In a single place the conversion was missing. Type: fix Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: Ic8cfe2cb4e0711b3e0614060ff6b4f2fe4ed4391
2020-01-16udp: fix ipv6 listen port registrationFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7f2233eb9bf3d81a697f76ba985083cf1040e2e9
2020-01-02session: fix listener global endpoint lookupFlorin Coras1-0/+3
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-10-01session: fix use-after-freeBenoît Ganne1-1/+2
Make sure to reinitialize data before free-ing it. Type: fix Change-Id: I45727c456d0345204d4825ecdd9690c5ebeb5e94 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-22udp: support close with dataFlorin Coras1-13/+30
Also adds connection flags. Type: feature Change-Id: I76f21eb88ab203076149b7c03dc31c22fc0f342e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-12quic: fix show session verboseAloys Augustin1-3/+3
Proprely display quic connections in show session verbose, and add a small fix for UDPC listeners and UDP sessions formatting. Change-Id: I33f83e77bf357347623d87ad23c483aba60a9bb2 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Type: feature
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