Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_sack.c
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||
#include <machine/in_cksum.h> | #include <machine/in_cksum.h> | ||||
VNET_DECLARE(struct uma_zone *, sack_hole_zone); | VNET_DECLARE(struct uma_zone *, sack_hole_zone); | ||||
#define V_sack_hole_zone VNET(sack_hole_zone) | #define V_sack_hole_zone VNET(sack_hole_zone) | ||||
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"TCP SACK"); | "TCP SACK"); | ||||
VNET_DEFINE(int, tcp_do_sack) = 1; | VNET_DEFINE(int, tcp_do_sack) = 1; | ||||
#define V_tcp_do_sack VNET(tcp_do_sack) | |||||
SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_do_sack), 0, "Enable/Disable TCP SACK support"); | &VNET_NAME(tcp_do_sack), 0, | ||||
"Enable/Disable TCP SACK support"); | |||||
VNET_DEFINE(int, tcp_do_newsack) = 1; | |||||
SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, revised, CTLFLAG_VNET | CTLFLAG_RW, | |||||
&VNET_NAME(tcp_do_newsack), 0, | |||||
"Use revised SACK loss recovery per RFC 6675"); | |||||
VNET_DEFINE(int, tcp_sack_maxholes) = 128; | VNET_DEFINE(int, tcp_sack_maxholes) = 128; | ||||
SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_sack_maxholes), 0, | &VNET_NAME(tcp_sack_maxholes), 0, | ||||
"Maximum number of TCP SACK holes allowed per connection"); | "Maximum number of TCP SACK holes allowed per connection"); | ||||
VNET_DEFINE(int, tcp_sack_globalmaxholes) = 65536; | VNET_DEFINE(int, tcp_sack_globalmaxholes) = 65536; | ||||
SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxholes, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxholes, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_sack_globalmaxholes), 0, | &VNET_NAME(tcp_sack_globalmaxholes), 0, | ||||
▲ Show 20 Lines • Show All 675 Lines • ▼ Show 20 Lines | tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) | ||||
* limited. However, this inference might not always be true. The | * limited. However, this inference might not always be true. The | ||||
* rescue retransmission may rarely be slightly premature | * rescue retransmission may rarely be slightly premature | ||||
* compared to RFC6675. | * compared to RFC6675. | ||||
* The corresponding ACK+SACK will cause any further outstanding | * The corresponding ACK+SACK will cause any further outstanding | ||||
* segments to be retransmitted. This addresses a corner case, when | * segments to be retransmitted. This addresses a corner case, when | ||||
* the trailing packets of a window are lost and no further data | * the trailing packets of a window are lost and no further data | ||||
* is available for sending. | * is available for sending. | ||||
*/ | */ | ||||
if ((V_tcp_do_rfc6675_pipe) && | if ((V_tcp_do_newsack) && | ||||
kbowling: This hunk rejected by patch, tcp_sack_partialack doesn't look like this in head | |||||
SEQ_LT(th->th_ack, tp->snd_recover) && | SEQ_LT(th->th_ack, tp->snd_recover) && | ||||
(tp->snd_recover == tp->snd_max) && | (tp->snd_recover == tp->snd_max) && | ||||
TAILQ_EMPTY(&tp->snd_holes) && | TAILQ_EMPTY(&tp->snd_holes) && | ||||
(tp->sackhint.delivered_data > 0)) { | (tp->sackhint.delivered_data > 0)) { | ||||
struct sackhole *hole; | struct sackhole *hole; | ||||
int maxseg = tcp_maxseg(tp); | int maxseg = tcp_maxseg(tp); | ||||
hole = tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, tp->snd_max - maxseg), tp->snd_max, NULL); | hole = tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, tp->snd_max - maxseg), tp->snd_max, NULL); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |
This hunk rejected by patch, tcp_sack_partialack doesn't look like this in head