[dpdk-dev,v2,4/4] net/avf: fix VF RX queue interrupt enabling

Message ID 1516781813-50818-5-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Wenzhuo Lu Jan. 24, 2018, 8:16 a.m. UTC
  As UIO doesn't support multiple interrupt, and the interrupt
is occupied by the control plane. PMD should not try to enable
RX queue interrupt. Then APP can know the RX queue interrupt
is not enabled and only choose the polling mode.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/avf/avf_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit Jan. 25, 2018, 4:39 p.m. UTC | #1
On 1/24/2018 8:16 AM, Wenzhuo Lu wrote:
> As UIO doesn't support multiple interrupt, and the interrupt
> is occupied by the control plane. PMD should not try to enable
> RX queue interrupt. Then APP can know the RX queue interrupt
> is not enabled and only choose the polling mode.
> 
> Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied to dpdk-next-net/master, thanks.

(only this patch applied, other patches in the set are still waiting.

normally we don't split patchsets, but for this release avf is going into
next-net and reset are into Helin's tree next-net-intel. After this release avf
also will be part of next-net-intel.)
  

Patch

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index b36d317..2bd5170 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -292,7 +292,8 @@  static int avf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 	uint16_t interval, i;
 	int vec;
 
-	if (dev->data->dev_conf.intr_conf.rxq != 0) {
+	if (rte_intr_cap_multiple(intr_handle) &&
+	    dev->data->dev_conf.intr_conf.rxq) {
 		if (rte_intr_efd_enable(intr_handle, dev->data->nb_rx_queues))
 			return -1;
 	}
@@ -308,7 +309,8 @@  static int avf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 		}
 	}
 
-	if (!dev->data->dev_conf.intr_conf.rxq) {
+	if (!dev->data->dev_conf.intr_conf.rxq ||
+	    !rte_intr_dp_is_en(intr_handle)) {
 		/* Rx interrupt disabled, Map interrupt only for writeback */
 		vf->nb_msix = 1;
 		if (vf->vf_res->vf_cap_flags &