Commit 59088b30 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[PKT_SCHED]: cls_fw: Whitespace/ifdef fixes

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b4c45b3
...@@ -57,15 +57,15 @@ struct fw_filter ...@@ -57,15 +57,15 @@ struct fw_filter
u32 id; u32 id;
struct tcf_result res; struct tcf_result res;
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
struct tc_action *action; struct tc_action *action;
#ifdef CONFIG_NET_CLS_IND #ifdef CONFIG_NET_CLS_IND
char indev[IFNAMSIZ]; char indev[IFNAMSIZ];
#endif #endif /* CONFIG_NET_CLS_IND */
#else #else /* CONFIG_NET_CLS_ACT */
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
struct tcf_police *police; struct tcf_police *police;
#endif #endif /* CONFIG_NET_CLS_POLICE */
#endif #endif /* CONFIG_NET_CLS_ACT */
}; };
static __inline__ int fw_hash(u32 handle) static __inline__ int fw_hash(u32 handle)
...@@ -158,14 +158,14 @@ static void fw_destroy(struct tcf_proto *tp) ...@@ -158,14 +158,14 @@ static void fw_destroy(struct tcf_proto *tp)
head->ht[h] = f->next; head->ht[h] = f->next;
tcf_unbind_filter(tp, &f->res); tcf_unbind_filter(tp, &f->res);
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
if (f->action) { if (f->action)
tcf_action_destroy(f->action,TCA_ACT_UNBIND); tcf_action_destroy(f->action, TCA_ACT_UNBIND);
} #else /* CONFIG_NET_CLS_ACT */
#else
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
tcf_police_release(f->police,TCA_ACT_UNBIND); if (f->police)
#endif tcf_police_release(f->police, TCA_ACT_UNBIND);
#endif #endif /* CONFIG_NET_CLS_POLICE */
#endif /* CONFIG_NET_CLS_ACT */
kfree(f); kfree(f);
} }
...@@ -189,14 +189,13 @@ static int fw_delete(struct tcf_proto *tp, unsigned long arg) ...@@ -189,14 +189,13 @@ static int fw_delete(struct tcf_proto *tp, unsigned long arg)
tcf_tree_unlock(tp); tcf_tree_unlock(tp);
tcf_unbind_filter(tp, &f->res); tcf_unbind_filter(tp, &f->res);
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
if (f->action) { if (f->action)
tcf_action_destroy(f->action,TCA_ACT_UNBIND); tcf_action_destroy(f->action,TCA_ACT_UNBIND);
} #else /* CONFIG_NET_CLS_ACT */
#else
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
tcf_police_release(f->police,TCA_ACT_UNBIND); tcf_police_release(f->police,TCA_ACT_UNBIND);
#endif #endif /* CONFIG_NET_CLS_POLICE */
#endif #endif /* CONFIG_NET_CLS_ACT */
kfree(f); kfree(f);
return 0; return 0;
} }
...@@ -358,15 +357,15 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, ...@@ -358,15 +357,15 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
t->tcm_handle = f->id; t->tcm_handle = f->id;
if (!f->res.classid if (!f->res.classid
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
&& !f->action && !f->action
#else #else
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
&& !f->police && !f->police
#endif #endif
#endif #endif
) )
return skb->len; return skb->len;
rta = (struct rtattr*)b; rta = (struct rtattr*)b;
...@@ -390,19 +389,19 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, ...@@ -390,19 +389,19 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
rta->rta_len = skb->tail - b; rta->rta_len = skb->tail - b;
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
if (f->action && f->action->type == TCA_OLD_COMPAT) { if (f->action && f->action->type == TCA_OLD_COMPAT) {
if (tcf_action_copy_stats(skb,f->action)) if (tcf_action_copy_stats(skb,f->action))
goto rtattr_failure; goto rtattr_failure;
} }
#else #else /* CONFIG_NET_CLS_ACT */
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
if (f->police) { if (f->police) {
if (qdisc_copy_stats(skb, &f->police->stats, if (qdisc_copy_stats(skb, &f->police->stats,
f->police->stats_lock)) f->police->stats_lock))
goto rtattr_failure; goto rtattr_failure;
} }
#endif #endif /* CONFIG_NET_CLS_POLICE */
#endif #endif /* CONFIG_NET_CLS_ACT */
return skb->len; return skb->len;
rtattr_failure: rtattr_failure:
......
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