aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
AgeCommit message (Collapse)AuthorFilesLines
2022-05-14session: revert "fix session cli maybe parse wrong args if executed in files"Damjan Marion1-38/+27
Fixed at infra level. Type: improvement Change-Id: I43cf16870c1d2e12189073f7786d62375c46e2c2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-06session: fix session cli maybe parse wrong args if executed in filesXiaoming Jiang1-29/+28
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: Id19a52df4f237cf5d85d305fdc279ab7df2d6f4b
2022-04-28session: fix coverity warningFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I67f5a2c8902dd14c09472c25599b3b1b493a6948
2022-04-26session: export session counts to stats segmentFlorin Coras1-0/+40
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I02aec410eaa7ccb999159b6967414fbaf4e76a3f
2022-04-22session: fix ctrl evt rpc elt pool reallocFlorin Coras1-5/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I79bfe91e81983b619c61a32285d8e038c2654147
2022-04-21session svm: fix mq producer wait on q and ringFlorin Coras2-7/+5
Make sure producer drops lock when it waits for empty ring slot. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id77d54ee8c01bed20c9eaf5ad372ed4b1e9fa712
2022-04-18session: add support for listen proxiesFlorin Coras2-5/+27
Listener proxies are allowed to listen on IPs that are not local. Configurable only by builtin apps for now. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb380ee3584a088878a03d45fd85e7bb0deeb590
2022-04-04session: use session layer rpc for evts sent to mainFlorin Coras1-5/+9
Fix race with connects for iperf3 udp test. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ief725b80047911e87ba24736dc0a60aa8bcdac50
2022-04-01session: leverage new pool functions in safe reallocFlorin Coras3-54/+50
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2c264c31d2470b11b94d68411fa8266387319146
2022-03-31vlib: add support for workers syncFlorin Coras1-38/+2
Adds api that allows workers to synchronize through main thread. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1e75e2fb5144d397d19b13c4dfc7e937f11c044c
2022-03-31session: fix coverity warningFlorin Coras1-0/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6ddb172d7b4f0ba06b0117d71853a22702a3466b
2022-03-26session: simplify safe pool reallocFlorin Coras1-62/+42
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1c55c054fea6c6886d8287a9b6e264a308f89504
2022-03-25session: reorganize local port allocationFlorin Coras1-29/+24
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5bbf8d584efdec57908c61f8626bcc81590401b3
2022-03-24session: safe reallocs for transport endpoint poolFlorin Coras1-11/+25
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6c86d0691bd0594d8b2c05d83d004be1aa8c5e21
2022-03-22session: use safe realloc for poolsFlorin Coras4-69/+23
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I313c916d268c4b2b448b93e90bc67da341b803e3
2022-03-21session: linked list of events to be handled by mainFlorin Coras3-56/+107
Minimize amount of rpcs from first worker to main Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3794ff028a17d18b7bff69ede2b62e1e2d45ae77
2022-03-18session: add infra for safe pool reallocsFlorin Coras2-0/+148
This is not to be used lightly. The idea is to forces pool reallocs to be done only on main thread with a barrier to make sure pools are always reallocated without peekers/readers. If rpcs are delayed and the pool runs out of elements, workers will block waiting for barrier and force the realloc. Consumers of this api should be session layer and transports. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I533272a29534338935a3fcf7027c0e7af2ca948c
2022-03-18vppinfra: refactor *_will_expand() functionsDamjan Marion1-3/+2
Type: refactor Change-Id: I3625eacf9e04542ca8778df5d46075a8654642c7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-11session: fix crash during client detachFilip Tehlar1-1/+3
This fixes a crash caused by client closing socket before adding worker. During detach vpp tries to delete worker based on invalid worker index. Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I3242bcbb116ef5fd1d4c449f5bcf907e4e2f8f30
2022-03-03session: improve tx tracingFlorin Coras1-10/+10
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4fd7ae435514eb986543302c7e3e69e04acba8cf
2022-02-24session: fix session layer socket readFilip Tehlar1-2/+27
This fixes an issue caused by session layer reading expected part of data (cert + key) before the client actually sends it. Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I6ddddb08f9576211b302e814d7c2b040383e5fb7
2022-02-10session: use transport endpoint cfg for listenFlorin Coras4-6/+6
Makes it similar to connects. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I38c328670054e1a9ba4dc4ea8fe7519a5a09e8be
2022-02-10session: avoid debug half-open session pool contentionFlorin Coras1-0/+11
Half-opens are only allocated from main with worker barrier but can be cleaned up, i.e., session_half_open_free, from main without a barrier. In debug images, the free_bitmap can grow while workers peek the sessions pool, e.g., session_half_open_migrate_notify, and as a result crash while validating the session. To avoid, proactively grow bitmap in debug images. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2410793f933fb638651fe8dc08ba78e9bee0bd77
2022-02-05session: track bytes dequeued in snd paramsFlorin Coras2-2/+5
Also reset send params flags before calling transports to avoid explicit resets in all transports. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1da7b3fab009728e7fee4199425ced933fa8a122
2022-01-22session: separate transports from apps in show cliFlorin Coras1-11/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If9d6153ddce836ec34842fb5e581b2f4565e33df
2022-01-22session: update time for list of subscribersFlorin Coras4-1/+53
Instead of constantly scanning all transport vfts for update time functions, build list at transport enable time. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id5c07cc03ee1fdd072ebbbd40119d1a440a5e3b1
2022-01-20http: add http protocol pluginFlorin Coras2-4/+3
Basic HTTP/1.1 server side implementation. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I06bddaf7f11e28db802b4cd7ef8160c78cb019b6
2022-01-12session: pass tx buffers in bulk to transportsFlorin Coras3-8/+12
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1025cccd784f80b557847f69c3ea1ada5c9de60d
2022-01-11session: increase postponed mq message min sizeFlorin Coras2-1/+2
Reported by coverity Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib1db0d120321b061f4c2c20117acdfb6e7dc0626
2022-01-10session: fix segment manager format coverity warningFlorin Coras1-3/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia32536a76aa3f92f80ee2cd027a9a010c19b861a
2022-01-10session: allow pacer to send when bucket hits 0Florin Coras1-2/+2
So after bucket reset session can send max burst of bytes. Also, reset pacer bucket to 0 not min burst Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iced8948c407e6647e6eb4caff5c62c06d45ce0bf
2022-01-10session: deschedule sessions with no data to sendFlorin Coras2-2/+26
This ensures the scheduler always tracks sessions that are descheduled, i.e., do not have events in the old io events list. When app retries to send, clear descheduled flag and potentially the pacer. Consequently, transports no longer need to reset the pacer when sessions are rescheduled after a long app tx pause. This also fixes a tcp bug whereby the pacer was reset too often when snd_una was equal to snd_nxt as there was no way to distinguish betwen app tx breaks and congestion. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id3cc6c98cd76299e15030e504380dcf3c04c5189
2022-01-10session: fix pacer bucket update castFlorin Coras1-2/+2
Make sure comparison is done between two i64 values. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ief5706f2bd9415587994a5b665d5e380b8e14f68
2021-12-23session svm: track fs and seg manager index in fsFlorin Coras2-42/+20
Simplifies allocation of fifos as fifo segment and segment manager indices can be set at alloc time. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibd357b3ff0279d8deefcdcb17010b4068007ccb7
2021-12-22session: fix segment alloc/free worker raceFlorin Coras2-70/+119
Avoid scenarios where a worker allocates a segment but while it drops the segment manager writer lock and acquires the reader lock another worker uses the segment and frees it. Type: fix Thanks to wanghanlin@corp.netease.com for the report. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0a88d738c51b33fd07c34916f125c98806861a06
2021-12-20session: ignore rpc in fifo event lookupsFlorin Coras1-10/+0
RPCs are not associated to sessions. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6b7870a3ebc2e8f32a6c1b10e2552d9e074c7eb3
2021-12-20session: improve sh segment-manager cliFlorin Coras1-53/+81
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5d669fcba609bcdb35103f57c45e0a270213d84a
2021-12-16session: app mq congestion detectionFlorin Coras3-266/+349
Detect mq congestion and handle it by queueing messages in a fifo and postponing handling via rpcs. App workers with congested mqs cannot accept nor connect additional sessions. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I401d971a1a53896758b88fc60f158cbc31e0c7cb
2021-12-08api: improve REPLY_MACRO safetyKlement Sekera1-35/+41
Improve vppapigen to generate per-message #define indicating whether said message is dynamically sized (due to VLA or string) or not. Use these #defines in REPLY_MACROs to prevent improper usage. Fix existing improper REPLY_MACRO* usage. Type: improvement Change-Id: Ia77aaf9f6cf3ed68ea21075a4cc8deda78a68651 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-12-08session: stricter tx checks for ct sessionsFlorin Coras1-1/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ied4fe0f2b35eeca4e3e82fa21346de7f243aa52a
2021-12-08session: fix duplicate segment del messageFlorin Coras1-6/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I42b5a5a07aae6708a20ed424c8f26ddbe91278fb
2021-11-29session: remove segment if empty after writer lockFlorin Coras1-9/+18
Make sure segment is empty after writer lock acquired. Other workers might add fifos in between empty test and writer lock acquire. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3400fdd14be98d9d8fb4e415d3a849be1d255241
2021-11-29session: mark first listener segment as protectedFlorin Coras1-0/+4
Avoid constantly re-mapping a listener's first segment when all its sessions are closed. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iea7033fb70f4cf9e4408d542b7c0ff2b0c5c2f92
2021-11-29session: no deq notifications after closeFlorin Coras1-0/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3e633f017c68e8c5446e45b577048138a387daf6
2021-11-29session: postpone close notification if still acceptingFlorin Coras1-0/+14
Acceping sessions might be rejected so the notification might not make sense. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3ababdce7c2cec62941d9722a9c06fa48ec547db
2021-11-29session: fix clib_rwlock_writer_unlock lostwanghanlin1-1/+4
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Iab857b056639f7e513f87a6095bea081b7d8349c
2021-11-26session: accept reply improvementsFlorin Coras1-26/+25
- Always check session ownership - Improve test for main thread rpc Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5fa60f7f5de199af0966987f9ce9a4cc8180cf98
2021-11-26session: postpone ct peer disconnect and more checksFlorin Coras1-20/+29
- Disconnect ct peer only after tx events have been drained - Make sure session/connection is in healty state before rx/tx notifications Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic6e684410a98530cc95a9c6c54c05a19c17c11d9
2021-11-26session: only notify server on ct connect failureFlorin Coras1-8/+14
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifcb631ed2913e5f4fc318238de9100286a7990d2
2021-11-24session: improve fifo segment allocationFilip Tehlar1-0/+6
This patch ensures that fifo segment has at least the size that was requested during allocation. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Iea8a885ac290183e25e5c8f9163bba226c5efa15