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>
This commit is contained in:

committed by
David S. Miller

parent
32f8c4093a
commit
d63db30c85
@@ -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);
|
||||
|
Reference in New Issue
Block a user