diff options
author | Gabriel Ganne <gabriel.ganne@enea.com> | 2017-11-28 09:55:07 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-11-28 12:27:10 +0000 |
commit | af6f93a4eb4740ac13b1d65eb44da442976fa809 (patch) | |
tree | 077b333085a8b6ee26cfabd444a458ee847d44ff /src/vlib/pci | |
parent | 430ac939d115b59e3f7f704645c6f88878223e1b (diff) |
net/virtio: support modern device id
Add legacy and modern macros to pci_config header.
This follows dpdk commit: 4c7903658f6b5a8f4901224ef405445541b91e4a
And PCI Device Conformance doc :
docs.oasis-open.org/virtio/virtio/v1.0/cs02/virtio-v1.0-cs02.html#x1-640001
Change-Id: Iacd40ea8c06f220736ca0bc7ce68bcf1e55b68f6
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Diffstat (limited to 'src/vlib/pci')
-rw-r--r-- | src/vlib/pci/pci_config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vlib/pci/pci_config.h b/src/vlib/pci/pci_config.h index 92e56af6d57..df82e1ab444 100644 --- a/src/vlib/pci/pci_config.h +++ b/src/vlib/pci/pci_config.h @@ -162,6 +162,13 @@ pci_device_class_base (pci_device_class_t c) } /* + * 0x1000 is the legacy device-id value + * 0x1041 is (0x1040 + 1), 1 being the Virtio Device ID + */ +#define VIRTIO_PCI_LEGACY_DEVICEID_NET 0x1000 +#define VIRTIO_PCI_MODERN_DEVICEID_NET 0x1041 + +/* * Under PCI, each device has 256 bytes of configuration address space, * of which the first 64 bytes are standardized as follows: */ |