From patchwork Fri May 13 15:01:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 67788 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp313889qge; Fri, 13 May 2016 08:02:10 -0700 (PDT) X-Received: by 10.55.78.9 with SMTP id c9mr16962303qkb.0.1463151730569; Fri, 13 May 2016 08:02:10 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y80si12266426qha.102.2016.05.13.08.02.05; Fri, 13 May 2016 08:02:10 -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 B8F6F6165E; Fri, 13 May 2016 15:02:05 +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 B325E61653; Fri, 13 May 2016 15:01:50 +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 5CBD361650; Fri, 13 May 2016 15:01:41 +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 9DED86160F for ; Fri, 13 May 2016 15:01:31 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id x19so174354928oix.2 for ; Fri, 13 May 2016 08:01:31 -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=AdMvjrXmplnyx297EekswgMFdTRqSTEU0lH5+SeXOmU=; b=WS/7snn4OH30jES+HXbyCgqLtnNN4GqVjx0K4jrwh2M2o4quJtlYaPzSuQodp4Ht2p DD/dxfE3K0n1boynio/TTG+XSbLpGDygmYXGNjwpvq6nX8D4SmS0oykvkFDHxw3NLqr6 J8ROGPUouSO8vCMqHKjd3cTcJnW1raei9oHq/P1QeHS+JDOt1+xR4DdoHBq1mfG7STHd rejpnqnDNskGBzR5TqFU3jbmR2NNLariUtAGgi8/1Hhpbf7MBeayuKhY9N16XV6nTHFC Bqg2j216FMC8stMrUYCF7q5AI5V30tp2oUmITIcBMBY4WZzAYJkdyNcsFUaCbBvvDzY7 nqUg== X-Gm-Message-State: AOPr4FW/22RcXvkYyiQpZu2DwDBCAR9gNRZTD3LoxNoaGryrZELLh9Aq1RyAWgBQ7CVFmoD5Zco= X-Received: by 10.157.52.240 with SMTP id t45mr9328871otd.46.1463151690947; Fri, 13 May 2016 08:01:30 -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 h9sm5439523otb.17.2016.05.13.08.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 May 2016 08:01:30 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 13 May 2016 10:01:25 -0500 Message-Id: <1463151686-12230-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: timers patch Subject: [lng-odp] [PATCHv6 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 Reviewed-by: Christophe Milard --- doc/images/.gitignore | 2 ++ doc/images/timeout_fsm.gv | 28 ++++++++++++++++++++++++++++ doc/images/timer_fsm.gv | 20 ++++++++++++++++++++ doc/users-guide/Makefile.am | 2 ++ 4 files changed, 52 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..21ecb59 --- /dev/null +++ b/doc/images/timeout_fsm.gv @@ -0,0 +1,28 @@ +digraph timer_state_machine { + rankdir=LR; + size="12,20"; + node [fontsize=28]; + edge [fontsize=28]; + node [shape=doublecircle]; TO_Unalloc; + node [shape=circle]; TO_Alloc TO_Pending TO_Delivered; + node [shape=rect]; TO_Enqueued; + 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_Enqueued [fontcolor=green, label="timer expires"]; + TO_Enqueued -> TO_Delivered [label="odp_schedule()"]; + 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 [label="odp_timeout_from_event()"]; + TO_Delivered -> TO_Delivered [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..1798d31 --- /dev/null +++ b/doc/images/timer_fsm.gv @@ -0,0 +1,20 @@ +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()"]; + +} 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