svn commit: r212803 - head/sys/netinet

Andre Oppermann andre at freebsd.org
Sat Sep 18 21:45:12 UTC 2010


On 18.09.2010 13:34, Bjoern A. Zeeb wrote:
> On Fri, 17 Sep 2010, Andre Oppermann wrote:
>> @@ -487,22 +482,15 @@ after_sack_rexmit:
>> */
>> ipsec_optlen = ipsec_hdrsiz_tcp(tp);
>> #endif
>> - if (len > tp->t_maxseg) {
>> - if ((tp->t_flags & TF_TSO) && V_tcp_do_tso &&
>> - ((tp->t_flags & TF_SIGNATURE) == 0) &&
>> - tp->rcv_numsacks == 0 && sack_rxmit == 0 &&
>> - tp->t_inpcb->inp_options == NULL &&
>> - tp->t_inpcb->in6p_options == NULL
>> + if ((tp->t_flags & TF_TSO) && V_tcp_do_tso && len > tp->t_maxseg &&
>> + ((tp->t_flags & TF_SIGNATURE) == 0) &&
>> + tp->rcv_numsacks == 0 && sack_rxmit == 0 &&
>> #ifdef IPSEC
>> - && ipsec_optlen == 0
>> + ipsec_optlen == 0 &&
>> #endif
>> - ) {
>> - tso = 1;
>> - } else {
>> - len = tp->t_maxseg;
>> - sendalot = 1;
>> - }
>> - }
>> + tp->t_inpcb->inp_options == NULL &&
>> + tp->t_inpcb->in6p_options == NULL)
>> + tso = 1;
>
> In the non-TSO case you are no longer reducing len to tp->t_maxseg
> here, if it's larger, which I think breaks asssumptions all the way down.

No assumptions are broken for the non-TSO case.  The value of len is
only tested against t_maxseg for being equal or grater.  This always
hold true.  When the decision to send has been made len is correctly
limited in the non-TSO and TSO case.  Before it was a bit of either
was done in both places.  That is now merged into one spot.

-- 
Andre


More information about the svn-src-head mailing list