diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index aaea2af3090b39f787342d3541ee86c638a948df..42aaeea25517ad2e997cb43f645ba7b547452466 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2960,33 +2960,34 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs) if (tp->undo_retrans < 0) tp->undo_retrans = 0; -//#if defined(CONFIG_XEN_SME) && defined(CONFIG_PACER_TCP) -// if (lnk_tx_adjust_urg) { -// if (ntohs(inet_sk(sk)->inet_sport) == 443 || -// ntohs(inet_sk(sk)->inet_dport) == 443) { -// tp->undo_retrans += 1; -// } else { -// tp->undo_retrans += tcp_skb_pcount(skb); -// } -// if (skb == NULL) { -// printk(KERN_ERR "(%d:%.16s,core:%d) %s:%d [%pI4 %u, %pI4 %u]\n" -// "snd_nxt %u snd_una %u snd_cwnd %d pkts %d lost %d retrans %d sack %d" -// " CA %d pending %d\n" -// , task_pid_nr(current), current->comm, smp_processor_id() -// , __func__, __LINE__ -// , (void *) &inet_sk(sk)->inet_saddr, ntohs(inet_sk(sk)->inet_sport) -// , (void *) &inet_sk(sk)->inet_daddr, ntohs(inet_sk(sk)->inet_dport) -// , tp->snd_nxt, tp->snd_una, tp->snd_cwnd, tp->packets_out -// , tp->lost_out, tp->retrans_out, tp->sacked_out -// , inet_csk(sk)->icsk_ca_state, inet_csk(sk)->icsk_pending -// ); -// } -// } else { -// tp->undo_retrans += tcp_skb_pcount(skb); -// } -//#else +#if defined(CONFIG_XEN_SME) && defined(CONFIG_PACER_TCP) + if (lnk_tx_adjust_urg) { + if (ntohs(inet_sk(sk)->inet_sport) == 443 || + ntohs(inet_sk(sk)->inet_dport) == 443) { + tp->undo_retrans += 0; + } else { + tp->undo_retrans += tcp_skb_pcount(skb); + } + if (skb == NULL) { + printk(KERN_ERR "(%d:%.16s,core:%d) %s:%d [%pI4 %u, %pI4 %u] undo_retrans %d\n" + "snd_nxt %u snd_una %u snd_cwnd %d pkts %d lost %d retrans %d sack %d" + " CA %d pending %d\n" + , task_pid_nr(current), current->comm, smp_processor_id() + , __func__, __LINE__ + , (void *) &inet_sk(sk)->inet_saddr, ntohs(inet_sk(sk)->inet_sport) + , (void *) &inet_sk(sk)->inet_daddr, ntohs(inet_sk(sk)->inet_dport) + , tp->undo_retrans + , tp->snd_nxt, tp->snd_una, tp->snd_cwnd, tp->packets_out + , tp->lost_out, tp->retrans_out, tp->sacked_out + , inet_csk(sk)->icsk_ca_state, inet_csk(sk)->icsk_pending + ); + } + } else { + tp->undo_retrans += tcp_skb_pcount(skb); + } +#else tp->undo_retrans += tcp_skb_pcount(skb); -//#endif +#endif return err; }