[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181116.194219.2027125174407236599.davem@davemloft.net>
Date: Fri, 16 Nov 2018 19:42:19 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: madalin.bucur@....com
Cc: netdev@...r.kernel.org, leoyang.li@....com, roy.pledge@....com,
linuxppc-dev@...ts.ozlabs.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] dpaa_eth: add ethtool coalesce control
From: Madalin Bucur <madalin.bucur@....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.
Powered by blists - more mailing lists