From: Evgeniy Polyakov <zbr@ioremap.net>
To: Samuel Ortiz <samuel@sortiz.org>
Cc: "Alex Villacís Lasso" <avillaci@ceibo.fiec.espol.edu.ec>,
irda-users@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [irda-users] [1/3] IRDA: Create new field tx_extra in skbuff
Date: Tue, 11 Nov 2008 09:22:14 +0300 [thread overview]
Message-ID: <20081111062214.GA20261@ioremap.net> (raw)
In-Reply-To: <20081111010001.GB7511@sortiz.org>
Hi Samuel.
On Tue, Nov 11, 2008 at 02:00:01AM +0100, Samuel Ortiz (samuel@sortiz.org) 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
next prev parent reply other threads:[~2008-11-11 6:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 16:09 [1/3] IRDA: Create new field tx_extra in skbuff Alex Villacís Lasso
2008-11-10 16:35 ` Evgeniy Polyakov
2008-11-10 16:55 ` Evgeniy Polyakov
[not found] ` <20081110165544.GB19804-i6C2adt8DTjR7s880joybQ@public.gmane.org>
2008-11-11 1:00 ` Samuel Ortiz
2008-11-11 6:22 ` Evgeniy Polyakov [this message]
2008-11-10 16:47 ` [irda-users] " Samuel Ortiz
2008-11-10 20:51 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081111062214.GA20261@ioremap.net \
--to=zbr@ioremap.net \
--cc=avillaci@ceibo.fiec.espol.edu.ec \
--cc=irda-users@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).