[dpdk-dev] [PATCH v2] net/tap: fix dev name look-up
ferruh.yigit at intel.com
Mon Mar 6 15:27:18 CET 2017
On 3/6/2017 1:51 PM, Pascal Mazon wrote:
> Store the device name in dev->data->name, to have symmetrical behavior
> between rte_pmd_tap_probe(name) and rte_pmd_tap_remove(name).
> The netdevice name (linux interface name) is stored in the name field of
> struct pmd_internals.
+1 for this.
> There's no need to allocate an rte_eth_dev_data, as it is done in
Allocating rte_eth_dev_data, although rte_eth_dev_allocate() does
already, common practice for virtual devices, for a reason.
rte_eth_dev_allocate() allocates device data from a shared memory, so
that multiple DPDK processes can access same device data, this may make
sense for physical devices, since there is a single physical resource.
But for virtual devices, each DPDK process may want to have independent
instance of the virtual device, that is why PMD itself allocates data
and overwrites with existing dev->data.
Also this may lead unexpected results for some multi process use cases,
like secondary process virtual device corrupt primary process physical
I believe it is good to keep this as it is.
> Signed-off-by: Pascal Mazon <pascal.mazon at 6wind.com>
More information about the dev