Re: CIPE and 2.3.49 (success I believe) (Heads up Russel of Netfilter, Alan Cox, Dave Miller, Olaf Titz)

From: David S. Miller (davem@redhat.com)
Date: Fri Mar 03 2000 - 20:00:21 EST


   Date: Fri, 03 Mar 2000 18:57:20 -0500
   From: Trever Adams <trever_Adams@bigfoot.com>

   Russell, Alan, David: I give this to you to help me check and see
   if the code Russell sent me is an accurate replacement and/or if
   there is a bug in skb_copy_expand, as Russell told me this was
   supposed to do just what the CIPE code does. Please do look into
   it. Thank you so much.

The only difference is that you are explicitly setting
SKB 'sk' ownership in your by-hand version, skb_copy_expand
seems to be doing everything else you are doing, except that
one thing. So maybe you could try:

       if (max_headroom > skb_headroom(skb)
           || max_tailroom > skb_tailroom(skb)) {
           struct sk_buff *n= skb_copy_expand(skb, max_headroom,
                                              max_tailroom, GFP_ATOMIC);
            if (!n) {
                printk(KERN_INFO "%s: Out of memory, dropped packet\n",
                       dev->name);
                goto tx_error;
            }
            dev_kfree_skb(skb);
            if (skb->sk)
                    skb_set_owner_w(n, skb->sk);
            skb = n;
       }

I have a sneaking suspicion that will make it work for you.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:16 EST