15b21ffb2SSunil Kumar Kori.. SPDX-License-Identifier: BSD-3-Clause 25b21ffb2SSunil Kumar Kori Copyright(c) 2023 Marvell. 35b21ffb2SSunil Kumar Kori 45b21ffb2SSunil Kumar Koridpdk-graph Application 55b21ffb2SSunil Kumar Kori====================== 65b21ffb2SSunil Kumar Kori 75b21ffb2SSunil Kumar KoriThe ``dpdk-graph`` tool is a Data Plane Development Kit (DPDK) 85b21ffb2SSunil Kumar Koriapplication that allows exercising various graph use cases. 95b21ffb2SSunil Kumar KoriThis application has a generic framework to add new graph based use cases 105b21ffb2SSunil Kumar Korito verify functionality. 115b21ffb2SSunil Kumar KoriEach use case is defined as a ``<usecase>.cli`` file. 125b21ffb2SSunil Kumar KoriBased on the input file, application creates a graph to cater the use case. 135b21ffb2SSunil Kumar Kori 145b21ffb2SSunil Kumar KoriAlso this application framework can be used by other graph-based applications. 155b21ffb2SSunil Kumar Kori 165b21ffb2SSunil Kumar Kori 175b21ffb2SSunil Kumar KoriRunning the Application 185b21ffb2SSunil Kumar Kori----------------------- 195b21ffb2SSunil Kumar Kori 205b21ffb2SSunil Kumar KoriThe application has a number of command line options 215b21ffb2SSunil Kumar Koriwhich can be provided in following syntax: 225b21ffb2SSunil Kumar Kori 235b21ffb2SSunil Kumar Kori.. code-block:: console 245b21ffb2SSunil Kumar Kori 255b21ffb2SSunil Kumar Kori dpdk-graph [EAL Options] -- [application options] 265b21ffb2SSunil Kumar Kori 275b21ffb2SSunil Kumar KoriEAL Options 285b21ffb2SSunil Kumar Kori~~~~~~~~~~~ 295b21ffb2SSunil Kumar Kori 305b21ffb2SSunil Kumar KoriFollowing are the EAL command-line options that can be used in conjunction 315b21ffb2SSunil Kumar Koriwith the ``dpdk-graph`` application. 325b21ffb2SSunil Kumar KoriSee the DPDK Getting Started Guides for more information on these options. 335b21ffb2SSunil Kumar Kori 345b21ffb2SSunil Kumar Kori``-c <COREMASK>`` or ``-l <CORELIST>`` 355b21ffb2SSunil Kumar Kori 365b21ffb2SSunil Kumar Kori Set the hexadecimal bit mask of the cores to run on. 375b21ffb2SSunil Kumar Kori The CORELIST is a list of cores to be used. 385b21ffb2SSunil Kumar Kori 395b21ffb2SSunil Kumar KoriApplication Options 405b21ffb2SSunil Kumar Kori~~~~~~~~~~~~~~~~~~~ 415b21ffb2SSunil Kumar Kori 425b21ffb2SSunil Kumar KoriFollowing are the application command-line options: 435b21ffb2SSunil Kumar Kori 443f90eda5SSunil Kumar Kori``-h`` 453f90eda5SSunil Kumar Kori 463f90eda5SSunil Kumar Kori Set the host IPv4 address over which telnet session can be opened. 473f90eda5SSunil Kumar Kori It is an optional parameter. Default host address is ``0.0.0.0``. 483f90eda5SSunil Kumar Kori 493f90eda5SSunil Kumar Kori``-p`` 503f90eda5SSunil Kumar Kori 513f90eda5SSunil Kumar Kori Set the L4 port number over which telnet session can be opened. 523f90eda5SSunil Kumar Kori It is an optional parameter. Default port is ``8086``. 533f90eda5SSunil Kumar Kori 545b21ffb2SSunil Kumar Kori``-s`` 555b21ffb2SSunil Kumar Kori 565b21ffb2SSunil Kumar Kori Script name with absolute path which specifies the use case. 575b21ffb2SSunil Kumar Kori It is a mandatory parameter which will be used 585b21ffb2SSunil Kumar Kori to create desired graph for a given use case. 595b21ffb2SSunil Kumar Kori 606f1407a1SSunil Kumar Kori``--enable-graph-stats`` 616f1407a1SSunil Kumar Kori 626f1407a1SSunil Kumar Kori Enable graph statistics printing on console. 636f1407a1SSunil Kumar Kori By default, graph statistics are disabled. 646f1407a1SSunil Kumar Kori 655b21ffb2SSunil Kumar Kori``--help`` 665b21ffb2SSunil Kumar Kori 675b21ffb2SSunil Kumar Kori Dumps application usage. 685b21ffb2SSunil Kumar Kori 695b21ffb2SSunil Kumar Kori 7034c0c38aSRakesh KudurumallaSupported Use cases 7134c0c38aSRakesh Kudurumalla------------------- 7234c0c38aSRakesh Kudurumalla 7334c0c38aSRakesh Kudurumallal3fwd 7434c0c38aSRakesh Kudurumalla~~~~~ 7534c0c38aSRakesh Kudurumalla 7634c0c38aSRakesh KudurumallaThis use case is supported for both H/W and PCAP vdev network devices. 7734c0c38aSRakesh KudurumallaTo demonstrate, corresponding ``.cli`` files are available at ``app/graph/examples/`` 7834c0c38aSRakesh Kudurumallanamed as ``l3fwd.cli`` and ``l3fwd_pcap.cli`` respectively. 7934c0c38aSRakesh Kudurumalla 802c7debd9SRakesh Kudurumallal2fwd 812c7debd9SRakesh Kudurumalla~~~~~ 822c7debd9SRakesh Kudurumalla 832c7debd9SRakesh KudurumallaThis use case is supported for both H/W and PCAP vdev network devices. 842c7debd9SRakesh KudurumallaTo demonstrate, corresponding ``.cli`` files are available at ``app/graph/examples/`` 852c7debd9SRakesh Kudurumallanamed as ``l2fwd.cli`` and ``l2fwd_pcap.cli`` respectively. 862c7debd9SRakesh Kudurumalla 8734c0c38aSRakesh KudurumallaExample Commands 8834c0c38aSRakesh Kudurumalla^^^^^^^^^^^^^^^^ 8934c0c38aSRakesh KudurumallaFor H/W devices 9034c0c38aSRakesh Kudurumalla 9134c0c38aSRakesh Kudurumalla.. code-block:: console 9234c0c38aSRakesh Kudurumalla 9334c0c38aSRakesh Kudurumalla ./dpdk-graph -c 0xff -a 0002:02:00.0 -a 0002:03:00.0 -- 9434c0c38aSRakesh Kudurumalla -s <dpdk_root_dir>/app/graph/examples/l3fwd.cli 9534c0c38aSRakesh Kudurumalla 962c7debd9SRakesh Kudurumalla ./dpdk-graph -c 0xff -a 0002:02:00.0 -a 0002:03:00.0 -- 972c7debd9SRakesh Kudurumalla -s <dpdk_root_dir>/app/graph/examples/l2fwd.cli 982c7debd9SRakesh Kudurumalla 9934c0c38aSRakesh KudurumallaFor net_pcapX devices 10034c0c38aSRakesh Kudurumalla 10134c0c38aSRakesh Kudurumalla.. code-block:: console 10234c0c38aSRakesh Kudurumalla 10334c0c38aSRakesh Kudurumalla ./dpdk-graph -c 0xff --vdev=net_pcap0,rx_pcap=in_net_pcap0.pcap,tx_pcap=out_net_pcap1.pcap 10434c0c38aSRakesh Kudurumalla --vdev=net_pcap1,rx_pcap=in_net_pcap1.pcap,tx_pcap=out_net_pcap0.pcap 10534c0c38aSRakesh Kudurumalla -- -s <dpdk_root_dir>/app/graph/examples/l3fwd_pcap.cli 10634c0c38aSRakesh Kudurumalla 1072c7debd9SRakesh Kudurumalla ./dpdk-graph -c 0xff --vdev=net_pcap0,rx_pcap=in_net_pcap0.pcap,tx_pcap=out_net_pcap1.pcap 1082c7debd9SRakesh Kudurumalla --vdev=net_pcap1,rx_pcap=in_net_pcap1.pcap,tx_pcap=out_net_pcap0.pcap 1092c7debd9SRakesh Kudurumalla -- -s <dpdk_root_dir>/app/graph/examples/l2fwd_pcap.cli 1102c7debd9SRakesh Kudurumalla 11134c0c38aSRakesh KudurumallaVerifying traffic 11234c0c38aSRakesh Kudurumalla^^^^^^^^^^^^^^^^^ 11334c0c38aSRakesh Kudurumalla 11434c0c38aSRakesh Kudurumalla``l3fwd.cli`` and ``l3fwd_pcap.cli`` creates setup with two network ports. 11534c0c38aSRakesh KudurumallaRouting between these ports are done by lookup node routing information. 11634c0c38aSRakesh KudurumallaFor current use case, following routing table is used: 11734c0c38aSRakesh Kudurumalla 11834c0c38aSRakesh Kudurumalla.. code-block:: console 11934c0c38aSRakesh Kudurumalla 12034c0c38aSRakesh Kudurumalla DIP port 12134c0c38aSRakesh Kudurumalla 10.0.2.2 1 12234c0c38aSRakesh Kudurumalla 20.0.2.2 0 12334c0c38aSRakesh Kudurumalla 12434c0c38aSRakesh KudurumallaOn the successful execution of ``l3fwd.cli`` or ``l3fwd_pcap.cli``, 12534c0c38aSRakesh Kudurumallauser needs to send traffic with mentioned DIP. 12634c0c38aSRakesh Kudurumalla 12734c0c38aSRakesh KudurumallaFor net_pcapX devices, required pcap file should be created and passed to application. 12834c0c38aSRakesh KudurumallaThese pcap files can be created in several ways. 12934c0c38aSRakesh KudurumallaScapy is one of the method to get the same: 13034c0c38aSRakesh Kudurumalla 13134c0c38aSRakesh Kudurumalla.. code-block:: console 13234c0c38aSRakesh Kudurumalla 13334c0c38aSRakesh Kudurumalla # scapy 13434c0c38aSRakesh Kudurumalla >>> pkts=[Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 13534c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 13634c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 13734c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 13834c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 13934c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 14034c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 14134c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 14234c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), 14334c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2")] 14434c0c38aSRakesh Kudurumalla >>> 14534c0c38aSRakesh Kudurumalla >>> wrpcap("in_net_pcap1.pcap",pkts) 14634c0c38aSRakesh Kudurumalla >>> 14734c0c38aSRakesh Kudurumalla >>> pkts=[Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 14834c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 14934c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15034c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15134c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15234c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15334c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15434c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15534c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), 15634c0c38aSRakesh Kudurumalla Ether(dst="FA:09:F9:D7:E0:9D", src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="20.0.2.2")] 15734c0c38aSRakesh Kudurumalla >>> 15834c0c38aSRakesh Kudurumalla >>> wrpcap("in_net_pcap0.pcap",pkts) 15934c0c38aSRakesh Kudurumalla >>> quit 16034c0c38aSRakesh Kudurumalla 16134c0c38aSRakesh Kudurumalla 1625b21ffb2SSunil Kumar KoriSupported CLI commands 1635b21ffb2SSunil Kumar Kori---------------------- 1645b21ffb2SSunil Kumar Kori 1655b21ffb2SSunil Kumar KoriThis section provides details on commands which can be used in ``<usecase>.cli`` 1665b21ffb2SSunil Kumar Korifile to express the requested use case configuration. 1675b21ffb2SSunil Kumar Kori 1685b21ffb2SSunil Kumar Kori.. table:: Exposed CLIs 1695b21ffb2SSunil Kumar Kori :widths: auto 1705b21ffb2SSunil Kumar Kori 171*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 172*fe42375aSSunil Kumar Kori | Command | Description | Scope | Optional | 173*fe42375aSSunil Kumar Kori +======================================+===================================+===================+==========+ 174*fe42375aSSunil Kumar Kori | | graph <usecases> [bsz <size>] | | Command to express the desired | :ref:`1 <scopes>` | No | 1755c59002aSRakesh Kudurumalla | | [tmo <ns>] [coremask <bitmask>] | | use case. Also enables/disable | | | 1765c59002aSRakesh Kudurumalla | | model <rtc/mcd/default> pcap_enable| | pcap capturing. | | | 1775c59002aSRakesh Kudurumalla | | <0/1> num_pcap_pkts <num> pcap_file| | | | 1785c59002aSRakesh Kudurumalla | | <output_capture_file> | | | | 179*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 180*fe42375aSSunil Kumar Kori | graph start | | Command to start the graph. | :ref:`1 <scopes>` | No | 1815c59002aSRakesh Kudurumalla | | | This command triggers that no | | | 1825c59002aSRakesh Kudurumalla | | | more commands are left to be | | | 1835c59002aSRakesh Kudurumalla | | | parsed and graph initialization | | | 1845c59002aSRakesh Kudurumalla | | | can be started now. It must be | | | 1855c59002aSRakesh Kudurumalla | | | the last command in usecase.cli | | | 186*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 187*fe42375aSSunil Kumar Kori | graph stats show | | Command to dump current graph | :ref:`2 <scopes>` | Yes | 1885c59002aSRakesh Kudurumalla | | | statistics. | | | 189*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 190*fe42375aSSunil Kumar Kori | help graph | | Command to dump graph help | :ref:`2 <scopes>` | Yes | 1915c59002aSRakesh Kudurumalla | | | message. | | | 192*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 193*fe42375aSSunil Kumar Kori | | mempool <mempool_name> size | | Command to create mempool which | :ref:`1 <scopes>` | No | 1942d7b3cccSRakesh Kudurumalla | | <mbuf_size> buffers | | will be further associated to | | | 1952d7b3cccSRakesh Kudurumalla | | <number_of_buffers> | | RxQ to dequeue the packets. | | | 1962d7b3cccSRakesh Kudurumalla | | cache <cache_size> numa <numa_id> | | | | 197*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 198*fe42375aSSunil Kumar Kori | help mempool | | Command to dump mempool help | :ref:`2 <scopes>` | Yes | 1992d7b3cccSRakesh Kudurumalla | | | message. | | | 200*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 201*fe42375aSSunil Kumar Kori | | ethdev <ethdev_name> rxq <n_queues>| | Command to create DPDK port with| :ref:`1 <scopes>` | No | 2023850cb06SSunil Kumar Kori | | txq <n_queues> <mempool_name> | | given number of Rx and Tx queues| | | 2033850cb06SSunil Kumar Kori | | | . Also attach RxQ with given | | | 2043850cb06SSunil Kumar Kori | | | mempool. Each port can have | | | 2053850cb06SSunil Kumar Kori | | | single mempool only i.e. all | | | 2063850cb06SSunil Kumar Kori | | | RxQs will share the same mempool| | | 2073850cb06SSunil Kumar Kori | | | . | | | 208*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 209*fe42375aSSunil Kumar Kori | ethdev <ethdev_name> mtu <mtu_sz> | | Command to configure MTU of DPDK| :ref:`3 <scopes>` | Yes | 2103850cb06SSunil Kumar Kori | | | port. | | | 211*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 212*fe42375aSSunil Kumar Kori | | ethdev forward <tx_dev_name> | | Command to configure port | :ref:`1 <scopes>` | Yes | 2130eb39f1dSRakesh Kudurumalla | | <rx_dev_name> | | forwarding of DPDK | | | 214*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 215*fe42375aSSunil Kumar Kori | | ethdev <ethdev_name> promiscuous | | Command to enable/disable | :ref:`3 <scopes>` | Yes | 2163850cb06SSunil Kumar Kori | | <on/off> | | promiscuous mode on DPDK port. | | | 217*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 218*fe42375aSSunil Kumar Kori | ethdev <ethdev_name> show | | Command to dump current ethdev | :ref:`2 <scopes>` | Yes | 2193850cb06SSunil Kumar Kori | | | configuration. | | | 220*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 221*fe42375aSSunil Kumar Kori | ethdev <ethdev_name> stats | | Command to dump current ethdev | :ref:`2 <scopes>` | Yes | 2223850cb06SSunil Kumar Kori | | | statistics. | | | 223*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 224*fe42375aSSunil Kumar Kori | | ethdev <ethdev_name> ip4 addr add | | Command to configure IPv4 | :ref:`3 <scopes>` | Yes | 2253850cb06SSunil Kumar Kori | | <ip> netmask <mask> | | address on given PCI device. It | | | 2263850cb06SSunil Kumar Kori | | | is needed if user wishes to use | | | 2273850cb06SSunil Kumar Kori | | | ``ipv4_lookup`` node. | | | 228*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 229*fe42375aSSunil Kumar Kori | | ethdev <ethdev_name> ip6 addr add | | Command to configure IPv6 | :ref:`3 <scopes>` | Yes | 2303850cb06SSunil Kumar Kori | | <ip> netmask <mask> | | address on given PCI device. It | | | 2313850cb06SSunil Kumar Kori | | | is needed if user wishes to use | | | 2323850cb06SSunil Kumar Kori | | | ``ipv6_lookup`` node. | | | 233*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 234*fe42375aSSunil Kumar Kori | help ethdev | | Command to dump ethdev help | :ref:`2 <scopes>` | Yes | 2353850cb06SSunil Kumar Kori | | | message. | | | 236*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 237*fe42375aSSunil Kumar Kori | | ipv4_lookup route add ipv4 <ip> | | Command to add a route into | :ref:`3 <scopes>` | Yes | 238aff63b6dSSunil Kumar Kori | | netmask <mask> via <ip> | | ``ipv4_lookup`` LPM table. It is| | | 239aff63b6dSSunil Kumar Kori | | | needed if user wishes to route | | | 240aff63b6dSSunil Kumar Kori | | | the packets based on LPM lookup | | | 241aff63b6dSSunil Kumar Kori | | | table. | | | 242*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 243*fe42375aSSunil Kumar Kori | help ipv4_lookup | | Command to dump ``ipv4_lookup`` | :ref:`2 <scopes>` | Yes | 244aff63b6dSSunil Kumar Kori | | | help message. | | | 245*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 246*fe42375aSSunil Kumar Kori | | ipv6_lookup route add ipv6 <ip> | | Command to add a route into | :ref:`3 <scopes>` | Yes | 24783b8e58eSRakesh Kudurumalla | | netmask <mask> via <ip> | | ``ipv6_lookup`` LPM table. It is| | | 24883b8e58eSRakesh Kudurumalla | | | needed if user wishes to route | | | 24983b8e58eSRakesh Kudurumalla | | | the packets based on LPM6 lookup| | | 25083b8e58eSRakesh Kudurumalla | | | table. | | | 251*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 252*fe42375aSSunil Kumar Kori | help ipv6_lookup | | Command to dump ``ipv6_lookup`` | :ref:`2 <scopes>` | Yes | 25383b8e58eSRakesh Kudurumalla | | | help message. | | | 254*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 255*fe42375aSSunil Kumar Kori | neigh add ipv4 <ip> <mac> | | Command to add a neighbour | :ref:`3 <scopes>` | Yes | 2569a3a41ebSSunil Kumar Kori | | | information into | | | 2579a3a41ebSSunil Kumar Kori | | | ``ipv4_rewrite`` node. | | | 258*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 259*fe42375aSSunil Kumar Kori | neigh add ipv6 <ip> <mac> | | Command to add a neighbour | :ref:`3 <scopes>` | Yes | 2609a3a41ebSSunil Kumar Kori | | | information into | | | 2619a3a41ebSSunil Kumar Kori | | | ``ipv6_rewrite`` node. | | | 262*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 263*fe42375aSSunil Kumar Kori | help neigh | | Command to dump neigh help | :ref:`2 <scopes>` | Yes | 2649a3a41ebSSunil Kumar Kori | | | message. | | | 265*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 266*fe42375aSSunil Kumar Kori | | ethdev_rx map port <ethdev_name> | | Command to add port-queue-core | :ref:`1 <scopes>` | No | 2670eadf8f8SRakesh Kudurumalla | | queue <q_num> core <core_id> | | mapping to ``ethdev_rx`` node. | | | 2680eadf8f8SRakesh Kudurumalla | | | ``ethdev_rx`` node instance will| | | 2690eadf8f8SRakesh Kudurumalla | | | be pinned on given core and will| | | 2700eadf8f8SRakesh Kudurumalla | | | poll on requested port/queue | | | 2710eadf8f8SRakesh Kudurumalla | | | pair. | | | 272*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 273*fe42375aSSunil Kumar Kori | help ethdev_rx | | Command to dump ethdev_rx help | :ref:`2 <scopes>` | Yes | 2740eadf8f8SRakesh Kudurumalla | | | message. | | | 275*fe42375aSSunil Kumar Kori +--------------------------------------+-----------------------------------+-------------------+----------+ 2765b21ffb2SSunil Kumar Kori 277*fe42375aSSunil Kumar Kori.. _scopes: 278*fe42375aSSunil Kumar Kori 279*fe42375aSSunil Kumar Kori1. Script only 280*fe42375aSSunil Kumar Kori2. Telnet only 281*fe42375aSSunil Kumar Kori3. Script and telnet both 2825b21ffb2SSunil Kumar Kori 2835b21ffb2SSunil Kumar KoriRuntime configuration 2845b21ffb2SSunil Kumar Kori--------------------- 2855b21ffb2SSunil Kumar Kori 2863f90eda5SSunil Kumar KoriApplication allows some configuration to be modified at runtime using a telnet session. 2873f90eda5SSunil Kumar KoriApplication initiates a telnet server with host address ``0.0.0.0`` and port number ``8086`` 2883f90eda5SSunil Kumar Koriby default. 2893f90eda5SSunil Kumar Kori 2903f90eda5SSunil Kumar KoriIf user passes ``-h`` and ``-p`` options while running application, 2913f90eda5SSunil Kumar Korithen corresponding IP address and port number will be used for telnet session. 2923f90eda5SSunil Kumar Kori 2933f90eda5SSunil Kumar KoriAfter successful launch of application, 2943f90eda5SSunil Kumar Koriclient can connect to application using given host & port 2953f90eda5SSunil Kumar Koriand console will be accessed with prompt ``graph>``. 2963f90eda5SSunil Kumar Kori 2973f90eda5SSunil Kumar KoriCommand to access a telnet session: 2983f90eda5SSunil Kumar Kori 2993f90eda5SSunil Kumar Kori.. code-block:: console 3003f90eda5SSunil Kumar Kori 3013f90eda5SSunil Kumar Kori telnet <host> <port> 3023f90eda5SSunil Kumar Kori 3033f90eda5SSunil Kumar KoriExample: ``dpdk-graph`` is started with ``-h 10.28.35.207`` and ``-p 50000`` then 3043f90eda5SSunil Kumar Kori 3053f90eda5SSunil Kumar Kori.. code-block:: console 3063f90eda5SSunil Kumar Kori 3073f90eda5SSunil Kumar Kori $ telnet 10.28.35.207 50000 3083f90eda5SSunil Kumar Kori Trying 10.28.35.207... 3093f90eda5SSunil Kumar Kori Connected to 10.28.35.207. 3103f90eda5SSunil Kumar Kori Escape character is '^]'. 3113f90eda5SSunil Kumar Kori 3123f90eda5SSunil Kumar Kori Welcome! 3133f90eda5SSunil Kumar Kori 3143f90eda5SSunil Kumar Kori graph> 3153f90eda5SSunil Kumar Kori graph> 3163850cb06SSunil Kumar Kori graph> help ethdev 3173850cb06SSunil Kumar Kori 3183850cb06SSunil Kumar Kori ----------------------------- ethdev command help ----------------------------- 3193850cb06SSunil Kumar Kori ethdev <ethdev_name> rxq <n_queues> txq <n_queues> <mempool_name> 3203850cb06SSunil Kumar Kori ethdev <ethdev_name> ip4 addr add <ip> netmask <mask> 3213850cb06SSunil Kumar Kori ethdev <ethdev_name> ip6 addr add <ip> netmask <mask> 3220eb39f1dSRakesh Kudurumalla ethdev forward <tx_dev_name> <rx_dev_name> 3233850cb06SSunil Kumar Kori ethdev <ethdev_name> promiscuous <on/off> 3243850cb06SSunil Kumar Kori ethdev <ethdev_name> mtu <mtu_sz> 3253850cb06SSunil Kumar Kori ethdev <ethdev_name> stats 3263850cb06SSunil Kumar Kori ethdev <ethdev_name> show 3273850cb06SSunil Kumar Kori graph> 3283850cb06SSunil Kumar Kori 3293850cb06SSunil Kumar KoriTo exit the telnet session, type ``Ctrl + ]``. 3303850cb06SSunil Kumar KoriThis changes the ``graph>`` command prompt to ``telnet>`` command prompt. 3313850cb06SSunil Kumar KoriNow running ``close`` or ``quit`` command on ``telnet>`` prompt 3323850cb06SSunil Kumar Koriwill terminate the telnet session. 3333f90eda5SSunil Kumar Kori 3345b21ffb2SSunil Kumar Kori 3355b21ffb2SSunil Kumar KoriCreated graph for use case 3365b21ffb2SSunil Kumar Kori-------------------------- 3375b21ffb2SSunil Kumar Kori 3385b21ffb2SSunil Kumar KoriOn the successful execution of ``<usecase>.cli`` file, corresponding graph will be created. 3395b21ffb2SSunil Kumar KoriThis section mentions the created graph for each use case. 34034c0c38aSRakesh Kudurumalla 34134c0c38aSRakesh Kudurumallal3fwd 34234c0c38aSRakesh Kudurumalla~~~~~ 34334c0c38aSRakesh Kudurumalla 34434c0c38aSRakesh Kudurumalla.. _figure_l3fwd_graph: 34534c0c38aSRakesh Kudurumalla 34634c0c38aSRakesh Kudurumalla.. figure:: img/graph-usecase-l3fwd.* 3472c7debd9SRakesh Kudurumalla 3482c7debd9SRakesh Kudurumallal2fwd 3492c7debd9SRakesh Kudurumalla~~~~~ 3502c7debd9SRakesh Kudurumalla 3512c7debd9SRakesh Kudurumalla.. _figure_l2fwd_graph: 3522c7debd9SRakesh Kudurumalla 3532c7debd9SRakesh Kudurumalla.. figure:: img/graph-usecase-l2fwd.* 354