taprio: Use taprio_reset_tc() to reset Traffic Classes configuration
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Thu, 6 Feb 2020 21:46:09 +0000 (13:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:37:25 +0000 (04:37 -0800)
commit5383710394b81b8b55c59e6664576d5f5601abaa
treef1d820b8a8a1d037816a91e0edff67f580ce02d7
parent84bd31b7516a64573b99331c0467b06f8cf0eb4a
taprio: Use taprio_reset_tc() to reset Traffic Classes configuration

[ Upstream commit 7c16680a08ee1e444a67d232c679ccf5b30fad16 ]

When destroying the current taprio instance, which can happen when the
creation of one fails, we should reset the traffic class configuration
back to the default state.

netdev_reset_tc() is a better way because in addition to setting the
number of traffic classes to zero, it also resets the priority to
traffic classes mapping to the default value.

Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_taprio.c