diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-07-09 22:55:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-09 14:38:50 -0700 |
commit | d63db30c8537ba45208c156d71125db73d0fe522 (patch) | |
tree | 36e704c2825d9d7667d3a5e5de247c0241fd8e79 /include | |
parent | 32f8c4093ac353a5f1b36cfed0ce0138faf8e15f (diff) | |
download | linux-d63db30c8537ba45208c156d71125db73d0fe522.tar.bz2 |
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')
-rw-r--r-- | include/net/flow_offload.h | 14 |
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); |