From patchwork Thu May 12 17:21:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 67688 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp869670qge; Thu, 12 May 2016 10:21:39 -0700 (PDT) X-Received: by 10.55.74.141 with SMTP id x135mr11592454qka.20.1463073699551; Thu, 12 May 2016 10:21:39 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p21si9163174qka.202.2016.05.12.10.21.39; Thu, 12 May 2016 10:21:39 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 14CD961657; Thu, 12 May 2016 17:21:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7235B61605; Thu, 12 May 2016 17:21:33 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id ECA7C61648; Thu, 12 May 2016 17:21:28 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id AE7EB615F7 for ; Thu, 12 May 2016 17:21:27 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id x201so130756288oif.3 for ; Thu, 12 May 2016 10:21:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ij4xR5eE29It2jr89yYcS43RWG1unveGvWh1OchrwNI=; b=iERRlWyM1qkw6Et36PVP5UYH4ABLUx4c81drR6VEadWWmRFZIICuQBW2wPP1qEReRD D8+9ZcfkGPcPAoeSSjfSnAfYKg533NrlDqVplDZVJIofmcCx0rLQdIQTF+0AMtux8i1e Xv1biML0uhvoNH6f47RlQDZaCLDzpliH+jlzJdcgIU7MaiRdfvebxt9Z+rpMVvClnZmJ ImH5ANSPFyKBWN8S5T4VXnj0tpa4yjI/Y4911mv+DU2XXhHKHwJmxyYk/P3fVf/bxUZi MAqRTFLMvLmRgZk5DFIIz7Ayb7XmNbjRi5eUOLiKZlRngTorZqivW1W2FE3iq14jmj24 A+2g== X-Gm-Message-State: AOPr4FVPBR4Qmt2gkCz5NqtE54p8y0Bo0X6x9/TDof0BDbk9tzpsVR0YTscW99sNt5dwBErJaRk= X-Received: by 10.202.66.135 with SMTP id p129mr6288427oia.153.1463073687149; Thu, 12 May 2016 10:21:27 -0700 (PDT) Received: from localhost.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id fo3sm2222001obb.1.2016.05.12.10.21.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 10:21:26 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 12 May 2016 12:21:23 -0500 Message-Id: <1463073684-12848-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: timers patch Subject: [lng-odp] [PATCHv5 1/2] doc: userguide: add timer/timeout state diagrams X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Bill Fischofer Signed-off-by: Christophe Milard --- doc/images/.gitignore | 2 ++ doc/images/timeout_fsm.gv | 29 +++++++++++++++++++++++++++++ doc/images/timer_fsm.gv | 24 ++++++++++++++++++++++++ doc/users-guide/Makefile.am | 2 ++ 4 files changed, 57 insertions(+) create mode 100644 doc/images/timeout_fsm.gv create mode 100644 doc/images/timer_fsm.gv diff --git a/doc/images/.gitignore b/doc/images/.gitignore index a19aa75..003dbe6 100644 --- a/doc/images/.gitignore +++ b/doc/images/.gitignore @@ -1,2 +1,4 @@ resource_management.svg pktio_fsm.svg +timer_fsm.svg +timeout_fsm.svg diff --git a/doc/images/timeout_fsm.gv b/doc/images/timeout_fsm.gv new file mode 100644 index 0000000..c65e3db --- /dev/null +++ b/doc/images/timeout_fsm.gv @@ -0,0 +1,29 @@ +digraph timer_state_machine { + rankdir=LR; + size="12,20"; + node [fontsize=28]; + edge [fontsize=28]; + node [shape=doublecircle]; TO_Unalloc TO_Delivered; + node [shape=circle]; TO_Alloc TO_Pending; + TO_Unalloc -> TO_Alloc [label="odp_timeout_alloc()"]; + TO_Alloc -> TO_Unalloc [label="odp_timeout_free()"]; + TO_Alloc -> TO_Pending [fontcolor=green, + label="odp_timer_set_abs()"]; + TO_Alloc -> TO_Pending [fontcolor=green, + label="odp_timer_set_rel()"]; + TO_Pending -> TO_Alloc [fontcolor=green, + label="odp_timer_cancel()"]; + TO_Pending -> TO_Delivered [fontcolor=green, + label="timer expires"]; + TO_Delivered -> TO_Pending [fontcolor=green, + label="odp_timer_set_abs()"]; + TO_Delivered -> TO_Pending [fontcolor=green, + label="odp_timer_set_rel()"]; + TO_Delivered -> TO_Delivered + [fontcolor=green, label="odp_timeout_from_event()"]; + TO_Delivered -> TO_Delivered + [fontcolor=green, label="odp_timeout_timer()"]; + TO_Delivered -> TO_Unalloc + [label="odp_timeout_free() / odp_event_free()"]; + +} diff --git a/doc/images/timer_fsm.gv b/doc/images/timer_fsm.gv new file mode 100644 index 0000000..60a52eb --- /dev/null +++ b/doc/images/timer_fsm.gv @@ -0,0 +1,24 @@ +digraph timer_state_machine { + rankdir=LR; + size="12,20"; + node [fontsize=28]; + edge [fontsize=28]; + node [shape=doublecircle]; Timer_Unalloc; + node [shape=circle]; Timer_Alloc Timer_Set Timer_Expired + Timer_Unalloc -> Timer_Alloc [label="odp_timer_alloc()"]; + Timer_Alloc -> Timer_Unalloc [label="odp_timer_free()"]; + Timer_Alloc -> Timer_Set [fontcolor=green,label="odp_timer_set_abs()"]; + Timer_Alloc -> Timer_Set [fontcolor=green,label="odp_timer_set_rel()"]; + Timer_Set -> Timer_Alloc [fontcolor=green,label="odp_timer_cancel()"]; + Timer_Set -> Timer_Expired [fontcolor=green,label="timer expires"]; + Timer_Expired -> Timer_Unalloc [label="odp_timer_free()"]; + Timer_Expired -> Timer_Set [fontcolor=green, + label="odp_timer_set_abs()"]; + Timer_Expired -> Timer_Set [fontcolor=green, + label="odp_timer_set_rel()"]; + Timer_Expired -> Timer_Expired + [fontcolor=green,label="odp_timeout_from_event()"]; + Timer_Expired -> Timer_Expired + [fontcolor=green,label="odp_timeout_timer()"]; + +} diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am index 74caa96..2e1195e 100644 --- a/doc/users-guide/Makefile.am +++ b/doc/users-guide/Makefile.am @@ -30,6 +30,8 @@ IMAGES = $(top_srcdir)/doc/images/overview.svg \ $(top_srcdir)/doc/images/release_git.svg \ $(top_srcdir)/doc/images/segment.svg \ $(top_srcdir)/doc/images/simple_release_git.svg \ + $(top_srcdir)/doc/images/timeout_fsm.svg \ + $(top_srcdir)/doc/images/timer_fsm.svg \ $(top_srcdir)/doc/images/tm_hierarchy.svg \ $(top_srcdir)/doc/images/tm_node.svg