Subject: Re: [PATCH net v2 1/3] taprio: Fix enabling offload with wrong number of traffic classes

From: Vinicius Costa Gomes <[email-masked]>
Date: Fri, 31 Jan 2020 10:05:44 -0800

Hi,

David Miller <[email-masked]> 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