Re: [PATCH v6 net-next 05/12] flow_offload: add ops to tc_action_ops for flow action setup
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2021-12-11 19:31:08
On 2021-12-09 04:27, Simon Horman wrote:
From: Baowen Zheng <redacted> Add a new ops to tc_action_ops for flow action setup. Refactor function tc_setup_flow_action to use this new ops. We make this change to facilitate to add standalone action module. We will also use this ops to offload action independent of filter in following patch.
Please name these functions with "offload" instead of "flow".
It improves readability because those functions exist for the
purpose of offload.
So i would say:
s/XX_setup_flow_action/XX_setup_offload_action/g
i.e
flow_act_setup becomes offload_act_setup
and things like tcf_gate_flow_act_setup become
tcf_gate_offload_act_setup
Again from a naming convention that tc_setup_flow_action
should be tc_setup_offload_act() really..
Maybe an additional patch for that?
<Rant>
Really - this whole naming of things in flow_offload.{c,h}
is very misleading and simplistic. I know it is not your doing.
The term flow is very much related to exact matches. A better
name would have been "match" (then you dont care if it is
exact, prefix, range, ternary, etc). Note:
In this case you can offload actions independent of matches
so a binding to a match may not even exist.
cheers,
jamal