mbox series

[net-next,v2,0/4] net/sched: act_api: contiguous action arrays

Message ID 20231201175015.214214-1-pctammela@mojatatu.com (mailing list archive)
Headers show
Series net/sched: act_api: contiguous action arrays | expand

Message

Pedro Tammela Dec. 1, 2023, 5:50 p.m. UTC
When dealing with action arrays in act_api it's natural to ask if they
are always contiguous (no NULL pointers in between). Yes, they are in
all cases so far, so make use of the already present tcf_act_for_each_action
macro to explicitly document this assumption.

There was an instance where it was not, but it was refactorable (patch 2)
to make the array contiguous.

v1->v2:
- Respin
- Added Jamal's acked-by

Pedro Tammela (4):
  net/sched: act_api: use tcf_act_for_each_action
  net/sched: act_api: avoid non-contiguous action array
  net/sched: act_api: stop loop over ops array on NULL in
    tcf_action_init
  net/sched: act_api: use tcf_act_for_each_action in tcf_idr_insert_many

 net/sched/act_api.c | 57 ++++++++++++++++++++++++---------------------
 1 file changed, 30 insertions(+), 27 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 5, 2023, 10:40 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri,  1 Dec 2023 14:50:11 -0300 you wrote:
> When dealing with action arrays in act_api it's natural to ask if they
> are always contiguous (no NULL pointers in between). Yes, they are in
> all cases so far, so make use of the already present tcf_act_for_each_action
> macro to explicitly document this assumption.
> 
> There was an instance where it was not, but it was refactorable (patch 2)
> to make the array contiguous.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/4] net/sched: act_api: use tcf_act_for_each_action
    https://git.kernel.org/netdev/net-next/c/3872347e0a16
  - [net-next,v2,2/4] net/sched: act_api: avoid non-contiguous action array
    https://git.kernel.org/netdev/net-next/c/a0e947c9ccff
  - [net-next,v2,3/4] net/sched: act_api: stop loop over ops array on NULL in tcf_action_init
    https://git.kernel.org/netdev/net-next/c/e09ac779f736
  - [net-next,v2,4/4] net/sched: act_api: use tcf_act_for_each_action in tcf_idr_insert_many
    https://git.kernel.org/netdev/net-next/c/f9bfc8eb1342

You are awesome, thank you!