From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A67CC41B5F; Fri, 18 Aug 2023 04:53:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDF734325D; Fri, 18 Aug 2023 04:53:06 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id 60A0C43255 for ; Fri, 18 Aug 2023 04:53:04 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-26813478800so348036a91.1 for ; Thu, 17 Aug 2023 19:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692327183; x=1692931983; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/U0rlONnrIXvx4fM89GhYXCDumMraqATcpJzMBFOmfo=; b=vpc7ID7nzREhVJVFXLpz/cLku5ol/NqlCo72vmEQevazRi8KsGLjy/IKDRP/FaaD8+ +OwxA31AUHDfiAVCeGluNW2+Z+tIyOeTY7kXOTrfy+8RDCageXVb8bxGvvaLd/KKCZvC QAADoQ+JmjWYwl+BAw+Ra/47DyJ8xyOA61qt89lH5FTpf07eEUAZJLwbu4Z77WJTRWY0 S6tt7crPAoXeGiD93shB9sP//diqhfBAKhh/4YBgurRZzTr1Y5SxOBojHFWs3ygA/4Ae 9GurTzlt6H3H4dS6PFlBcCh0EBQ1BhmfbEDR2yGoU+GuOIJHW9UUtvl6JHHiiYCbVRLv SA5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692327183; x=1692931983; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/U0rlONnrIXvx4fM89GhYXCDumMraqATcpJzMBFOmfo=; b=grBp29ZeiSsI1L3fSb0ahLA+arFfqlkE8eeN/Apl8smkhhMhUqvjHxHvjMfGiOVXOY trSNI8tUYy254BXD2kCCHg+ReBZBU8WPhBS2fMEZ5qjKF3qheLG/2yyIYvbJIkpH0u4q vZOphg8CCehOGf14p+hsyB1ibfFYL+8x3A8XQHETT2TN4wUd92jzRm6wktDBHY4F/ZUN DCqobeDJSCbiSiPneaTQiDOr8Wo5TjJGdEVbuH0iuTQF3NOe6CbiArEcC9thRKD5C+QU bwei35V5k/cwCRiQVzwUIqIGvh4dPFPmkGK92Rql62F81sTfLadbERbhwkhM3eN7ADqb Mtjg== X-Gm-Message-State: AOJu0YwM7HULhysYTfFViPv8089Ej3zgDn864nMwJIcaNihb/xTgpb+4 ZaSNPPm/+t0oouBOT8RwUctVfTOHTHgSSh74UCbVFw== X-Google-Smtp-Source: AGHT+IGt0JaVhqRdPeJ9ULES8az2NXAyuajpEQG5VVTpm4rqTyrkBCDUCp7jjD3Rw5pbzHSYnUuFVw== X-Received: by 2002:a17:90b:1a8e:b0:268:c5c7:f7f1 with SMTP id ng14-20020a17090b1a8e00b00268c5c7f7f1mr1155429pjb.29.1692327183026; Thu, 17 Aug 2023 19:53:03 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id ep13-20020a17090ae64d00b00262e485156esm2221246pjb.57.2023.08.17.19.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 19:53:02 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH 03/14] pipeline: remove use of term abort Date: Thu, 17 Aug 2023 19:52:38 -0700 Message-Id: <20230818025249.33994-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230818025249.33994-1-stephen@networkplumber.org> References: <20230818025249.33994-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Replace with cancel. Signed-off-by: Stephen Hemminger --- lib/pipeline/rte_swx_ctl.c | 29 +++++++++++++++-------------- lib/pipeline/rte_swx_ctl.h | 8 ++++---- lib/pipeline/version.map | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c index 857770d297a4..41d07e9b3a19 100644 --- a/lib/pipeline/rte_swx_ctl.c +++ b/lib/pipeline/rte_swx_ctl.c @@ -2063,7 +2063,7 @@ table_rollback(struct rte_swx_ctl_pipeline *ctl, uint32_t table_id) * failed commit operation to remove ALL the pending work for ALL the tables. */ static void -table_abort(struct rte_swx_ctl_pipeline *ctl, uint32_t table_id) +table_cancel(struct rte_swx_ctl_pipeline *ctl, uint32_t table_id) { struct table *table = &ctl->tables[table_id]; @@ -2366,7 +2366,7 @@ selector_rollback(struct rte_swx_ctl_pipeline *ctl, uint32_t selector_id) } static void -selector_abort(struct rte_swx_ctl_pipeline *ctl, uint32_t selector_id) +selector_cancel(struct rte_swx_ctl_pipeline *ctl, uint32_t selector_id) { struct selector *s = &ctl->selectors[selector_id]; uint32_t group_id; @@ -2545,7 +2545,7 @@ learner_rollfwd_finalize(struct rte_swx_ctl_pipeline *ctl, uint32_t learner_id) } static void -learner_abort(struct rte_swx_ctl_pipeline *ctl, uint32_t learner_id) +learner_cancel(struct rte_swx_ctl_pipeline *ctl, uint32_t learner_id) { struct learner *l = &ctl->learners[learner_id]; @@ -2554,7 +2554,8 @@ learner_abort(struct rte_swx_ctl_pipeline *ctl, uint32_t learner_id) } int -rte_swx_ctl_pipeline_commit(struct rte_swx_ctl_pipeline *ctl, int abort_on_fail) +rte_swx_ctl_pipeline_commit(struct rte_swx_ctl_pipeline *ctl, + int cancel_on_fail) { struct rte_swx_table_state *ts; int status = 0; @@ -2622,25 +2623,25 @@ rte_swx_ctl_pipeline_commit(struct rte_swx_ctl_pipeline *ctl, int abort_on_fail) rollback: for (i = 0; i < ctl->info.n_tables; i++) { table_rollback(ctl, i); - if (abort_on_fail) - table_abort(ctl, i); + if (cancel_on_fail) + table_cancel(ctl, i); } for (i = 0; i < ctl->info.n_selectors; i++) { selector_rollback(ctl, i); - if (abort_on_fail) - selector_abort(ctl, i); + if (cancel_on_fail) + selector_cancel(ctl, i); } - if (abort_on_fail) + if (cancel_on_fail) for (i = 0; i < ctl->info.n_learners; i++) - learner_abort(ctl, i); + learner_cancel(ctl, i); return status; } void -rte_swx_ctl_pipeline_abort(struct rte_swx_ctl_pipeline *ctl) +rte_swx_ctl_pipeline_cancel(struct rte_swx_ctl_pipeline *ctl) { uint32_t i; @@ -2648,13 +2649,13 @@ rte_swx_ctl_pipeline_abort(struct rte_swx_ctl_pipeline *ctl) return; for (i = 0; i < ctl->info.n_tables; i++) - table_abort(ctl, i); + table_cancel(ctl, i); for (i = 0; i < ctl->info.n_selectors; i++) - selector_abort(ctl, i); + selector_cancel(ctl, i); for (i = 0; i < ctl->info.n_learners; i++) - learner_abort(ctl, i); + learner_cancel(ctl, i); } static int diff --git a/lib/pipeline/rte_swx_ctl.h b/lib/pipeline/rte_swx_ctl.h index 6ef2551ab534..14973b74172b 100644 --- a/lib/pipeline/rte_swx_ctl.h +++ b/lib/pipeline/rte_swx_ctl.h @@ -1045,7 +1045,7 @@ rte_swx_ctl_pipeline_learner_default_entry_add(struct rte_swx_ctl_pipeline *ctl, * * @param[in] ctl * Pipeline control handle. - * @param[in] abort_on_fail + * @param[in] revert_on_fail * When non-zero (false), all the scheduled work is discarded after a failed * commit. Otherwise, the scheduled work is still kept pending for the next * commit. @@ -1056,10 +1056,10 @@ rte_swx_ctl_pipeline_learner_default_entry_add(struct rte_swx_ctl_pipeline *ctl, __rte_experimental int rte_swx_ctl_pipeline_commit(struct rte_swx_ctl_pipeline *ctl, - int abort_on_fail); + int revert_on_fail); /** - * Pipeline abort + * Pipeline cancel * * Discard all the scheduled table work. * @@ -1068,7 +1068,7 @@ rte_swx_ctl_pipeline_commit(struct rte_swx_ctl_pipeline *ctl, */ __rte_experimental void -rte_swx_ctl_pipeline_abort(struct rte_swx_ctl_pipeline *ctl); +rte_swx_ctl_pipeline_cancel(struct rte_swx_ctl_pipeline *ctl); /** * Pipeline table entry read diff --git a/lib/pipeline/version.map b/lib/pipeline/version.map index 6997b69340ef..1ddd598fa079 100644 --- a/lib/pipeline/version.map +++ b/lib/pipeline/version.map @@ -62,7 +62,7 @@ EXPERIMENTAL { # added in 20.11 rte_swx_ctl_action_arg_info_get; rte_swx_ctl_action_info_get; - rte_swx_ctl_pipeline_abort; + rte_swx_ctl_pipeline_cancel; rte_swx_ctl_pipeline_commit; rte_swx_ctl_pipeline_create; rte_swx_ctl_pipeline_free; -- 2.39.2