zoukankan      html  css  js  c++  java
  • vhost switch

    https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/open-vswitch-with-dpdk-setup-on-arm-for-phy-vm-phy-vhost-loopback-test

    > my steps at host:
    > 1. enabling VHOST defines and building x86_64-native-linuxapp-gcc.
    >
    > 2. both interfaces are bind like:
    > 0000:04:00.0 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=ixgbe
    > 0000:04:00.1 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=ixgbe
    >
    > 3. then making the project examples/vhost and executing:
    > ./build/vhost-switch -c 0x03 -n 4 --socket-mem 1024 --file-prefix p1  --
    > -p 1 --vm2vm 0 --socket-file /tmp/sock1 --client -P
    > ./build/vhost-switch -c 0x30 -n 4 --socket-mem 1024 --file-prefix p2  --
    > -p 2 --vm2vm 0 --socket-file /tmp/sock2 --client -P
    >
    > 4. creating the guest
    > qemu- system-x86_64 -chardev socket,id=char1,path=/tmp/sock1,server
    > -netdev type=vhost-user,id=hostnet1,chardev=char1,queues=2 -device
    > virtio-net-pci,mq=on,vectors=2,netdev=hostnet1,id=net1,mac=00:00:00:00:00:01
    > -chardev socket,id=char2,path=/tmp/sock2,server -netdev
    > type=vhost-user,id=hostnet2,chardev=char2,queues=2 -device
    > virtio-net-pci,mq=on,vectors=2,netdev=hostnet2,id=net2,mac=00:00:00:00:00:02
    > -object
    > memory-backend-file,id=mem2,size=2048M,mem-path=/run/hugepages,share=on  ...
    >
    > my steps on the guest:
    > 1. enabling VHOST defines and building x86_64-native-linuxapp-gcc.
    >
    > 2. successfully setting up environment:
    > modprobe uio_pci_generic
    > ./tools/dpdk-devbind.py -b uio_pci_generic 0000:00:07.0
    > ./tools/dpdk-devbind.py -b uio_pci_generic 0000:00:08.0
    > ./examples/l3fwd/build/l3fwd -c 0x3 -n 3 -- --parse-ptype -p 0x3 -P -L
    > --config="(0,0,0),(0,1,1),(1,0,0),(1,1,1)" --no-numa
    (gdb) set args -l 0-3 -n 4 --socket-mem 1024  -- --socket-file /tmp/sock0 --client  -p 0x1
    (gdb) r
    Starting program: /data1/dpdk-19.11/examples/vhost/build/app/vhost-switch -l 0-3 -n 4 --socket-mem 1024  -- --socket-file /tmp/sock0 --client  -p 0x1
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    [New Thread 0xffffbe43d910 (LWP 52584)]
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    [New Thread 0xffffbdc2d910 (LWP 52585)]
    EAL: Selected IOVA mode 'VA'
    EAL: No available hugepages reported in hugepages-2048kB
    EAL: Probing VFIO support...
    EAL: VFIO support initialized
    [New Thread 0xffffbd40d910 (LWP 52586)]
    [New Thread 0xffffbcbfd910 (LWP 52587)]
    [New Thread 0xffffbc3ed910 (LWP 52588)]
    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: Hwif is not ready
    net_hinic: Initialize hwif failed, dev_name: 0000:05:00.0
    net_hinic: Initialize hwif failed, dev_name: 0000:05:00.0
    net_hinic: Create nic device failed, dev_name: 0000:05:00.0
    net_hinic: Initialize 0000:05:00.0 in primary failed
    EAL: Releasing pci mapped resource for 0000:05:00.0
    EAL: Calling pci_unmap_resource for 0000:05:00.0 at 0x8300000000
    EAL: Calling pci_unmap_resource for 0000:05:00.0 at 0x8300030000
    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: Hwif is not ready
    net_hinic: Initialize hwif failed, dev_name: 0000:06:00.0
    net_hinic: Initialize hwif failed, dev_name: 0000:06:00.0
    net_hinic: Create nic device failed, dev_name: 0000:06:00.0
    net_hinic: Initialize 0000:06:00.0 in primary failed
    EAL: Releasing pci mapped resource for 0000:06:00.0
    EAL: Calling pci_unmap_resource for 0000:06:00.0 at 0x8300130000
    EAL: Calling pci_unmap_resource for 0000:06:00.0 at 0x8300160000
    EAL: Requested device 0000:06:00.0 cannot be used
    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
    VHOST_PORT: 
    Specified port number(1) exceeds total system port number(0)
    VHOST_DATA: Procesing on Core 1 started
    
    Breakpoint 1, rte_vhost_driver_register (path=0x10c5550 "/tmp/sock0", flags=1) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:848
    848             int ret = -1;
    (gdb) bt
    #0  rte_vhost_driver_register (path=0x10c5550 "/tmp/sock0", flags=1) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:848
    #1  0x0000000000465624 in main ()
    (gdb) 
    Breakpoint 1, rte_vhost_driver_register (path=0x10c5550 "/tmp/sock0", flags=1) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:848
    848             int ret = -1;
    (gdb) bt
    #0  rte_vhost_driver_register (path=0x10c5550 "/tmp/sock0", flags=1) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:848
    #1  0x0000000000465624 in main ()
    (gdb) b rte_vhost_driver_set_features
    Breakpoint 2 at 0x515f58: file /data1/dpdk-19.11/lib/librte_vhost/socket.c, line 673.
    (gdb) b rte_vhost_driver_callback_register
    Breakpoint 3 at 0x5169c4: file /data1/dpdk-19.11/lib/librte_vhost/socket.c, line 1110.
    (gdb) b rte_vhost_driver_start
    Breakpoint 4 at 0x516a80: file /data1/dpdk-19.11/lib/librte_vhost/socket.c, line 1137.
    (gdb) b virtio_user_dev_init
    Breakpoint 5 at 0x9fc5b0: file /data1/dpdk-19.11/drivers/net/virtio/virtio_user/virtio_user_dev.c, line 427.
    (gdb) c
    Continuing.
    VHOST_DATA: Procesing on Core 3 started
    VHOST_DATA: Procesing on Core 2 started
    [New Thread 0xffffbbbdd910 (LWP 52609)]
    VHOST_CONFIG: vhost-user client: socket created, fd: 46
    
    Breakpoint 3, rte_vhost_driver_callback_register (path=0x10c5550 "/tmp/sock0", ops=0xbab1a8 <virtio_net_device_ops>) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:1110
    1110            pthread_mutex_lock(&vhost_user.mutex);
    (gdb) bt
    #0  rte_vhost_driver_callback_register (path=0x10c5550 "/tmp/sock0", ops=0xbab1a8 <virtio_net_device_ops>) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:1110
    #1  0x00000000004655ec in main ()
    (gdb) c
    Continuing.
    
    Breakpoint 4, rte_vhost_driver_start (path=0x10c5550 "/tmp/sock0") at /data1/dpdk-19.11/lib/librte_vhost/socket.c:1137
    1137            pthread_mutex_lock(&vhost_user.mutex);
    (gdb) c
    Continuing.
    [New Thread 0xffffbb3cd910 (LWP 52611)]
    VHOST_CONFIG: failed to connect to /tmp/sock0: No such file or directory
    VHOST_CONFIG: /tmp/sock0: reconnecting..
    int
    rte_vhost_driver_start(const char *path)
    {
            struct vhost_user_socket *vsocket;
            static pthread_t fdset_tid;
    
            pthread_mutex_lock(&vhost_user.mutex);
            vsocket = find_vhost_user_socket(path);
            pthread_mutex_unlock(&vhost_user.mutex);
    
            if (!vsocket)
                    return -1;
    
            if (fdset_tid == 0) {
                    /**
                     * create a pipe which will be waited by poll and notified to
                     * rebuild the wait list of poll.
                     */
                    if (fdset_pipe_init(&vhost_user.fdset) < 0) {
                            RTE_LOG(ERR, VHOST_CONFIG,
                                    "failed to create pipe for vhost fdset
    ");
                            return -1;
                    }
    
                    int ret = rte_ctrl_thread_create(&fdset_tid,
                            "vhost-events", NULL, fdset_event_dispatch,
                            &vhost_user.fdset);
                    if (ret != 0) {
                            RTE_LOG(ERR, VHOST_CONFIG,
                                    "failed to create fdset handling thread");
    
                            fdset_pipe_uninit(&vhost_user.fdset);
                            return -1;
                    }
            }
    
            if (vsocket->is_server)
                    return vhost_user_start_server(vsocket);
            else
                    return vhost_user_start_client(vsocket);
    }
    [root@localhost app]# gdb vhost-switch
    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/examples/vhost/build/app/vhost-switch...done.
    (gdb)  set args -l 0-3 -n 4 --socket-mem 1024  -- --socket-file /tmp/sock0 --client  -p 0x1
    (gdb)  set args -l 0-3 -n 4 --socket-mem 1024  -- --socket-file /tmp/vhost1 --client  -p 0x1
    (gdb)  b virtio_user_dev_init
    Breakpoint 1 at 0x9fc5b0: file /data1/dpdk-19.11/drivers/net/virtio/virtio_user/virtio_user_dev.c, line 427.
    (gdb) b vhost_user_set_mem_table
    Breakpoint 2 at 0x51ebcc: file /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c, line 1047.
    (gdb) b vhost_user_set_vring_kick
    Breakpoint 3 at 0x5204fc: file /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c, line 1795.
    (gdb) b vhost_user_set_vring_call
    Breakpoint 4 at 0x51fcac: file /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c, line 1563.
    (gdb) r
    Starting program: /data1/dpdk-19.11/examples/vhost/build/app/vhost-switch -l 0-3 -n 4 --socket-mem 1024  -- --socket-file /tmp/vhost1 --client  -p 0x1
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Cannot create lock on '/var/run/dpdk/rte/config'. Is another primary process running?
    EAL: FATAL: Cannot init config
    EAL: Cannot init config
    EAL: Error - exiting with code: 1
      Cause: Error with EAL initialization
    [Inferior 1 (process 52654) exited with code 01]
    (gdb) r
    Starting program: /data1/dpdk-19.11/examples/vhost/build/app/vhost-switch -l 0-3 -n 4 --socket-mem 1024  -- --socket-file /tmp/vhost1 --client  -p 0x1
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    [New Thread 0xffffbe43d910 (LWP 52662)]
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    [New Thread 0xffffbdc2d910 (LWP 52663)]
    EAL: Selected IOVA mode 'VA'
    EAL: No available hugepages reported in hugepages-2048kB
    EAL: Probing VFIO support...
    EAL: VFIO support initialized
    [New Thread 0xffffbd40d910 (LWP 52664)]
    [New Thread 0xffffbcbfd910 (LWP 52665)]
    [New Thread 0xffffbc3ed910 (LWP 52666)]
    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: Hwif is not ready
    net_hinic: Initialize hwif failed, dev_name: 0000:05:00.0
    net_hinic: Initialize hwif failed, dev_name: 0000:05:00.0
    net_hinic: Create nic device failed, dev_name: 0000:05:00.0
    net_hinic: Initialize 0000:05:00.0 in primary failed
    EAL: Releasing pci mapped resource for 0000:05:00.0
    EAL: Calling pci_unmap_resource for 0000:05:00.0 at 0x8300000000
    EAL: Calling pci_unmap_resource for 0000:05:00.0 at 0x8300030000
    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: Hwif is not ready
    net_hinic: Initialize hwif failed, dev_name: 0000:06:00.0
    net_hinic: Initialize hwif failed, dev_name: 0000:06:00.0
    net_hinic: Create nic device failed, dev_name: 0000:06:00.0
    net_hinic: Initialize 0000:06:00.0 in primary failed
    EAL: Releasing pci mapped resource for 0000:06:00.0
    EAL: Calling pci_unmap_resource for 0000:06:00.0 at 0x8300130000
    EAL: Calling pci_unmap_resource for 0000:06:00.0 at 0x8300160000
    EAL: Requested device 0000:06:00.0 cannot be used
    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
    VHOST_PORT: 
    Specified port number(1) exceeds total system port number(0)
    VHOST_DATA: Procesing on Core 1 started
    VHOST_DATA: Procesing on Core 2 started
    VHOST_DATA: Procesing on Core 3 started
    [New Thread 0xffffbbbdd910 (LWP 52667)]
    VHOST_CONFIG: vhost-user client: socket created, fd: 46
    [New Thread 0xffffbb3cd910 (LWP 52668)]
    VHOST_CONFIG: new device, handle is 0
    VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
    VHOST_CONFIG: read message VHOST_USER_GET_PROTOCOL_FEATURES
    VHOST_CONFIG: read message VHOST_USER_SET_PROTOCOL_FEATURES
    VHOST_CONFIG: negotiated Vhost-user protocol features: 0xcb7
    VHOST_CONFIG: read message VHOST_USER_GET_QUEUE_NUM
    VHOST_CONFIG: read message VHOST_USER_SET_SLAVE_REQ_FD
    VHOST_CONFIG: read message VHOST_USER_SET_OWNER
    VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
    [Switching to Thread 0xffffbb3cd910 (LWP 52668)]
    
    Breakpoint 4, vhost_user_set_vring_call (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1563
    1563            struct virtio_net *dev = *pdev;
    (gdb) bt
    #0  vhost_user_set_vring_call (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1563
    #1  0x0000000000521e8c in vhost_user_msg_handler (vid=0, fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:2689
    #2  0x0000000000515528 in vhost_user_read_cb (connfd=46, dat=0x10c47f0, remove=0xffffbb3cd064) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:306
    #3  0x0000000000512640 in fdset_event_dispatch (arg=0xe04568 <vhost_user+8192>) at /data1/dpdk-19.11/lib/librte_vhost/fd_man.c:286
    #4  0x00000000005b024c in rte_thread_init (arg=0x10c3b10) at /data1/dpdk-19.11/lib/librte_eal/common/eal_common_thread.c:165
    #5  0x0000ffffbe617d38 in start_thread (arg=0xffffbb3cd910) at pthread_create.c:309
    #6  0x0000ffffbe55f5f0 in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:91
    (gdb) c
    Continuing.
    VHOST_CONFIG: vring call idx:0 file:50
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
    
    Breakpoint 4, vhost_user_set_vring_call (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1563
    1563            struct virtio_net *dev = *pdev;
    (gdb) bt
    #0  vhost_user_set_vring_call (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1563
    #1  0x0000000000521e8c in vhost_user_msg_handler (vid=0, fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:2689
    #2  0x0000000000515528 in vhost_user_read_cb (connfd=46, dat=0x10c47f0, remove=0xffffbb3cd064) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:306
    #3  0x0000000000512640 in fdset_event_dispatch (arg=0xe04568 <vhost_user+8192>) at /data1/dpdk-19.11/lib/librte_vhost/fd_man.c:286
    #4  0x00000000005b024c in rte_thread_init (arg=0x10c3b10) at /data1/dpdk-19.11/lib/librte_eal/common/eal_common_thread.c:165
    #5  0x0000ffffbe617d38 in start_thread (arg=0xffffbb3cd910) at pthread_create.c:309
    #6  0x0000ffffbe55f5f0 in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:91
    (gdb) c
    Continuing.
    VHOST_CONFIG: vring call idx:1 file:51
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
    VHOST_CONFIG: set queue enable: 1 to qp idx: 0
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
    VHOST_CONFIG: set queue enable: 1 to qp idx: 1
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
    VHOST_CONFIG: set queue enable: 1 to qp idx: 0
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
    VHOST_CONFIG: set queue enable: 1 to qp idx: 1
    VHOST_CONFIG: read message VHOST_USER_SET_FEATURES
    VHOST_CONFIG: negotiated Virtio features: 0x170206602
    VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE
    
    Breakpoint 2, vhost_user_set_mem_table (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1047
    1047            struct virtio_net *dev = *pdev;
    (gdb) bt
    #0  vhost_user_set_mem_table (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1047
    #1  0x0000000000521e8c in vhost_user_msg_handler (vid=0, fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:2689
    #2  0x0000000000515528 in vhost_user_read_cb (connfd=46, dat=0x10c47f0, remove=0xffffbb3cd064) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:306
    #3  0x0000000000512640 in fdset_event_dispatch (arg=0xe04568 <vhost_user+8192>) at /data1/dpdk-19.11/lib/librte_vhost/fd_man.c:286
    #4  0x00000000005b024c in rte_thread_init (arg=0x10c3b10) at /data1/dpdk-19.11/lib/librte_eal/common/eal_common_thread.c:165
    #5  0x0000ffffbe617d38 in start_thread (arg=0xffffbb3cd910) at pthread_create.c:309
    #6  0x0000ffffbe55f5f0 in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:91
    (gdb) c
    Continuing.
    VHOST_CONFIG: guest memory region 0, size: 0x100000000
             guest physical addr: 0x40000000
             guest virtual  addr: 0xfffea0000000
             host  virtual  addr: 0x400000000000
             mmap addr : 0x400000000000
             mmap size : 0x100000000
             mmap align: 0x20000000
             mmap off  : 0x0
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR
    VHOST_CONFIG: reallocate vq from 0 to 3 node
    VHOST_CONFIG: reallocate dev from 0 to 3 node
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
    
    Breakpoint 3, vhost_user_set_vring_kick (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1795
    1795            struct virtio_net *dev = *pdev;
    (gdb) bt
    #0  vhost_user_set_vring_kick (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1795
    #1  0x0000000000521e8c in vhost_user_msg_handler (vid=0, fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:2689
    #2  0x0000000000515528 in vhost_user_read_cb (connfd=46, dat=0x10c47f0, remove=0xffffbb3cd064) at /data1/dpdk-19.11/lib/librte_vhost/socket.c:306
    #3  0x0000000000512640 in fdset_event_dispatch (arg=0xe04568 <vhost_user+8192>) at /data1/dpdk-19.11/lib/librte_vhost/fd_man.c:286
    #4  0x00000000005b024c in rte_thread_init (arg=0x10c3b10) at /data1/dpdk-19.11/lib/librte_eal/common/eal_common_thread.c:165
    #5  0x0000ffffbe617d38 in start_thread (arg=0xffffbb3cd910) at pthread_create.c:309
    #6  0x0000ffffbe55f5f0 in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:91
    (gdb) c
    Continuing.
    VHOST_CONFIG: vring kick idx:0 file:53
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
    
    Breakpoint 4, vhost_user_set_vring_call (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1563
    1563            struct virtio_net *dev = *pdev;
    (gdb) c
    Continuing.
    VHOST_CONFIG: vring call idx:0 file:55
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR
    VHOST_CONFIG: reallocate vq from 0 to 3 node
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
    
    Breakpoint 3, vhost_user_set_vring_kick (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1795
    1795            struct virtio_net *dev = *pdev;
    (gdb) c
    Continuing.
    VHOST_CONFIG: vring kick idx:1 file:50
    VHOST_CONFIG: virtio is now ready for processing.
    VHOST_DATA: (0) device has been added to data core 0
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
    
    Breakpoint 4, vhost_user_set_vring_call (pdev=0xffffbb3ccfa8, msg=0xffffbb3ccd00, main_fd=46) at /data1/dpdk-19.11/lib/librte_vhost/vhost_user.c:1563
    1563            struct virtio_net *dev = *pdev;
    (gdb) c
    Continuing.
    VHOST_CONFIG: vring call idx:1 file:56
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
    VHOST_CONFIG: set queue enable: 1 to qp idx: 0
    VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
    VHOST_CONFIG: set queue enable: 1 to qp idx: 1

     虚拟机绑定 vfio,swtich收到VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE

  • 相关阅读:
    开始逆向objc基础准备(一)简单认识一下arm32,以及与x86汇编指令类比
    构思一个在windows下仿objc基于动画层ui编程的ui引擎
    设计模式学习笔记整理手册
    面向对象的设计原则
    Oracle和Mysql获取uuid的方法对比
    设计模式之解释器模式(行为型)
    设计模式之命令模式(行为型)
    设计模式之中介者模式(行为型)
    设计模式之迭代器模式(行为型)
    Delphi
  • 原文地址:https://www.cnblogs.com/dream397/p/13947392.html
Copyright © 2011-2022 走看看