DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Question about virtio-net device on google cloud engine
@ 2021-08-30 13:49 William Tu
  0 siblings, 0 replies; only message in thread
From: William Tu @ 2021-08-30 13:49 UTC (permalink / raw)
  To: dpdk-dev; +Cc: Maxime Coquelin

Hi,

I'm testing DPDK on virtio device using a Linux VM (ubuntu 21.04) from
google cloud. But I couldn't get it to work. I wonder
1. Is "no modern virtio pci device found." expected?
2. Should I use vfio-pci, instead uio_pci_generic?
3. maybe on the public cloud, promiscuous mode is not allowed?
   so "virtio_dev_promiscuous_enable(): host does not support rx control"

Below are my steps, thanks in advance:
$ clone the latest dpdk, commit bfd3c352eb9
$modprobe uio_pci_generic
$ ./usertools/dpdk-devbind.py -u 00:05.0
$ ./usertools/dpdk-devbind.py -b uio_pci_generic 00:05.0
$ ./usertools/dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:00:05.0 'Virtio network device 1000' drv=uio_pci_generic unused=vfio-pci
...
$ dpdk-hugepages.py --setup 1G
$ meson build; ninja -C build
$ ./build/app/dpdk-testpmd
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available 1048576 kB hugepages reported
EAL: VFIO support initialized
EAL: PCI device 0000:00:05.0 on NUMA socket -1
EAL:   probe driver: 1af4:1000 net_virtio
EAL: Probe PCI driver: net_virtio (1af4:1000) device: 0000:00:05.0 (socket 0)
EAL:   PCI memory mapped at 0x1100800000
virtio_read_caps(): [80] skipping non VNDR cap id: 11
virtio_read_caps(): no modern virtio pci device found.
vtpci_init(): trying with legacy virtio pci.
EAL: pci_uio_ioport_map(): PIO BAR 0000c000 detected
EAL: PCI Port IO found start=0xc000
virtio_ethdev_negotiate_features(): guest_features before negotiate =
8000005f10ef8028
virtio_ethdev_negotiate_features(): host_features before negotiate = 204399a7
virtio_ethdev_negotiate_features(): features after negotiate = 438020
virtio_init_device(): PORT MAC: 42:01:0A:01:01:05
virtio_init_device(): link speed = -1, duplex = 1
virtio_init_device(): config->max_virtqueue_pairs=1
virtio_init_device(): config->status=1
virtio_init_device(): PORT MAC: 42:01:0A:01:01:05
virtio_init_queue(): setting up queue: 0 on NUMA node 0
virtio_init_queue(): vq_size: 4096
virtio_init_queue(): vring_size: 110596, rounded_vring_size: 114688
virtio_init_queue(): vq->vq_ring_mem:      0x1b3b84000
virtio_init_queue(): vq->vq_ring_virt_mem: 0x100384000
virtio_init_vring():  >>
virtio_init_queue(): setting up queue: 1 on NUMA node 0
virtio_init_queue(): vq_size: 4096
virtio_init_queue(): vring_size: 110596, rounded_vring_size: 114688
virtio_init_queue(): vq->vq_ring_mem:      0x1b3b4f000
virtio_init_queue(): vq->vq_ring_virt_mem: 0x10034f000
virtio_init_vring():  >>
virtio_init_queue(): setting up queue: 2 on NUMA node 0
virtio_init_queue(): vq_size: 64
virtio_init_queue(): vring_size: 4612, rounded_vring_size: 8192
virtio_init_queue(): vq->vq_ring_mem:      0x1b3abc000
virtio_init_queue(): vq->vq_ring_virt_mem: 0x1002bc000
virtio_init_vring():  >>
eth_virtio_pci_init(): port 0 vendorID=0x1af4 deviceID=0x1000
...
virtio_dev_configure(): configure
virtio_dev_tx_queue_setup():  >>
virtio_dev_rx_queue_setup():  >>
virtio_dev_rx_queue_setup_finish():  >>
virtio_dev_rx_queue_setup_finish(): Allocated 512 bufs
virtio_dev_tx_queue_setup_finish():  >>
virtio_dev_start(): nb_queues=1
virtio_dev_start(): Notified backend at initialization
set_rxtx_funcs(): virtio: using standard Tx path on port 0
set_rxtx_funcs(): virtio: using mergeable buffer Rx path on port 0
virtio_dev_link_update(): Get link status from hw
virtio_dev_link_update(): Port 0 is up
virtio_dev_promiscuous_disable(): host does not support rx control
virtio_dev_allmulticast_disable(): host does not support rx control
Configuring Port 0 (socket 0)
Port 0: 42:01:0A:01:01:05
Checking link statuses...
virtio_dev_promiscuous_enable(): host does not support rx control
Error during enabling promiscuous mode for port 0: Operation not
supported - ignore

---
lspci -vv
00:05.0 Ethernet controller [0200]: Red Hat, Inc. Virtio network
device [1af4:1000]
Subsystem: Red Hat, Inc. Virtio network device [1af4:0001]
Physical Slot: 5
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV+ VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx+
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at c000 [size=64]
Region 1: Memory at c0002000 (32-bit, non-prefetchable) [size=64]
Capabilities: [80] MSI-X: Enable- Count=3 Masked-
Vector table: BAR=1 offset=00000008
PBA: BAR=1 offset=00000000
Kernel driver in use: uio_pci_generic

lspci -xx
00:05.0 Ethernet controller [0200]: Red Hat, Inc. Virtio network
device [1af4:1000]
00: f4 1a 00 10 13 04 18 00 00 00 00 02 00 00 00 00
10: 01 c0 00 00 00 20 00 c0 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 f4 1a 01 00
30: 00 00 00 00 80 00 00 00 00 00 00 00 0a 01 00 00
... all zero
80: 11 00 02 00 09 00 00 00 01 00 00 00 00 00 00 00

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-30 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 13:49 [dpdk-dev] Question about virtio-net device on google cloud engine William Tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).