aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/util/trajectory.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-11-27 04:34:14 -0500
committerDave Barach <openvpp@barachs.net>2017-11-28 13:21:26 +0000
commitf988e696149f42828444c69762c036d9684b6bb0 (patch)
tree8e62fbd53a713e64be7c0441f0399aa023a949d8 /src/vnet/util/trajectory.c
parentaf6f93a4eb4740ac13b1d65eb44da442976fa809 (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/util/trajectory.c')
-rw-r--r--src/vnet/util/trajectory.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/util/trajectory.c b/src/vnet/util/trajectory.c
index 24b51254ecd..91812dcba58 100644
--- a/src/vnet/util/trajectory.c
+++ b/src/vnet/util/trajectory.c
@@ -64,7 +64,11 @@ vnet_dump_trajectory_trace (vlib_main_t * vm, u32 bi)
void
init_trajectory_trace (vlib_buffer_t * b)
{
- vec_validate (vnet_buffer2 (b)->trajectory_trace, 7);
+ if (!clib_mem_is_vec (vnet_buffer2 (b)->trajectory_trace))
+ {
+ vnet_buffer2 (b)->trajectory_trace = 0;
+ vec_validate (vnet_buffer2 (b)->trajectory_trace, 7);
+ }
_vec_len (vnet_buffer2 (b)->trajectory_trace) = 0;
}