net/tap: fix dev name look-up
authorPascal Mazon <pascal.mazon@6wind.com>
Mon, 6 Mar 2017 15:13:08 +0000 (16:13 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:52 +0000 (15:52 +0200)
commit66db3932dd3ffa1af8924f1d1e4f3fe687b61761
tree61b2f0c569c2767bd92fe62db0166e798f29a9a4
parent676d11ffb24e8e567f2680a0804209a6c2beec5e
net/tap: fix dev name look-up

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.

snprintf(data->name) has been moved closer to the rte_ethdev_allocate()
as it should use the same name.

Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c