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

From: Trever Adams (trever_Adams@bigfoot.com)
Date: Sun Mar 05 2000 - 16:58:31 EST


Andi Kleen wrote:
> netfilter uses it AFAIK
>
> Have you inserted any debugging code that shows that
> skb->tail-skb->data != skb->len ?
>
> -Andi

Yes, just did. It is the same. I do think it should be replaced with
skb->len. I mean, we have it in memory, it is already computed, why do
another set of subtraction and dereferencing?

It seems that since it is a "complete packet" that cipe doesn't like not
expanding upon whatever it was it was handed. For example:

If I remove the comments around the if's the code never gets run.

        max_headroom = (((tdev->hard_header_len+15)&~15)+cipehdrlen+
                        ((tunnel->sockshost) ? sizeof(struct sockshdr) :
0));
        max_tailroom = (tunnel->havekey) ? cipefootlen : 0;

                printk(KERN_ERR "%s: max_headroom %d, skb_headroom
%d\n", dev->name, max_headroom, skb_headroom(skb));
                printk(KERN_ERR "%s: max_tailroom %d, skb_tailroom
%d\n", dev->name, max_tailroom, skb_tailroom(skb));

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,35)
/* 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);

Mar 5 16:52:51 aurora kernel: cipcb0: max_tailroom 12, skb_tailroom 28
Mar 5 16:52:52 aurora kernel: cipcb0: max_headroom 52, skb_headroom 64
Mar 5 16:52:52 aurora kernel: cipcb0: max_tailroom 12, skb_tailroom 28
Mar 5 16:52:53 aurora kernel: cipcb0: max_headroom 52, skb_headroom 64
Mar 5 16:52:53 aurora kernel: cipcb0: max_tailroom 12, skb_tailroom 28

Is the output in syslog.

I am sorry to have wasted everyone's time. It seems I had this problem
and one ordering problem. They are now fixed.

I appreciate you all. Olaf Titz, expect a patch against
cipe-snapshot-20000305 momentarily. This patch will make it work (I
believe flawlessly) with 2.3.x. Though I am getting:

Removing existing cipe interface(s).
Setting up cipe interface(s): /etc/cipe/options.ITDOY internal error:
307

Trever Adams

P.S. In skb_copy_expand it uses skb->tail - skb->data which is correct
after all, but I don't see why we don't just use skb->len when it is
correct to begin with!

-- 
For the finest in family and value oriented products:
http://www.daysofyore.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:18 EST