|
@@ -24,6 +24,15 @@ static inline bool is_tcf_mirred_redirect(const struct tc_action *a)
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static inline bool is_tcf_mirred_mirror(const struct tc_action *a)
|
|
|
|
|
+{
|
|
|
|
|
+#ifdef CONFIG_NET_CLS_ACT
|
|
|
|
|
+ if (a->ops && a->ops->type == TCA_ACT_MIRRED)
|
|
|
|
|
+ return to_mirred(a)->tcfm_eaction == TCA_EGRESS_MIRROR;
|
|
|
|
|
+#endif
|
|
|
|
|
+ return false;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
static inline int tcf_mirred_ifindex(const struct tc_action *a)
|
|
static inline int tcf_mirred_ifindex(const struct tc_action *a)
|
|
|
{
|
|
{
|
|
|
return to_mirred(a)->tcfm_ifindex;
|
|
return to_mirred(a)->tcfm_ifindex;
|