net/sched: act_api: use tcf_act_for_each_action in tcf_idr_insert_many
authorPedro Tammela <pctammela@mojatatu.com>
Fri, 1 Dec 2023 17:50:15 +0000 (14:50 -0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Dec 2023 10:15:08 +0000 (11:15 +0100)
commitf9bfc8eb1342c7ddbe1b7be9d1ebd5bc80fb72b0
tree541e27b7d2f3783bc878f86dc0054cea56c9ec8d
parente09ac779f736e75eab501b77f2a4f13d245f0a6d
net/sched: act_api: use tcf_act_for_each_action in tcf_idr_insert_many

The actions array is contiguous, so stop processing whenever a NULL
is found. This is already the assumption for tcf_action_destroy[1],
which is called from tcf_actions_init.

[1] https://elixir.bootlin.com/linux/v6.7-rc3/source/net/sched/act_api.c#L1115

Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/sched/act_api.c