On Thu, Nov 05, 2020 at 03:52:27PM +0800, we...@ucloud.cn wrote:

We cross-posted :)
I think my comments on the v1 still applies, btw.

...
> This patch add support for a xmit hook to mirred, that gets executed before
> xmiting the packet. Then, when act_ct gets loaded, it configs that hook.
> The frag xmit hook maybe reused by other modules.
...
> --- a/include/net/act_api.h
> +++ b/include/net/act_api.h
> @@ -239,6 +239,29 @@ int tcf_action_check_ctrlact(int action, struct 
> tcf_proto *tp,
>                            struct netlink_ext_ack *newchain);
>  struct tcf_chain *tcf_action_set_ctrlact(struct tc_action *a, int action,
>                                        struct tcf_chain *newchain);
> +
> +#if IS_ENABLED(CONFIG_NET_ACT_FRAG)
> +int tcf_exec_frag_xmit_hook(struct sk_buff *skb, int (*xmit)(struct sk_buff 
> *skb));
> +void tcf_set_frag_xmit_hook(void);
> +void tcf_clear_frag_xmit_hook(void);
> +bool tcf_frag_xmit_hook_enabled(void);

Now it's naming the hook after frag action, but it's meant to be
generic. It got confusing on what is local to act_frag or not due to
that.

Reply via email to