Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: madalin.bucur@nxp.com
Cc: netdev@vger.kernel.org, roy.pledge@nxp.com,
	linux-kernel@vger.kernel.org, leoyang.li@nxp.com,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/2] dpaa_eth: add ethtool coalesce control
Date: Fri, 16 Nov 2018 19:42:19 -0800 (PST)	[thread overview]
Message-ID: <20181116.194219.2027125174407236599.davem@davemloft.net> (raw)
In-Reply-To: <1542126591-5114-3-git-send-email-madalin.bucur@nxp.com>

From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Tue, 13 Nov 2018 18:29:51 +0200

> +	for_each_cpu(cpu, cpus) {
> +		portal = qman_get_affine_portal(cpu);
> +		res = qman_portal_set_iperiod(portal, period);
> +		if (res)
> +			return res;
> +		res = qman_dqrr_set_ithresh(portal, thresh);
> +		if (res)
> +			return res;

Nope, you can't do it like this.

If any intermediate change fails, you have to unwind all of the
changes made up until that point.

Which means you'll have to store the previous setting somewhere
and reinstall those saved values in the error path.

  reply	other threads:[~2018-11-17  3:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 16:29 [PATCH v2 0/2] dpaa_eth: add ethtool coalesce control Madalin Bucur
2018-11-13 16:29 ` [PATCH v2 1/2] soc/qman: add return value to interrupt coalesce changing APIs Madalin Bucur
2018-11-13 16:29 ` [PATCH v2 2/2] dpaa_eth: add ethtool coalesce control Madalin Bucur
2018-11-17  3:42   ` David Miller [this message]
2018-11-19  7:11     ` Madalin-cristian Bucur

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=20181116.194219.2027125174407236599.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=roy.pledge@nxp.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