netdev
[Top] [All Lists]

Re: [Fwd: Re: possible bug x86 2.4.2 SMP in IP receive stack]

To: feldy@xxxxxxxx, kuznet@xxxxxxxxxxxxx
Subject: Re: [Fwd: Re: possible bug x86 2.4.2 SMP in IP receive stack]
From: Bob Felderman <feldy@xxxxxxxx>
Date: Sun, 11 Mar 2001 11:02:25 -0800 (PST)
Cc: ak@xxxxxx, andrewm@xxxxxxxxxx, davem@xxxxxxxxxx, hadi@xxxxxxxxxx, netdev@xxxxxxxxxxx, pp@xxxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
 361878 Mar  9 12:24 zerocopy-2.4.2-1.diff



-#define TCP_DONT_COLLAPSE (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN)
-           !(tcp_flag_word(skb->h.th)&TCP_DONT_COLLAPSE) &&
-           !(tcp_flag_word(skb_next->h.th)&TCP_DONT_COLLAPSE)) {
-           /* OK to collapse two skbs to one */
-           memcpy(skb_put(skb, skb_next->len), skb_next->data, skb_next->len);
-           __skb_unlink(skb_next, skb_next->list);
-           scb->end_seq = scb_next->end_seq;
-           __kfree_skb(skb_next);
+   /* First, check that queue is collapsable and find
+    * the point where collapsing can be useful. */
+   for (skb = head; skb != tail; ) {
+       /* No new bits? It is possible on ofo queue. */
+       if (!before(start, TCP_SKB_CB(skb)->seq)) {
+           struct sk_buff *next = skb->next;
+           __skb_unlink(skb, skb->list);
+           __kfree_skb(skb);
            NET_INC_STATS_BH(TCPRcvCollapsed);

<Prev in Thread] Current Thread [Next in Thread>