diff options
author | Florin Coras <fcoras@cisco.com> | 2020-03-13 17:54:42 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-03-19 14:46:01 +0000 |
commit | 70f879d2852dfc042ad0911a4a6e4a1714c0eb83 (patch) | |
tree | d7ea7d76b8ec034d41ead0b9ada2db18d9676670 /src/vnet/session/transport.c | |
parent | 7fd59cc79c9fb0cccd0cb5c0b4579d0f0a004f6b (diff) |
session tcp udp: consolidate transport snd apis
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
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r-- | src/vnet/session/transport.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c index c8c58357afd..e27aaf3ff6b 100644 --- a/src/vnet/session/transport.c +++ b/src/vnet/session/transport.c @@ -103,6 +103,8 @@ format_transport_connection (u8 * s, va_list * args) indent = format_get_indent (s) + 1; s = format (s, "%Upacer: %U\n", format_white_space, indent, format_transport_pacer, &tc->pacer, tc->thread_index); + s = format (s, "%Utransport: flags 0x%x\n", format_white_space, indent, + tc->flags); } return s; } @@ -720,6 +722,22 @@ transport_connection_tx_pacer_update_bytes (transport_connection_t * tc, } void +transport_connection_reschedule (transport_connection_t * tc) +{ + tc->flags &= ~TRANSPORT_CONNECTION_F_DESCHED; + if (transport_max_tx_dequeue (tc)) + sesssion_reschedule_tx (tc); + else + { + session_t *s = session_get (tc->s_index, tc->thread_index); + svm_fifo_unset_event (s->tx_fifo); + if (svm_fifo_max_dequeue_cons (s->tx_fifo)) + if (svm_fifo_set_event (s->tx_fifo)) + sesssion_reschedule_tx (tc); + } +} + +void transport_update_time (clib_time_type_t time_now, u8 thread_index) { transport_proto_vft_t *vft; |