Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	David Miller <davem@davemloft.net>,
	socketcan@hartkopp.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] pkt_sched: namespace aware ifb
Date: Sun, 13 Jan 2013 08:57:37 -0800	[thread overview]
Message-ID: <1358096257.8744.112.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130113164141.GL5259@kvack.org>

On Sun, 2013-01-13 at 11:41 -0500, Benjamin LaHaise wrote:
> Hi folks,
> 
> On Sun, Jan 13, 2013 at 09:44:48AM -0500, Jamal Hadi Salim wrote:
> > Eric, the point probably Ben was trying to make is not about 
> > synchronizing rather about which namespace has the right to that action 
> > config. Your change is correct for the common use of actions
> > but does not fix the larger picture.
> ...
> > In such a case, the "tc actions" netlink path may be
> > entered from a different namespace than the one that is
> > using it. Then current->nsproxy->net_ns is no longer correct.
> > 
> > To correct this, i think what Ben points out in passing the
> > init() the correct namespace seem like the way to go. Feel free
> > to make that change - otherwise i will get to it and fix it.
> 
> Yep, Jamal's right on the point I'm trying to make.  To deal with this, I 
> think we need a patch along the lines of the following to pass the 'struct 
> net *' down to where it's needed...  Please note that I've only compile 
> tested this with all the net/sched modules enabled and a allmodconfig 
> build.  It's a bit bigger, but passing the argument down through the call 
> chain looks simpler than trying to stuff a struct net pointer into the 
> various structures and keep that in sync with the network device's network 
> namespace.
> 
> 		-ben
> -- 
> "Thought is the essence of where you are now."
> 
> -- 
> pkt_sched: namespace aware ifb v2
> 
> Eric Dumazet pointed out that act_mirred needs to find the current net_ns,
> and struct net pointer is not provided in the call chain.  His original
> patch made use of current->nsproxy->net_ns to find the network namespace,
> but this fails to work correctly for userspace code that makes use of
> netlink sockets in different network namespaces.  Instead, pass the
> "struct net *" down along the call chain to where it is needed.
> 
> Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
> ---

OK I'll test it at the end of the (sunny) day.

Thanks

  reply	other threads:[~2013-01-13 16:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 13:48 [RFC davem] revert: net: Make skb->skb_iif always track skb->dev Oliver Hartkopp
2013-01-12 18:13 ` Jiri Pirko
2013-01-12 18:40   ` Oliver Hartkopp
2013-01-12 19:37     ` Jiri Pirko
2013-01-12 20:14       ` Oliver Hartkopp
2013-01-12 21:23 ` David Miller
2013-01-12 21:36   ` David Miller
2013-01-13  3:06     ` [PATCH net-next] pkt_sched: namespace aware ifb Eric Dumazet
2013-01-13  3:50       ` Benjamin LaHaise
2013-01-13  5:49         ` Eric Dumazet
2013-01-13 14:44           ` Jamal Hadi Salim
2013-01-13 16:41             ` Benjamin LaHaise
2013-01-13 16:57               ` Eric Dumazet [this message]
2013-01-13 17:25                 ` Jamal Hadi Salim
2013-01-14  5:40                 ` Eric Dumazet
2013-01-13 17:46             ` [PATCH net-next] ifb: dont hard code inet_net use Eric Dumazet
2013-01-14 13:13               ` Jamal Hadi Salim
2013-01-14 15:15                 ` [PATCH net-next] pkt_sched: namespace aware act_mirred Benjamin LaHaise
2013-01-14 20:10                   ` David Miller
2013-01-14 20:13                 ` [PATCH net-next] ifb: dont hard code inet_net use David Miller
2013-01-13 14:59           ` [PATCH net-next] pkt_sched: namespace aware ifb Benjamin LaHaise
2013-01-13 16:35             ` Eric Dumazet
2013-01-13 11:01     ` [RFC davem] revert: net: Make skb->skb_iif always track skb->dev Oliver Hartkopp
2013-01-13 13:20       ` 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=1358096257.8744.112.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=bcrl@kvack.org \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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