From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, "V. Lavrov" <lve@guap.ru>
Subject: Re: [PATCH 1/1] net: sched: Make netns available for ematch extensions
Date: Wed, 11 Sep 2013 07:31:55 -0700 [thread overview]
Message-ID: <1378909915.21474.2.camel@edumazet-glaptop> (raw)
In-Reply-To: <1378905614-29691-2-git-send-email-kadlec@blackhole.kfki.hu>
On Wed, 2013-09-11 at 15:20 +0200, Jozsef Kadlecsik wrote:
> Ematch API (change, destroy) doesn't pass netns data to ematch extensions.
> This prevents adding netns support to ipset, which is an ematch too.
>
> The patch adds the required pointer to "struct tcf_proto", thus
> making it available for every ematch.
>
> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> ---
> include/net/sch_generic.h | 1 +
> net/sched/cls_api.c | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index f4eb365..38e5e4b 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -225,6 +225,7 @@ struct tcf_proto {
> struct Qdisc *q;
> void *data;
> const struct tcf_proto_ops *ops;
> + struct net *net;
> };
>
Note that qdisc_dev(tp->q) should give you the pointer to device
Then ->nd_net gives you the struct net pointer.
On management path, this should be enough ;)
next prev parent reply other threads:[~2013-09-11 14:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 13:20 [PATCH 0/1] Make netns available for ematch extensions Jozsef Kadlecsik
2013-09-11 13:20 ` [PATCH 1/1] net: sched: " Jozsef Kadlecsik
2013-09-11 14:31 ` Eric Dumazet [this message]
2013-09-11 14:32 ` Eric Dumazet
2013-09-11 18:37 ` Jozsef Kadlecsik
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=1378909915.21474.2.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=lve@guap.ru \
--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