Re: [PATCH v10 net-next 03/15] net/sched: act_api: Update tc_action_ops to account for P4 actions

From
Marcelo Ricardo Leitner <hidden>
Date
2024-02-01 19:02:40
Also in
bpf
Reply to
Jamal Hadi Salim, 2024-01-22
On Mon, Jan 22, 2024 at 02:47:49PM -0500, Jamal Hadi Salim wrote:
The initialisation of P4TC action instances require access to a struct
p4tc_act (which appears in later patches) to help us to retrieve
information like the P4 action parameters etc. In order to retrieve
struct p4tc_act we need the pipeline name or id and the action name or id.
Also recall that P4TC action IDs are P4 and are net namespace specific and
not global like standard tc actions.
The init callback from tc_action_ops parameters had no way of
supplying us that information. To solve this issue, we decided to create a
new tc_action_ops callback (init_ops), that provies us with the
tc_action_ops  struct which then provides us with the pipeline and action
name. In addition we add a new refcount to struct tc_action_ops called
dyn_ref, which accounts for how many action instances we have of a specific
action.

Co-developed-by: Victor Nogueira <redacted>
Signed-off-by: Victor Nogueira <redacted>
Co-developed-by: Pedro Tammela <redacted>
Signed-off-by: Pedro Tammela <redacted>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Vlad Buslov <redacted>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thread (41 messages) 41 messages, 3 authors, last reply 2024-02-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help