Subject: Re: [irda-users] [1/3] IRDA: Create new field tx_extra in skbuff

From: Evgeniy Polyakov <[email-masked]>
Date: Tue, 11 Nov 2008 09:22:14 +0300

Hi Samuel.

On Tue, Nov 11, 2008 at 02:00:01AM +0100, Samuel Ortiz ([email-masked]) wrote:
> I thought about that solution, but the irda_skb_cb line field has to be kept
> per skb. It is needed for ircomm LMP flow control, in the skb destructor. I
> see that BT rfcomm does something similar, but uses the skbuff->sk as a
> rfcomm_dev pointer. As far as I understand the skbuff structure, that doesnt
> look like a reasonnable solution, as we cant assume the sk pointer won't be
> altered down the line.

It depends... If you own skb (when reference counter is 1), you can
owerwrite socket pointer with own data as long as destructor will also
be updated. You can try to clone skb and free old one to achieve this,
but it is not the fastest operation, althouhg I think both bt and irda
can afford that. Obviously in the first case you have to call old
destructor with old socket pointer also.

-- 
	Evgeniy Polyakov