From: Yuanhan Liu <yliu@fridaylinux.org>
To: Zhiyong Yang <zhiyong.yang@intel.com>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com, "Tan,
Jianfeng" <jianfeng.tan@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix use_msix get the wrong value
Date: Wed, 1 Nov 2017 23:40:13 +0800 [thread overview]
Message-ID: <20171101154013.GU1545@yliu-home> (raw)
In-Reply-To: <20171031094456.24912-1-zhiyong.yang@intel.com>
On Tue, Oct 31, 2017 at 05:44:56PM +0800, Zhiyong Yang wrote:
> When running l3fwd-power to test virtio rxq interrupt using vfio
> pci noiommu mode, startup fails.
What errors have you met?
> In the function virtio_read_caps,
> the code if (flags & PCI_MSIX_ENABLE) intends to double check
> if vfio msix is enabled or not. However, it is indeed not valid.
> Come back to l3fwd-power, use_msix is not assigned to the right
> value "1". The patch fixes the issue.
Jianfeng, could you review it? You are the last author changed the code.
Will it break your case?
--yliu
> Fixes: cb482cb3a305 ("net/virtio: fix MAC address read")
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
> ---
> drivers/net/virtio/virtio_pci.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
> index 55b717c03..be5b07a58 100644
> --- a/drivers/net/virtio/virtio_pci.c
> +++ b/drivers/net/virtio/virtio_pci.c
> @@ -580,8 +580,6 @@ get_cfg_addr(struct rte_pci_device *dev, struct virtio_pci_cap *cap)
> return base + offset;
> }
>
> -#define PCI_MSIX_ENABLE 0x8000
> -
> static int
> virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
> {
> @@ -609,14 +607,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
> }
>
> if (cap.cap_vndr == PCI_CAP_ID_MSIX) {
> - /* Transitional devices would also have this capability,
> - * that's why we also check if msix is enabled.
> - * 1st byte is cap ID; 2nd byte is the position of next
> - * cap; next two bytes are the flags.
> - */
> - uint16_t flags = ((uint16_t *)&cap)[1];
> -
> - if (flags & PCI_MSIX_ENABLE)
> + if (dev->intr_handle.type == RTE_INTR_HANDLE_VFIO_MSIX)
> hw->use_msix = 1;
> }
>
> --
> 2.13.3
next prev parent reply other threads:[~2017-11-01 15:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 9:44 Zhiyong Yang
2017-11-01 15:40 ` Yuanhan Liu [this message]
2017-11-02 1:46 ` Yang, Zhiyong
2017-11-02 3:36 ` Tan, Jianfeng
2017-11-08 11:03 ` [dpdk-dev] [PATCH v2] net/virtio: fix rxq intr config fails using vfio-pci Zhiyong Yang
2017-11-08 13:52 ` Tan, Jianfeng
2017-11-09 1:28 ` Yang, Zhiyong
2017-11-09 2:11 ` Yang, Zhiyong
2017-11-09 3:31 ` Tan, Jianfeng
2017-11-09 3:18 ` [dpdk-dev] [PATCH v3] " Zhiyong Yang
2017-11-09 3:47 ` Tan, Jianfeng
2017-11-09 4:01 ` Yang, Zhiyong
2017-11-09 4:40 ` Tan, Jianfeng
2017-11-09 4:46 ` [dpdk-dev] [PATCH v4] " Zhiyong Yang
2017-11-09 6:51 ` Tan, Jianfeng
2017-11-09 8:18 ` Maxime Coquelin
2017-11-09 8:55 ` [dpdk-dev] [PATCH v5] " Zhiyong Yang
2017-11-09 9:08 ` Maxime Coquelin
2017-11-09 9:16 ` Yang, Zhiyong
2017-11-09 9:21 ` [dpdk-dev] [PATCH v6] " Zhiyong Yang
2017-11-11 14:34 ` Thomas Monjalon
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=20171101154013.GU1545@yliu-home \
--to=yliu@fridaylinux.org \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=zhiyong.yang@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).