All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: hadi@cyberus.ca, David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next V3] net: dynamic ingress_queue allocation
Date: Mon, 4 Oct 2010 16:24:15 +0200	[thread overview]
Message-ID: <20101004142415.GA2049@del.dom.local> (raw)
In-Reply-To: <1286196720.18293.196.camel@edumazet-laptop>

On Mon, Oct 04, 2010 at 02:52:00PM +0200, Eric Dumazet wrote:
> Le lundi 04 octobre 2010 ?? 14:06 +0200, Jarek Poplawski a écrit :
> 
> > Right, but then at least in qdisc_lookup():
> > 
> > if (dev_ingress_queue(dev))
> > 	q = qdisc_match_from_root(dev_ingress_queue(dev), handle);
> > 
> > you should use a variable instead of the second dereference (rtnl isn't
> > mandatory here).
> 
> I am lost.
> 
> If rntl is not mandatory, what is the lock that protects us ?
> 
> qdisc_lookup() _is_ called under the protection of a lock.
> Or as soon as we return from it, result could change under us.
> 
> Please name it, and I'll use it :
> 
> rcu_dereference_protected(dev->ingress_queue, lockdep_is_held(THISLOCK))
> 

You are right! There is no other lock. (I forgot I removed
qdisc_list_lock already ;-)

Sorry,
Jarek P.

  reply	other threads:[~2010-10-04 14:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 15:58 [PATCH net-next2.6] net: rename netdev rx_queue to ingress_queue Eric Dumazet
2010-09-28 18:04 ` Jarek Poplawski
2010-09-29 10:56   ` jamal
2010-09-29 13:18     ` Jarek Poplawski
2010-09-29 16:54       ` Jarek Poplawski
2010-09-30 22:58     ` [PATCH net-next2.6] net: dynamic ingress_queue allocation Eric Dumazet
2010-10-01 11:45       ` jamal
2010-10-01 13:56         ` [PATCH net-next V2] " Eric Dumazet
2010-10-02  9:32           ` Jarek Poplawski
2010-10-02 16:11             ` [PATCH net-next V3] " Eric Dumazet
2010-10-03  9:42               ` Jarek Poplawski
2010-10-03 13:10                 ` jamal
2010-10-04  8:42                 ` Eric Dumazet
2010-10-04  9:00                   ` [PATCH net-next] net: relax rtnl_dereference() Eric Dumazet
2010-10-05  7:29                     ` David Miller
2010-10-04 12:06                   ` [PATCH net-next V3] net: dynamic ingress_queue allocation Jarek Poplawski
2010-10-04 12:52                     ` Eric Dumazet
2010-10-04 14:24                       ` Jarek Poplawski [this message]
2010-10-04 15:21                         ` Eric Dumazet
2010-10-05  7:24               ` David Miller
2010-10-05  7:31                 ` Eric Dumazet
2010-10-02 12:10           ` [PATCH net-next V2] " jamal
2010-09-29 20:27 ` [PATCH net-next2.6] net: rename netdev rx_queue to ingress_queue 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=20101004142415.GA2049@del.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hadi@cyberus.ca \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.