David S. Miller <[EMAIL PROTECTED]> wrote: > + if (pcount > 1 && > + (after(start_seq, TCP_SKB_CB(skb)->seq) || > + before(end_seq, TCP_SKB_CB(skb)->end_seq))) { > + unsigned int pkt_len; > + > + if (after(start_seq, TCP_SKB_CB(skb)->seq)) > + pkt_len = (start_seq - > + TCP_SKB_CB(skb)->seq); > + else > + pkt_len = (end_seq - > + TCP_SKB_CB(skb)->seq); > + if (tcp_fragment(sk, skb, pkt_len, pkt_len)) > + break; > + pcount = tcp_skb_pcount(skb); > + }
You need to update various counters likes packets_out since you're changing the skb_pcount of a packet that's on the retransmit queue. I'm also unsure whether pkt_len is a good value to use for the MSS. For instance, what if the sack acknowledged two consecutive packets? > + > + fack_count += pcount; > > in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) && > !before(end_seq, TCP_SKB_CB(skb)->end_seq); Maybe I'm missing something subtle here :) But it seems to me that your patch will end up only processing the second half of the result of tcp_fragment and skip the first bit. I would've expected to see something like a loop restart right after the tcp_fragment but starting at the current skb not the next one. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html