1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2019 Intel Corporation.
7 The ntb sample application shows how to use ntb rawdev driver.
8 This sample provides interactive mode to do packet based processing
11 This sample supports 4 types of packet forwarding mode.
13 * ``file-trans``: transmit files between two systems. The sample will
14 be polling to receive files from the peer and save the file as
15 ``ntb_recv_file[N]``, [N] represents the number of received file.
16 * ``rxonly``: NTB receives packets but doesn't transmit them.
17 * ``txonly``: NTB generates and transmits packets without receiving any.
18 * ``iofwd``: iofwd between NTB device and ethdev.
20 Compiling the Application
21 -------------------------
23 To compile the sample application see :doc:`compiling`.
25 The application is located in the ``ntb`` sub-directory.
27 Running the Application
28 -----------------------
30 The application requires an available core for each port, plus one.
31 The only available options are the standard ones for the EAL:
33 .. code-block:: console
35 ./<build_dir>/examples/dpdk-ntb -c 0xf -n 6 -- -i
37 Refer to the *DPDK Getting Started Guide* for general information on
38 running applications and the Environment Abstraction Layer (EAL)
44 The application supports the following command-line options.
48 Set the data size of the mbufs used to N bytes, where N < 65536.
49 The default value is 2048.
53 Set the packet forwarding mode as ``file-trans``, ``txonly``,
54 ``rxonly`` or ``iofwd``.
58 Set number of descriptors of queue as N, namely queue size,
59 where 64 <= N <= 1024. The default value is 1024.
63 Set the transmit free threshold of TX rings to N, where 0 <= N <=
64 the value of ``--nb-desc``. The default value is 256.
68 Set the number of packets per burst to N, where 1 <= N <= 32.
69 The default value is 32.
73 Set the number of queues as N, where qp > 0. The default value is 1.
78 The application is console-driven using the cmdline DPDK interface:
80 .. code-block:: console
84 From this interface the available commands and descriptions of what
87 * ``send [filepath]``: Send file to the peer host. Need to be in
88 file-trans forwarding mode first.
89 * ``start``: Start transmission.
90 * ``stop``: Stop transmission.
91 * ``show/clear port stats``: Show/Clear port stats and throughput.
92 * ``set fwd file-trans/rxonly/txonly/iofwd``: Set packet forwarding
94 * ``quit``: Exit program.