[dpdk-stable] patch 'net/virtio: disable LSC interrupt if MSIX not enabled' has been queued to LTS release 16.11.2

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Apr 7 10:12:04 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 04/11/17.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From eee42f85b779dfc55352f73f91fc1cde1e6ff132 Mon Sep 17 00:00:00 2001
From: Matt Peters <matt.peters at windriver.com>
Date: Thu, 9 Mar 2017 15:28:02 -0500
Subject: [PATCH] net/virtio: disable LSC interrupt if MSIX not enabled

[ upstream commit a5ed844846aefeefb1df3df15e6588c265452f19 ]

The link state change interrupt can only be configured if the virtio device
supports MSIX.  Prior to this change the writing of the vector to the PCI
config space was causing it to overwrite the initial part of the MAC
address since the MSIX vector is not in the config space and is occupied by
the MAC address.

This has been reproduced in Virtual Box (v5.0.30.r112061) in Windows 7.

Fixes: 954ea11540b6 ("virtio: do not report link state feature unless available")

Signed-off-by: Matt Peters <matt.peters at windriver.com>
Signed-off-by: Allain Legacy <allain.legacy at windriver.com>
---
 drivers/net/virtio/virtio_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f5961ab..ff3f781 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1210,11 +1210,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
-	/* If host does not support status then disable LSC */
-	if (!vtpci_with_feature(hw, VIRTIO_NET_F_STATUS))
-		eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
-	else
+	/* If host does not support both status and MSI-X then disable LSC */
+	if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS) && hw->use_msix)
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
+	else
+		eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
 
 	rx_func_get(eth_dev);
 
-- 
1.9.0



More information about the stable mailing list