[dpdk-dev] Question regarding PMDs

Stephen Hemminger stephen at networkplumber.org
Wed Jul 31 23:35:18 CEST 2013


On Wed, 31 Jul 2013 14:23:40 -0700
Patrick Mahan <mahan at mahan.org> wrote:

> Okay, I wadding into the process of writing a poll-mode driver for DPDK. 
> 
> First question, is the use of the UIO device a requirement (outside of the need for interrupt support) since it is possible to map the PCI bars via /dev/mem?

Not really, the 6wind virtio driver doesn't bother (because it uses I/O ports).
But if you want link state interrupt then you need UIO support.
Plus if you use UIO, then there is protection against overlapping usage between
user mode and kernel drivers which matters especially if doing blacklisting.

The whole memory mapping approach in DPDK needs to be hardened with something
stronger like using the IOMMU. Recent kernels support something called VFIO
which could be used. This is a base PCI level change, not a something each driver
should have to worry about.

  http://lwn.net/Articles/474088/


> 
> Second question, is it expected that the NIC hardware would already have been initialized by the kernel driver for that device? Say to load microcode on an intelligent NIC?

If you need firmware then yes, the linux firmware loader is a lot easier
than doing it yourself. I wouldn't assume more than that.


More information about the dev mailing list