From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
vladimir.oltean@nxp.com, po.liu@nxp.com
Subject: Re: [PATCH net v2 1/3] taprio: Fix enabling offload with wrong number of traffic classes
Date: Fri, 31 Jan 2020 10:05:44 -0800 [thread overview]
Message-ID: <87lfpnbix3.fsf@linux.intel.com> (raw)
In-Reply-To: <20200129.111116.26679152804758998.davem@davemloft.net>
Hi,
David Miller <davem@davemloft.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
next prev parent reply other threads:[~2020-01-31 18:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 23:52 [PATCH net v2 0/3] taprio: Some fixes Vinicius Costa Gomes
2020-01-28 23:52 ` [PATCH net v2 1/3] taprio: Fix enabling offload with wrong number of traffic classes Vinicius Costa Gomes
2020-01-29 10:11 ` David Miller
2020-01-31 18:05 ` Vinicius Costa Gomes [this message]
2020-01-28 23:52 ` [PATCH net v2 2/3] taprio: Allow users not to specify "flags" when changing schedules Vinicius Costa Gomes
2020-01-29 10:12 ` David Miller
2020-01-29 11:24 ` Vladimir Oltean
2020-01-29 12:09 ` David Miller
2020-01-29 12:23 ` Vladimir Oltean
2020-01-29 18:13 ` Vinicius Costa Gomes
2020-01-28 23:52 ` [PATCH net v2 3/3] taprio: Fix still allowing changing the flags during runtime Vinicius Costa Gomes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfpnbix3.fsf@linux.intel.com \
--to=vinicius.gomes@intel.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=po.liu@nxp.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).