Thread (11 messages) 11 messages, 3 authors, 2020-01-31

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

From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: 2020-01-31 18:04:25

Hi,

David Miller [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help