Skip to contentSkip to conversation

net/virtio: add missing driver name

PATCH Applied David Marchand 3 participants 3 messages Oct 7, 2016 – Oct 9, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/virtio: add missing driver name

The driver name has been lost with the eal rework. Restore it.

Fixes c830cb295411 ("drivers: use PCI registration macro")
---
 drivers/net/virtio/virtio_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/virtio/virtio_ethdev.c +3 -0
index b4dfc0a..809ebf7 100644
@@ -1304,6 +1304,9 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
 
 static struct eth_driver rte_virtio_pmd = {
 	.pci_drv = {
+		.driver = {
+			.name = "net_virtio",
+		},
 		.id_table = pci_id_virtio_map,
 		.drv_flags = RTE_PCI_DRV_DETACHABLE,
 		.probe = rte_eth_dev_pci_probe,
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · David Marchand

The driver name has been lost with the eal rework. Restore it.

Fixes c830cb295411 ("drivers: use PCI registration macro")
---
 drivers/net/virtio/virtio_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/virtio/virtio_ethdev.c +0 -0
index b4dfc0a..809ebf7 100644

drivers/net/virtio/virtio_ethdev.c eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev) · line 1312

Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +3 -0
@@ -1304,6 +1304,9 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
 
 static struct eth_driver rte_virtio_pmd = {
 	.pci_drv = {
+		.driver = {
+			.name = "net_virtio",
+		},
 		.id_table = pci_id_virtio_map,
 		.drv_flags = RTE_PCI_DRV_DETACHABLE,
 		.probe = rte_eth_dev_pci_probe,

Indeed. For MLX4/5 and Virtio, DRIVER_REGISTER_* is not being used which takes this 'name'. In this case, it was missed.

Applied
#2 lore raw
Quoted 30 lines · Shreyansh Jain
Quoted 16 lines · David Marchand

The driver name has been lost with the eal rework. Restore it.

Fixes c830cb295411 ("drivers: use PCI registration macro")

---
drivers/net/virtio/virtio_ethdev.c | 3 +++

1 file changed, 3 insertions(+)
drivers/net/virtio/virtio_ethdev.c +0 -0
index b4dfc0a..809ebf7 100644

drivers/net/virtio/virtio_ethdev.c eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev) · line 1312

Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +3 -0
@@ -1304,6 +1304,9 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
 
 static struct eth_driver rte_virtio_pmd = {
 	.pci_drv = {
+		.driver = {
+			.name = "net_virtio",
+		},
 		.id_table = pci_id_virtio_map,
 		.drv_flags = RTE_PCI_DRV_DETACHABLE,
 		.probe = rte_eth_dev_pci_probe,

Indeed. For MLX4/5 and Virtio, DRIVER_REGISTER_* is not being used which takes this 'name'. In this case, it was missed.

Quoted 1 line

Applied to dpdk-next-virtio.

Thanks.

	--yliu