Subject: Re: [PATCH] reduce netfilte sk_buff enlargement

From: Marcel Holtmann <[email-masked]>
Date: Fri, 22 Jul 2005 01:49:51 +0200

Hi Dave,

> > unfortunatly it is not that straight forward as I thought. The attached
> > patch which modifies the Bluetooth core and the hci_usb driver is not
> > working on my machine.
> 
> This probably has nothing to do with why the patch doesn't
> work for you, but the transformation of "incoming" to a "u8"
> from an "int" is not fully correct, because hci_sock.c
> does this:
> 
> 	put_cmsg(msg, SOL_HCI, HCI_CMSG_DIR, sizeof(int), &bt_cb(skb)->incoming);
> 
> I haven't found any other problems though...

actually I overlooked it. Thanks for spotting it. I fixed it by copying
it into an int first. However this is only used when you really request
the direction bit and this happens only with hcidump from userspace as
far as I know.

> Maybe the bluetooth code was somehow depending upon the initial
> value of skb->pkt_type or something like that?

The pkt_type zero is not a valid one. We only use 1-4 and 0xff. So this
can't be the problem. I assume that the cb is not copied from the driver
into the core at some point.

Regards

Marcel