DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nikhil Rao <nikhil.rao@intel.com>
To: anatoly.burakov@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] vfio: Fix vfio disable INTx
Date: Wed, 29 Mar 2017 05:24:07 +0530	[thread overview]
Message-ID: <1490745247-32001-1-git-send-email-nikhil.rao@intel.com> (raw)
In-Reply-To: <1490742934-30608-1-git-send-email-nikhil.rao@intel.com>

The flags member of irq_set should be ORed with VFIO_IRQ_SET_ACTION_MASK
and not VFIO_IRQ_SET_ACTION_UNMASK. The bug was found by code inspection.

Fixes: 5c782b3928b8 (\"vfio: interrupts\")

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
Changes since v1:
* Better summary
* Fix error message

 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 5bb833e..029a147 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -194,14 +194,14 @@ vfio_disable_intx(const struct rte_intr_handle *intr_handle) {
 	irq_set = (struct vfio_irq_set *) irq_set_buf;
 	irq_set->argsz = len;
 	irq_set->count = 1;
-	irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK;
+	irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK;
 	irq_set->index = VFIO_PCI_INTX_IRQ_INDEX;
 	irq_set->start = 0;
 
 	ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
 
 	if (ret) {
-		RTE_LOG(ERR, EAL, "Error unmasking INTx interrupts for fd %d\n",
+		RTE_LOG(ERR, EAL, "Error masking INTx interrupts for fd %d\n",
 						intr_handle->fd);
 		return -1;
 	}
-- 
2.7.4

  reply	other threads:[~2017-03-28 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 23:15 [dpdk-dev] [PATCH] vfio: Fix vfio ioctl call to mask INTx Nikhil Rao
2017-03-28 23:54 ` Nikhil Rao [this message]
2017-03-28 15:28   ` [dpdk-dev] [PATCH v2] vfio: Fix vfio disable INTx Burakov, Anatoly
2017-03-30 15:00     ` 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=1490745247-32001-1-git-send-email-nikhil.rao@intel.com \
    --to=nikhil.rao@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    /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).