From: Jianfeng Tan <jianfeng.tan@intel.com>
To: dev@dpdk.org
Cc: yuanhan.liu@linux.intel.com, stephen@networkplumber.org,
lei.a.yao@intel.com, Jianfeng Tan <jianfeng.tan@intel.com>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH v4 01/10] net/virtio: fix rewriting LSC flag
Date: Tue, 17 Jan 2017 07:10:21 +0000 [thread overview]
Message-ID: <1484637030-106261-2-git-send-email-jianfeng.tan@intel.com> (raw)
In-Reply-To: <1484637030-106261-1-git-send-email-jianfeng.tan@intel.com>
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
prev parent reply other threads:[~2017-01-17 7:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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] " 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 ` Jianfeng Tan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484637030-106261-2-git-send-email-jianfeng.tan@intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--cc=lei.a.yao@intel.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=yuanhan.liu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).