netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Divy Le Ray <divy@chelsio.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Brice Goglin <Brice.Goglin@ens-lyon.org>, netdev@vger.kernel.org
Subject: Re: Who's allowed to set a skb destructor?
Date: Thu, 05 Jul 2007 04:07:07 -0700	[thread overview]
Message-ID: <468CD0DB.8060705@chelsio.com> (raw)
In-Reply-To: <p733b032mec.fsf@bingen.suse.de>

Andi Kleen wrote:
> Brice Goglin <Brice.Goglin@ens-lyon.org> writes:
>
>   
>> I am trying to understand whether I can setup a skb destructor in my
>> code (which is basically a protocol above dev_queue_xmit() and co). From
>> what I see in many parts in the current kernel code, the "protocol" (I
>> mean, the one who actually creates the skb) may setup a destructor.
>>     
>
> The socket layer generally needs it for its own accounting.
> Unless you never pass it up you can't use it.
>
>   
>> However, I also see some places where some low-level drivers might be
>> using a destructor too , without apparently checking whether an upper
>> layer already uses one. For instance, write_ofld_wr() in cxgb3/sge.c.
>>     
>
> Likely a bug. Normally that should not slip past code review.
>   

Andi,

The destructor method is set and used for skbs originating from the RDMA 
driver sitting above cxgb3.

The patch introducing this code was discussed at the time.
http://marc.info/?l=linux-netdev&m=117029329230969&w=2

Cheers,
Divy

  reply	other threads:[~2007-07-05 11:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04  8:04 Who's allowed to set a skb destructor? Brice Goglin
2007-07-04  9:38 ` Evgeniy Polyakov
2007-07-05 10:08 ` Andi Kleen
2007-07-05 11:07   ` Divy Le Ray [this message]
2007-07-05 13:07     ` Andi Kleen
2007-07-05 12:28   ` Jarek Poplawski
2007-07-05 12:28     ` Evgeniy Polyakov
2007-07-05 13:00       ` Jarek Poplawski
2007-07-06  9:08       ` Jarek Poplawski
2007-07-06  9:44         ` Jarek Poplawski
2007-07-05 13:06     ` Andi Kleen
2007-07-05 13:51       ` Jarek Poplawski
2007-07-06  7:47       ` Jarek Poplawski

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=468CD0DB.8060705@chelsio.com \
    --to=divy@chelsio.com \
    --cc=Brice.Goglin@ens-lyon.org \
    --cc=andi@firstfloor.org \
    --cc=netdev@vger.kernel.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).