dpdk helloworld

1、编译sdk
export RTE_TARGET=arm64-armv8a-linuxapp-gcc export RTE_SDK=`pwd` insmod ${RTE_SDK}/${RTE_TARGET}/kmod/igb_uio.ko make -j 96 [root@localhost dpdk-19.11]# export RTE_SDK=`pwd` [root@localhost dpdk-19.11]# export RTE_TARGET=arm64-armv8a-linuxapp-gcc
2、绑定网卡
3、进入helloworld,make [root@localhost dpdk
-19.11]# cd examples/helloworld [root@localhost helloworld]# make CC main.o LD helloworld INSTALL-APP helloworld INSTALL-MAP helloworld.map [root@localhost helloworld]# ls build main.c Makefile meson.build [root@localhost helloworld]# ./build/helloworld EAL: Detected 128 lcore(s) EAL: Detected 4 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size 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: Cannot open /dev/vfio/25: Device or resource busy EAL: Failed to open group 25 EAL: Requested device 0000:05:00.0 cannot be used EAL: PCI device 0000:06: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:06:00.0 in primary process net_hinic: Device 0000:06:00.0 hwif attribute: net_hinic: func_idx:1, p2p_idx:1, pciintf_idx:0, vf_in_pf:0, ppf_idx:0, global_vf_id:135, func_type:0 net_hinic: num_aeqs:4, num_ceqs:4, num_irqs:32, dma_attr:2 net_hinic: Get public resource capability: net_hinic: host_id: 0x0, ep_id: 0x1, intr_type: 0x0, max_cos_id: 0x7, er_id: 0x1, port_id: 0x1 net_hinic: host_total_function: 0xf2, host_oq_id_mask_val: 0x8, max_vf: 0x78 net_hinic: pf_num: 0x2, pf_id_start: 0x0, vf_num: 0xf0, vf_id_start: 0x10 net_hinic: Get l2nic resource capability: net_hinic: max_sqs: 0x10, max_rqs: 0x10, vf_max_sqs: 0x4, vf_max_rqs: 0x4 net_hinic: Initialize 0000:06:00.0 in primary successfully 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 hello from core 1 hello from core 2 hello from core 3 hello from core 4 hello from core 5 hello from core 6 hello from core 7 hello from core 8 hello from core 9 hello from core 10 hello from core 11 hello from core 12 hello from core 13 hello from core 14 hello from core 15 hello from core 16 hello from core 17 hello from core 18 hello from core 19 hello from core 20 hello from core 21 hello from core 22 hello from core 23 hello from core 24 hello from core 25 hello from core 26 hello from core 27 hello from core 28 hello from core 29 hello from core 30 hello from core 31 hello from core 32 hello from core 33 hello from core 34 hello from core 35 hello from core 36 hello from core 37 hello from core 38 hello from core 39 hello from core 40 hello from core 41 hello from core 42 hello from core 43 hello from core 44 hello from core 45 hello from core 46 hello from core 47 hello from core 48 hello from core 49 hello from core 50 hello from core 51 hello from core 52 hello from core 53 hello from core 54 hello from core 55 hello from core 56 hello from core 57 hello from core 58 hello from core 59 hello from core 60 hello from core 61 hello from core 62 hello from core 63 hello from core 64 hello from core 65 hello from core 66 hello from core 67 hello from core 68 hello from core 69 hello from core 70 hello from core 71 hello from core 72 hello from core 73 hello from core 74 hello from core 75 hello from core 76 hello from core 77 hello from core 78 hello from core 79 hello from core 80 hello from core 81 hello from core 82 hello from core 83 hello from core 84 hello from core 85 hello from core 86 hello from core 87 hello from core 88 hello from core 89 hello from core 90 hello from core 91 hello from core 92 hello from core 93 hello from core 94 hello from core 95 hello from core 96 hello from core 97 hello from core 98 hello from core 99 hello from core 100 hello from core 101 hello from core 102 hello from core 103 hello from core 104 hello from core 105 hello from core 106 hello from core 107 hello from core 108 hello from core 109 hello from core 110 hello from core 111 hello from core 112 hello from core 113 hello from core 114 hello from core 115 hello from core 116 hello from core 117 hello from core 118 hello from core 119 hello from core 120 hello from core 121 hello from core 122 hello from core 123 hello from core 124 hello from core 125 hello from core 126 hello from core 127 hello from core 0 [root@localhost helloworld]#
原文地址:https://www.cnblogs.com/dream397/p/12765495.html