Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109290/?format=api
http://patches.dpdk.org/api/patches/109290/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220406151106.2915304-24-juraj.linkes@pantheon.tech/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220406151106.2915304-24-juraj.linkes@pantheon.tech>", "list_archive_url": "https://inbox.dpdk.org/dev/20220406151106.2915304-24-juraj.linkes@pantheon.tech", "date": "2022-04-06T15:11:05", "name": "[RFC,v1,23/24] dts: merge DTS doc/dts_gsg/usr_guide/trex.rst to DPDK", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": true, "hash": "f45308ae4c816e42473bdcf608b962fa889f5dc6", "submitter": { "id": 1626, "url": "http://patches.dpdk.org/api/people/1626/?format=api", "name": "Juraj Linkeš", "email": "juraj.linkes@pantheon.tech" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220406151106.2915304-24-juraj.linkes@pantheon.tech/mbox/", "series": [ { "id": 22379, "url": "http://patches.dpdk.org/api/series/22379/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22379", "date": "2022-04-06T15:10:42", "name": "merge DTS documentation files to DPDK", "version": 1, "mbox": "http://patches.dpdk.org/series/22379/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/109290/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/109290/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1E30FA0508;\n\tWed, 6 Apr 2022 17:14:17 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CD10C42929;\n\tWed, 6 Apr 2022 17:11:43 +0200 (CEST)", "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by mails.dpdk.org (Postfix) with ESMTP id 8B2BC428FD\n for <dev@dpdk.org>; Wed, 6 Apr 2022 17:11:36 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id EA89F129C28;\n Wed, 6 Apr 2022 17:11:35 +0200 (CEST)", "from lb.pantheon.sk ([127.0.0.1])\n by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id mhe7S5udW6PL; Wed, 6 Apr 2022 17:11:34 +0200 (CEST)", "from entguard.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id CE74119E0DF;\n Wed, 6 Apr 2022 17:11:17 +0200 (CEST)" ], "X-Virus-Scanned": "amavisd-new at siecit.sk", "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "To": "thomas@monjalon.net, david.marchand@redhat.com,\n Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu, lijuan.tu@intel.com", "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "Subject": "[RFC PATCH v1 23/24] dts: merge DTS doc/dts_gsg/usr_guide/trex.rst to\n DPDK", "Date": "Wed, 6 Apr 2022 15:11:05 +0000", "Message-Id": "<20220406151106.2915304-24-juraj.linkes@pantheon.tech>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220406151106.2915304-1-juraj.linkes@pantheon.tech>", "References": "<20220406151106.2915304-1-juraj.linkes@pantheon.tech>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "---\n dts/doc/dts_gsg/usr_guide/trex.rst | 377 +++++++++++++++++++++++++++++\n 1 file changed, 377 insertions(+)\n create mode 100644 dts/doc/dts_gsg/usr_guide/trex.rst", "diff": "diff --git a/dts/doc/dts_gsg/usr_guide/trex.rst b/dts/doc/dts_gsg/usr_guide/trex.rst\nnew file mode 100644\nindex 0000000000..8dfa66bdbb\n--- /dev/null\n+++ b/dts/doc/dts_gsg/usr_guide/trex.rst\n@@ -0,0 +1,377 @@\n+Practice with TRex\n+==================\n+\n+Download TREX\n+-------------\n+TREX should be installed in Tester, it could be downloaded from http://trex-tgn.cisco.com/trex/release/.\n+We recommend to use the latest version v2.88.\n+\n+.. code-block:: console\n+\n+ wget http://trex-tgn.cisco.com/trex/release/v2.88.tar.gz\n+\n+To read more about T-Rex stateless mode, read the\n+`T-Rex stateless support guide <https://trex-tgn.cisco.com/trex/doc/trex_stateless.html>`__.\n+\n+Configure TREX\n+--------------\n+\n+Extract the downloaded TREX tarball\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+Extract the downloaded TREX file to /opt/trex/::\n+\n+ root@tester:/opt# mkdir trex\n+ root@tester:/opt# cd trex\n+ root@tester:/opt/trex# tar -zxvf v2.88.tar.gz\n+ v2.88/\n+ v2.88/_t-rex-64-debug\n+ v2.88/t-rex-64-debug\n+ ...\n+ v2.88/trex_client_v2.88.tar.gz\n+\n+Generate Configure File\n+~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Identify the performance test ports in tester\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+execute the command like below to list the ports::\n+\n+ root@tester:/opt/trex/v2.88# ./dpdk_setup_ports.py -s\n+\n+ Network devices using DPDK-compatible driver\n+ ============================================\n+ <none>\n+\n+ Network devices using kernel driver\n+ ===================================\n+ 0000:03:00.0 'VMXNET3 Ethernet Controller' if=ens160 drv=vmxnet3 unused=igb_uio,vfio-pci,uio_pci_generic *Active*\n+ 0000:0b:00.0 'Device 1592' if=ens192f0 drv=ice unused=igb_uio,vfio-pci,uio_pci_generic\n+ 0000:0b:00.1 'Device 1592' if=ens192f1 drv=ice unused=igb_uio,vfio-pci,uio_pci_generic\n+ Other network devices\n+ =====================\n+ <none>\n+\n+Generate Configure File\n+^^^^^^^^^^^^^^^^^^^^^^^\n+Assume that we use 0000:0b:00.0, 0000:0b:00.1 to connect to DUT port.\n+And the ports topology as below::\n+\n+ trex.0 (0b:00.0/40:a6:b7:0b:55:78) <-------> DUT port 0 (05:00.0/b4:96:91:9f:63:68)\n+ trex.1 (0b:00.1/40:a6:b7:0b:55:79) <-------> DUT port 1 (05:00.1/b4:96:91:9f:63:69)\n+\n+We need to generate the trex config file as below::\n+\n+ root@tester:/opt/v2.88# ./dpdk_setup_ports.py -i\n+ By default, IP based configuration file will be created. Do you want to use MAC based config? (y/N)y\n+ +----+------+---------+-------------------+--------------------------------------------+---------+----------+----------+\n+ | ID | NUMA | PCI | MAC | Name | Driver | Linux IF | Active |\n+ +====+======+=========+===================+============================================+=========+==========+==========+\n+ | 0 | -1 | 03:00.0 | 00:0c:29:29:30:80 | VMXNET3 Ethernet Controller | vmxnet3 | ens160 | *Active* |\n+ +----+------+---------+-------------------+--------------------------------------------+---------+----------+----------+\n+ | 1 | -1 | 0b:00.0 | 40:a6:b7:0b:55:78 | Device 1592 | ice | ens192f0 | |\n+ +----+------+---------+-------------------+--------------------------------------------+---------+----------+----------+\n+ | 2 | -1 | 0b:00.1 | 40:a6:b7:0b:55:79 | Device 1592 | ice | ens192f1 | |\n+ +----+------+---------+-------------------+--------------------------------------------+---------+----------+----------+\n+ Please choose an even number of interfaces from the list above, either by ID, PCI or Linux IF\n+ Stateful will use order of interfaces: Client1 Server1 Client2 Server2 etc. for flows.\n+ Stateless can be in any order.\n+ Enter list of interfaces separated by space (for example: 1 3) : 1 2\n+ For interface 1, assuming loopback to its dual interface 2.\n+ Destination MAC is 40:a6:b7:0b:55:79. Change it to MAC of DUT? (y/N).y\n+ Please enter a new destination MAC of interface 1: b4:96:91:9f:63:68\n+ For interface 2, assuming loopback to its dual interface 1.\n+ Destination MAC is 40:a6:b7:0b:55:78. Change it to MAC of DUT? (y/N).y\n+ Please enter a new destination MAC of interface 2: b4:96:91:9f:63:69\n+ Print preview of generated config? (Y/n)Y\n+ ### Config file generated by dpdk_setup_ports.py ###\n+\n+ - version: 2\n+ interfaces: ['0b:00.0', '0b:00.1']\n+ port_info:\n+ - dest_mac: b4:96:91:9f:63:68\n+ src_mac: 40:a6:b7:0b:55:78\n+ - dest_mac: b4:96:91:9f:63:69\n+ src_mac: 40:a6:b7:0b:55:79\n+\n+ platform:\n+ master_thread_id: 0\n+ latency_thread_id: 1\n+ dual_if:\n+ - socket: 0\n+ threads: [2,3,4,5,6,7]\n+\n+ Save the config to file? (Y/n)Y\n+ Default filename is /etc/trex_cfg.yaml\n+ Press ENTER to confirm or enter new file:\n+ File /etc/trex_cfg.yaml already exist, overwrite? (y/N)Y\n+ Saved to /etc/trex_cfg.yaml.\n+ root@tester:/opt/trex/v2.88#\n+\n+We could not modify the DUT mac during the configuration and modify it in the generated file /etc/trex_cfg.yaml.\n+\n+Modify Configure File\n+^^^^^^^^^^^^^^^^^^^^^\n+Make sure the DUT mac of the generated TREX file is correct, and add prefix and limit_memory is better::\n+\n+ root@tester:/opt/trex/v2.88# cat /etc/trex_cfg.yaml\n+ ### Config file generated by dpdk_setup_ports.py ###\n+\n+ - version: 2\n+ interfaces: ['0b:00.0', '0b:00.1']\n+ prefix: TREX\n+ limit_memory: 4096\n+ port_info:\n+ - dest_mac: b4:96:91:9f:63:68\n+ src_mac: 40:a6:b7:0b:55:78\n+ - dest_mac: b4:96:91:9f:63:69\n+ src_mac: 40:a6:b7:0b:55:79\n+\n+ platform:\n+ master_thread_id: 0\n+ latency_thread_id: 1\n+ dual_if:\n+ - socket: 0\n+ threads: [2,3,4,5,6,7]\n+\n+ root@tester:/opt/trex/v2.88#\n+\n+Replace system scapy with TREX scapy\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+As the know trex issue -- trex scapy lib will be conflict with scapy installed in OS, we need the replace the scapy\n+in system with trex scapy.\n+\n+#. backup your scapy::\n+\n+ cp -rf /usr/local/lib/python3.6/dist-packages/scapy /usr/local/lib/python3.6/dist-packages/scapy_backup\n+\n+#. unify scapy version with trex::\n+\n+ cp -rf /opt/trex/v2.88/external_libs/scapy-2.4.3/scapy/ /usr/local/lib/python3.6/dist-packages/scapy\n+\n+Configure DTS\n+--------------\n+\n+Configure execution.cfg\n+~~~~~~~~~~~~~~~~~~~~~~~\n+Add the performance test suite and set perf=true::\n+\n+ root@tester:dts# cat execution.cfg\n+ [Execution1]\n+ crbs=192.168.1.1\n+ drivername=vfio-pci\n+ build_type=meson\n+ test_suites=\n+ tso,\n+ targets=\n+ x86_64-native-linuxapp-gcc\n+ parameters=nic_type=cfg:perf=true\n+ root@tester:dts#\n+\n+Configure $DTS_CFG_FOLDER/crbs.cfg\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+Set the pktgen_group=trex or pktgen_group=TREX, this item is case insensitive::\n+\n+ root@tester:dts# cat $DTS_CFG_FOLDER/crbs.cfg\n+ [192.168.1.1]\n+ dut_ip=192.168.1.1\n+ dut_user=root\n+ dut_passwd=dutpwd\n+ os=linux\n+ dut_arch=\n+ tester_ip=192.168.1.2\n+ tester_passwd=testerpwd\n+ ixia_group=\n+ pktgen_group=trex\n+ channels=4\n+ bypass_core0=True\n+\n+Configure $DTS_CFG_FOLDER/ports.cfg\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+This configuration is just same with PF function test, so if you have completed some functional test,\n+you have no need to modify the $DTS_CFG_FOLDER/ports.cfg, just like below::\n+\n+ root@tester:dts# cat $DTS_CFG_FOLDER/ports.cfg\n+ [192.168.1.1]\n+ ports =\n+ pci=0000:05:00.0,peer=0000:0b:00.0;\n+ pci=0000:05:00.1,peer=0000:0b:00.1;\n+\n+In addition, it could be configured as below::\n+\n+ root@tester:dts# cat $DTS_CFG_FOLDER/ports.cfg\n+ [192.168.1.1]\n+ ports =\n+ pci=0000:05:00.0,peer=TREX:0;\n+ pci=0000:05:00.1,peer=TREX:1;\n+\n+We recommend to use the first format configuration, as it has no need to do modification when we do functional test.\n+\n+Configure $DTS_CFG_FOLDER/pktgen.cfg\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+Fill in the $DTS_CFG_FOLDER/pktgen.cfg with your TREX setting, for the first time, you should set start_trex=yes.\n+Set the IP address of the device which you installed TREX into item ‘server=’, it should be the tester IP.\n+The configuration should as below::\n+\n+ root@tester:dts# cat $DTS_CFG_FOLDER/pktgen.cfg\n+ [TREX]\n+ trex_root_path=/opt/trex/v2.88\n+ trex_lib_path=/opt/trex/v2.88/automation/trex_control_plane/interactive\n+ config_file=/etc/trex_cfg.yaml\n+ server=192.168.1.1\n+ pcap_file=/opt/trex/v2.88/stl/sample.pcap\n+ core_num=4\n+ #core_mask=0x3\n+ ip_src=16.0.0.1\n+ ip_dst=10.0.0.1\n+ warmup=15\n+ duration=-1\n+ start_trex=yes\n+\n+As the trex_lib_path may be different in different versions, you could find the correct path as blow command::\n+\n+ root@tester:/opt/trex/v2.88# find . -name trex_stl_lib\n+ ./automation/trex_control_plane/interactive/trex_stl_lib\n+ root@tester:/opt/trex/v2.88#\n+\n+\n+Run DTS performance test with TREX\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Now you can start DTS performance test with TREX::\n+\n+ root@tester:/home/zhaohy/dts# ./dts\n+ dts:\n+ DUT 192.168.1.1\n+ tester: ssh root@192.168.1.1\n+ ...\n+ pktgen: ssh root@192.168.1.1\n+ pktgen: cd /opt/trex/v2.88;./t-rex-64 -i --cfg /etc/trex_cfg.yaml -c 4\n+ pktgen: Starting Scapy server..... Scapy server is started\n+ Trying to bind to igb_uio ...\n+ /usr/bin/python3 dpdk_nic_bind.py --bind=igb_uio 0000:0b:00.0 0000:0b:00.1\n+ ...\n+ TestTSO: Test Case test_perf_TSO_2ports Begin\n+ dut.10.240.183.72:\n+ tester:\n+ TestTSO: Executing PMD using 1S/1C/2T\n+ dut.10.240.183.72: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,45 -n 4 -a 0000:05:00.0 -a 0000:05:00.1 --file-prefix=dpdk_31529_20210324143008 -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=0x3 --max-pkt-len=9000 --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32\n+ dut.10.240.183.72: EAL: Detected 88 lcore(s)\n+ ...\n+ pktgen: Rx Port 0 stats:\n+ rx_port: 0, rx_bps: 25354096640.000000, rx_pps: 1239130.250000\n+ pktgen: throughput: pps_rx 5463897.750000, bps_rx 50961129472.000000\n+ pktgen: traffic completed.\n+ ...\n+ TestTSO:\n+ +------------+---------------+------------+\n+ | Frame Size | 1S/1C/2T Mpps | % linerate |\n+ +============+===============+============+\n+ | 128 | 5.371 | 4 |\n+ +------------+---------------+------------+\n+ | 2500 | 5.464 | 56 |\n+ +------------+---------------+------------+\n+ TestTSO: Test Case test_perf_TSO_2ports Result PASSED\n+\n+FAQ\n+---\n+\n+dpdk hugepage management conflict issue\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+trex use older dpdk version than we release cycle source code. When dpdk change\n+the memory management merchanism, trex will meet the following issue.\n+\n+Trex should run on an independent platform. DUT/Trex should run on two platforms:\n+\n+* one is used as TESTER and trex server, another one is used as DUT.(dts/pktgen)\n+* one is used as trex server, another one is used as DUT/TESTER.(recommended scheme)\n+ This scheme can make sure that trex run on its full status capability.\n+\n+When trex run with dts on the same platform, trex server sometimes boot up\n+failed for hugepage error.\n+\n+.. code-block:: console\n+\n+ ./t-rex-64 -i --stl -k 4\n+\n+ Starting Scapy server..... Scapy server is started\n+ Trying to bind to igb_uio ...\n+ /usr/bin/python3 dpdk_nic_bind.py --bind=igb_uio 0000:85:00.0 0000:8a:00.1\n+ The ports are bound/configured.\n+ Starting TRex v2.41 please wait ...\n+ EAL: Can only reserve 1766 pages from 4096 requested\n+ Current CONFIG_RTE_MAX_MEMSEG=256 is not enough\n+ Please either increase it or request less amount of memory.\n+ EAL: FATAL: Cannot init memory\n+\n+ EAL: Cannot init memory\n+\n+ You might need to run ./trex-cfg once\n+ EAL: Error - exiting with code: 1\n+ Cause: Invalid EAL arguments\n+\n+trex quit when using Niantic\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+when bind dut NNT port to igb_uio, peer port will get a link down status, then\n+trex server using NNT nic will quit.\n+\n+.. code-block:: console\n+\n+ WATCHDOG: task 'master' has not responded for more than 2.00044 seconds - timeout is 2 seconds\n+\n+ *** traceback follows ***\n+\n+ 1 0x55a7c779561a ./_t-rex-64(+0x12761a) [0x55a7c779561a]\n+ 2 0x7f23da4be1b0 /lib64/libpthread.so.0(+0x121b0) [0x7f23da4be1b0]\n+ 3 0x55a7c7942d40 rte_delay_us_block + 128\n+ 4 0x55a7c798d731 ixgbe_setup_mac_link_multispeed_fiber + 337\n+ 5 0x55a7c79a8f14 ./_t-rex-64(+0x33af14) [0x55a7c79a8f14]\n+ 6 0x55a7c7954c72 rte_eth_link_get_nowait + 114\n+ 7 0x55a7c776a988 DpdkTRexPortAttr::update_link_status_nowait() + 24\n+ 8 0x55a7c77856a6 CGlobalTRex::handle_slow_path() + 118\n+ 9 0x55a7c7785ad7 CGlobalTRex::run_in_master() + 759\n+ 10 0x55a7c7785e3c ./_t-rex-64(+0x117e3c) [0x55a7c7785e3c]\n+ 11 0x55a7c793efba rte_eal_mp_remote_launch + 346\n+ 12 0x55a7c7789e1e main_test(int, char**) + 1038\n+ 13 0x7f23d9417f2a __libc_start_main + 234\n+ 14 0x55a7c7719b9d ./_t-rex-64(+0xabb9d) [0x55a7c7719b9d]\n+\n+\n+ *** addr2line information follows ***\n+\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+ ??:0\n+\n+\n+ ./t-rex-64: line 80: 25870 Aborted (core dumped) ./_$(\n+\n+other issues\n+~~~~~~~~~~~~\n+\n+#. linux kernel version should not be too low.\n+\n+#. Trex only works with even number link peers.\n+\n+#. Trex only works with nics, which are using the same driver.\n+\n+#. Before boot up trex, please make sure the peer ports are on up status.\n+\n+#. If you have ran dpdk on the platform which you want to deploy trex-server,\n+ reboot the platform to make sure that trex-server can work fine.\n+\n+#. If using i40e driver, Trex v2.41 version need i40e nic firmware version newer than 5.02.\n+\n+#. trex will drop the received packet, which dst mac is the port mac address.\n", "prefixes": [ "RFC", "v1", "23/24" ] }{ "id": 109290, "url": "