diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -513,8 +513,8 @@ * hardware). * * TSO may only be used if we are in a pure bulk sending state. The - * presence of TCP-MD5, SACK retransmits, SACK advertizements and - * IP options prevent using TSO. With TSO the TCP header is the same + * presence of TCP-MD5, IP options (IPsec), and possibly SACK + * retransmits prevent using TSO. With TSO the TCP header is the same * (except for the sequence number) for all generated packets. This * makes it impossible to transmit any options which vary per generated * segment or packet. @@ -556,9 +556,9 @@ if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && ((sack_rxmit == 0) || V_tcp_sack_tso) && + ((sack_rxmit == 0) || V_tcp_sack_tso) && (ipoptlen == 0 || (ipoptlen == ipsec_optlen && - (tp->t_flags2 & TF2_IPSEC_TSO) != 0)) && + (tp->t_flags2 & TF2_IPSEC_TSO) != 0)) && !(flags & TH_SYN)) tso = 1; diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -12619,7 +12619,6 @@ (len > maxseg) && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && ipoptlen == 0) tso = 1; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -20708,7 +20708,7 @@ if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > segsiz && (tp->t_port == 0) && ((tp->t_flags & TF_SIGNATURE) == 0) && - tp->rcv_numsacks == 0 && sack_rxmit == 0 && + sack_rxmit == 0 && ipoptlen == 0) tso = 1; { @@ -20910,7 +20910,6 @@ rack_use_rfo && ((flags & (TH_SYN|TH_FIN)) == 0) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && ((IN_RECOVERY(tp->t_flags)) == 0) && @@ -22550,7 +22549,6 @@ ((flags & (TH_SYN|TH_FIN)) == 0) && (rsm == NULL) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) && ((IN_RECOVERY(tp->t_flags)) == 0) && @@ -22578,7 +22576,6 @@ ((flags & (TH_SYN|TH_FIN)) == 0) && (rsm == NULL) && (ipoptlen == 0) && - (tp->rcv_numsacks == 0) && (rack->r_must_retran == 0) && rack->r_fsb_inited && TCPS_HAVEESTABLISHED(tp->t_state) &&