patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2 1/9] net/virtio: fix rewriting LSC flag
       [not found] ` <1482996643-113253-1-git-send-email-jianfeng.tan@intel.com>
@ 2016-12-29  7:30   ` Jianfeng Tan
  0 siblings, 0 replies; 3+ messages in thread
From: Jianfeng Tan @ 2016-12-29  7:30 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, stephen, Jianfeng Tan, stable

The LSC flag is decided according to if VIRTIO_NET_F_STATUS feature
is negotiated. Copy the PCI info after the judgement will rewrite
the correct result.

Fixes: 198ab33677c9 ("net/virtio: move device initialization in a function")

CC: stable@dpdk.org

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 079fd6c..aaec338 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1204,14 +1204,14 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	if (virtio_negotiate_features(hw, req_features) < 0)
 		return -1;
 
+	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
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	rx_func_get(eth_dev);
 
 	/* Setting up rx_header size for the device */
-- 
2.7.4

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

* [dpdk-stable] [PATCH v3 01/10] net/virtio: fix rewriting LSC flag
       [not found] ` <1484578022-92705-1-git-send-email-jianfeng.tan@intel.com>
@ 2017-01-16 14:46   ` Jianfeng Tan
  0 siblings, 0 replies; 3+ messages in thread
From: Jianfeng Tan @ 2017-01-16 14:46 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, stephen, lei.a.yao, Jianfeng Tan, stable

The LSC flag is decided according to if VIRTIO_NET_F_STATUS feature
is negotiated. Copy the PCI info after the judgement will rewrite
the correct result.

Fixes: 198ab33677c9 ("net/virtio: move device initialization in a function")

CC: stable@dpdk.org

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f596f4d..837d3df 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1208,17 +1208,17 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	if (virtio_negotiate_features(hw, req_features) < 0)
 		return -1;
 
+	if (eth_dev->device) {
+		pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
+		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
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 
-	if (eth_dev->device) {
-		pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
-		rte_eth_copy_pci_info(eth_dev, pci_dev);
-	}
-
 	rx_func_get(eth_dev);
 
 	/* Setting up rx_header size for the device */
-- 
2.7.4

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

* [dpdk-stable] [PATCH v4 01/10] net/virtio: fix rewriting LSC flag
       [not found] ` <1484637030-106261-1-git-send-email-jianfeng.tan@intel.com>
@ 2017-01-17  7:10   ` Jianfeng Tan
  0 siblings, 0 replies; 3+ messages in thread
From: Jianfeng Tan @ 2017-01-17  7:10 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, stephen, lei.a.yao, Jianfeng Tan, stable

The LSC flag is decided according to if VIRTIO_NET_F_STATUS feature
is negotiated. Copy the PCI info after the judgement will rewrite
the correct result.

Fixes: 198ab33677c9 ("net/virtio: move device initialization in a function")

CC: stable@dpdk.org

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f596f4d..837d3df 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1208,17 +1208,17 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	if (virtio_negotiate_features(hw, req_features) < 0)
 		return -1;
 
+	if (eth_dev->device) {
+		pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
+		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
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 
-	if (eth_dev->device) {
-		pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
-		rte_eth_copy_pci_info(eth_dev, pci_dev);
-	}
-
 	rx_func_get(eth_dev);
 
 	/* Setting up rx_header size for the device */
-- 
2.7.4

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

end of thread, other threads:[~2017-01-17  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1480810702-114815-1-git-send-email-jianfeng.tan@intel.com>
     [not found] ` <1482996643-113253-1-git-send-email-jianfeng.tan@intel.com>
2016-12-29  7:30   ` [dpdk-stable] [PATCH v2 1/9] net/virtio: fix rewriting LSC flag Jianfeng Tan
     [not found] ` <1484578022-92705-1-git-send-email-jianfeng.tan@intel.com>
2017-01-16 14:46   ` [dpdk-stable] [PATCH v3 01/10] " Jianfeng Tan
     [not found] ` <1484637030-106261-1-git-send-email-jianfeng.tan@intel.com>
2017-01-17  7:10   ` [dpdk-stable] [PATCH v4 " Jianfeng Tan

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).