summaryrefslogtreecommitdiff
path: root/include/net/tc_act/tc_police.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tc_act/tc_police.h')
-rw-r--r--include/net/tc_act/tc_police.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/tc_act/tc_police.h b/include/net/tc_act/tc_police.h
index f098ad4424be..cd973b10ae8c 100644
--- a/include/net/tc_act/tc_police.h
+++ b/include/net/tc_act/tc_police.h
@@ -69,4 +69,14 @@ static inline s64 tcf_police_tcfp_burst(const struct tc_action *act)
return params->tcfp_burst;
}
+static inline u32 tcf_police_tcfp_mtu(const struct tc_action *act)
+{
+ struct tcf_police *police = to_police(act);
+ struct tcf_police_params *params;
+
+ params = rcu_dereference_protected(police->params,
+ lockdep_is_held(&police->tcf_lock));
+ return params->tcfp_mtu;
+}
+
#endif /* __NET_TC_POLICE_H */