+int
+rte_jobstats_abort(struct rte_jobstats *job)
+{
+ struct rte_jobstats_context *ctx;
+ uint64_t now, exec_time;
+
+ /* Some sanity check. */
+ if (unlikely(job == NULL || job->context == NULL))
+ return -EINVAL;
+
+ ctx = job->context;
+ now = get_time();
+ exec_time = now - ctx->state_time;
+ ADD_TIME_MIN_MAX(ctx, management, exec_time);
+ ctx->state_time = now;
+ job->context = NULL;
+
+ return 0;
+}
+