[dpdk-stable] patch 'net/virtio: fix MSI-X for modern devices' has been queued to LTS release 16.11.2

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue May 2 11:32:10 CEST 2017


Hi,

FYI, your patch has been queued to LTS release 16.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 05/07/17.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From 23275b326c9ea9b1044125b9469f1dc19c4f7c36 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan at intel.com>
Date: Thu, 27 Apr 2017 07:35:36 +0000
Subject: [PATCH] net/virtio: fix MSI-X for modern devices

[ upstream commit 554b6d3ef90d2c65a11523e72d768945baeebd41 ]

The field, use_msix, in struct virtio_hw is not updated for modern
device, and is always zero. And now we depend on the status feature
and MSI-X to report LSC support (which is also not a correct
behavior). As a result, LSC is always disabled for modern devices.

To fix this, we just recognize MSI-X capability when going through
capability list, and update the info in virtio.

Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")

Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
 drivers/net/virtio/virtio_pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index f49a123..f6d697f 100644
--- 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_CAP_ID_MSIX		0x11
 
 /*
  * The remaining space is defined by each driver as the per-driver
@@ -670,6 +671,9 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
 			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",
-- 
1.9.0



More information about the stable mailing list