From patchwork Tue Sep 19 16:04:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kumar Kori X-Patchwork-Id: 131649 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5EA564260C; Tue, 19 Sep 2023 18:06:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBC90427DC; Tue, 19 Sep 2023 18:05:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 74500410F2 for ; Tue, 19 Sep 2023 18:05:30 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38JDa02Q012050 for ; Tue, 19 Sep 2023 09:05:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=XOabzoNY7w+2bse1b4SffYUZX8ZJYRmdld0iHkY9vE4=; b=N03TuRJUImtMXLNfnBLU+cFUppsS/o/k+R4/pdOBVDQQ4ubc0w88GhIRTG9EywD5M1Rh 33qib4I99Y7sQYfkZWB7SGzCCHBXF6RqO3q1xI5lTH/m0Sk/vdMJ4DiTT92EqeQsI3Ba IPyM/IxymJNU1LUk8Sl/+E/AIVBTrSjS8EnQwOBNGAjM9Z3qGZUBXxxVIjZEAX7xOFRI 2yZzvefq0BkOCHkdSEC1BHJWKOv1sEurcAAh38qNQAfhDy/y2BS5sZ/JP/mv1OqOSARZ 1eNw44O5jKDOH6cQ9X21hC/BrbBwf6aohsmxzg/zU2Hg92/FwmKMVPXeZwU11XRnmnkm 3w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t7cnq0p6d-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 19 Sep 2023 09:05:28 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 19 Sep 2023 09:05:25 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 19 Sep 2023 09:05:25 -0700 Received: from localhost.localdomain (unknown [10.28.34.25]) by maili.marvell.com (Postfix) with ESMTP id A14C93F7099; Tue, 19 Sep 2023 09:05:24 -0700 (PDT) From: To: Sunil Kumar Kori , Rakesh Kudurumalla CC: Subject: [PATCH v4 13/14] doc: add graph application user guide Date: Tue, 19 Sep 2023 21:34:54 +0530 Message-ID: <20230919160455.1678716-13-skori@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230919160455.1678716-1-skori@marvell.com> References: <20230908104907.4060511-1-skori@marvell.com> <20230919160455.1678716-1-skori@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: pJfIe_tbAzIj3OedrMepE51CVfxGxkR9 X-Proofpoint-GUID: pJfIe_tbAzIj3OedrMepE51CVfxGxkR9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-19_07,2023-09-19_01,2023-05-22_02 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 From: Rakesh Kudurumalla It adds application user guide with detailed infomration about application's parameter, exposed commands by each module etc. Signed-off-by: Sunil Kumar Kori Signed-off-by: Rakesh Kudurumalla --- doc/guides/tools/graph.rst | 240 +++++++++++++++++++ doc/guides/tools/img/graph-usecase-l3fwd.svg | 210 ++++++++++++++++ doc/guides/tools/index.rst | 1 + 3 files changed, 451 insertions(+) create mode 100644 doc/guides/tools/graph.rst create mode 100644 doc/guides/tools/img/graph-usecase-l3fwd.svg diff --git a/doc/guides/tools/graph.rst b/doc/guides/tools/graph.rst new file mode 100644 index 0000000000..52d732cc88 --- /dev/null +++ b/doc/guides/tools/graph.rst @@ -0,0 +1,240 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2023 Marvell. + +dpdk-graph Application +====================== + +The ``dpdk-graph`` tool is a Data Plane Development Kit (DPDK) +application that allows exercising various graph use cases. +This application has a generic framework to add new graph based use cases to +verify functionality. Each use case is defined as a ``.cli`` file. +Based on the input file, application creates a graph to cater the use case. + +Supported Use cases +------------------- + * l3fwd + +Running the Application +----------------------- + +The application has a number of command line options which can be provided in +following syntax + +.. code-block:: console + + dpdk-graph [EAL Options] -- [application options] + +EAL Options +~~~~~~~~~~~ + +Following are the EAL command-line options that can be used in conjunction +with the ``dpdk-graph`` application. +See the DPDK Getting Started Guides for more information on these options. + +* ``-c `` or ``-l `` + + Set the hexadecimal bit mask of the cores to run on. The CORELIST is a + list of cores to be used. + +Application Options +~~~~~~~~~~~~~~~~~~~ + +Following are the application command-line options: + +* ``-h`` + + Set the host IPv4 address over which telnet session can be opened. + It is an optional parameter. Default host address is 0.0.0.0. + +* ``-p`` + + Set the L4 port number over which telnet session can be opened. + It is an optional parameter. Default port is 8086. + +* ``-s`` + + Script name with absolute path which specifies the use case. It is + a mandatory parameter which will be used to create desired graph + for a given use case. + +* ``--enable-graph-stats`` + + Enable graph statistics printing on console. By default graph statistics are disabled. + +* ``--help`` + + Dumps application usage + +Supported CLI commands +---------------------- + +This section provides details on commands which can be used in ``.cli`` +file to express the requested use case configuration. + +.. list-table:: Exposed CLIs + :widths: 40 40 10 10 + :header-rows: 1 + :class: longtable + + * - Command + - Description + - Dynamic + - Optional + * - graph [bsz ] [tmo ] [coremask ] model + - Command to express the desired use case + - No + - No + * - graph start + - Command to start the graph. + This command triggers that no more commands are left to be parsed and graph + initialization can be started now. It must be the last command in ``.cli`` + - No + - No + * - graph stats show + - Command to dump current graph statistics + - Yes + - Yes + * - help graph + - Command to dump graph help message + - Yes + - Yes + * - mempool size buffers cache numa + - Command to create mempool which will be further associated to RxQ to dequeue the packets + - No + - No + * - help mempool + - Command to dump mempool help message + - Yes + - Yes + * - ethdev rxq txq + - Command to create DPDK port with given number of Rx and Tx queues. Also attached + RxQ with given mempool. Each port can have single mempool only i.e. all RxQs will + share the same mempool. + - No + - No + * - ethdev mtu + - Command to configure MTU of DPDK port + - Yes + - Yes + * - ethdev promiscuous + - Command to enable/disable promiscuous mode on DPDK port + - Yes + - Yes + * - ethdev show + - Command to dump current ethdev configuration + - Yes + - Yes + * - ethdev stats + - Command to dump current ethdev statistics + - Yes + - Yes + * - ethdev ip4 addr add netmask + - Command to configure IPv4 address on given PCI device. It is needed if user + wishes to use ``ipv4_lookup`` node + - No + - Yes + * - ethdev ip6 addr add netmask + - Command to configure IPv6 address on given PCI device. It is needed if user + wishes to use ``ipv6_lookup`` node + - No + - Yes + * - help ethdev + - Command to dump ethdev help message + - Yes + - Yes + * - ipv4_lookup route add ipv4 netmask via + - Command to add a route into ``ipv4_lookup`` LPM table. It is needed if user + wishes to route the packets based on LPM lookup table. + - No + - Yes + * - help ipv4_lookup + - Command to dump ipv4_lookup help message + - Yes + - Yes + * - ipv6_lookup route add ipv6 netmask via + - Command to add a route into ``ipv6_lookup`` LPM table. It is needed if user + wishes to route the packets based on LPM6 lookup table. + - No + - Yes + * - help ipv6_lookup + - Command to dump ipv6_lookup help message + - Yes + - Yes + * - neigh add ipv4 + - Command to add a neighbour information into ``ipv4_rewrite`` node. + - No + - Yes + * - neigh add ipv6 + - Command to add a neighbour information into ``ipv6_rewrite`` node. + - No + - Yes + * - help neigh + - Command to dump neigh help message + - Yes + - Yes + * - ethdev_rx map port queue core + - Command to add port-queue-core mapping to ``ethdev_rx`` node. ``ethdev_rx`` + node instance will be pinned on given core and will poll on requested + port/queue pair. + - No + - No + * - help ethdev_rx + - Command to dump ethdev_rx help message + - Yes + - Yes + +Runtime configuration +--------------------- + +Application allows some configuration to be modified at runtime using a telnet session. +Application initiates a telnet server with host address ``0.0.0.0`` and port number ``8086`` +by default. + +if user passes ``-h`` and ``-p`` options while running application then corresponding +IPv4 address and port number will be used for telnet session. + +After successful launch of application, client can connect to application using given +host & port and console will be accessed with prompt ``graph>``. + +Command to access a telnet session + +.. code-block:: console + + telnet + +Example: ``dpdk-graph`` is started with -h 10.28.35.207 and -p 50000 then + +.. code-block:: console + + $ telnet 10.28.35.207 50000 + Trying 10.28.35.207... + Connected to 10.28.35.207. + Escape character is '^]'. + + Welcome! + + graph> + graph> + graph> help ethdev + + ----------------------------- ethdev command help ----------------------------- + ethdev rxq txq + ethdev ip4 addr add netmask + ethdev ip6 addr add netmask + ethdev promiscuous + ethdev mtu + ethdev show + graph> + +Created graph for use case +-------------------------- + +On the successful execution of ``.cli`` file, corresponding graph will be created. +This section mentions the created graph for each use case. + +l3fwd +~~~~~ + +.. _figure_l3fwd_graph: + +.. figure:: img/graph-usecase-l3fwd.* diff --git a/doc/guides/tools/img/graph-usecase-l3fwd.svg b/doc/guides/tools/img/graph-usecase-l3fwd.svg new file mode 100644 index 0000000000..3b991c4cf0 --- /dev/null +++ b/doc/guides/tools/img/graph-usecase-l3fwd.svg @@ -0,0 +1,210 @@ + + + + + + + + + +dpdk_app_graph_l3fwd_nodes_flow + + + +ingress_port + +ingress_port + + + +ethdev_rx + +ethdev_rx + + + +ingress_port->ethdev_rx + + +ingress packet + + + +pkt_cls + +pkt_cls + + + +ethdev_rx->pkt_cls + + + + + +ip4_lookup + +ip4_lookup + + + +pkt_cls->ip4_lookup + + + + + +ip6_lookup + +ip6_lookup + + + +pkt_cls->ip6_lookup + + + + + +pkt_drop + +pkt_drop + + + +pkt_cls->pkt_drop + + + + + +ip4_rewrite + +ip4_rewrite + + + +ip4_lookup->ip4_rewrite + + + + + +ip4_lookup->pkt_drop + + + + + +ip6_rewrite + +ip6_rewrite + + + +ip6_lookup->ip6_rewrite + + + + + +ip6_lookup->pkt_drop + + + + + +ethdev_tx + +ethdev_tx + + + +ip4_rewrite->ethdev_tx + + + + + +ip4_rewrite->pkt_drop + + + + + +ip6_rewrite->ethdev_tx + + + + + +ip6_rewrite->pkt_drop + + + + + +ethdev_tx->pkt_drop + + + + + +egress_port + +egress_port + + + +ethdev_tx->egress_port + + +egress packet + + + diff --git a/doc/guides/tools/index.rst b/doc/guides/tools/index.rst index f2afb1fcc5..4f4dc8b518 100644 --- a/doc/guides/tools/index.rst +++ b/doc/guides/tools/index.rst @@ -23,4 +23,5 @@ DPDK Tools User Guides testeventdev testregex testmldev + graph dts