]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/tcp.h
[TCP]: Add tcp_for_write_queue_from_safe and use it in mtu_probe
[net-next-2.6.git] / include / net / tcp.h
index cdd0050b97a4ffae6622b38f78ee277521878f5d..6e392babda4abab3349ff4901f7c6ff42414ed78 100644 (file)
@@ -1229,6 +1229,11 @@ static inline struct sk_buff *tcp_write_queue_next(struct sock *sk, struct sk_bu
                for (; (skb != (struct sk_buff *)&(sk)->sk_write_queue);\
                     skb = skb->next)
 
+#define tcp_for_write_queue_from_safe(skb, tmp, sk)                    \
+               for (tmp = skb->next;                                   \
+                    (skb != (struct sk_buff *)&(sk)->sk_write_queue);  \
+                    skb = tmp, tmp = skb->next)
+
 static inline struct sk_buff *tcp_send_head(struct sock *sk)
 {
        return sk->sk_send_head;