aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 503810a70e21..e71f8ba3e101 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -7,7 +7,7 @@
7 * 7 *
8 * Version: @(#)tcp.h 1.0.5 05/23/93 8 * Version: @(#)tcp.h 1.0.5 05/23/93
9 * 9 *
10 * Authors: Ross Biro, <bir7@leland.Stanford.Edu> 10 * Authors: Ross Biro
11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
12 * 12 *
13 * This program is free software; you can redistribute it and/or 13 * This program is free software; you can redistribute it and/or
@@ -1417,19 +1417,20 @@ tcp_nagle_check(const struct tcp_sock *tp, const struct sk_buff *skb,
1417 tcp_minshall_check(tp)))); 1417 tcp_minshall_check(tp))));
1418} 1418}
1419 1419
1420extern void tcp_set_skb_tso_segs(struct sk_buff *, unsigned int); 1420extern void tcp_set_skb_tso_segs(struct sock *, struct sk_buff *);
1421 1421
1422/* This checks if the data bearing packet SKB (usually sk->sk_send_head) 1422/* This checks if the data bearing packet SKB (usually sk->sk_send_head)
1423 * should be put on the wire right now. 1423 * should be put on the wire right now.
1424 */ 1424 */
1425static __inline__ int tcp_snd_test(const struct tcp_sock *tp, 1425static __inline__ int tcp_snd_test(struct sock *sk,
1426 struct sk_buff *skb, 1426 struct sk_buff *skb,
1427 unsigned cur_mss, int nonagle) 1427 unsigned cur_mss, int nonagle)
1428{ 1428{
1429 struct tcp_sock *tp = tcp_sk(sk);
1429 int pkts = tcp_skb_pcount(skb); 1430 int pkts = tcp_skb_pcount(skb);
1430 1431
1431 if (!pkts) { 1432 if (!pkts) {
1432 tcp_set_skb_tso_segs(skb, tp->mss_cache_std); 1433 tcp_set_skb_tso_segs(sk, skb);
1433 pkts = tcp_skb_pcount(skb); 1434 pkts = tcp_skb_pcount(skb);
1434 } 1435 }
1435 1436
@@ -1490,7 +1491,7 @@ static __inline__ void __tcp_push_pending_frames(struct sock *sk,
1490 if (skb) { 1491 if (skb) {
1491 if (!tcp_skb_is_last(sk, skb)) 1492 if (!tcp_skb_is_last(sk, skb))
1492 nonagle = TCP_NAGLE_PUSH; 1493 nonagle = TCP_NAGLE_PUSH;
1493 if (!tcp_snd_test(tp, skb, cur_mss, nonagle) || 1494 if (!tcp_snd_test(sk, skb, cur_mss, nonagle) ||
1494 tcp_write_xmit(sk, nonagle)) 1495 tcp_write_xmit(sk, nonagle))
1495 tcp_check_probe_timer(sk, tp); 1496 tcp_check_probe_timer(sk, tp);
1496 } 1497 }
@@ -1508,7 +1509,7 @@ static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp)
1508 struct sk_buff *skb = sk->sk_send_head; 1509 struct sk_buff *skb = sk->sk_send_head;
1509 1510
1510 return (skb && 1511 return (skb &&
1511 tcp_snd_test(tp, skb, tcp_current_mss(sk, 1), 1512 tcp_snd_test(sk, skb, tcp_current_mss(sk, 1),
1512 tcp_skb_is_last(sk, skb) ? TCP_NAGLE_PUSH : tp->nonagle)); 1513 tcp_skb_is_last(sk, skb) ? TCP_NAGLE_PUSH : tp->nonagle));
1513} 1514}
1514 1515