Commit 7eb8896d authored by WANG Cong's avatar WANG Cong Committed by David S. Miller

net_sched: act: remove struct tcf_act_hdr

It is not necessary at all.

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8701a6c
...@@ -73,10 +73,6 @@ static inline void tcf_hashinfo_destroy(struct tcf_hashinfo *hf) ...@@ -73,10 +73,6 @@ static inline void tcf_hashinfo_destroy(struct tcf_hashinfo *hf)
#define ACT_P_CREATED 1 #define ACT_P_CREATED 1
#define ACT_P_DELETED 1 #define ACT_P_DELETED 1
struct tcf_act_hdr {
struct tcf_common common;
};
struct tc_action { struct tc_action {
void *priv; void *priv;
const struct tc_action_ops *ops; const struct tc_action_ops *ops;
......
...@@ -556,9 +556,9 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a, ...@@ -556,9 +556,9 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
{ {
int err = 0; int err = 0;
struct gnet_dump d; struct gnet_dump d;
struct tcf_act_hdr *h = a->priv; struct tcf_common *p = a->priv;
if (h == NULL) if (p == NULL)
goto errout; goto errout;
/* compat_mode being true specifies a call that is supposed /* compat_mode being true specifies a call that is supposed
...@@ -567,20 +567,20 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a, ...@@ -567,20 +567,20 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
if (compat_mode) { if (compat_mode) {
if (a->type == TCA_OLD_COMPAT) if (a->type == TCA_OLD_COMPAT)
err = gnet_stats_start_copy_compat(skb, 0, err = gnet_stats_start_copy_compat(skb, 0,
TCA_STATS, TCA_XSTATS, &h->tcf_lock, &d); TCA_STATS, TCA_XSTATS, &p->tcfc_lock, &d);
else else
return 0; return 0;
} else } else
err = gnet_stats_start_copy(skb, TCA_ACT_STATS, err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
&h->tcf_lock, &d); &p->tcfc_lock, &d);
if (err < 0) if (err < 0)
goto errout; goto errout;
if (gnet_stats_copy_basic(&d, &h->tcf_bstats) < 0 || if (gnet_stats_copy_basic(&d, &p->tcfc_bstats) < 0 ||
gnet_stats_copy_rate_est(&d, &h->tcf_bstats, gnet_stats_copy_rate_est(&d, &p->tcfc_bstats,
&h->tcf_rate_est) < 0 || &p->tcfc_rate_est) < 0 ||
gnet_stats_copy_queue(&d, &h->tcf_qstats) < 0) gnet_stats_copy_queue(&d, &p->tcfc_qstats) < 0)
goto errout; goto errout;
if (gnet_stats_finish_copy(&d) < 0) if (gnet_stats_finish_copy(&d) < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment