Re: [PATCH net v3 1/2] taprio: Fix enabling offload with wrong number of traffic classes
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: 2020-01-31 17:59:35
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: 2020-01-31 17:59:35
Jakub Kicinski [off-list ref] writes:
On Wed, 29 Jan 2020 17:37:20 -0800, Vinicius Costa Gomes wrote:quoted
If the driver implementing taprio offloading depends on the value of the network device number of traffic classes (dev->num_tc) for whatever reason, it was going to receive the value zero. The value was only set after the offloading function is called. So, moving setting the number of traffic classes to before the offloading function is called fixes this issue. This is safe because this only happens when taprio is instantiated (we don't allow this configuration to be changed without first removing taprio). Fixes: 9c66d1564676 ("taprio: Add support for hardware offloading") Reported-by: Po Liu <redacted> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>What about Dave's question about resetting the tc state with netdev_reset_tc()?
I missed that question.