Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tcp: avoid fr segments less than mss if possible
[vpp.git]
/
src
/
vnet
/
tcp
/
tcp_output.c
diff --git
a/src/vnet/tcp/tcp_output.c
b/src/vnet/tcp/tcp_output.c
index
f157b78
..
78148cd
100644
(file)
--- a/
src/vnet/tcp/tcp_output.c
+++ b/
src/vnet/tcp/tcp_output.c
@@
-1810,7
+1810,11
@@
tcp_retransmit_sack (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
break;
}
break;
}
- max_bytes = clib_min (hole->end - sb->high_rxt, snd_space);
+ max_bytes = hole->end - sb->high_rxt;
+ /* Avoid retransmitting segment less than mss if possible */
+ if (snd_space < tc->snd_mss && max_bytes > snd_space)
+ break;
+ max_bytes = clib_min (max_bytes, snd_space);
max_bytes = snd_limited ? clib_min (max_bytes, tc->snd_mss) : max_bytes;
if (max_bytes == 0)
break;
max_bytes = snd_limited ? clib_min (max_bytes, tc->snd_mss) : max_bytes;
if (max_bytes == 0)
break;
@@
-2295,7
+2299,6
@@
VLIB_NODE_FN (tcp6_output_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
return tcp46_output_inline (vm, node, from_frame, 0 /* is_ip4 */ );
}
return tcp46_output_inline (vm, node, from_frame, 0 /* is_ip4 */ );
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (tcp4_output_node) =
{
.name = "tcp4-output",
VLIB_REGISTER_NODE (tcp4_output_node) =
{
.name = "tcp4-output",
@@
-2313,9
+2316,7
@@
VLIB_REGISTER_NODE (tcp4_output_node) =
.format_buffer = format_tcp_header,
.format_trace = format_tcp_tx_trace,
};
.format_buffer = format_tcp_header,
.format_trace = format_tcp_tx_trace,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (tcp6_output_node) =
{
.name = "tcp6-output",
VLIB_REGISTER_NODE (tcp6_output_node) =
{
.name = "tcp6-output",
@@
-2333,7
+2334,6
@@
VLIB_REGISTER_NODE (tcp6_output_node) =
.format_buffer = format_tcp_header,
.format_trace = format_tcp_tx_trace,
};
.format_buffer = format_tcp_header,
.format_trace = format_tcp_tx_trace,
};
-/* *INDENT-ON* */
typedef enum _tcp_reset_next
{
typedef enum _tcp_reset_next
{
@@
-2444,7
+2444,6
@@
VLIB_NODE_FN (tcp6_reset_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
return tcp46_reset_inline (vm, node, from_frame, 0);
}
return tcp46_reset_inline (vm, node, from_frame, 0);
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (tcp4_reset_node) = {
.name = "tcp4-reset",
.vector_size = sizeof (u32),
VLIB_REGISTER_NODE (tcp4_reset_node) = {
.name = "tcp4-reset",
.vector_size = sizeof (u32),
@@
-2458,9
+2457,7
@@
VLIB_REGISTER_NODE (tcp4_reset_node) = {
},
.format_trace = format_tcp_tx_trace,
};
},
.format_trace = format_tcp_tx_trace,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (tcp6_reset_node) = {
.name = "tcp6-reset",
.vector_size = sizeof (u32),
VLIB_REGISTER_NODE (tcp6_reset_node) = {
.name = "tcp6-reset",
.vector_size = sizeof (u32),
@@
-2474,7
+2471,6
@@
VLIB_REGISTER_NODE (tcp6_reset_node) = {
},
.format_trace = format_tcp_tx_trace,
};
},
.format_trace = format_tcp_tx_trace,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
/*
* fd.io coding-style-patch-verification: ON