首页 > 其他分享 >Running Pktgen

Running Pktgen

时间:2023-11-14 16:11:06浏览次数:36  
标签:KB TX qid RX Running 64 port Pktgen

A sample commandline to start a pktgen instance would look something like the following, which you may need ‘sudo -E’ added to the front if not superuser. The -E option of sudo passes environment variables to sudo shell as the scripts need the RTE_SDK and RTE_TARGET variables:

启动 pktgen 实例的示例命令行如下所示,如果不是超级用户,您可能需要将“sudo -E”添加到前面。 sudo 的 -E 选项将环境变量传递给 sudo shell,因为脚本需要 RTE_SDK 和 RTE_TARGET 变量:

./app/pktgen -l 0-4 -n 3 -- -P -m "[1:3].0, [2:4].1

Pktgen, like other DPDK applications splits its commandline arguments into arguments for the DPDK Environmental Abstraction Layer (EAL) and arguments for the application itself. The two sets of arguments are separated using the standard convention of -- as shown above.

与其他 DPDK 应用程序一样,Pktgen 将其命令行参数分为 DPDK 环境抽象层 (EAL) 的参数和应用程序本身的参数。 两组参数使用标准约定 -- 分隔,如上所示。

These commandline arguments are explained in the EAL Commandline Options and Pktgen Commandline Options.

这些命令行参数在 EAL 命令行选项和 Pktgen 命令行选项中进行了解释。

The output when running pktgen will look something like the following:

运行 pktgen 时的输出将如下所示:

-----------------------

Copyright notices

-----------------------
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
...
EAL: PCI device 0000:07:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1521 rte_igb_pmd
EAL:   0000:07:00.1 not managed by UIO driver, skipping
Lua 5.2.1  Copyright (C) 1994-2012 Lua.org, PUC-Rio

>>> Packet Burst 16, RX Desc 256, TX Desc 256, mbufs/port 2048, mbuf cache 256

=== port to lcore mapping table (# lcores 5) ===
   lcore:     0     1     2     3     4
port   0:  D: T  1: 0  0: 0  0: 1  0: 0 =  1: 1
port   1:  D: T  0: 0  1: 0  0: 0  0: 1 =  1: 1
Total   :  0: 0  1: 0  1: 0  0: 1  0: 1
    Display and Timer on lcore 0, rx:tx counts per port/lcore

Configuring 6 ports, MBUF Size 1984, MBUF Cache Size 256
Lcore:
    1, type  RX , rx_cnt  1, tx_cnt  0, RX (pid:qid): ( 0: 0) , TX (pid:qid):
    2, type  RX , rx_cnt  1, tx_cnt  0, RX (pid:qid): ( 1: 0) , TX (pid:qid):
    3, type  TX , rx_cnt  0, tx_cnt  1, RX (pid:qid): , TX (pid:qid): ( 0: 0)
    4, type  TX , rx_cnt  0, tx_cnt  1, RX (pid:qid): , TX (pid:qid): ( 1: 0)

Port :
    0, nb_lcores  2, private 0x7d08d8, lcores:  1  3
    1, nb_lcores  2, private 0x7d1c48, lcores:  2  4


Initialize Port 0 -- TxQ 1, RxQ 1,  Src MAC 90:e2:ba:5a:f7:90
    Create: Default RX  0:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Default TX  0:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Range TX    0:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Sequence TX 0:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Special TX  0:0 - Mem (MBUFs   64 x (1984 + 64)) + 790720 =  901 KB

                                                   Port memory used =  20373 KB

Initialize Port 1 -- TxQ 1, RxQ 1,  Src MAC 90:e2:ba:5a:f7:91
    Create: Default RX  1:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Default TX  1:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Range TX    1:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Sequence TX 1:0 - Mem (MBUFs 2048 x (1984 + 64)) + 790720 = 4869 KB
    Create: Special TX  1:0 - Mem (MBUFs   64 x (1984 + 64)) + 790720 =  901 KB

                                                   Port memory used =  20373 KB
                                                  Total memory used =  40746 KB

Port  0: Link Up - speed 10000 Mbps - full-duplex <Enable promiscuous mode>
Port  1: Link Up - speed 10000 Mbps - full-duplex <Enable promiscuous mode>


=== Display processing on lcore 0
=== RX processing on lcore  1, rxcnt 1, port/qid, 0/0
=== RX processing on lcore  2, rxcnt 1, port/qid, 1/0
=== TX processing on lcore  3, txcnt 1, port/qid, 0/0
=== TX processing on lcore  4, txcnt 1, port/qid, 1/0
...

Once pktgen is running you will see an output like the following:

pktgen 运行后,您将看到如下输出:

| Ports 0-3 of 8   <Main Page>  Copyright(c) <2010-2023>, Intel Corporation
  Flags:Port       :   P--------------:0   P--------------:1   P--------------:2   P--------------:3
Link State         :       <UP-10000-FD>       <UP-10000-FD>       <UP-10000-FD>       <UP-10000-FD>     ----TotalRate----
Pkts/s Max/Rx      :                 0/0                 0/0                 0/0                 0/0                   0/0
       Max/Tx      :                 0/0                 0/0                 0/0                 0/0                   0/0
MBits/s Rx/Tx      :                 0/0                 0/0                 0/0                 0/0                   0/0
Broadcast          :                   0                   0                   0                   0
Multicast          :                   0                   0                   0                   0
  64 Bytes         :                   0                   0                   0                   0
  65-127           :                   0                   0                   0                   0
  128-255          :                   0                   0                   0                   0
  256-511          :                   0                   0                   0                   0
  512-1023         :                   0                   0                   0                   0
  1024-1518        :                   0                   0                   0                   0
Runts/Jumbos       :                 0/0                 0/0                 0/0                 0/0
Errors Rx/Tx       :                 0/0                 0/0                 0/0                 0/0
Total Rx Pkts      :                   0                   0                   0                   0
      Tx Pkts      :                   0                   0                   0                   0
      Rx MBs       :                   0                   0                   0                   0
      Tx MBs       :                   0                   0                   0                   0
ARP/ICMP Pkts      :                 0/0                 0/0                 0/0                 0/0
                   :
Pattern Type       :             abcd...             abcd...             abcd...             abcd...
Tx Count/% Rate    :       Forever /100%       Forever /100%       Forever /100%       Forever /100%
PktSize/Rx:Tx Burst:           64 /   32           64 /   32           64 /   32           64 /   32
Src/Dest Port      :         1234 / 5678         1234 / 5678         1234 / 5678         1234 / 5678
Pkt Type:VLAN ID   :     IPv4 / TCP:0001     IPv4 / TCP:0001     IPv4 / TCP:0001     IPv4 / TCP:0001
Dst  IP Address    :         192.168.1.1         192.168.0.1         192.168.3.1         192.168.2.1
Src  IP Address    :      192.168.0.1/24      192.168.1.1/24      192.168.2.1/24      192.168.3.1/24
Dst MAC Address    :   3c:fd:fe:9c:5c:d9   3c:fd:fe:9c:5c:d8   3c:fd:fe:9c:5c:db   3c:fd:fe:9c:5c:da
Src MAC Address    :   3c:fd:fe:9c:5c:d8   3c:fd:fe:9c:5c:d9   3c:fd:fe:9c:5c:da   3c:fd:fe:9c:5c:db
VendID/PCI Addr    :   8086:1572/04:00.0   8086:1572/04:00.1   8086:1572/04:00.2   8086:1572/04:00.3

-- Pktgen Ver: 3.2.4 (DPDK 17.05.0-rc0)  Powered by DPDK ---------------

Pktgen:/>

The flags displayed on the top line for each port are:

每个端口顶行显示的标志是:

 Flags: P---------------- - Promiscuous mode enabled
         E                - ICMP Echo enabled
          A               - Send ARP Request flag
           G              - Send Gratuitous ARP flag
            C             - TX Cleanup flag
             p            - PCAP enabled flag
              S           - Send Sequence packets enabled
               R          - Send Range packets enabled
                D         - DPI Scanning enabled (If Enabled)
                 I        - Process packets on input enabled
                  *       - Using TAP interface for this port can be [-rt*]
                   L      - Send Latency packets                          V     - Send VLAN ID tag
                    M     - Send MPLS header
                    Q     - Send Q-in-Q tags
                     g    - Process GARP packets
                      g   - Perform GRE with IPv4 payload
                      G   - Perform GRE with Ethernet payload
                       C  - Capture received packets
                        R - Random bitfield(s) are applied

Notes. <state> - Use enable|disable or on|off to set the state.
    <portlist> - a list of ports (no spaces) as 2,4,6-9,12 or 3-5,8 or 5 or the word 'all'
         Color best seen on a black background for now
         To see a set of example Lua commands see the files in wr-examples/pktgen/test

The pktgen default colors and theme work best on a black background. If required, it is possible to set other color themes, (see commands).

pktgen 默认颜色和主题在黑色背景上效果最佳。 如果需要,可以设置其他颜色主题(请参阅命令)。

 

标签:KB,TX,qid,RX,Running,64,port,Pktgen
From: https://www.cnblogs.com/imreW/p/17831880.html

相关文章

  • The Pktgen Application
    Pktgen,(Packet Gen-erator)isasoftwarebasedtrafficgeneratorpoweredbytheDPDKfastpacketprocessingframework.Pktgen(数据包生成器)是一款基于软件的流量生成器,由DPDK快速数据包处理框架提供支持。SomeofthefeaturesofPktgenare:Pktgen的一些功能包括......
  • pktgen
    一、pktgen使用详细教程(一)pktgen简介pktgen是一个位于linux内核层的高性能网络测试工具,由瑞士皇家理工大学的TSlab实验室的RobertOlsson开发的(现在应该不在皇家理工了),主要用来测试网络驱动与网卡设备,支持多线程,能够产生随机mac地址、IP地址、UDP端口号的数据包,pktgen的作者使......
  • Mac Os VS Code 无法升级Cannot update while running on a read-only volume.
    macOSVSCode无法升级,提示“Cannotupdatewhilerunningonaread-onlyvolume“错误提示错误如下:Cannotupdatewhilerunningonaread-onlyvolume.Theapplicationisonaread-onlyvolume.Pleasemovetheapplicationandtryagain.Ifyou’reonmacOSSierr......
  • No compiler detected, make sure you are running on top of a JDK instead of a JRE
    Java调webservice报如下错误[2023-11-0717:01:02.315]ERROR[scheduling-1]ToHisApiImpl.java:106-Nocompilerdetected,makesureyouarerunningontopofaJDKinsteadofaJRE.java.lang.IllegalStateException:Nocompilerdetected,makesureyouarerun......
  • SVN一直报错Error running context: 由于目标计算机积极拒绝,无法连接。解决办法【杭州
    一、发现SVN一直报错Errorrunningcontext:由于目标计算机积极拒绝,无法连接。 二、没有启动 VisualSVN Server。cmd--> services.msc打开本地服务。查看VisualSVN的三个服务的启动类型,建议选择“手动”,不能选择“禁用”,选择“自动”开机启动耗内存,因为是Java写的插件,要启......
  • Go - Changing the Timing for Running Performance Tests
    Problem: Youwanttorunperformancetestsforaspecificdurationoraspecificnumberofiterations.Solution: Youcanincreasetheminimumdurationthebenchmarksshouldrunorincreasethenumberofiterationsusingthe-benchtimeflag. Torunthis......
  • 安装NVIDA驱动时,出现your appear to running an x server;please exit x before insta
    安装NVIDA驱动时,出现yourappeartorunninganxserver;pleaseexitxbeforeinstalling.forfurtherdetails这个错误主要是由于安装远程控制lightgm导致X-server启动。解决办法:sudochmod+xNVIDIA-Linux-X86_64-440.100.runsudo./NVIDIA-Linux-X86_64-440.100.run......
  • Running Large Language Models locally – Your own ChatGPT-like AI in C#
    Forthepastfewmonths,alotofnewsintechaswellasmainstreammediahasbeenaround ChatGPT,anArtificialIntelligence(AI)productbythefolksat OpenAI.ChatGPTisaLargeLanguageModel(LLM)thatisfine-tunedforconversation.Whileunderval......
  • The Virtual KVM Client applet is not running or not initialized properiy.
    KVM TheVirtualKVMClientappletisnotrunningornotinitializedproperly. PortAccessisdisabled. PortAccessisdisabled.  ......
  • Kubernetes 无法join:[ERROR CRI]: container runtime is not running:
    Kubernetes初始化成功,然后将node加入,结果报错:[root@k8s-node1~]#kubeadmjoin10.10.10.185:6443--token84pas2.ifxb6o8g7h2abg28--discovery-token-ca-cert-hashsha256:f85f0c324e0b951238617f9037832b63e4c4a6c7679aaa53c711a829fc9374e6[preflight]Runningpre-flight......