From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, "V. Lavrov" <lve@guap.ru>
Subject: [PATCH 1/1] net: sched: Make netns available for ematch extensions
Date: Wed, 11 Sep 2013 15:20:14 +0200 [thread overview]
Message-ID: <1378905614-29691-2-git-send-email-kadlec@blackhole.kfki.hu> (raw)
In-Reply-To: <1378905614-29691-1-git-send-email-kadlec@blackhole.kfki.hu>
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;
};
struct qdisc_skb_cb {
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 8e118af..1b1cb11 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -266,6 +266,7 @@ replay:
tp->q = q;
tp->classify = tp_ops->classify;
tp->classid = parent;
+ tp->net = net;
err = tp_ops->init(tp);
if (err != 0) {
--
1.7.0.4
next prev parent reply other threads:[~2013-09-11 13:20 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 ` Jozsef Kadlecsik [this message]
2013-09-11 14:31 ` [PATCH 1/1] net: sched: " Eric Dumazet
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=1378905614-29691-2-git-send-email-kadlec@blackhole.kfki.hu \
--to=kadlec@blackhole.kfki.hu \
--cc=davem@davemloft.net \
--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