|
@@ -3382,7 +3382,7 @@ EXPORT_SYMBOL_GPL(tcp_send_ack);
|
|
* one is with SEG.SEQ=SND.UNA to deliver urgent pointer, another is
|
|
* one is with SEG.SEQ=SND.UNA to deliver urgent pointer, another is
|
|
* out-of-date with SND.UNA-1 to probe window.
|
|
* out-of-date with SND.UNA-1 to probe window.
|
|
*/
|
|
*/
|
|
-static int tcp_xmit_probe_skb(struct sock *sk, int urgent)
|
|
|
|
|
|
+static int tcp_xmit_probe_skb(struct sock *sk, int urgent, int mib)
|
|
{
|
|
{
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
@@ -3400,6 +3400,7 @@ static int tcp_xmit_probe_skb(struct sock *sk, int urgent)
|
|
*/
|
|
*/
|
|
tcp_init_nondata_skb(skb, tp->snd_una - !urgent, TCPHDR_ACK);
|
|
tcp_init_nondata_skb(skb, tp->snd_una - !urgent, TCPHDR_ACK);
|
|
skb_mstamp_get(&skb->skb_mstamp);
|
|
skb_mstamp_get(&skb->skb_mstamp);
|
|
|
|
+ NET_INC_STATS_BH(sock_net(sk), mib);
|
|
return tcp_transmit_skb(sk, skb, 0, GFP_ATOMIC);
|
|
return tcp_transmit_skb(sk, skb, 0, GFP_ATOMIC);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3407,12 +3408,12 @@ void tcp_send_window_probe(struct sock *sk)
|
|
{
|
|
{
|
|
if (sk->sk_state == TCP_ESTABLISHED) {
|
|
if (sk->sk_state == TCP_ESTABLISHED) {
|
|
tcp_sk(sk)->snd_wl1 = tcp_sk(sk)->rcv_nxt - 1;
|
|
tcp_sk(sk)->snd_wl1 = tcp_sk(sk)->rcv_nxt - 1;
|
|
- tcp_xmit_probe_skb(sk, 0);
|
|
|
|
|
|
+ tcp_xmit_probe_skb(sk, 0, LINUX_MIB_TCPWINPROBE);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/* Initiate keepalive or window probe from timer. */
|
|
/* Initiate keepalive or window probe from timer. */
|
|
-int tcp_write_wakeup(struct sock *sk)
|
|
|
|
|
|
+int tcp_write_wakeup(struct sock *sk, int mib)
|
|
{
|
|
{
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
@@ -3449,8 +3450,8 @@ int tcp_write_wakeup(struct sock *sk)
|
|
return err;
|
|
return err;
|
|
} else {
|
|
} else {
|
|
if (between(tp->snd_up, tp->snd_una + 1, tp->snd_una + 0xFFFF))
|
|
if (between(tp->snd_up, tp->snd_una + 1, tp->snd_una + 0xFFFF))
|
|
- tcp_xmit_probe_skb(sk, 1);
|
|
|
|
- return tcp_xmit_probe_skb(sk, 0);
|
|
|
|
|
|
+ tcp_xmit_probe_skb(sk, 1, mib);
|
|
|
|
+ return tcp_xmit_probe_skb(sk, 0, mib);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3464,7 +3465,7 @@ void tcp_send_probe0(struct sock *sk)
|
|
unsigned long probe_max;
|
|
unsigned long probe_max;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- err = tcp_write_wakeup(sk);
|
|
|
|
|
|
+ err = tcp_write_wakeup(sk, LINUX_MIB_TCPWINPROBE);
|
|
|
|
|
|
if (tp->packets_out || !tcp_send_head(sk)) {
|
|
if (tp->packets_out || !tcp_send_head(sk)) {
|
|
/* Cancel probe timer, if it is not required. */
|
|
/* Cancel probe timer, if it is not required. */
|