summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
AgeCommit message (Collapse)AuthorFilesLines
2021-09-09vlib: fix vlib_buffer_enqueue_to_next() overflowBenoît Ganne1-3/+3
vlib_buffer_enqueue_to_next() requires to allow overflow of up to 63 elements of 'buffer' and 'nexts' array. - add helper to compute the minimum size - fix occurences in session and async crypto Type: fix Change-Id: If8d7eebc5bf9beba71ba194aec0f79b8eb6d5843 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-01udp: fill rmt info if session is connection lessliuyacan1-1/+1
The app may send packet to different remote via sendto() with same socket (without calling connect()). In such scenario, remote address need to be filled in. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I49deb308668c05442f237e97acc9bfa239782482
2021-08-30session: fix prefetch out of struct bound on ArmTianyu Li1-1/+1
CLIB_PREFETCH (s->tx_fifo, 2 * CLIB_CACHE_LINE_BYTES, LOAD); sizeof(svm_fifo_t) is 128 bytes Note on 64B cacheline size Arm machine, CLIB_CACHE_LINE_BYTES 128 CLIB_CACHE_PREFETCH_BYTES 6 above CLIB_PREFETCH () macro will be expand to __builtin_prefetch(s->tx_fifo) __builtin_prefetch(s->tx_fifo + 64) __builtin_prefetch(s->tx_fifo + 128) << prefetch out of range __builtin_prefetch(s->tx_fifo + 192) << the same here Solution: Change to CLIB_PREFETCH (s->tx_fifo, sizeof (*(s->tx_fifo)), LOAD); Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Change-Id: I745cbce3dbe5afcab53c39189d18392f569df5aa
2021-08-30tcp: Allow accepting session to send custom packetliuyacan1-1/+9
Tcp may want to send acks in established, but the app has not called accept() yet. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I43b8cd386e533ca95c8ec260a0a1f695ea140358
2021-07-21session: fix unlisten rpc barrier releaseFlorin Coras1-4/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9301fbbcd611033b4b6ad5313edbc66840f5bb3a
2021-06-29session: free ctrl event data on connect rpcFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48
2021-06-22session: avoid reordering unlisten and connect msgFlorin Coras1-6/+33
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibe32f7965f8cf457c39845713b029c8a4647ee55
2021-06-18session: improve ct locking with multiple workersFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id91c3be57d49745cb3db6c768a8d5d14133f899e
2021-05-21session: improve main thread connects rpcFlorin Coras1-17/+25
Avoid grabbing the worker barrier if there's no work to be done. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ice3de5df41cd1752aba3419ad2e2dd82f30e9bfb
2021-05-19session: cleanup event llist usageFlorin Coras1-17/+17
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I750c856ac81d951e8c0e62c710e0f35a0c80d6f9
2021-05-18session: poll main thread if pending connectsFlorin Coras1-48/+71
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie8a15c50531f3ccd5f91dbc0779e4d9c0d146844
2021-05-18session: only handle old ctrl events per dispatchFlorin Coras1-6/+12
Avoids dispatching ctrl events generated while handling the current pending list. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibeaf901ba4cf58a68fbd88e5ec3c23f6c2f6f145
2021-05-18session: move tx-buffers to tx ctxFlorin Coras1-13/+11
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I10ec410fb7f3acb47128dda23510162dc13b20d0
2021-05-16session: rpc for connects to mainFlorin Coras1-5/+81
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifa47e1500e5cfb3c717f87b1d21131b9531c9005
2021-05-12session: support half-close connectionliuyacan1-0/+25
Some app(e.g. Envoy) may call shutdown() instead of close() when draining connection. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I9543b9ca3caa87b10b134fd1fc4019124e41e4d2
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-5/+0
trajectory trace has been broken for a while because we used to save the buffer trajectory in a vector pointed to in opaque2. This does not work well when opaque2 is copied (eg. because of a clone) as 2 buffers end up sharing the same vector. This dedicates a full cacheline in the buffer metadata instead when trajectory is compiled in. No dynamic allocation, no sharing, no tears. Type: refactor Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-27session: fix mq ext config cleanupFlorin Coras1-2/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I18eb1a71ac22017f75f835a23a57b023b46524ce
2021-04-22vcl session: refactor passing of crypto contextFlorin Coras1-11/+0
Pass tls/quic crypto context using extended config instead of bloating conect/listen messages. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0bc637ae310e6c31ef1e16847501dcb81453ee94
2021-04-22vcl session: extended connect/listen configurationFlorin Coras1-1/+35
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic8d9386fef37ffd3446aaeb93a96ee6d60633831
2021-04-14session tcp vcl: api to update connection attributesFlorin Coras1-0/+48
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifdd6024daf044751895bb8d2deabad41d3a80c92
2021-04-07session: fix coverity warningFlorin Coras1-5/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id2c06f49bcae1a26a2d16d58f9da7a4d3175bf3c
2021-04-06session: basic support for interrupt modeFlorin Coras1-0/+117
Experimental support for session layer interrupt mode. When enabled (use-private-rx-mqs must be set) session queue node switches to interrupt state when lightly loaded, i.e., no events and less than 1 vector/dispatch. Because transport protocols require a periodic time update, when in interrupt state the session queue node workers register a timerfd with the unix-epoll-input node that when triggered signals, i.e., wakes up, the queue node. Under light load, the timer is set to trigger every 1ms whereas if no session is allocated, the worker moves to idle state and the timeout is set to 100ms. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I905b00777fbc025faf9c4074fce4c516cd139387
2021-04-05tcp: time infra improvementsFlorin Coras1-2/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I998c0686f9f7dc556dda8b28e23bbed127d0aafc
2021-03-29svm session vcl: per app rx message queuesFlorin Coras1-25/+25
Add option to use per app private segments for app to vpp message queues, as opposed to exposing internal message queues segment. When so configured, internal message queues are still polled by the session queue node but external app message queues are handled by a new input node (appsl-rx-mqs-input) that runs in interrupt state. Signaling of the node, when mqs receive new messages, is done through eventfds epolled by worker epoll input nodes. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iffe8ce5a9944a56a14e6d0f492a850cb9e392d16
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion1-1/+1
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-17session: fix populating chained buffersIvan Shvedunov1-3/+5
Type: fix Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: I3fdc1711d508bc5b0c2f56b3bd3fb4a56056eb54
2021-03-11session tls: deq notifications for custom txFlorin Coras1-0/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6ed2104e9d79c367ca36460047586f9b632c3315
2021-02-09session: coverity fixesFlorin Coras1-2/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2828287c58115aa08c0a4297c01cea60f41f4749
2021-02-05session svm: non blocking mqFlorin Coras1-3/+2
Avoid synchronizing producers and the consumer. Instead, only use mutex or spinlock (if eventfds are configured) to synchronize producers. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie2aafbdc2e07fced5d5e46ee2df6b30a186faa2f
2020-12-29svm vcl: allow random offsets for fifo segments in appsFlorin Coras1-2/+2
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1658a9c19d8eae4c9a42c0a111d4ad343b8eb8a4
2020-12-29svm: allow mq attachments at random offsetsFlorin Coras1-2/+2
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic373cd2c11272da539eb4b0db27227f36f2f9688
2020-12-04udp session: fix deq notification for dgramsFlorin Coras1-1/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1440c11fb9d962a05d877aebb4de364c86f9953e
2020-12-01session: allow small pacer burstsFlorin Coras1-1/+2
Instead of enforcing a "strict" release of data, which relies on frequent rescheduling of sessions, allow some pacer coalescing, i.e., short bursts, that can minimize load on scheduler/session layer and potentially leverage tso. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I67e38e5b8dc335bd214113b70c68c27ae92bd6da
2020-11-09vlib: fix trace number accountingBenoît Ganne1-11/+15
When using classifier to filter traces, not all packets will be traced. In that case, we should only count traced packets. Type: fix Change-Id: I87d1e217b580ebff8c6ade7860eb43950420ae78 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-03session: reduce max session node frame sizeFlorin Coras1-4/+4
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9e6b5e245533c9ea7bb8dc4f784a31fcb0da88bd
2020-10-26session: fix feature disableFlorin Coras1-0/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I69e912ddf64d8ec89f8d93e02a201781b99de0bd
2020-10-19hsa: cleanup sock server testFlorin Coras1-1/+1
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I769174f0023d00a59bc5a03cf0a05996b616742b
2020-09-21session: use wrk instead of thread index in nodeFlorin Coras1-10/+12
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia36d86eb108f0651fc3af8b4dbdc2d0b49e283da
2020-08-11vcl: support inter worker rpcFlorin Coras1-0/+30
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I664cd14c84fc5cf2ffe61efce99c95219b44fad7
2020-07-07session: fix ct listener cleanupFlorin Coras1-3/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I749f36a7062bf9b073c1b6753436c23ba326a5db
2020-05-21vcl: support connected udp listensFlorin Coras1-0/+1
Request connected udp listener behavior by setting VPPCOM_ATTR_SET_CONNECTED attribute with vppcom_session_attr Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iba95155c0f41cea8c6e1a4263946270d49c213ac
2020-04-22session: multiple dgrams per dispatchFlorin Coras1-7/+50
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifa4916ffeaa30039e366011109bbd2e9c91a1b0b
2020-04-20session: fix use-after-free in input nodeBenoît Ganne1-1/+2
Type: fix Change-Id: Ie60b07abe76ad166f048f5885accd7038d8153b2 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-13session: cleanup debug codeFlorin Coras1-157/+3
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie6c03195019fe18c547b22f4387d7f2b14b71461
2020-04-13session: adding debug eventsSrikanth Akula1-0/+11
Type: feature Enhancing the debugging capability of tcp session layer by measing time spent for various events. This is meant only for debugging purpose Signed-off-by: Srikanth Akula <srakula@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9f401881b345bcae5f7d8050338637fd47b3723b Signed-off-by: Srikanth Akula <srakula@cisco.com>
2020-04-08session: alloc exact number of bufs for multi-seg deqsSimon Zhang1-7/+23
Type: refactor Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I11cf806e22158e021a9a405eb4487a9ed6fdbccf
2020-04-07udp session: allow dgram ip fragmentationFlorin Coras1-8/+3
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ida8f9e759b4990ea6e34e71dc45bdb3b5eabc27f
2020-04-06session udp: shared local endpointsFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie7102355b95eefb233ec7d146e61819051a7bf07
2020-04-04session tls: support tls deschedulingFlorin Coras1-10/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb8bb9c6deb92479fdd3e045778fe5ae4782d1ea
2020-04-04session tls: improve app transports tx schedulingFlorin Coras1-4/+26
Type: improvement - allow apps to request rescheduling of tx events via SESSION_F_CUSTOM_TX flag - limit max burst per session custom tx dispatch In tls - use the new infra to reschedule tx events - use max burst bytes as upper limit to number of bytes to be encrypted Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I544a5a3337af7ebdff3406b776adf30cf96ebf3c