Skip to contentSkip to conversation

pmd: Fix pci_id match

PATCH In review Asias He 2 participants 2 messages Jan 4, 2014 – Jan 6, 2014 1 message not in the archive

lore
Share & tools
lore

Asias He

author
#0 lore raw

PATCH 1/1 pmd: Fix pci_id match

Hex numbers in /proc/ioports are lowercase. we should make it lowercase in pci_id as well. Otherwise devices like:

00:0a.0 Ethernet controller: Red Hat, Inc Virtio network device

would not be handled by virtio-net-pmd.

---
 virtio_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
virtio_user.c +1 -1
index 68a7bec..04dd9ac 100644
@@ -1385,7 +1385,7 @@ eth_virtio_dev_init(struct eth_driver *eth_drv, struct rte_eth_dev *eth_dev)
 
 	priv->pci_addr = eth_dev->pci_dev->addr;
 
-	snprintf(pci_id, sizeof(pci_id), "%04X:%02X:%02X.%d",
+	snprintf(pci_id, sizeof(pci_id), "%04x:%02x:%02x.%d",
 		 eth_dev->pci_dev->addr.domain,
 		 eth_dev->pci_dev->addr.bus,
 		 eth_dev->pci_dev->addr.devid,
Signature · 1 line
1.8.5.1
#2 lore raw
In reply to a message not in the archive

Hello Asias,

04/01/2014 07:07, Asias He :

Quoted 8 lines

Hex numbers in /proc/ioports are lowercase. we should make it lowercase in pci_id as well. Otherwise devices like:

00:0a.0 Ethernet controller: Red Hat, Inc Virtio network device

would not be handled by virtio-net-pmd.

Good catch !

I have acked and applied it with this title:
pmd: fix PCI id match when probing

I think we should distinguish such patch for an extension from other ones. I suggest using --subject-prefix 'virtio-net-pmd PATCH'

Thank you

Signature · 1 line
Thomas