aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-03-07 15:12:44 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:02 -0400
commitfe067e8ab5e0dc5ca3c54634924c628da92090b4 (patch)
tree98f5a6ebbb770f16682cfc52caea2da1e7eeb73b /include/net/sock.h
parent02ea4923b4997d7e1310c027081f46d584b9d714 (diff)
[TCP]: Abstract out all write queue operations.
This allows the write queue implementation to be changed, for example, to one which allows fast interval searching. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 9583639090d2..2974bacc8850 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -710,15 +710,6 @@ static inline void sk_stream_mem_reclaim(struct sock *sk)
710 __sk_stream_mem_reclaim(sk); 710 __sk_stream_mem_reclaim(sk);
711} 711}
712 712
713static inline void sk_stream_writequeue_purge(struct sock *sk)
714{
715 struct sk_buff *skb;
716
717 while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL)
718 sk_stream_free_skb(sk, skb);
719 sk_stream_mem_reclaim(sk);
720}
721
722static inline int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb) 713static inline int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb)
723{ 714{
724 return (int)skb->truesize <= sk->sk_forward_alloc || 715 return (int)skb->truesize <= sk->sk_forward_alloc ||
@@ -1256,18 +1247,6 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk)
1256 return page; 1247 return page;
1257} 1248}
1258 1249
1259#define sk_stream_for_retrans_queue(skb, sk) \
1260 for (skb = (sk)->sk_write_queue.next; \
1261 (skb != (sk)->sk_send_head) && \
1262 (skb != (struct sk_buff *)&(sk)->sk_write_queue); \
1263 skb = skb->next)
1264
1265/*from STCP for fast SACK Process*/
1266#define sk_stream_for_retrans_queue_from(skb, sk) \
1267 for (; (skb != (sk)->sk_send_head) && \
1268 (skb != (struct sk_buff *)&(sk)->sk_write_queue); \
1269 skb = skb->next)
1270
1271/* 1250/*
1272 * Default write policy as shown to user space via poll/select/SIGIO 1251 * Default write policy as shown to user space via poll/select/SIGIO
1273 */ 1252 */