aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_flow_table_offload.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-05-29 02:25:41 +0200
committerDavid S. Miller <davem@davemloft.net>2020-06-01 11:41:50 -0700
commit709ffbe19b777e8fc952e2fdcfd8e6f50c8ef08c (patch)
tree1ef18393a6cb028d43eb40a0e90c05850dd5ab45 /net/netfilter/nf_flow_table_offload.c
parente445e30cf7e6d68566db775ce186cbe63ef286e9 (diff)
downloadlinux-709ffbe19b777e8fc952e2fdcfd8e6f50c8ef08c.tar.gz
net: remove indirect block netdev event registration
Drivers do not register to netdev events to set up indirect blocks anymore. Remove __flow_indr_block_cb_register() and __flow_indr_block_cb_unregister(). The frontends set up the callbacks through flow_indr_dev_setup_block() Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nf_flow_table_offload.c')
-rw-r--r--net/netfilter/nf_flow_table_offload.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index 01cfa02c43bdce..62651e6683f633 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -1008,69 +1008,6 @@ int nf_flow_table_offload_setup(struct nf_flowtable *flowtable,
}
EXPORT_SYMBOL_GPL(nf_flow_table_offload_setup);
-static void nf_flow_table_indr_block_ing_cmd(struct net_device *dev,
- struct nf_flowtable *flowtable,
- flow_indr_block_bind_cb_t *cb,
- void *cb_priv,
- enum flow_block_command cmd)
-{
- struct netlink_ext_ack extack = {};
- struct flow_block_offload bo;
-
- if (!flowtable)
- return;
-
- nf_flow_table_block_offload_init(&bo, dev_net(dev), cmd, flowtable,
- &extack);
-
- cb(dev, cb_priv, TC_SETUP_FT, &bo);
-
- nf_flow_table_block_setup(flowtable, &bo, cmd);
-}
-
-static void nf_flow_table_indr_block_cb_cmd(struct nf_flowtable *flowtable,
- struct net_device *dev,
- flow_indr_block_bind_cb_t *cb,
- void *cb_priv,
- enum flow_block_command cmd)
-{
- if (!(flowtable->flags & NF_FLOWTABLE_HW_OFFLOAD))
- return;
-
- nf_flow_table_indr_block_ing_cmd(dev, flowtable, cb, cb_priv, cmd);
-}
-
-static void nf_flow_table_indr_block_cb(struct net_device *dev,
- flow_indr_block_bind_cb_t *cb,
- void *cb_priv,
- enum flow_block_command cmd)
-{
- struct net *net = dev_net(dev);
- struct nft_flowtable *nft_ft;
- struct nft_table *table;
- struct nft_hook *hook;
-
- mutex_lock(&net->nft.commit_mutex);
- list_for_each_entry(table, &net->nft.tables, list) {
- list_for_each_entry(nft_ft, &table->flowtables, list) {
- list_for_each_entry(hook, &nft_ft->hook_list, list) {
- if (hook->ops.dev != dev)
- continue;
-
- nf_flow_table_indr_block_cb_cmd(&nft_ft->data,
- dev, cb,
- cb_priv, cmd);
- }
- }
- }
- mutex_unlock(&net->nft.commit_mutex);
-}
-
-static struct flow_indr_block_entry block_ing_entry = {
- .cb = nf_flow_table_indr_block_cb,
- .list = LIST_HEAD_INIT(block_ing_entry.list),
-};
-
int nf_flow_table_offload_init(void)
{
nf_flow_offload_wq = alloc_workqueue("nf_flow_table_offload",
@@ -1078,13 +1015,10 @@ int nf_flow_table_offload_init(void)
if (!nf_flow_offload_wq)
return -ENOMEM;
- flow_indr_add_block_cb(&block_ing_entry);
-
return 0;
}
void nf_flow_table_offload_exit(void)
{
- flow_indr_del_block_cb(&block_ing_entry);
destroy_workqueue(nf_flow_offload_wq);
}