On Thu, 6 Jun 2019 10:52:18 -0700 Vedang Patel <vedang.pa...@intel.com> wrote:
> @@ -405,6 +420,7 @@ static int taprio_print_opt(struct qdisc_util *qu, FILE > *f, struct rtattr *opt) > struct rtattr *tb[TCA_TAPRIO_ATTR_MAX + 1]; > struct tc_mqprio_qopt *qopt = 0; > __s32 clockid = CLOCKID_INVALID; > + __u32 offload_flags = 0; > int i; > > if (opt == NULL) > @@ -442,6 +458,11 @@ static int taprio_print_opt(struct qdisc_util *qu, FILE > *f, struct rtattr *opt) > > print_string(PRINT_ANY, "clockid", "clockid %s", > get_clock_name(clockid)); > > + if (tb[TCA_TAPRIO_ATTR_OFFLOAD_FLAGS]) > + offload_flags = > rta_getattr_u32(tb[TCA_TAPRIO_ATTR_OFFLOAD_FLAGS]); > + > + print_uint(PRINT_ANY, "offload", " offload %x", offload_flags); I don't think offload flags should be printed at all if not present. Why not? if (tb[TCA_TAPRIO_ATTR_OFFLOLAD_FLAGS]) { __u32 offload_flags = rta_getattr_u32(tb[TCA_TAPRIO_ATTR_OFFLOAD_FLAGS]); print_uint(PRINT_ANY, "offload", " offload %x", offload_flags); }