diff options
author | Baowen Zheng <baowen.zheng@corigine.com> | 2021-12-17 21:16:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-19 17:08:48 +0300 |
commit | 13926d19a11e303f12571df61b7bb64f17cb4561 (patch) | |
tree | 0f962e6dc0bec7b9a6335a1fdac31e6f89f5a2d3 /net/core | |
parent | e8cb5bcf6ed6d42227c453a3a3170105462f69df (diff) | |
download | linux-13926d19a11e303f12571df61b7bb64f17cb4561.tar.xz |
flow_offload: add reoffload process to update hw_count
Add reoffload process to update hw_count when driver
is inserted or removed.
We will delete the action if it is with skip_sw flag and
not offloaded to any hardware in reoffload process.
When reoffloading actions, we still offload the actions
that are added independent of filters.
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/flow_offload.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c index 022c945817fa..73f68d4625f3 100644 --- a/net/core/flow_offload.c +++ b/net/core/flow_offload.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/kernel.h> #include <linux/slab.h> +#include <net/act_api.h> #include <net/flow_offload.h> #include <linux/rtnetlink.h> #include <linux/mutex.h> @@ -417,6 +418,8 @@ int flow_indr_dev_register(flow_indr_block_bind_cb_t *cb, void *cb_priv) existing_qdiscs_register(cb, cb_priv); mutex_unlock(&flow_indr_block_lock); + tcf_action_reoffload_cb(cb, cb_priv, true); + return 0; } EXPORT_SYMBOL(flow_indr_dev_register); @@ -469,6 +472,7 @@ void flow_indr_dev_unregister(flow_indr_block_bind_cb_t *cb, void *cb_priv, __flow_block_indr_cleanup(release, cb_priv, &cleanup_list); mutex_unlock(&flow_indr_block_lock); + tcf_action_reoffload_cb(cb, cb_priv, false); flow_block_indr_notify(&cleanup_list); kfree(indr_dev); } |