summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-07-19 18:20:16 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-19 21:27:45 -0700
commit14bfb13f0ed525ed117b5d1f3e77e7c0a6be15de (patch)
tree3f61f0c8d27bce01c1dde2d7f52226539f221113 /net/core
parenta7323311515d488b7714bb7504a1d50fabb0bfcf (diff)
downloadlinux-stable-14bfb13f0ed525ed117b5d1f3e77e7c0a6be15de.tar.gz
linux-stable-14bfb13f0ed525ed117b5d1f3e77e7c0a6be15de.tar.bz2
linux-stable-14bfb13f0ed525ed117b5d1f3e77e7c0a6be15de.zip
net: flow_offload: add flow_block structure and use it
This object stores the flow block callbacks that are attached to this block. Update flow_block_cb_lookup() to take this new object. This patch restores the block sharing feature. Fixes: da3eeb904ff4 ("net: flow_offload: add list handling functions") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow_offload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index a800fa78d96c..d63b970784dc 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -193,12 +193,12 @@ void flow_block_cb_free(struct flow_block_cb *block_cb)
}
EXPORT_SYMBOL(flow_block_cb_free);
-struct flow_block_cb *flow_block_cb_lookup(struct flow_block_offload *f,
+struct flow_block_cb *flow_block_cb_lookup(struct flow_block *block,
flow_setup_cb_t *cb, void *cb_ident)
{
struct flow_block_cb *block_cb;
- list_for_each_entry(block_cb, f->driver_block_list, driver_list) {
+ list_for_each_entry(block_cb, &block->cb_list, list) {
if (block_cb->cb == cb &&
block_cb->cb_ident == cb_ident)
return block_cb;
@@ -268,7 +268,7 @@ int flow_block_cb_setup_simple(struct flow_block_offload *f,
list_add_tail(&block_cb->driver_list, driver_block_list);
return 0;
case FLOW_BLOCK_UNBIND:
- block_cb = flow_block_cb_lookup(f, cb, cb_ident);
+ block_cb = flow_block_cb_lookup(f->block, cb, cb_ident);
if (!block_cb)
return -ENOENT;