tcp: do not delete session on establish pop
Also:
- force reset if wait close pops in fin-wait-1 with unsent data
- adds more event logging.
Change-Id: I4ddada046214fa71e17514cdec57b3026f84a283
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/tcp/tcp_debug.h b/src/vnet/tcp/tcp_debug.h
index 23ad391..262d3fa 100755
--- a/src/vnet/tcp/tcp_debug.h
+++ b/src/vnet/tcp/tcp_debug.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Copyright (c) 2017-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -177,7 +177,7 @@
{ \
ELOG_TYPE_DECLARE (_e) = \
{ \
- .format = "close: %d", \
+ .format = "close: cidx %d", \
.format_args = "i4", \
}; \
DECLARE_ETD(_tc, _e, 1); \
@@ -201,12 +201,13 @@
TCP_EVT_INIT_HANDLER(_tc, 0); \
ELOG_TYPE_DECLARE (_e) = \
{ \
- .format = "syn-rx: idx %u irs %u", \
- .format_args = "i4i4", \
+ .format = "syn-rx: cidx %u sidx %u irs %u", \
+ .format_args = "i4i4i4", \
}; \
- DECLARE_ETD(_tc, _e, 2); \
+ DECLARE_ETD(_tc, _e, 3); \
ed->data[0] = _tc->c_c_index; \
- ed->data[1] = _tc->irs; \
+ ed->data[1] = _tc->c_s_index; \
+ ed->data[2] = _tc->irs; \
TCP_EVT_STATE_CHANGE_HANDLER(_tc); \
}
@@ -226,11 +227,12 @@
{ \
ELOG_TYPE_DECLARE (_e) = \
{ \
- .format = "delete: %d", \
- .format_args = "i4", \
+ .format = "delete: cidx %d sidx %d", \
+ .format_args = "i4i4", \
}; \
- DECLARE_ETD(_tc, _e, 1); \
+ DECLARE_ETD(_tc, _e, 2); \
ed->data[0] = _tc->c_c_index; \
+ ed->data[1] = _tc->c_s_index; \
TCP_EVT_DEALLOC_HANDLER(_tc); \
}
@@ -379,7 +381,7 @@
.n_enum_strings = 2, \
.enum_strings = { \
"syn", \
- "syn-ack", \
+ "synack", \
}, \
}; \
DECLARE_ETD(_tc, _e, 5); \
@@ -405,8 +407,8 @@
} \
ELOG_TYPE_DECLARE (_e) = \
{ \
- .format = "timer-pop: %s (%d)", \
- .format_args = "t4i4", \
+ .format = "timer-pop: %s cidx %u sidx %u", \
+ .format_args = "t4i4i4", \
.n_enum_strings = 8, \
.enum_strings = { \
"retransmit", \
@@ -421,9 +423,10 @@
}; \
if (_tc) \
{ \
- DECLARE_ETD(_tc, _e, 2); \
+ DECLARE_ETD(_tc, _e, 3); \
ed->data[0] = _timer_id; \
- ed->data[1] = _timer_id; \
+ ed->data[1] = _tc->c_c_index; \
+ ed->data[2] = _tc->c_s_index; \
} \
else \
{ \