[01/14] jobstats: change jobstats_abort to jobstats_cancel
Checks
Commit Message
The term abort is on the "Replace now" list of words.
Use cancel instead.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/l2fwd-jobstats/main.c | 2 +-
lib/jobstats/rte_jobstats.c | 2 +-
lib/jobstats/rte_jobstats.h | 9 ++++++++-
lib/jobstats/version.map | 2 +-
4 files changed, 11 insertions(+), 4 deletions(-)
Comments
On Thu, Aug 17, 2023 at 07:52:36PM -0700, Stephen Hemminger wrote:
> The term abort is on the "Replace now" list of words.
> Use cancel instead.
>
I see cancel generally being used as a replacement throughout this
patchset, but I wonder if the use of th term could be confusing as it
doesn't strictly match the term "abort" at least to my mind.
When an operation is aborted, (to me anyway) it generally means that the
operation is just stopped at whatever point it is at, and nothing more is
done. However, when an operation is cancelled, that would imply to me that
the operation is not only stopped, but whatever tasks were already done by
that operation are undone. Would others share this understanding? If so, we
should make the rollback/no-rollback behaviour clear.
/Bruce
On Fri, 18 Aug 2023 10:08:58 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:
> On Thu, Aug 17, 2023 at 07:52:36PM -0700, Stephen Hemminger wrote:
> > The term abort is on the "Replace now" list of words.
> > Use cancel instead.
> >
> I see cancel generally being used as a replacement throughout this
> patchset, but I wonder if the use of th term could be confusing as it
> doesn't strictly match the term "abort" at least to my mind.
>
> When an operation is aborted, (to me anyway) it generally means that the
> operation is just stopped at whatever point it is at, and nothing more is
> done. However, when an operation is cancelled, that would imply to me that
> the operation is not only stopped, but whatever tasks were already done by
> that operation are undone. Would others share this understanding? If so, we
> should make the rollback/no-rollback behaviour clear.
>
> /Bruce
It seemed like the best of the alternatives proposed here:
https://inclusivenaming.org/word-lists/tier-1/abort/
Recommended Replacements
User-Initiated Termination
Force quit
Cancel
System-Initiated Termination
Fail
Close (app, program, connection)
End
Halt
Hard stop
Stop (something you triggered)
I don't think the rollback semantics are implied by either word.
They should be spelled out more though.
@@ -534,7 +534,7 @@ l2fwd_main_loop(void)
if (likely(repeats != 1))
rte_jobstats_finish(&qconf->idle_job, qconf->idle_job.target);
else
- rte_jobstats_abort(&qconf->idle_job);
+ rte_jobstats_cancel(&qconf->idle_job);
rte_timer_manage();
rte_jobstats_context_finish(&qconf->jobs_context);
@@ -139,7 +139,7 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
}
int
-rte_jobstats_abort(struct rte_jobstats *job)
+rte_jobstats_cancel(struct rte_jobstats *job)
{
struct rte_jobstats_context *ctx;
uint64_t now, exec_time;
@@ -218,7 +218,14 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job);
* -EINVAL if job is NULL or job was not started (it have no context).
*/
int
-rte_jobstats_abort(struct rte_jobstats *job);
+rte_jobstats_cancel(struct rte_jobstats *job);
+
+__rte_deprecated
+static inline int
+rte_jobstats_abort(struct rte_jobstats *job)
+{
+ return rte_jobstats_cancel(job);
+}
/**
* Mark that *job* finished its execution. Context in which it was executing
@@ -1,7 +1,7 @@
DPDK_24 {
global:
- rte_jobstats_abort;
+ rte_jobstats_cancel;
rte_jobstats_context_finish;
rte_jobstats_context_init;
rte_jobstats_context_reset;