@@ -93,6 +93,8 @@ static const struct pretty_nla_desc __linkstate_desc[] = {
NLATTR_DESC_INVALID(ETHTOOL_A_LINKSTATE_UNSPEC),
NLATTR_DESC_NESTED(ETHTOOL_A_LINKSTATE_HEADER, header),
NLATTR_DESC_BOOL(ETHTOOL_A_LINKSTATE_LINK),
+ NLATTR_DESC_U32(ETHTOOL_A_LINKSTATE_SQI),
+ NLATTR_DESC_U32(ETHTOOL_A_LINKSTATE_SQI_MAX),
};
static const struct pretty_nla_desc __debug_desc[] = {
@@ -627,6 +627,22 @@ int linkstate_reply_cb(const struct nlmsghdr *nlhdr, void *data)
printf("\tLink detected: %s\n", val ? "yes" : "no");
}
+ if (tb[ETHTOOL_A_LINKSTATE_SQI]) {
+ uint32_t val = mnl_attr_get_u32(tb[ETHTOOL_A_LINKSTATE_SQI]);
+
+ print_banner(nlctx);
+ printf("\tSQI: %u", val);
+
+ if (tb[ETHTOOL_A_LINKSTATE_SQI_MAX]) {
+ uint32_t max;
+
+ max = mnl_attr_get_u32(tb[ETHTOOL_A_LINKSTATE_SQI_MAX]);
+ printf("/%u\n", max);
+ } else {
+ printf("\n");
+ }
+ }
+
return MNL_CB_OK;
}