In the following code, write queue is traversed and ack_seq of the skb's is used. Can someone please point out how/where it is initialized. I can only see it being initialized in tcp_transmit_skb but that skb will be freed since it is a clone. I could not find where the skb queued in the write queue is initialized.
Thanks, static void tcp_mark_lost_retrans(struct sock *sk) { const struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *skb; int cnt = 0; u32 new_low_seq = tp->snd_nxt; u32 received_upto = tcp_highest_sack_seq(tp); if (!tcp_is_fack(tp) || !tp->retrans_out || !after(received_upto, tp->lost_retrans_low) || icsk->icsk_ca_state != TCP_CA_Recovery) return; tcp_for_write_queue(skb, sk) { u32 ack_seq = TCP_SKB_CB(skb)->ack_seq; <====== if (skb == tcp_send_head(sk)) break; -- JS