From patchwork Wed May 11 22:32:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 67624 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp453638qge; Wed, 11 May 2016 15:32:57 -0700 (PDT) X-Received: by 10.140.176.205 with SMTP id w196mr6717666qhw.76.1463005976958; Wed, 11 May 2016 15:32:56 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v6si4425839qhe.106.2016.05.11.15.32.56; Wed, 11 May 2016 15:32:56 -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 3399B61614; Wed, 11 May 2016 22:32:56 +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 808CF6163B; Wed, 11 May 2016 22:32:23 +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 D634A61606; Wed, 11 May 2016 22:32:20 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by lists.linaro.org (Postfix) with ESMTPS id 3455861605 for ; Wed, 11 May 2016 22:32:18 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id v145so91863301oie.0 for ; Wed, 11 May 2016 15:32:18 -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:in-reply-to :references; bh=pWK5gwWBN4t5LD+UDmtqaNiEaaWCalp61tnkWR2IuII=; b=REcJE+znNyTqZpVgNHmQSw7fDhpVfxa7El38KDa8RuzrQfBziMFIw7woo9tWGEk3yL coX3KQZy5j9HqHENMnozVozAnEH4UwxktAg/kKw4c4B3x5gRBRvnZ+7iaUMAXpegWXGE IYIOtlW5gm4GhpZLNDI3iz8ppnUwC2EHx6+JKGmStsHngjlIp79S75WEKuD/6OAgk9gX lSzMdWFZNag+8xTMJKkkSAFUVsy2IH4HkAjOvsBH4nQllwuII0Xmz2oSucDtl0/bOMXS wgCa0sLYdVdMxQrI2ZL4sV+kcTvCSCqLRtxh0GMXpUpsK481hjlSyiwHH6fkhmd1Rawj Nnkw== X-Gm-Message-State: AOPr4FVkrnG90DU4uGldhDS/R/gbc6pxMZtD79BpOW4tK7pyoDBl1fBK/x2arhp7xrNesthmF3g= X-Received: by 10.202.51.133 with SMTP id z127mr3586965oiz.194.1463005937745; Wed, 11 May 2016 15:32:17 -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 78sm2867304otd.12.2016.05.11.15.32.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 15:32:17 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 11 May 2016 17:32:11 -0500 Message-Id: <1463005931-6890-3-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1463005931-6890-1-git-send-email-bill.fischofer@linaro.org> References: <1463005931-6890-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 3/3] doc: users-guide: add packet flow overview 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" From: Mike Holmes Signed-off-by: Mike Holmes Signed-off-by: Bill Fischofer --- doc/users-guide/Makefile.am | 1 + doc/users-guide/users-guide.adoc | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) mode change 100644 => 100755 doc/users-guide/users-guide.adoc diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am index 439ce69..77594fc 100644 --- a/doc/users-guide/Makefile.am +++ b/doc/users-guide/Makefile.am @@ -14,6 +14,7 @@ IMAGES = $(top_srcdir)/doc/images/overview.svg \ $(top_srcdir)/doc/images/odp_scheduling.svg \ $(top_srcdir)/doc/images/odp_traffic_manager.svg \ $(top_srcdir)/doc/images/ordered_queue.svg \ + $(top_srcdir)/doc/images/packet_flow.svg \ $(top_srcdir)/doc/images/packet-adddata.svg \ $(top_srcdir)/doc/images/packet-align.svg \ $(top_srcdir)/doc/images/packet-copyops.svg \ diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc old mode 100644 new mode 100755 index 0221634..7053d7d --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -298,11 +298,11 @@ with each packet for its own use. Packets are represented by handles of abstract type `odp_packet_t`. -=== PktIO -PktIO is how ODP represents I/O interfaces. A pktio object is a logical -port capable of receiving and/or transmitting packets. This may be directly -supported by the underlying platform as an integrated feature, -or may represent a device attached via a PCIE or other bus. +=== Packet I/O (PktIO) +PktIO is how ODP represents I/O interfaces. A pktio object is a logical port +capable of receiving (RX) and/or transmitting (TX) packets. This may be +directly supported by the underlying platform as an integrated feature, or may +represent a device attached via a PCIE or other bus. PktIOs are represented by handles of abstract type `odp_pktio_t`. @@ -460,7 +460,27 @@ _synchronization_ mechanisms. . They examine, transform, or otherwise process packets. . They transmit packets to one or more _packet I/O interfaces_. -ODP provides APIs to assist in each of these areas. +ODP provides APIs to assist in each of these areas as show below: + +.ODP Application Packet Flow Overview +image::packet_flow.svg[align="center"] + +Packets arrive and are received (RX) from a network interface represented by +a _PktIO_ abstraction. From here they go either directly to _Queues_ that are +polled by ODP _Threads_, or can pass through the _Classifier_ and sorted into +Queues that represent individual flows. These queues can then be dispatched +to application threads via the _Scheduler_. + +Threads, in term can invoke various ODP APIs to manipulate packet contents +prior to disposing of them. For output processing, packets make by directly +queued to a PktIO output queue or else they may be handed to the _Traffic +Manager_ for programmatic _Quality of Service (QoS)_ processing before winding +up being transmitted (TX). Note that output interfaces may operate in +_loopback_ mode, in which case packets sent to them are re-routed back to the +input lines for "second pass" processing. For example, an incoming IPSec packet +cannot be properly classified (beyond being IPSec traffic) until it is +decrypted. Once decrypted and its actual contents made visible, it can then +be classified into its real flow. === The include structure Applications only include the 'include/odp_api.h' file, which includes the @@ -509,9 +529,12 @@ which is either `ODP_THREAD_WORKER` or `ODP_THREAD_CONTROL`. === Shutdown Shutdown is the logical reverse of the initialization procedure, with -'odp_term_local()' called for each thread before 'odp_term_global()' is +`odp_term_local()` called for each thread before `odp_term_global()` is called to terminate ODP. +=== Application Initialization/Termination Structure +ODP Applications follow the general structure flow shown below: + .ODP Application Structure Flow Diagram image::resource_management.svg[align="center"]