[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Jun 2019 21:13:50 +0000
From: "Patel, Vedang" <vedang.patel@...el.com>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"Gomes, Vinicius" <vinicius.gomes@...el.com>,
"Dorileo, Leandro" <leandro.maciel.dorileo@...el.com>,
"jakub.kicinski@...ronome.com" <jakub.kicinski@...ronome.com>,
"m-karicheri2@...com" <m-karicheri2@...com>
Subject: Re: [PATCH iproute2 net-next v1 3/6] taprio: Add support for
enabling offload mode
> On Jun 6, 2019, at 12:43 PM, Stephen Hemminger <stephen@...workplumber.org> wrote:
>
> On Thu, 6 Jun 2019 10:52:18 -0700
> Vedang Patel <vedang.patel@...el.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?
Will make this in the next version.
> 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);
> }
Powered by blists - more mailing lists