From: Andre Guedes <andre.guedes@linux.intel.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>, netdev@vger.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
davem@davemloft.net, vladimir.oltean@nxp.com, po.liu@nxp.com
Subject: Re: [PATCH net v1 1/3] taprio: Fix enabling offload with wrong number of traffic classes
Date: Mon, 27 Jan 2020 11:02:18 -0800 [thread overview]
Message-ID: <158015173854.43591.3142751689916523701@aguedesl-mac01.jf.intel.com> (raw)
In-Reply-To: <20200125005320.3353761-2-vinicius.gomes@intel.com>
Hi Vinicius,
Quoting Vinicius Costa Gomes (2020-01-24 16:53:18)
> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
> index c609373c8661..ad0dadcfcdba 100644
> --- a/net/sched/sch_taprio.c
> +++ b/net/sched/sch_taprio.c
> @@ -1444,6 +1444,19 @@ static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
>
> taprio_set_picos_per_byte(dev, q);
>
> + if (mqprio) {
> + netdev_set_num_tc(dev, mqprio->num_tc);
> + for (i = 0; i < mqprio->num_tc; i++)
> + netdev_set_tc_queue(dev, i,
> + mqprio->count[i],
> + mqprio->offset[i]);
> +
> + /* Always use supplied priority mappings */
> + for (i = 0; i <= TC_BITMASK; i++)
> + netdev_set_prio_tc_map(dev, i,
> + mqprio->prio_tc_map[i]);
> + }
> +
> if (FULL_OFFLOAD_IS_ENABLED(taprio_flags))
> err = taprio_enable_offload(dev, mqprio, q, new_admin, extack);
> else
If something goes wrong later within this function (e.g.
taprio_enable_offload() returns error), don't we want to roll back these
changes to the netdev object?
- Andre
next prev parent reply other threads:[~2020-01-27 19:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 0:53 [PATCH net v1 0/3] taprio: Some fixes Vinicius Costa Gomes
2020-01-25 0:53 ` [PATCH net v1 1/3] taprio: Fix enabling offload with wrong number of traffic classes Vinicius Costa Gomes
2020-01-25 16:53 ` Vladimir Oltean
2020-01-27 19:02 ` Andre Guedes [this message]
2020-01-27 19:18 ` Vinicius Costa Gomes
2020-01-25 0:53 ` [PATCH net v1 2/3] taprio: Fix still allowing changing the flags during runtime Vinicius Costa Gomes
2020-01-25 16:44 ` Vladimir Oltean
2020-01-25 20:25 ` Vinicius Costa Gomes
2020-01-25 0:53 ` [PATCH net v1 3/3] taprio: Allow users not to specify "flags" when changing schedules Vinicius Costa Gomes
2020-01-25 16:52 ` Vladimir Oltean
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=158015173854.43591.3142751689916523701@aguedesl-mac01.jf.intel.com \
--to=andre.guedes@linux.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=vinicius.gomes@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.