[dpdk-dev] virtio: rte_ethdev port_ids consumed by rte_eal_init()

Dennis Montgomery dmontgomery at 128technology.com
Thu Apr 12 20:30:19 CEST 2018


Hi,

I've run into a problem with DPDK v17.08, when built with
CONFIG_RTE_LIBRTE_VIRTIO_PMD=y.  After rte_eal_init() calls rte_bus_probe()
we end up with the first several entries (matching the number of virtio-pci
eth devices on the system) in rte_eth_devices[] showing state ==
RTE_ETH_DEV_ATTACHED.  Subsequently when we try to allocate a new device
(via rte_eth_dev_attach()), rte_eth_dev_find_free_port() returns a nonzero
number the for the first device we really want to use.  The device
functions properly so this isn't too much of a problem, but effectively it
limits the number of virtio eth devices to be half of RTE_MAX_ETHPORTS.

I'd greatly appreciate some guidance on how to work around this - i.e.
whether it's fixed in a newer release or if the structures filled in by
rte_bus_probe() can be started without attaching, or whatever.

Thanks in advance,

Dennis Montgomery


More information about the dev mailing list