net_sched: move tc_action into tcf_common
authorWANG Cong <xiyou.wangcong@gmail.com>
Mon, 25 Jul 2016 23:09:41 +0000 (16:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jul 2016 04:49:19 +0000 (21:49 -0700)
commita85a970af265f156740977168b542234511b28a8
tree19866c37883917b1ec6964fcbae76335f9de0139
parentb93dd49c1a35884864027abd707889b795637f7a
net_sched: move tc_action into tcf_common

struct tc_action is confusing, currently we use it for two purposes:
1) Pass in arguments and carry out results from helper functions
2) A generic representation for tc actions

The first one is error-prone, since we need to make sure we don't
miss anything. This patch aims to get rid of this use, by moving
tc_action into tcf_common, so that they are allocated together
in hashtable and can be cast'ed easily.

And together with the following patch, we could really make
tc_action a generic representation for all tc actions and each
type of action can inherit from it.

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
27 files changed:
include/net/act_api.h
include/net/tc_act/tc_bpf.h
include/net/tc_act/tc_connmark.h
include/net/tc_act/tc_csum.h
include/net/tc_act/tc_defact.h
include/net/tc_act/tc_gact.h
include/net/tc_act/tc_ife.h
include/net/tc_act/tc_ipt.h
include/net/tc_act/tc_mirred.h
include/net/tc_act/tc_nat.h
include/net/tc_act/tc_pedit.h
include/net/tc_act/tc_skbedit.h
include/net/tc_act/tc_vlan.h
net/sched/act_api.c
net/sched/act_bpf.c
net/sched/act_connmark.c
net/sched/act_csum.c
net/sched/act_gact.c
net/sched/act_ife.c
net/sched/act_ipt.c
net/sched/act_mirred.c
net/sched/act_nat.c
net/sched/act_pedit.c
net/sched/act_police.c
net/sched/act_simple.c
net/sched/act_skbedit.c
net/sched/act_vlan.c