]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: extend flow_action_entry with destructor
authorVlad Buslov <vladbu@mellanox.com>
Fri, 13 Sep 2019 15:28:39 +0000 (18:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 07:18:02 +0000 (09:18 +0200)
commit143c2bac207fdeb3a73e9c593d6ef5b311b7ba01
tree3fca9616bf020edceb8c13f528846231eec134bc
parentec930a9c6bc928624c6c0069d85c4f64a776f122
net: sched: extend flow_action_entry with destructor

Generalize flow_action_entry cleanup by extending the structure with
pointer to destructor function. Set the destructor in
tc_setup_flow_action(). Refactor tc_cleanup_flow_action() to call
entry->destructor() instead of using switch that dispatches by entry->id
and manually executes cleanup.

This refactoring is necessary for following patches in this series that
require destructor to use tc_action->ops callbacks that can't be easily
obtained in tc_cleanup_flow_action().

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