]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: use get_dev() action API in flow_action infra
authorVlad Buslov <vladbu@mellanox.com>
Fri, 13 Sep 2019 15:28:41 +0000 (18:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 07:18:03 +0000 (09:18 +0200)
commit2421b1f7234194f6a9ba990d157ce495c7b13c33
treeb91a0dfb567b5ed2878d5543014a65196f7fe7ae
parente47523caf091f2c737c0466f005e289f70889b5b
net: sched: use get_dev() action API in flow_action infra

When filling in hardware intermediate representation tc_setup_flow_action()
directly obtains, checks and takes reference to dev used by mirred action,
instead of using act->ops->get_dev() API created specifically for this
purpose. In order to remove code duplication, refactor flow_action infra to
use action API when obtaining mirred action target dev. Extend get_dev()
with additional argument that is used to provide dev destructor to the
user.

Fixes: 7c3f799e0012 ("net: sched: take reference to action dev before calling offloads")
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/act_api.h
net/sched/act_mirred.c
net/sched/cls_api.c