[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1378905614-29691-2-git-send-email-kadlec@blackhole.kfki.hu>
Date: Wed, 11 Sep 2013 15:20:14 +0200
From: Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, "V. Lavrov" <lve@...p.ru>
Subject: [PATCH 1/1] net: sched: Make netns available for ematch extensions
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@...ckhole.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists