Thu, Jul 11, 2019 at 03:09:23PM CEST, pa...@netfilter.org wrote:
>This object stores the flow block callbacks that are attached to this
>block. This patch restores block sharing.
>
>Fixes: da3eeb904ff4 ("net: flow_offload: add list handling functions")
>Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
>---
>v3: add flow_block_init() - Jiri Pirko.

and rename flow/flow_block/

[...]


>@@ -951,7 +952,7 @@ struct nft_stats {
>  *    @stats: per-cpu chain stats
>  *    @chain: the chain
>  *    @dev_name: device name that this base chain is attached to (if any)
>- *    @cb_list: list of flow block callbacks (for hardware offload)
>+ *    @flow: flow block (for hardware offload)

You missed rename here: s/flow:/flow_block:/


>  */
> struct nft_base_chain {
>       struct nf_hook_ops              ops;
>@@ -961,7 +962,7 @@ struct nft_base_chain {
>       struct nft_stats __percpu       *stats;
>       struct nft_chain                chain;
>       char                            dev_name[IFNAMSIZ];
>-      struct list_head                cb_list;
>+      struct flow_block               flow_block;
> };
> 
> static inline struct nft_base_chain *nft_base_chain(const struct nft_chain 
> *chain)
>diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>index 9482e060483b..6b6b01234dd9 100644
>--- a/include/net/sch_generic.h
>+++ b/include/net/sch_generic.h
>@@ -399,7 +399,7 @@ struct tcf_block {
>       refcount_t refcnt;
>       struct net *net;
>       struct Qdisc *q;
>-      struct list_head cb_list;
>+      struct flow_block flow_block;
>       struct list_head owner_list;
>       bool keep_dst;
>       unsigned int offloadcnt; /* Number of oddloaded filters */
>diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
>index a800fa78d96c..935c7f81a9ef 100644
>--- a/net/core/flow_offload.c
>+++ b/net/core/flow_offload.c
>@@ -198,7 +198,7 @@ struct flow_block_cb *flow_block_cb_lookup(struct 
>flow_block_offload *f,

Reminding the block arg here.


> {
>       struct flow_block_cb *block_cb;
> 
>-      list_for_each_entry(block_cb, f->driver_block_list, driver_list) {
>+      list_for_each_entry(block_cb, &f->block->cb_list, list) {
>               if (block_cb->cb == cb &&
>                   block_cb->cb_ident == cb_ident)
>                       return block_cb;

[...]

Reply via email to