summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp
AgeCommit message (Collapse)AuthorFilesLines
2019-08-09udp: fix rx event generationFlorin Coras1-6/+20
When session is owned by another thread, avoid postponing the generation of the rx event. Type:fix Change-Id: Ie6afc8116ce40e83d8aae0432b48e19b31287d8b Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 9cbf6818b37275199b6c0ebef0ef3d8ecaac0a3b)
2019-08-08udp: fix connections moveAloys Augustin1-1/+4
Without this the use of uc0 is racy between the current thread and the thread that owns it and will delete it. This also ensures we don't trigger a read event on the session before moving it to the right thread and notifying the application. Type: fix Change-Id: Icb1ca3ee5805ea3c0d2d424d4b23511465deb3b6 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit b3392334942ed5459edfa7f11e098f4eab3aa29a)
2019-08-06udp: fix session migrate when not neededNathan Skrzypczak1-15/+21
Type: fix Change-Id: I56f5f5e7e6430552f0346a65b1e5707edc28c1c0 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-23udp: fix typo in udp connectinon flagsDave Wallace1-1/+1
Type: fix Fixes: 3b726197 Change-Id: Ib515f0995e5c837349ebcad5f63fbd1b2a197e13 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-07-23udp: fix connection flagsAloys Augustin1-3/+3
Change-Id: Ib69f9bd7970aeb2ee6a1c114d38dcb7f8698dc6d Type: fix Fixes: c754239 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-07-22udp: support close with dataFlorin Coras3-19/+41
Also adds connection flags. Type: feature Change-Id: I76f21eb88ab203076149b7c03dc31c22fc0f342e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-19fib: FIB Entry trackingNeale Ranns1-11/+6
Instead of all clients directly RR sourcing the entry they are tracking, use a deidcated 'tracker' object. This tracker object is a entry delegate and a child of the entry. The clients are then children of the tracker. The benefit of this aproach is that each time a new client tracks the entry it doesn't RR source it. When an entry is sourced all its children are updated. Thus, new clients tracking an entry is O(n^2). With the tracker as indirection, the entry is sourced only once. Type: feature Change-Id: I5b80bdda6c02057152e5f721e580e786cd840a3b Signed-off-by: Neale Ranns <nranns@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
2019-07-09udp: UDPC handle open failNathan Skrzypczak1-6/+9
Type: fix Change-Id: Ib8fb4957f4da9e464e2575c45c8ff3828db89872 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-28session: add half_open_has_fifos for UDPCNathan Skrzypczak1-0/+1
Type: fix Change-Id: Iede83a4e72b88fd55bf56ec0ca71c9196ce743cd Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-27session: Add transport vft protocol optionsNathan Skrzypczak1-7/+14
Type: refactor Change-Id: I4e0afc206e4871596c2ed8a6ca00914a379f1526 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-18fib: fib api updatesNeale Ranns1-1/+1
Enhance the route add/del APIs to take a set of paths rather than just one. Most unicast routing protocols calcualte all the available paths in one run of the algorithm so updating all the paths at once is beneficial for the client. two knobs control the behaviour: is_multipath - if set the the set of paths passed will be added to those that already exist, otherwise the set will replace them. is_add - add or remove the set is_add=0, is_multipath=1 and an empty set, results in deleting the route. It is also considerably faster to add multiple paths at once, than one at a time: vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11 100000 routes in .572240 secs, 174751.80 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12 100000 routes in .528383 secs, 189256.54 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13 100000 routes in .757131 secs, 132077.52 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14 100000 routes in .878317 secs, 113854.12 routes/sec vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14 100000 routes in .900212 secs, 111084.93 routes/sec Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-17session: use listener_handle instead of listener_indexNathan Skrzypczak1-1/+2
Type: refactor Change-Id: I97fa59a0ba0b6b7a98698926020ffffcf6ae6ba3 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-22fix show session verbose crash with udp transportDave Wallace1-0/+2
Type: fix Change-Id: Ib3a2777317f8c57e91ce43820ad7ca5d10ac8677 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-17UDP-Local: fix unregistered portsNeale Ranns1-64/+51
- if the port is unregistered then write ~0 into the sparse vec, this allows the DP to send packets to ICMP - remove the v6 arcs from the v4 node and vice-versa (since they're never taken) - i have tests for this in a pending change for the punt socket Change-Id: Icbd97de2c2fc38490c16afc2e0b414d8436593c4 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-16init / exit function orderingDave Barach1-10/+9
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-14Unregister UDPC port only when ownedNathan Skrzypczak3-2/+9
Needed in QUIC, when cleaning up accepted UDP sessions Change-Id: Ifcb32687175562bed4ca69bdc519cedd4dc3c2bc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-03Fix FIB initialization in UDP inputNathan Skrzypczak1-0/+1
Change-Id: I7c88ada2af039aa0861fe7c71361a293b999d0c7 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-03Add packet headers in UDPC fifosAloys Augustin2-38/+23
This change adds packet headers for each packet in a UDPC connection. This changes the semantic of UDPC from an unreliable, unordered stream of bytes to an unreliable, unordered sequence of packets. Change-Id: I831e43903870a5720d26daa6e971299d03b208d7 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-24UDPC: Fix open segfault with multiple workersAloys Augustin1-1/+3
Change-Id: Ib4a64f17831e2419f1d6140a6d24649c096bdfa5 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-16svm_fifo rework to avoid contention on cursizeSirshak Das1-2/+3
Problems Addressed: - Contention of cursize by producer and consumer. - Reduce the no of modulo operations. Changes: - Synchronization between producer and consumer changed from cursize to head and tail indexes Implications: reduces the usable size of fifo by 1. - Using weaker memory ordering C++11 atomics to access head and tail based on producer and consumer role. - Head and tail indexes are unsigned 32 bit integers. Additions and subtraction on them are implicit 32 bit Modulo operation. - Adding weaker memory ordering variants of max_enq, max_deq, is_empty and is_full Using them appropriately in all places. Perfomance improvement (iperf3 via Hoststack): iperf3 Server: Marvell ThunderX2(AArch64) - iperf3 Client: Skylake(x86) ~6%(256 rxd/txd) - ~11%(2048 rxd/txd) Change-Id: I1d484e000e437430fdd5a819657d1c6b62443018 Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2019-04-10udp: fix copyright typoFlorin Coras1-1/+1
Change-Id: I74a61e941176321da0767affff0fb023f4c54c35 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-08host stack: update stale copyrightFlorin Coras13-13/+13
Change-Id: I33cd6e44d126c73c1f4c16b2041ea607b4d7f39f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06udp: migrate old MULTIARCH macros to VLIB_NODE_FNFilip Tehlar4-27/+20
Change-Id: I2b324c77df2685a0bdfb617fb484022daf017d0b Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-03-02session: cleanup/rename functionsFlorin Coras1-1/+1
- remove unused functions - rename old "stream" functions Change-Id: Icbb03daa9f9f1c58b5be5c38aa8a9cbcf9159b47 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-09session: refactor listen logicFlorin Coras1-1/+1
Make app-listener the handle for app listens. Consequently transport and local listen sessions are now associated to the app-listener. Change-Id: I9397a26d42cccb100970b6b4794c15bac2e11465 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-02-06transport: cleanupFlorin Coras1-6/+6
- 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-04session: cleanup part 1Florin Coras1-4/+3
Rename core data structures. This will break compatibility for out of tree builtin apps. - stream_session_t to session_t - server_rx/tx_fifo to rx/tx_fifo - stream_session.h to session_types.h - update copyright Change-Id: I414097c6e28bcbea866fbf13b8773c7db3f49325 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-28session: free session after transport and app confirmFlorin Coras1-1/+1
In addition to that, a bit of refactoring. Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07VPP-1506: dump local punts and registered punt socketsPavel Kotucek3-0/+77
Change-Id: If7835e9b80ec9402404bfc8d271eb11a10ef992b Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
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-10-28session: extend connect api for internal appsFlorin Coras1-2/+2
Change-Id: Ie4c5cfc4c97acb321a46b4df589dc44de1b616ba Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-27pg: allow creating pg for udp based protocolsKingwel Xie2-1/+13
f.g., gtpu4/6 Change-Id: I8bb1dc5fd2fba89ff17ec069a9816bafb9684190 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-10-23pg: udp length & checsum issueKingwel Xie1-4/+4
if udp length is specified, then use this length to calculate udp checksum otherwise, use length from vlib_buffer Change-Id: I5304a60d5d429993d0524b864b65ec503775412d Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-10-23c11 safe string handling supportDave Barach3-5/+5
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-25UDP-Encap: fix coverity found errorNeale Ranns1-0/+1
Change-Id: Idbe5f4d7f37dbe4dbf8d2679c3d816aeaed148d8 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-4/+4
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-20UDP-Encap: name counters for the stats segmentNeale Ranns4-206/+131
change the ADD api so that is returns the 'ID' that can be used by the client to read the stats from the stats segment and to delete the object. Previously a similar value used required to be chosen by the client, now VPP allocates one (like it does e.g. for interfaces) Change-Id: I563cf6092276eb990c52d5457c86e72546bcf69e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-10vxlan-gbp: Add support for vxlan gbpMohsin Kazmi1-0/+2
This patch implements vxlan with extension of group based policy support. Change-Id: I70405bf7332c02867286da8958d9652837edd3c2 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-31VPP-1407: Fix the wrong length of udp header for buffer chainsshubing guo1-1/+4
Change-Id: I1669faeac15dfb69e335a1e96b6da118dc1892c1 Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-10Use IP address types on UDP encap APINeale Ranns2-73/+111
Change-Id: I3c714c519b6d0009329b50947ce250c18ee2a85a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-06re-indent UDP encap documentationNeale Ranns1-31/+34
Change-Id: Ieb53860769f511205bcd3f1605e76a80e65d4939 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-11avoid using thread local storage for thread indexDamjan Marion2-2/+2
It is cheaper to get thread index from vlib_main_t if available... Change-Id: I4582e160d06d9d7fccdc54271912f0635da79b50 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-21BIER neighbor statsNeale Ranns2-2/+2
Change-Id: I2f638f1932b4aeddf2408c06d1b8393551675b72 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-11udp: fix for multiple workers and add testFlorin Coras1-4/+12
Since the main thread is not used for session polling anymore, when vpp is started with multiple wokers, allocate connections on the first. Also add a simple udp make test. Change-Id: Id869f5d89e0fced51048f0384fa86a5022258b7c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-09ipsec: support UDP encap/decap for NAT traversalKlement Sekera1-0/+1
Change-Id: I65c12617ad49e4d5ef242e53988782f0cefa5684 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+2
Object sizes must evenly divide alignment requests, or vice versa. Otherwise, only the first object will be aligned as requested. Three choices: add CLIB_CACHE_LINE_ALIGN_MARK(align_me) at the end of structures, manually pad to an even divisor or multiple of the alignment request, or use plain vectors/pools. static assert for enforcement. Change-Id: I41aa6ff1a58267301d32aaf4b9cd24678ac1c147 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-04-18udp/session: refactor to support dgram modeFlorin Coras3-72/+172
- adds session layer support for datagram based protocols - updates udp to work in pure connectionless and datagram mode. The existing connected mode is now 'accessible' for apps as a dummy UDPC, as in, connected udp, protocol. - updates udp_echo, echo client, echo server code to work in datagram mode. Change-Id: I2960c0d2d246cb166005f545794ec31fe0d546dd Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-21udp: make udp encap pool cacheline alignedDamjan Marion1-1/+1
This fixes issue with unaligned vector access on gcc-7. As udp_encap_t is declared as cacheline aligned, alloc also need to be. Change-Id: Ic30876911baf2c22c135097490075fa7bcf0ca18 Signed-off-by: Damjan Marion <damarion@cisco.com>