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/udp | |
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/udp')
-rw-r--r-- | src/vnet/udp/udp.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c index 34cebec93d2..109f4683e7f 100644 --- a/src/vnet/udp/udp.c +++ b/src/vnet/udp/udp.c @@ -273,18 +273,17 @@ format_udp_listener_session (u8 * s, va_list * args) return format (s, "%U", format_udp_connection, uc, verbose); } -u16 -udp_send_mss (transport_connection_t * t) -{ - /* TODO figure out MTU of output interface */ - return 1460; -} - -u32 -udp_send_space (transport_connection_t * t) +static int +udp_session_send_params (transport_connection_t * tconn, + transport_send_params_t * sp) { /* No constraint on TX window */ - return ~0; + sp->snd_space = ~0; + /* TODO figure out MTU of output interface */ + sp->snd_mss = 1460; + sp->tx_offset = 0; + sp->flags = 0; + return 0; } int @@ -357,8 +356,7 @@ static const transport_proto_vft_t udp_proto = { .get_half_open = udp_session_get_half_open, .close = udp_session_close, .cleanup = udp_session_cleanup, - .send_mss = udp_send_mss, - .send_space = udp_send_space, + .send_params = udp_session_send_params, .format_connection = format_udp_session, .format_half_open = format_udp_half_open_session, .format_listener = format_udp_listener_session, @@ -412,8 +410,7 @@ static const transport_proto_vft_t udpc_proto = { .get_half_open = udp_session_get_half_open, .close = udp_session_close, .cleanup = udp_session_cleanup, - .send_mss = udp_send_mss, - .send_space = udp_send_space, + .send_params = udp_session_send_params, .format_connection = format_udp_session, .format_half_open = format_udp_half_open_session, .format_listener = format_udp_listener_session, |