summaryrefslogtreecommitdiffstats
path: root/include/net/flow_offload.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-07-09 22:55:42 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-09 23:38:50 +0200
commitd63db30c8537ba45208c156d71125db73d0fe522 (patch)
tree36e704c2825d9d7667d3a5e5de247c0241fd8e79 /include/net/flow_offload.h
parentnet: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* (diff)
downloadlinux-d63db30c8537ba45208c156d71125db73d0fe522.tar.xz
linux-d63db30c8537ba45208c156d71125db73d0fe522.zip
net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()
Add a new helper function to allocate flow_block_cb objects. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow_offload.h')
-rw-r--r--include/net/flow_offload.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index f12b905ad95e..45d74cb542cd 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -260,6 +260,20 @@ struct flow_block_offload {
struct netlink_ext_ack *extack;
};
+struct flow_block_cb {
+ struct list_head list;
+ tc_setup_cb_t *cb;
+ void *cb_ident;
+ void *cb_priv;
+ void (*release)(void *cb_priv);
+ unsigned int refcnt;
+};
+
+struct flow_block_cb *flow_block_cb_alloc(struct net *net, tc_setup_cb_t *cb,
+ void *cb_ident, void *cb_priv,
+ void (*release)(void *cb_priv));
+void flow_block_cb_free(struct flow_block_cb *block_cb);
+
int flow_block_cb_setup_simple(struct flow_block_offload *f,
struct list_head *driver_list, tc_setup_cb_t *cb,
void *cb_ident, void *cb_priv, bool ingress_only);