]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: change action API to use array of pointers to actions
authorVlad Buslov <vladbu@mellanox.com>
Thu, 5 Jul 2018 14:24:33 +0000 (17:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Jul 2018 03:42:29 +0000 (12:42 +0900)
commit7e7a7b117ead7f6aadab89e0a80b3eded50649af
tree50c929a316f5c3049e38fdc42e18a3baad8deaaa
parente8163a9d8626f46433699304b721d426b1489b52
net: sched: change action API to use array of pointers to actions

Act API used linked list to pass set of actions to functions. It is
intrusive data structure that stores list nodes inside action structure
itself, which means it is not safe to modify such list concurrently.
However, action API doesn't use any linked list specific operations on this
set of actions, so it can be safely refactored into plain pointer array.

Refactor action API to use array of pointers to tc_actions instead of
linked list. Change argument 'actions' type of exported action init,
destroy and dump functions.

Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/act_api.h
net/sched/act_api.c
net/sched/cls_api.c