Currently, when the rule is not to be exclusively executed by the
hardware, extack is not passed along and offloading failures don't
get logged. Add a new attr TCA_EXT_WARN_MSG to log the extack message
so we can monitor the HW failures. e.g.
# tc monitor
added chain dev enp3s0f1np1 parent ffff: chain 0
added filter dev enp3s0f1np1 ingress protocol all pref 49152 flower chain 0 handle 0x1
ct_state +trk+new
not_in_hw
action order 1: gact action drop
random type none pass val 0
index 1 ref 1 bind 1
mlx5_core: matching on ct_state +new isn't supported.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
open_json_object(NULL);
tc_dump_action(fp, tb[TCA_ACT_TAB], tot_acts ? *tot_acts:0, false);
+ print_ext_msg(tb);
close_json_object();
return 0;
print_nl();
}
+ print_ext_msg(tb);
close_json_object();
fflush(fp);
return 0;
print_nl();
}
}
+
+ print_ext_msg(tb);
close_json_object();
fflush(fp);
return 0;
print_masked_type(UINT16_MAX, __rta_getattr_be16_u32, name, attr,
mask_attr, newline);
}
+
+void print_ext_msg(struct rtattr **tb)
+{
+ if (!tb[TCA_EXT_WARN_MSG])
+ return;
+
+ print_string(PRINT_ANY, "warn", "%s", rta_getattr_str(tb[TCA_EXT_WARN_MSG]));
+ print_nl();
+}
struct rtattr *mask_attr, bool newline);
void print_masked_be16(const char *name, struct rtattr *attr,
struct rtattr *mask_attr, bool newline);
+
+void print_ext_msg(struct rtattr **tb);
#endif