[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87lfpnbix3.fsf@linux.intel.com>
Date: Fri, 31 Jan 2020 10:05:44 -0800
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, vladimir.oltean@....com, po.liu@....com
Subject: Re: [PATCH net v2 1/3] taprio: Fix enabling offload with wrong number of traffic classes
Hi,
David Miller <davem@...emloft.net> writes:
> This feedback applies to the existing code too, but don't we need to have
> a call to netdev_reset_tc() in the error paths after we commit these
> settings?
>
> Because ->num_tc for the device should be reset to zero for sure if we
> can't complete this configuration change successfully.
As we can only change ->num_tc in the _init() path, if any error happens,
_init() will fail and taprio_destroy() will be called, reseting num_tc to
zero.
And, yeah, in taprio_destoy() calling netdev_reset_tc() is better than
netdev_set_num_tc(dev, 0). Will fix this.
Cheers,
--
Vinicius
Powered by blists - more mailing lists