diff options
author | Florin Coras <fcoras@cisco.com> | 2017-11-27 04:34:14 -0500 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-11-28 13:21:26 +0000 |
commit | f988e696149f42828444c69762c036d9684b6bb0 (patch) | |
tree | 8e62fbd53a713e64be7c0441f0399aa023a949d8 /src/vnet/tcp/tcp.h | |
parent | af6f93a4eb4740ac13b1d65eb44da442976fa809 (diff) |
tcp: fix retransmissions under buffer shortage
- add debugging scaffolding for simulating buffer shortage
Change-Id: Ice519d74f9c4e4094c4586c548185135b7bb5f2d
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r-- | src/vnet/tcp/tcp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index b057b883fd8..1ddfac0ce96 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -410,6 +410,9 @@ typedef struct _tcp_main u8 punt_unknown4; u8 punt_unknown6; + + /** fault-injection */ + f64 buffer_fail_fraction; } tcp_main_t; extern tcp_main_t tcp_main; @@ -432,6 +435,15 @@ tcp_buffer_hdr (vlib_buffer_t * b) + vnet_buffer (b)->tcp.hdr_offset); } +#if (VLIB_BUFFER_TRACE_TRAJECTORY) +#define tcp_trajectory_add_start(b, start) \ +{ \ + (*vlib_buffer_trace_trajectory_cb) (b, start); \ +} +#else +#define tcp_trajectory_add_start(b, start) +#endif + clib_error_t *vnet_tcp_enable_disable (vlib_main_t * vm, u8 is_en); void tcp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add); |