[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190426003348.30745-4-pablo@netfilter.org>
Date: Fri, 26 Apr 2019 02:33:40 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: netfilter-devel@...r.kernel.org
Cc: davem@...emloft.net, netdev@...r.kernel.org, jiri@...lanox.com,
john.hurley@...ronome.com, jakub.kicinski@...ronome.com,
ogerlitz@...lanox.com
Subject: [PATCH net-next,RFC 3/9] net: sched: add tcf_block_cb_free()
Just a stub to release tcf_block_cb objects, follow up patch extends it
to have a release callback in it for the private data.
Signed-off-by: Pablo Neira Ayuso <pablo@...filter.org>
---
include/net/pkt_cls.h | 1 +
net/sched/cls_api.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 8ddfbe94e253..565775289b41 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -73,6 +73,7 @@ static inline struct Qdisc *tcf_block_q(struct tcf_block *block)
struct tcf_block_cb *tcf_block_cb_alloc(tc_setup_cb_t *cb,
void *cb_ident, void *cb_priv);
+void tcf_block_cb_free(struct tcf_block_cb *block_cb);
void *tcf_block_cb_priv(struct tcf_block_cb *block_cb);
struct tcf_block_cb *tcf_block_cb_lookup(struct tcf_block *block,
tc_setup_cb_t *cb, void *cb_ident);
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index ddfccf31aac9..9f61a2c3cf6f 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -766,6 +766,12 @@ struct tcf_block_cb *tcf_block_cb_alloc(tc_setup_cb_t *cb,
}
EXPORT_SYMBOL(tcf_block_cb_alloc);
+void tcf_block_cb_free(struct tcf_block_cb *block_cb)
+{
+ kfree(block_cb);
+}
+EXPORT_SYMBOL(tcf_block_cb_free);
+
struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block,
tc_setup_cb_t *cb, void *cb_ident,
void *cb_priv,
--
2.11.0
Powered by blists - more mailing lists