kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [TCP]: question about counter in tcp_mark_head_lost
@ 2012-07-12  5:44 李易
  0 siblings, 0 replies; only message in thread
From: 李易 @ 2012-07-12  5:44 UTC (permalink / raw)
  To: kernelnewbies

hi all,
In tcp_mark_head_lost() fucntion, when sack enabled and fack disabled,
why does the packet counter variable "cnt" increase only when current skb is
marked as TCPCB_SACKED_ACKED?
code:
if (tcp_is_fack(tp) || tcp_is_reno(tp) ||
(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
cnt += tcp_skb_pcount(skb);

Is this right ? I have a question when retransmition queue looks as below:

sacked=0 --> sacked=SACK_ACKED --> sacked=0 --> sacked=SACK_ACKED
then, when we call tcp_mark_head_lost(sk, 1, 0)
this will mark the two skbs, which are previously marked 0 , as TCPCB_LOST.

So, this function marks two skbs as lost, although we pass parameter
"packets"
as "1".

I do not know why this function has this semantic , which is not
consistent with
its declaration.

Can anyone explanation this, thanks in advance.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-12  5:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12  5:44 [TCP]: question about counter in tcp_mark_head_lost 李易

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).