https://www.yuque.com/zzqcn/opensource/cucfi7
https://doc.dpdk.org/guides-17.11/nics/build_and_test.html
./app/dpdk-procinfo -- --metrics
# ./dpdk-procinfo -v --log-level=eal,8 --huge-unlink -d librte_pmd_tap.so -- --host-id versionfetch -m
dpdk-procinfo --proc-type secondary --file-prefix=ovs -- --stats
/app/dpdk-procinfo -- -p 3 --xstats
[root@localhost dpdk-19.11]# make showconfigs arm-armv7a-linux-gcc arm64-armada-linux-gcc arm64-armv8a-linux-clang arm64-armv8a-linux-gcc arm64-bluefield-linux-gcc arm64-dpaa-linux-gcc arm64-emag-linux-gcc arm64-n1sdp-linux-gcc arm64-octeontx2-linux-gcc arm64-stingray-linux-gcc arm64-thunderx-linux-gcc arm64-thunderx2-linux-gcc arm64-xgene1-linux-gcc i686-native-linux-gcc i686-native-linux-icc ppc_64-power8-linux-gcc x86_64-native-freebsd-clang x86_64-native-freebsd-gcc x86_64-native-linux-clang x86_64-native-linux-gcc x86_64-native-linux-icc x86_x32-native-linux-gcc
[root@localhost proc-info]# ls main.c Makefile meson.build [root@localhost proc-info]# make Makefile:4: /mk/rte.vars.mk: No such file or directory Makefile:14: /mk/rte.app.mk: No such file or directory make: *** No rule to make target `/mk/rte.app.mk'. Stop. [root@localhost proc-info]# cd .. [root@localhost app]# ls Makefile pdump test test-bbdev test-compress-perf test-eventdev test-pmd meson.build proc-info test-acl test-cmdline test-crypto-perf test-pipeline test-sad [root@localhost app]# make Makefile:4: /mk/rte.vars.mk: No such file or directory Makefile:31: /mk/rte.subdir.mk: No such file or directory make: *** No rule to make target `/mk/rte.subdir.mk'. Stop. [root@localhost app]# cd .. [root@localhost dpdk-19.11]# ls ABI_VERSION buildtools devtools env_vars kernel Makefile new_id app config do_build.sh examples lib meson.build README arm64-armv8a-linuxapp-gcc custom-config doc GNUmakefile license meson_options.txt usertools build demo drivers init.sh MAINTAINERS mk VERSION [root@localhost dpdk-19.11]# ls build build include Makefile [root@localhost dpdk-19.11]# ls build/ build include Makefile [root@localhost dpdk-19.11]# ls build/build/ app buildtools drivers kernel lib [root@localhost dpdk-19.11]# ls build/build/app/ pdump proc-info test-acl test-cmdline test-crypto-perf test-pipeline test-sad _postclean test test-bbdev test-compress-perf test-eventdev test-pmd [root@localhost dpdk-19.11]# ls build/build/app/proc-info/ [root@localhost dpdk-19.11]# ./build/build/app/proc-info -h -bash: ./build/build/app/proc-info: Is a directory [root@localhost dpdk-19.11]# ls ./build/build/app/proc-info [root@localhost dpdk-19.11]# ls ./build/build/app/proc-info -al total 8 drwxr-xr-x. 2 root root 4096 Sep 18 04:02 . drwxr-xr-x. 14 root root 4096 Sep 18 04:02 .. [root@localhost dpdk-19.11]# ls ./build/build/app/test-pmd/ [root@localhost dpdk-19.11]# ls ABI_VERSION buildtools devtools env_vars kernel Makefile new_id app config do_build.sh examples lib meson.build README arm64-armv8a-linuxapp-gcc custom-config doc GNUmakefile license meson_options.txt usertools build demo drivers init.sh MAINTAINERS mk VERSION [root@localhost dpdk-19.11]# ls arm64-armv8a-linuxapp-gcc/ app build include kmod lib Makefile [root@localhost dpdk-19.11]# ls arm64-armv8a-linuxapp-gcc/app/ cmdline_test dpdk-procinfo dpdk-test-crypto-perf.map testacl.map testpipeline.map cmdline_test.map dpdk-procinfo.map dpdk-test-eventdev testbbdev testpmd dpdk-pdump dpdk-test-compress-perf dpdk-test-eventdev.map testbbdev.map testpmd.map dpdk-pdump.map dpdk-test-compress-perf.map test test.map testsad dpdk-pmdinfogen dpdk-test-crypto-perf testacl testpipeline testsad.map [root@localhost dpdk-19.11]# ./arm64-armv8a-linuxapp-gcc/app/dpdk-procinfo -h EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes
1. dpdk-procinfo Application The dpdk-procinfo application is a Data Plane Development Kit (DPDK) application that runs as a DPDK secondary process and is capable of retrieving port statistics, resetting port statistics, printing DPDK memory information and displaying debug information for port. This application extends the original functionality that was supported by dump_cfg. 1.1. Running the Application The application has a number of command line options: ./$(RTE_TARGET)/app/dpdk-procinfo -- -m | [-p PORTMASK] [--stats | --xstats | --stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto | --show-ring[=name] | --show-mempool[=name] | --iter-mempool=name ]
rte_eth_stats_get
[root@localhost dpdk-19.11]# ./arm64-armv8a-linuxapp-gcc/build/app/proc-info/dpdk-procinfo -- -p 0x3 --stats EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_45449_378aac254801 EAL: Selected IOVA mode 'VA' EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:05:00.0 on NUMA socket 0 EAL: probe driver: 19e5:200 net_hinic EAL: using IOMMU type 1 (Type 1) net_hinic: Initializing pf hinic-0000:05:00.0 in secondary process net_hinic: Initialize 0000:05:00.0 in secondary process EAL: PCI device 0000:06:00.0 on NUMA socket 0 EAL: probe driver: 19e5:200 net_hinic net_hinic: Initializing pf hinic-0000:06:00.0 in secondary process net_hinic: Initialize 0000:06:00.0 in secondary process
--------------------非dpdk网卡 EAL: PCI device 0000:7d:00.0 on NUMA socket 0 EAL: probe driver: 19e5:a222 net_hns3 EAL: PCI device 0000:7d:00.1 on NUMA socket 0 EAL: probe driver: 19e5:a221 net_hns3 EAL: PCI device 0000:7d:00.2 on NUMA socket 0 EAL: probe driver: 19e5:a222 net_hns3 EAL: PCI device 0000:7d:00.3 on NUMA socket 0 EAL: probe driver: 19e5:a221 net_hns3 Segmentation fault [root@localhost dpdk-19.11]#
[root@localhost dpdk-19.11]# lspci | grep -i ether 05:00.0 Ethernet controller: Huawei Technologies Co., Ltd. Hi1822 Family (2*25GE) (rev 45) 06:00.0 Ethernet controller: Huawei Technologies Co., Ltd. Hi1822 Family (2*25GE) (rev 45) 7d:00.0 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE RDMA Network Controller (rev 21) 7d:00.1 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE Network Controller (rev 21) 7d:00.2 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE RDMA Network Controller (rev 21) 7d:00.3 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE Network Controller (rev 21)
[root@localhost dpdk-19.11]# gdb ./arm64-armv8a-linuxapp-gcc/build/app/proc-info/dpdk-procinfo ../core/core-dpdk-procinfo-45468_1604396102 GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /data1/dpdk-19.11/arm64-armv8a-linuxapp-gcc/build/app/proc-info/dpdk-procinfo...done. [New LWP 45468] [New LWP 45470] [New LWP 45469] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `./arm64-armv8a-linuxapp-gcc/build/app/proc-info/dpdk-procinfo -- -p 3 --stats'. Program terminated with signal 11, Segmentation fault. #0 0x0000000000553008 in rte_eth_stats_get (port_id=0, stats=0xffffe8177ae8) at /data1/dpdk-19.11/lib/librte_ethdev/rte_ethdev.c:2387 2387 RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP); (gdb) bt #0 0x0000000000553008 in rte_eth_stats_get (port_id=0, stats=0xffffe8177ae8) at /data1/dpdk-19.11/lib/librte_ethdev/rte_ethdev.c:2387 #1 0x0000000000465908 in nic_stats_display (port_id=0) at /data1/dpdk-19.11/app/proc-info/main.c:355 #2 0x0000000000467f7c in main (argc=4, argv=0xffffe8177fd0) at /data1/dpdk-19.11/app/proc-info/main.c:1313 (gdb)