aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
AgeCommit message (Collapse)AuthorFilesLines
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
2021-11-24session: detach server from client on connect failureFlorin Coras1-0/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie2ed2554578d6a2c671c552dc2bdc081f9754eed
2021-11-18session: deprecate mq segments basevaFlorin Coras2-15/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5b6cb8dd9db7e003a470ca4aeb8472fa7cb9a128
2021-11-18session: improve wrk mq segment allocationFlorin Coras3-53/+62
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9e5438a2f82762aa8a88bbacf4290151ef30969e
2021-11-17session: fix state check in switch poolFlorin Coras1-3/+3
This affect udp only Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5e05e9c77b733b9e10c14cc9ef610c9bff216fa0
2021-11-17session: support close during migrationFlorin Coras1-8/+40
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ife1e046b62bb0679419fd1346e973d0e3ea55489
2021-11-17session: try to coalesce ct accept rpcsFlorin Coras1-7/+44
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I11de851949afd90a37c102ed0c00969a4cc73df4
2021-11-16session: add per worker ct contextFlorin Coras1-26/+43
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie20dc1e369735965bd780f04cd8703c099065fcc
2021-11-15session: postpone ct segment deleteFlorin Coras1-47/+70
Only delete segments only after both server and client detach. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idea6b2141f406aad1f19a5312ecea89d35f2b5de
2021-11-15vcl: add DSCP support in VCLFilip Tehlar2-0/+2
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I835675267c997b5dc92a0aaccdb58648bc786bb9
2021-11-12session: add support for DSCPFilip Tehlar1-0/+3
Type: feature Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I817b1503ada1ae53c1134a85263f9b801d74e88a
2021-11-12session: fix ct tracking of actual transport protoFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If6a0b0ba9efc95180bdd2e26a1422663ab957ea0
2021-11-09session: reset if ct close with dataFlorin Coras1-1/+15
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9540948b8b5476af7558d741cbf15ee838d4e01b
2021-11-09session: postpone ct cleanupsFlorin Coras1-18/+105
Add infra to postpone cleanups while tx events are not delivered. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7611ac2442116f71a229569a7e274eb58eb84546
2021-10-21session: add api test fileFilip Tehlar1-0/+363
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I6b89c4158d10d4928c8418312180dbeba7d70ab2
2021-10-13session: app name should format with %vXiaoming Jiang1-1/+1
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I2c77066cc9f1d3063373cc9559cc5b369906cc24
2021-10-12session: set actual lcl ip on accepted ctFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic2ba5fa234a394acb524b61573fc49f2d58c2dea
2021-10-06session: fix severity infoFilip Tehlar1-11/+10
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I6548274f8c0ae2a183b1d221cb195de445c2819f