Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Imported Upstream version 16.11.2
[deb_dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_pci.c
diff --git
a/drivers/net/virtio/virtio_pci.c
b/drivers/net/virtio/virtio_pci.c
index
8d5355c
..
f6d697f
100644
(file)
--- a/
drivers/net/virtio/virtio_pci.c
+++ b/
drivers/net/virtio/virtio_pci.c
@@
-48,6
+48,7
@@
*/
#define PCI_CAPABILITY_LIST 0x34
#define PCI_CAP_ID_VNDR 0x09
*/
#define PCI_CAPABILITY_LIST 0x34
#define PCI_CAP_ID_VNDR 0x09
+#define PCI_CAP_ID_MSIX 0x11
/*
* The remaining space is defined by each driver as the per-driver
/*
* The remaining space is defined by each driver as the per-driver
@@
-517,7
+518,7
@@
modern_del_queue(struct virtio_hw *hw, struct virtqueue *vq)
static void
modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue *vq)
{
static void
modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue *vq)
{
- io_write16(
1
, vq->notify_addr);
+ io_write16(
vq->vq_queue_index
, vq->notify_addr);
}
const struct virtio_pci_ops modern_ops = {
}
const struct virtio_pci_ops modern_ops = {
@@
-670,6
+671,9
@@
virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
break;
}
break;
}
+ if (cap.cap_vndr == PCI_CAP_ID_MSIX)
+ hw->use_msix = 1;
+
if (cap.cap_vndr != PCI_CAP_ID_VNDR) {
PMD_INIT_LOG(DEBUG,
"[%2x] skipping non VNDR cap id: %02x",
if (cap.cap_vndr != PCI_CAP_ID_VNDR) {
PMD_INIT_LOG(DEBUG,
"[%2x] skipping non VNDR cap id: %02x",