DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/virtio: support modern device id
@ 2016-09-02  6:36 Jason Wang
  2016-09-02  6:37 ` [dpdk-dev] [PATCH 2/2] virtio: support IOMMU platform Jason Wang
  2016-09-02 12:57 ` [dpdk-dev] [PATCH 1/2] net/virtio: support modern device id Thomas Monjalon
  0 siblings, 2 replies; 18+ messages in thread
From: Jason Wang @ 2016-09-02  6:36 UTC (permalink / raw)
  To: dev; +Cc: huawei.xie, yuanhan.liu, mst, Jason Wang

Spec said "The PCI Device ID is calculated by adding 0x1040 to the
Virtio Device ID". So this patch makes pmd can recognize modern virtio
net id.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 1 +
 drivers/net/virtio/virtio_pci.h    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 07d6449..f48e037 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -104,6 +104,7 @@ static int virtio_dev_queue_stats_mapping_set(
  */
 static const struct rte_pci_id pci_id_virtio_map[] = {
 	{ RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) },
+	{ RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_MODERN_DEVICEID_NET) },
 	{ .vendor_id = 0, /* sentinel */ },
 };
 
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index dd7693f..d3bdfa0 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -46,6 +46,7 @@ struct virtnet_ctl;
 #define VIRTIO_PCI_VENDORID     0x1AF4
 #define VIRTIO_PCI_DEVICEID_MIN 0x1000
 #define VIRTIO_PCI_DEVICEID_MAX 0x103F
+#define VIRTIO_PCI_MODERN_DEVICEID_NET 0x1041
 
 /* VirtIO ABI version, this must match exactly. */
 #define VIRTIO_PCI_ABI_VERSION 0
-- 
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-09-08  5:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02  6:36 [dpdk-dev] [PATCH 1/2] net/virtio: support modern device id Jason Wang
2016-09-02  6:37 ` [dpdk-dev] [PATCH 2/2] virtio: support IOMMU platform Jason Wang
2016-09-02 13:04   ` Thomas Monjalon
2016-09-02 17:26     ` Michael S. Tsirkin
2016-09-04  8:08       ` Alejandro Lucero
2016-09-05  6:31         ` Jason Wang
2016-09-05  6:31           ` Jason Wang
2016-09-05  6:31           ` Jason Wang
2016-09-05  5:15     ` Jason Wang
2016-09-05  6:25     ` Jason Wang
2016-09-05  6:25       ` Jason Wang
2016-09-05  6:25       ` Jason Wang
     [not found]   ` <20160905071626.GM30752@yliu-dev.sh.intel.com>
2016-09-06  7:46     ` Yuanhan Liu
2016-09-07  4:53       ` Jason Wang
2016-09-02 12:57 ` [dpdk-dev] [PATCH 1/2] net/virtio: support modern device id Thomas Monjalon
2016-09-05  6:36   ` Jason Wang
2016-09-05  6:36     ` Jason Wang
2016-09-05  6:36     ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).