码迷,mamicode.com
首页 > 其他好文 > 详细

dpdk primary secondary

时间:2020-09-14 18:59:42      阅读:32      评论:0      收藏:0      [点我收藏+]

标签:int   fail   nec   hello   erro   refused   rpo   dpdk   内存   

 

/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2010-2014 Intel Corporation
 */

#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <sys/queue.h>

#include <rte_memory.h>
#include <rte_launch.h>
#include <rte_eal.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_debug.h>
#include <unistd.h>
#include "eal_private.h"
static int
lcore_hello(__attribute__((unused)) void *arg)
{
        unsigned lcore_id,  socket_id;
        lcore_id = rte_lcore_id();
        socket_id = rte_socket_id();
        printf("hello from core %u\n", lcore_id);
        printf("socket id  %u\n", socket_id);
        sleep(60); 
        return 0;
}

int
main(int argc, char **argv)
{
        int ret;
        unsigned lcore_id;
        const struct rte_memzone *mz;
        ret = rte_eal_init(argc, argv);
        if (ret < 0)
                rte_panic("Cannot init EAL\n");
        
        if (rte_eal_process_type() == RTE_PROC_PRIMARY){
             mz = rte_memzone_reserve("memzone", 100,
                                SOCKET_ID_ANY, 0);
        }
        else {
             mz = rte_memzone_lookup("memzone"); 
        }
        if (mz == NULL)
                rte_exit(EXIT_FAILURE, "Cannot reserve memory zone for port information\n");

        /* call lcore_hello() on every slave lcore */
        RTE_LCORE_FOREACH_SLAVE(lcore_id) {
                rte_eal_remote_launch(lcore_hello, NULL, lcore_id);
        }

        /* call it on master lcore too */
        lcore_hello(NULL);
        struct rte_config *tmp_config;
        tmp_config=rte_eal_get_configuration();
        printf("rte_config->lcore_count = %d \n",tmp_config->lcore_count);
        rte_eal_mp_wait_lcore();
        return 0;
}

 

1、先运行secondary

[root@localhost memzone]# build/app/helloworld -c 0xf -n 4 --proc-type=secondary
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_28766_340f85da0cba
EAL: failed to send to (/var/run/dpdk/rte/mp_socket) due to Connection refused
EAL: Fail to send request /var/run/dpdk/rte/mp_socket:bus_vdev_mp
vdev_scan(): Failed to request vdev from primary
EAL: Selected IOVA mode PA
EAL: Probing VFIO support...
EAL: failed to send to (/var/run/dpdk/rte/mp_socket) due to Connection refused
EAL: Fail to send request /var/run/dpdk/rte/mp_socket:eal_vfio_mp_sync
EAL:   cannot request default container fd
EAL: VFIO support could not be initialized
EAL: PCI device 0000:05:00.0 on NUMA socket 0
EAL:   probe driver: 19e5:200 net_hinic
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: 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
EAL: Error - exiting with code: 1
  Cause: Cannot reserve memory zone for port information

 

 

[root@localhost memzone]# build/app/helloworld -c 0xf -n 4 --proc-type=primary
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode PA
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 primary process
net_hinic: Device 0000:05:00.0 hwif attribute:
net_hinic: func_idx:0, p2p_idx:0, pciintf_idx:0, vf_in_pf:0, ppf_idx:0, global_vf_id:15, func_type:2
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: 0x0, intr_type: 0x0, max_cos_id: 0x7, er_id: 0x0, port_id: 0x0
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 share resource capability:
net_hinic: host_pctxs: 0x0, host_cctxs: 0x0, host_scqs: 0x0, host_srqs: 0x0, host_mpts: 0x0
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:05:00.0 in primary successfully
EAL: PCI device 0000:06:00.0 on NUMA socket 0
EAL:   probe driver: 19e5:200 net_hinic
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
mz addr: 100012838, mz->addr :42002bc780 , mz->addr_64 : 42002bc780
arr addr: fffffe364068 
arr addr: 2bb700 ----------不是virtual addr
hello from core 1
socket id  0
hello from core 2
socket id  0
hello from core 3
socket id  0
hello from core 0
socket id  0
rte_config addr : affea8 
[root@localhost memzone]#

 

 

[root@localhost memzone]# build/app/helloworld -c 0xf -n 4 --proc-type=secondary
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_53918_3577cd500820
EAL: Selected IOVA mode PA
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
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
mz addr: 100012838, mz->addr :42002bc780 , mz->addr_64 : 42002bc780
arr addr: ffffff685e88 
arr addr: 290580 
hello from core 1
socket id  0
hello from core 2
socket id  0
hello from core 3
socket id  0
hello from core 0
socket id  0
rte_config addr : affea8 
[root@localhost memzone]#

 

[root@localhost memzone]# build/app/helloworld -c 0xf -n 4 --proc-type=secondary
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_53918_3577cd500820
EAL: Selected IOVA mode PA
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
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
mz addr: 100012838, mz->addr :42002bc780 , mz->addr_64 : 42002bc780 ------------和primary一样
arr addr: ffffff685e88 
arr addr: 290580 
hello from core 1
socket id  0
hello from core 2
socket id  0
hello from core 3
socket id  0
hello from core 0
socket id  0
rte_config addr : affea8 
[root@localhost memzone]# 

 

[root@localhost ~]# ps -elf | grep helloworld
4 S root      53911  25731  4  80   0 - 8389656 hrtime 02:00 pts/0  00:00:00 build/app/helloworld -c 0xf -n 4 --proc-type=primary
0 S root      53918  26041  1  80   0 - 8389774 hrtime 02:00 pts/1  00:00:00 build/app/helloworld -c 0xf -n 4 --proc-type=secondary
0 S root      53927  29043  0  80   0 -  1729 pipe_w 02:00 pts/2    00:00:00 grep --color=auto helloworld
[root@localhost ~]# cat /proc/53911/maps 
00400000-00ac0000 r-xp 00000000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00ad0000-00af0000 r--p 006c0000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00af0000-00b30000 rw-p 006e0000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00b30000-00d90000 rw-p 00000000 00:00 0 
38d10000-38fd0000 rw-p 00000000 00:00 0                                  [heap]
100000000-100010000 rw-s 00000000 00:17 128179                           /run/dpdk/rte/config
100010000-100040000 rw-s 00000000 00:17 133227                           /run/dpdk/rte/fbarray_memzone
100040000-100050000 rw-s 00000000 00:17 224017                           /run/dpdk/rte/fbarray_memseg-524288k-0-0
120000000-920000000 r--p 00000000 00:00 0 
920000000-920010000 rw-s 00000000 00:17 224018                           /run/dpdk/rte/fbarray_memseg-524288k-0-1
940000000-1140000000 r--p 00000000 00:00 0 
1140000000-1140010000 rw-s 00000000 00:17 224019                         /run/dpdk/rte/fbarray_memseg-524288k-1-0
1160000000-1960000000 r--p 00000000 00:00 0 
1960000000-1960010000 rw-s 00000000 00:17 224020                         /run/dpdk/rte/fbarray_memseg-524288k-1-1
1980000000-2180000000 r--p 00000000 00:00 0 
2180000000-2180010000 rw-s 00000000 00:17 224021                         /run/dpdk/rte/fbarray_memseg-524288k-2-0
21a0000000-29a0000000 r--p 00000000 00:00 0 
29a0000000-29a0010000 rw-s 00000000 00:17 224022                         /run/dpdk/rte/fbarray_memseg-524288k-2-1
29c0000000-31c0000000 r--p 00000000 00:00 0 
31c0000000-31c0010000 rw-s 00000000 00:17 224023                         /run/dpdk/rte/fbarray_memseg-524288k-3-0
31e0000000-39e0000000 r--p 00000000 00:00 0 
39e0000000-39e0010000 rw-s 00000000 00:17 224024                         /run/dpdk/rte/fbarray_memseg-524288k-3-1
3a00000000-4200000000 r--p 00000000 00:00 0 
4200000000-4200070000 rw-s 00000000 00:17 224025                         /run/dpdk/rte/fbarray_memseg-2048k-0-0
4200200000-4200400000 rw-s 00000000 00:2b 434446                         /mnt/huge/rtemap_65536
4200400000-4200600000 rw-s 00000000 00:2b 434447                         /mnt/huge/rtemap_65537
4200600000-4600200000 r--p 00000000 00:00 0 
4600200000-4600270000 rw-s 00000000 00:17 224026                         /run/dpdk/rte/fbarray_memseg-2048k-0-1
4600400000-4a00400000 r--p 00000000 00:00 0 
4a00400000-4a00470000 rw-s 00000000 00:17 224027                         /run/dpdk/rte/fbarray_memseg-2048k-0-2
4a00600000-4e00600000 r--p 00000000 00:00 0 
4e00600000-4e00670000 rw-s 00000000 00:17 224028                         /run/dpdk/rte/fbarray_memseg-2048k-0-3
4e00800000-5200800000 r--p 00000000 00:00 0 
5200800000-5200870000 rw-s 00000000 00:17 224029                         /run/dpdk/rte/fbarray_memseg-2048k-1-0
5200a00000-5600a00000 r--p 00000000 00:00 0 
5600a00000-5600a70000 rw-s 00000000 00:17 224030                         /run/dpdk/rte/fbarray_memseg-2048k-1-1
5600c00000-5a00c00000 r--p 00000000 00:00 0 
5a00c00000-5a00c70000 rw-s 00000000 00:17 224031                         /run/dpdk/rte/fbarray_memseg-2048k-1-2
5a00e00000-5e00e00000 r--p 00000000 00:00 0 
5e00e00000-5e00e70000 rw-s 00000000 00:17 224032                         /run/dpdk/rte/fbarray_memseg-2048k-1-3
5e01000000-6201000000 r--p 00000000 00:00 0 
6201000000-6201070000 rw-s 00000000 00:17 224033                         /run/dpdk/rte/fbarray_memseg-2048k-2-0
6201200000-6601200000 r--p 00000000 00:00 0 
6601200000-6601270000 rw-s 00000000 00:17 224034                         /run/dpdk/rte/fbarray_memseg-2048k-2-1
6601400000-6a01400000 r--p 00000000 00:00 0 
6a01400000-6a01470000 rw-s 00000000 00:17 224035                         /run/dpdk/rte/fbarray_memseg-2048k-2-2
6a01600000-6e01600000 r--p 00000000 00:00 0 
6e01600000-6e01670000 rw-s 00000000 00:17 224036                         /run/dpdk/rte/fbarray_memseg-2048k-2-3
6e01800000-7201800000 r--p 00000000 00:00 0 
7201800000-7201870000 rw-s 00000000 00:17 224037                         /run/dpdk/rte/fbarray_memseg-2048k-3-0
7201a00000-7601a00000 r--p 00000000 00:00 0 
7601a00000-7601a70000 rw-s 00000000 00:17 224038                         /run/dpdk/rte/fbarray_memseg-2048k-3-1
7601c00000-7a01c00000 r--p 00000000 00:00 0 
7a01c00000-7a01c70000 rw-s 00000000 00:17 224039                         /run/dpdk/rte/fbarray_memseg-2048k-3-2
7a01e00000-7e01e00000 r--p 00000000 00:00 0 
7e01e00000-7e01e70000 rw-s 00000000 00:17 224040                         /run/dpdk/rte/fbarray_memseg-2048k-3-3
7e02000000-8202000000 r--p 00000000 00:00 0 
8202000000-8202020000 rw-s 80007b00000 00:0d 8356                        anon_inode:[vfio-device]
8202030000-8202130000 rw-s 80000200000 00:0d 8356                        anon_inode:[vfio-device]
ffff7fa30000-ffff7fa40000 ---p 00000000 00:00 0 
ffff7fa40000-ffff80240000 rw-p 00000000 00:00 0 
ffff80240000-ffff80250000 ---p 00000000 00:00 0 
ffff80250000-ffff80a50000 rw-p 00000000 00:00 0 
ffff80a50000-ffff80a60000 ---p 00000000 00:00 0 
ffff80a60000-ffff81270000 rw-p 00000000 00:00 0 
ffff81270000-ffff81280000 ---p 00000000 00:00 0 
ffff81280000-ffff81a80000 rw-p 00000000 00:00 0 
ffff81a80000-ffff81a90000 ---p 00000000 00:00 0 
ffff81a90000-ffff82290000 rw-p 00000000 00:00 0 
ffff82290000-ffff822b0000 r-xp 00000000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff822b0000-ffff822c0000 r--p 00010000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff822c0000-ffff822d0000 rw-p 00020000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff822d0000-ffff82440000 r-xp 00000000 08:03 247                        /usr/lib64/libc-2.17.so
ffff82440000-ffff82450000 r--p 00160000 08:03 247                        /usr/lib64/libc-2.17.so
ffff82450000-ffff82460000 rw-p 00170000 08:03 247                        /usr/lib64/libc-2.17.so
ffff82460000-ffff82480000 r-xp 00000000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff82480000-ffff82490000 r--p 00010000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff82490000-ffff824a0000 rw-p 00020000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff824a0000-ffff824b0000 r-xp 00000000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff824b0000-ffff824c0000 r--p 00000000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff824c0000-ffff824d0000 rw-p 00010000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff824d0000-ffff824e0000 r-xp 00000000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff824e0000-ffff824f0000 r--p 00000000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff824f0000-ffff82500000 rw-p 00010000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff82500000-ffff825a0000 r-xp 00000000 08:03 255                        /usr/lib64/libm-2.17.so
ffff825a0000-ffff825b0000 r--p 00090000 08:03 255                        /usr/lib64/libm-2.17.so
ffff825b0000-ffff825c0000 rw-p 000a0000 08:03 255                        /usr/lib64/libm-2.17.so
ffff825c0000-ffff825d0000 r-xp 00000000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff825d0000-ffff825e0000 r--p 00000000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff825e0000-ffff825f0000 rw-p 00010000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff825f0000-ffff82600000 rw-p 00000000 00:00 0 
ffff82600000-ffff82610000 r--p 00000000 00:00 0                          [vvar]
ffff82610000-ffff82620000 r-xp 00000000 00:00 0                          [vdso]
ffff82620000-ffff82640000 r-xp 00000000 08:03 240                        /usr/lib64/ld-2.17.so
ffff82640000-ffff82650000 r--p 00010000 08:03 240                        /usr/lib64/ld-2.17.so
ffff82650000-ffff82660000 rw-p 00020000 08:03 240                        /usr/lib64/ld-2.17.so
fffffe340000-fffffe370000 rw-p 00000000 00:00 0                          [stack]
[root@localhost ~]# cat /proc/53918/maps 
00400000-00ac0000 r-xp 00000000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00ad0000-00af0000 r--p 006c0000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00af0000-00b30000 rw-p 006e0000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00b30000-00d90000 rw-p 00000000 00:00 0 
01670000-01910000 rw-p 00000000 00:00 0                                  [heap]
100000000-100010000 rw-s 00000000 00:17 128179                           /run/dpdk/rte/config
100010000-100040000 rw-s 00000000 00:17 133227                           /run/dpdk/rte/fbarray_memzone
100040000-100050000 rw-s 00000000 00:17 224017                           /run/dpdk/rte/fbarray_memseg-524288k-0-0
120000000-920000000 r--p 00000000 00:00 0 
920000000-920010000 rw-s 00000000 00:17 224018                           /run/dpdk/rte/fbarray_memseg-524288k-0-1
940000000-1140000000 r--p 00000000 00:00 0 
1140000000-1140010000 rw-s 00000000 00:17 224019                         /run/dpdk/rte/fbarray_memseg-524288k-1-0
1160000000-1960000000 r--p 00000000 00:00 0 
1960000000-1960010000 rw-s 00000000 00:17 224020                         /run/dpdk/rte/fbarray_memseg-524288k-1-1
1980000000-2180000000 r--p 00000000 00:00 0 
2180000000-2180010000 rw-s 00000000 00:17 224021                         /run/dpdk/rte/fbarray_memseg-524288k-2-0
21a0000000-29a0000000 r--p 00000000 00:00 0 
29a0000000-29a0010000 rw-s 00000000 00:17 224022                         /run/dpdk/rte/fbarray_memseg-524288k-2-1
29c0000000-31c0000000 r--p 00000000 00:00 0 
31c0000000-31c0010000 rw-s 00000000 00:17 224023                         /run/dpdk/rte/fbarray_memseg-524288k-3-0
31e0000000-39e0000000 r--p 00000000 00:00 0 
39e0000000-39e0010000 rw-s 00000000 00:17 224024                         /run/dpdk/rte/fbarray_memseg-524288k-3-1
3a00000000-4200000000 r--p 00000000 00:00 0 
4200000000-4200070000 rw-s 00000000 00:17 224025                         /run/dpdk/rte/fbarray_memseg-2048k-0-0
4200200000-4200400000 rw-s 00000000 00:2b 434446                         /mnt/huge/rtemap_65536
4200400000-4200600000 rw-s 00000000 00:2b 434447                         /mnt/huge/rtemap_65537
4200600000-4600200000 r--p 00000000 00:00 0 
4600200000-4600270000 rw-s 00000000 00:17 224026                         /run/dpdk/rte/fbarray_memseg-2048k-0-1
4600400000-4a00400000 r--p 00000000 00:00 0 
4a00400000-4a00470000 rw-s 00000000 00:17 224027                         /run/dpdk/rte/fbarray_memseg-2048k-0-2
4a00600000-4e00600000 r--p 00000000 00:00 0 
4e00600000-4e00670000 rw-s 00000000 00:17 224028                         /run/dpdk/rte/fbarray_memseg-2048k-0-3
4e00800000-5200800000 r--p 00000000 00:00 0 
5200800000-5200870000 rw-s 00000000 00:17 224029                         /run/dpdk/rte/fbarray_memseg-2048k-1-0
5200a00000-5600a00000 r--p 00000000 00:00 0 
5600a00000-5600a70000 rw-s 00000000 00:17 224030                         /run/dpdk/rte/fbarray_memseg-2048k-1-1
5600c00000-5a00c00000 r--p 00000000 00:00 0 
5a00c00000-5a00c70000 rw-s 00000000 00:17 224031                         /run/dpdk/rte/fbarray_memseg-2048k-1-2
5a00e00000-5e00e00000 r--p 00000000 00:00 0 
5e00e00000-5e00e70000 rw-s 00000000 00:17 224032                         /run/dpdk/rte/fbarray_memseg-2048k-1-3
5e01000000-6201000000 r--p 00000000 00:00 0 
6201000000-6201070000 rw-s 00000000 00:17 224033                         /run/dpdk/rte/fbarray_memseg-2048k-2-0
6201200000-6601200000 r--p 00000000 00:00 0 
6601200000-6601270000 rw-s 00000000 00:17 224034                         /run/dpdk/rte/fbarray_memseg-2048k-2-1
6601400000-6a01400000 r--p 00000000 00:00 0 
6a01400000-6a01470000 rw-s 00000000 00:17 224035                         /run/dpdk/rte/fbarray_memseg-2048k-2-2
6a01600000-6e01600000 r--p 00000000 00:00 0 
6e01600000-6e01670000 rw-s 00000000 00:17 224036                         /run/dpdk/rte/fbarray_memseg-2048k-2-3
6e01800000-7201800000 r--p 00000000 00:00 0 
7201800000-7201870000 rw-s 00000000 00:17 224037                         /run/dpdk/rte/fbarray_memseg-2048k-3-0
7201a00000-7601a00000 r--p 00000000 00:00 0 
7601a00000-7601a70000 rw-s 00000000 00:17 224038                         /run/dpdk/rte/fbarray_memseg-2048k-3-1
7601c00000-7a01c00000 r--p 00000000 00:00 0 
7a01c00000-7a01c70000 rw-s 00000000 00:17 224039                         /run/dpdk/rte/fbarray_memseg-2048k-3-2
7a01e00000-7e01e00000 r--p 00000000 00:00 0 
7e01e00000-7e01e70000 rw-s 00000000 00:17 224040                         /run/dpdk/rte/fbarray_memseg-2048k-3-3
7e02000000-8202000000 r--p 00000000 00:00 0 
8202000000-8202020000 rw-s 80007b00000 00:0d 8356                        anon_inode:[vfio-device]
8202030000-8202130000 rw-s 80000200000 00:0d 8356                        anon_inode:[vfio-device]
ffff94590000-ffff945a0000 ---p 00000000 00:00 0 
ffff945a0000-ffff94da0000 rw-p 00000000 00:00 0 
ffff94da0000-ffff94db0000 ---p 00000000 00:00 0 
ffff94db0000-ffff955b0000 rw-p 00000000 00:00 0 
ffff955b0000-ffff955c0000 ---p 00000000 00:00 0 
ffff955c0000-ffff95dc0000 rw-p 00000000 00:00 0 
ffff95dc0000-ffff95e30000 rw-s 00000000 00:17 340823                     /run/dpdk/rte/fbarray_memseg-2048k-3-3_53918
ffff95e30000-ffff95ea0000 rw-s 00000000 00:17 340822                     /run/dpdk/rte/fbarray_memseg-2048k-3-2_53918
ffff95ea0000-ffff95f10000 rw-s 00000000 00:17 340821                     /run/dpdk/rte/fbarray_memseg-2048k-3-1_53918
ffff95f10000-ffff95f80000 rw-s 00000000 00:17 340820                     /run/dpdk/rte/fbarray_memseg-2048k-3-0_53918
ffff95f80000-ffff95ff0000 rw-s 00000000 00:17 340819                     /run/dpdk/rte/fbarray_memseg-2048k-2-3_53918
ffff95ff0000-ffff96060000 rw-s 00000000 00:17 340818                     /run/dpdk/rte/fbarray_memseg-2048k-2-2_53918
ffff96060000-ffff960d0000 rw-s 00000000 00:17 340817                     /run/dpdk/rte/fbarray_memseg-2048k-2-1_53918
ffff960d0000-ffff96140000 rw-s 00000000 00:17 340816                     /run/dpdk/rte/fbarray_memseg-2048k-2-0_53918
ffff96140000-ffff961b0000 rw-s 00000000 00:17 340815                     /run/dpdk/rte/fbarray_memseg-2048k-1-3_53918
ffff961b0000-ffff96220000 rw-s 00000000 00:17 340814                     /run/dpdk/rte/fbarray_memseg-2048k-1-2_53918
ffff96220000-ffff96290000 rw-s 00000000 00:17 340813                     /run/dpdk/rte/fbarray_memseg-2048k-1-1_53918
ffff96290000-ffff96300000 rw-s 00000000 00:17 340812                     /run/dpdk/rte/fbarray_memseg-2048k-1-0_53918
ffff96300000-ffff96370000 rw-s 00000000 00:17 340811                     /run/dpdk/rte/fbarray_memseg-2048k-0-3_53918
ffff96370000-ffff963e0000 rw-s 00000000 00:17 340810                     /run/dpdk/rte/fbarray_memseg-2048k-0-2_53918
ffff963e0000-ffff96450000 rw-s 00000000 00:17 340809                     /run/dpdk/rte/fbarray_memseg-2048k-0-1_53918
ffff96450000-ffff964c0000 rw-s 00000000 00:17 340808                     /run/dpdk/rte/fbarray_memseg-2048k-0-0_53918
ffff964c0000-ffff964d0000 rw-s 00000000 00:17 340807                     /run/dpdk/rte/fbarray_memseg-524288k-3-1_53918
ffff964d0000-ffff964e0000 rw-s 00000000 00:17 340806                     /run/dpdk/rte/fbarray_memseg-524288k-3-0_53918
ffff964e0000-ffff964f0000 rw-s 00000000 00:17 340805                     /run/dpdk/rte/fbarray_memseg-524288k-2-1_53918
ffff964f0000-ffff96500000 rw-s 00000000 00:17 340804                     /run/dpdk/rte/fbarray_memseg-524288k-2-0_53918
ffff96500000-ffff96510000 rw-s 00000000 00:17 340803                     /run/dpdk/rte/fbarray_memseg-524288k-1-1_53918
ffff96510000-ffff96520000 rw-s 00000000 00:17 340802                     /run/dpdk/rte/fbarray_memseg-524288k-1-0_53918
ffff96520000-ffff96530000 rw-s 00000000 00:17 340801                     /run/dpdk/rte/fbarray_memseg-524288k-0-1_53918
ffff96530000-ffff96540000 rw-s 00000000 00:17 340800                     /run/dpdk/rte/fbarray_memseg-524288k-0-0_53918
ffff96540000-ffff96550000 rw-p 00000000 00:00 0 
ffff96550000-ffff96560000 ---p 00000000 00:00 0 
ffff96560000-ffff96d60000 rw-p 00000000 00:00 0 
ffff96d60000-ffff96d70000 ---p 00000000 00:00 0 
ffff96d70000-ffff97570000 rw-p 00000000 00:00 0 
ffff97570000-ffff97590000 r-xp 00000000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff97590000-ffff975a0000 r--p 00010000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff975a0000-ffff975b0000 rw-p 00020000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff975b0000-ffff97720000 r-xp 00000000 08:03 247                        /usr/lib64/libc-2.17.so
ffff97720000-ffff97730000 r--p 00160000 08:03 247                        /usr/lib64/libc-2.17.so
ffff97730000-ffff97740000 rw-p 00170000 08:03 247                        /usr/lib64/libc-2.17.so
ffff97740000-ffff97760000 r-xp 00000000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff97760000-ffff97770000 r--p 00010000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff97770000-ffff97780000 rw-p 00020000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff97780000-ffff97790000 r-xp 00000000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff97790000-ffff977a0000 r--p 00000000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff977a0000-ffff977b0000 rw-p 00010000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff977b0000-ffff977c0000 r-xp 00000000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff977c0000-ffff977d0000 r--p 00000000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff977d0000-ffff977e0000 rw-p 00010000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff977e0000-ffff97880000 r-xp 00000000 08:03 255                        /usr/lib64/libm-2.17.so
ffff97880000-ffff97890000 r--p 00090000 08:03 255                        /usr/lib64/libm-2.17.so
ffff97890000-ffff978a0000 rw-p 000a0000 08:03 255                        /usr/lib64/libm-2.17.so
ffff978a0000-ffff978b0000 r-xp 00000000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff978b0000-ffff978c0000 r--p 00000000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff978c0000-ffff978d0000 rw-p 00010000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff978d0000-ffff978e0000 rw-p 00000000 00:00 0 
ffff978e0000-ffff978f0000 r--p 00000000 00:00 0                          [vvar]
ffff978f0000-ffff97900000 r-xp 00000000 00:00 0                          [vdso]
ffff97900000-ffff97920000 r-xp 00000000 08:03 240                        /usr/lib64/ld-2.17.so
ffff97920000-ffff97930000 r--p 00010000 08:03 240                        /usr/lib64/ld-2.17.so
ffff97930000-ffff97940000 rw-p 00020000 08:03 240                        /usr/lib64/ld-2.17.so
ffffff660000-ffffff690000 rw-p 00000000 00:00 0                          [stack]
[root@localhost ~]# 

 

[root@localhost ~]# cat /proc/53918/maps 
00400000-00ac0000 r-xp 00000000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00ad0000-00af0000 r--p 006c0000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00af0000-00b30000 rw-p 006e0000 08:10 22155964                           /data1/dpdk-19.11/demo/memzone/build/app/helloworld
00b30000-00d90000 rw-p 00000000 00:00 0 
01670000-01910000 rw-p 00000000 00:00 0                                  [heap]
100000000-100010000 rw-s 00000000 00:17 128179                           /run/dpdk/rte/config
100010000-100040000 rw-s 00000000 00:17 133227                           /run/dpdk/rte/fbarray_memzone
100040000-100050000 rw-s 00000000 00:17 224017                           /run/dpdk/rte/fbarray_memseg-524288k-0-0
120000000-920000000 r--p 00000000 00:00 0 
920000000-920010000 rw-s 00000000 00:17 224018                           /run/dpdk/rte/fbarray_memseg-524288k-0-1
940000000-1140000000 r--p 00000000 00:00 0 
1140000000-1140010000 rw-s 00000000 00:17 224019                         /run/dpdk/rte/fbarray_memseg-524288k-1-0
1160000000-1960000000 r--p 00000000 00:00 0 
1960000000-1960010000 rw-s 00000000 00:17 224020                         /run/dpdk/rte/fbarray_memseg-524288k-1-1
1980000000-2180000000 r--p 00000000 00:00 0 
2180000000-2180010000 rw-s 00000000 00:17 224021                         /run/dpdk/rte/fbarray_memseg-524288k-2-0
21a0000000-29a0000000 r--p 00000000 00:00 0 
29a0000000-29a0010000 rw-s 00000000 00:17 224022                         /run/dpdk/rte/fbarray_memseg-524288k-2-1
29c0000000-31c0000000 r--p 00000000 00:00 0 
31c0000000-31c0010000 rw-s 00000000 00:17 224023                         /run/dpdk/rte/fbarray_memseg-524288k-3-0
31e0000000-39e0000000 r--p 00000000 00:00 0 
39e0000000-39e0010000 rw-s 00000000 00:17 224024                         /run/dpdk/rte/fbarray_memseg-524288k-3-1
3a00000000-4200000000 r--p 00000000 00:00 0 
4200000000-4200070000 rw-s 00000000 00:17 224025                         /run/dpdk/rte/fbarray_memseg-2048k-0-0
4200200000-4200400000 rw-s 00000000 00:2b 434446                         /mnt/huge/rtemap_65536
4200400000-4200600000 rw-s 00000000 00:2b 434447                         /mnt/huge/rtemap_65537
4200600000-4600200000 r--p 00000000 00:00 0 
4600200000-4600270000 rw-s 00000000 00:17 224026                         /run/dpdk/rte/fbarray_memseg-2048k-0-1
4600400000-4a00400000 r--p 00000000 00:00 0 
4a00400000-4a00470000 rw-s 00000000 00:17 224027                         /run/dpdk/rte/fbarray_memseg-2048k-0-2
4a00600000-4e00600000 r--p 00000000 00:00 0 
4e00600000-4e00670000 rw-s 00000000 00:17 224028                         /run/dpdk/rte/fbarray_memseg-2048k-0-3
4e00800000-5200800000 r--p 00000000 00:00 0 
5200800000-5200870000 rw-s 00000000 00:17 224029                         /run/dpdk/rte/fbarray_memseg-2048k-1-0
5200a00000-5600a00000 r--p 00000000 00:00 0 
5600a00000-5600a70000 rw-s 00000000 00:17 224030                         /run/dpdk/rte/fbarray_memseg-2048k-1-1
5600c00000-5a00c00000 r--p 00000000 00:00 0 
5a00c00000-5a00c70000 rw-s 00000000 00:17 224031                         /run/dpdk/rte/fbarray_memseg-2048k-1-2
5a00e00000-5e00e00000 r--p 00000000 00:00 0 
5e00e00000-5e00e70000 rw-s 00000000 00:17 224032                         /run/dpdk/rte/fbarray_memseg-2048k-1-3
5e01000000-6201000000 r--p 00000000 00:00 0 
6201000000-6201070000 rw-s 00000000 00:17 224033                         /run/dpdk/rte/fbarray_memseg-2048k-2-0
6201200000-6601200000 r--p 00000000 00:00 0 
6601200000-6601270000 rw-s 00000000 00:17 224034                         /run/dpdk/rte/fbarray_memseg-2048k-2-1
6601400000-6a01400000 r--p 00000000 00:00 0 
6a01400000-6a01470000 rw-s 00000000 00:17 224035                         /run/dpdk/rte/fbarray_memseg-2048k-2-2
6a01600000-6e01600000 r--p 00000000 00:00 0 
6e01600000-6e01670000 rw-s 00000000 00:17 224036                         /run/dpdk/rte/fbarray_memseg-2048k-2-3
6e01800000-7201800000 r--p 00000000 00:00 0 
7201800000-7201870000 rw-s 00000000 00:17 224037                         /run/dpdk/rte/fbarray_memseg-2048k-3-0
7201a00000-7601a00000 r--p 00000000 00:00 0 
7601a00000-7601a70000 rw-s 00000000 00:17 224038                         /run/dpdk/rte/fbarray_memseg-2048k-3-1
7601c00000-7a01c00000 r--p 00000000 00:00 0 
7a01c00000-7a01c70000 rw-s 00000000 00:17 224039                         /run/dpdk/rte/fbarray_memseg-2048k-3-2
7a01e00000-7e01e00000 r--p 00000000 00:00 0 
7e01e00000-7e01e70000 rw-s 00000000 00:17 224040                         /run/dpdk/rte/fbarray_memseg-2048k-3-3
7e02000000-8202000000 r--p 00000000 00:00 0 
8202000000-8202020000 rw-s 80007b00000 00:0d 8356                        anon_inode:[vfio-device]
8202030000-8202130000 rw-s 80000200000 00:0d 8356                        anon_inode:[vfio-device]
ffff94590000-ffff945a0000 ---p 00000000 00:00 0 
ffff945a0000-ffff94da0000 rw-p 00000000 00:00 0 
ffff94da0000-ffff94db0000 ---p 00000000 00:00 0 
ffff94db0000-ffff955b0000 rw-p 00000000 00:00 0 
ffff955b0000-ffff955c0000 ---p 00000000 00:00 0 
ffff955c0000-ffff95dc0000 rw-p 00000000 00:00 0 
ffff95dc0000-ffff95e30000 rw-s 00000000 00:17 340823                     /run/dpdk/rte/fbarray_memseg-2048k-3-3_53918
ffff95e30000-ffff95ea0000 rw-s 00000000 00:17 340822                     /run/dpdk/rte/fbarray_memseg-2048k-3-2_53918
ffff95ea0000-ffff95f10000 rw-s 00000000 00:17 340821                     /run/dpdk/rte/fbarray_memseg-2048k-3-1_53918
ffff95f10000-ffff95f80000 rw-s 00000000 00:17 340820                     /run/dpdk/rte/fbarray_memseg-2048k-3-0_53918
ffff95f80000-ffff95ff0000 rw-s 00000000 00:17 340819                     /run/dpdk/rte/fbarray_memseg-2048k-2-3_53918
ffff95ff0000-ffff96060000 rw-s 00000000 00:17 340818                     /run/dpdk/rte/fbarray_memseg-2048k-2-2_53918
ffff96060000-ffff960d0000 rw-s 00000000 00:17 340817                     /run/dpdk/rte/fbarray_memseg-2048k-2-1_53918
ffff960d0000-ffff96140000 rw-s 00000000 00:17 340816                     /run/dpdk/rte/fbarray_memseg-2048k-2-0_53918
ffff96140000-ffff961b0000 rw-s 00000000 00:17 340815                     /run/dpdk/rte/fbarray_memseg-2048k-1-3_53918
ffff961b0000-ffff96220000 rw-s 00000000 00:17 340814                     /run/dpdk/rte/fbarray_memseg-2048k-1-2_53918
ffff96220000-ffff96290000 rw-s 00000000 00:17 340813                     /run/dpdk/rte/fbarray_memseg-2048k-1-1_53918
ffff96290000-ffff96300000 rw-s 00000000 00:17 340812                     /run/dpdk/rte/fbarray_memseg-2048k-1-0_53918
ffff96300000-ffff96370000 rw-s 00000000 00:17 340811                     /run/dpdk/rte/fbarray_memseg-2048k-0-3_53918
ffff96370000-ffff963e0000 rw-s 00000000 00:17 340810                     /run/dpdk/rte/fbarray_memseg-2048k-0-2_53918
ffff963e0000-ffff96450000 rw-s 00000000 00:17 340809                     /run/dpdk/rte/fbarray_memseg-2048k-0-1_53918
ffff96450000-ffff964c0000 rw-s 00000000 00:17 340808                     /run/dpdk/rte/fbarray_memseg-2048k-0-0_53918
ffff964c0000-ffff964d0000 rw-s 00000000 00:17 340807                     /run/dpdk/rte/fbarray_memseg-524288k-3-1_53918
ffff964d0000-ffff964e0000 rw-s 00000000 00:17 340806                     /run/dpdk/rte/fbarray_memseg-524288k-3-0_53918
ffff964e0000-ffff964f0000 rw-s 00000000 00:17 340805                     /run/dpdk/rte/fbarray_memseg-524288k-2-1_53918
ffff964f0000-ffff96500000 rw-s 00000000 00:17 340804                     /run/dpdk/rte/fbarray_memseg-524288k-2-0_53918
ffff96500000-ffff96510000 rw-s 00000000 00:17 340803                     /run/dpdk/rte/fbarray_memseg-524288k-1-1_53918
ffff96510000-ffff96520000 rw-s 00000000 00:17 340802                     /run/dpdk/rte/fbarray_memseg-524288k-1-0_53918
ffff96520000-ffff96530000 rw-s 00000000 00:17 340801                     /run/dpdk/rte/fbarray_memseg-524288k-0-1_53918
ffff96530000-ffff96540000 rw-s 00000000 00:17 340800                     /run/dpdk/rte/fbarray_memseg-524288k-0-0_53918
ffff96540000-ffff96550000 rw-p 00000000 00:00 0 
ffff96550000-ffff96560000 ---p 00000000 00:00 0 
ffff96560000-ffff96d60000 rw-p 00000000 00:00 0 
ffff96d60000-ffff96d70000 ---p 00000000 00:00 0 
ffff96d70000-ffff97570000 rw-p 00000000 00:00 0 
ffff97570000-ffff97590000 r-xp 00000000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff97590000-ffff975a0000 r--p 00010000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff975a0000-ffff975b0000 rw-p 00020000 08:03 229                        /usr/lib64/libgcc_s-4.8.5-20150702.so.1
ffff975b0000-ffff97720000 r-xp 00000000 08:03 247                        /usr/lib64/libc-2.17.so
ffff97720000-ffff97730000 r--p 00160000 08:03 247                        /usr/lib64/libc-2.17.so
ffff97730000-ffff97740000 rw-p 00170000 08:03 247                        /usr/lib64/libc-2.17.so
ffff97740000-ffff97760000 r-xp 00000000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff97760000-ffff97770000 r--p 00010000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff97770000-ffff97780000 rw-p 00020000 08:03 51073                      /usr/lib64/libpthread-2.17.so
ffff97780000-ffff97790000 r-xp 00000000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff97790000-ffff977a0000 r--p 00000000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff977a0000-ffff977b0000 rw-p 00010000 08:03 253                        /usr/lib64/libdl-2.17.so
ffff977b0000-ffff977c0000 r-xp 00000000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff977c0000-ffff977d0000 r--p 00000000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff977d0000-ffff977e0000 rw-p 00010000 08:03 230                        /usr/lib64/libnuma.so.1.0.0
ffff977e0000-ffff97880000 r-xp 00000000 08:03 255                        /usr/lib64/libm-2.17.so
ffff97880000-ffff97890000 r--p 00090000 08:03 255                        /usr/lib64/libm-2.17.so
ffff97890000-ffff978a0000 rw-p 000a0000 08:03 255                        /usr/lib64/libm-2.17.so
ffff978a0000-ffff978b0000 r-xp 00000000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff978b0000-ffff978c0000 r--p 00000000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff978c0000-ffff978d0000 rw-p 00010000 08:03 51079                      /usr/lib64/librt-2.17.so
ffff978d0000-ffff978e0000 rw-p 00000000 00:00 0 
ffff978e0000-ffff978f0000 r--p 00000000 00:00 0                          [vvar]
ffff978f0000-ffff97900000 r-xp 00000000 00:00 0                          [vdso]
ffff97900000-ffff97920000 r-xp 00000000 08:03 240                        /usr/lib64/ld-2.17.so
ffff97920000-ffff97930000 r--p 00010000 08:03 240                        /usr/lib64/ld-2.17.so
ffff97930000-ffff97940000 rw-p 00020000 08:03 240                        /usr/lib64/ld-2.17.so
ffffff660000-ffffff690000 rw-p 00000000 00:00 0                          [stack]
[root@localhost ~]# 

 

PRIMARY 和 SECONDARY 通过fbarray 文件  map到同一个内存virtual base

 

dpdk primary secondary

标签:int   fail   nec   hello   erro   refused   rpo   dpdk   内存   

原文地址:https://www.cnblogs.com/dream397/p/13595910.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!