DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: return err for too many interrupt queues
@ 2016-03-28  0:39 Wang Xiao W
  2016-03-28  1:25 ` Lu, Wenzhuo
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Xiao W @ 2016-03-28  0:39 UTC (permalink / raw)
  To: wenzhuo.lu; +Cc: dev, Wang Xiao W

The lower 16 bits of EICR register are used for queue interrupts,
dpdk framework take over the first bit for other interrupts like
LSC, so there're only 15 bits left for queue interrupts mapping.
This patch adds a check for the num of interrupt queues at
dev_start.

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 5812d10..8961454 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2131,6 +2131,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	     !RTE_ETH_DEV_SRIOV(dev).active) &&
 	    dev->data->dev_conf.intr_conf.rxq != 0) {
 		intr_vector = dev->data->nb_rx_queues;
+		if (intr_vector > IXGBE_MAX_INTR_QUEUE_NUM) {
+			PMD_INIT_LOG(ERR, "At most %d intr queues supported",
+					IXGBE_MAX_INTR_QUEUE_NUM);
+			return -ENOTSUP;
+		}
 		if (rte_intr_efd_enable(intr_handle, intr_vector))
 			return -1;
 	}
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index a7b1eb5..4ff6338 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -59,6 +59,7 @@
 #define IXGBE_VFTA_SIZE 128
 #define IXGBE_VLAN_TAG_SIZE 4
 #define IXGBE_MAX_RX_QUEUE_NUM	128
+#define IXGBE_MAX_INTR_QUEUE_NUM	15
 #define IXGBE_VMDQ_DCB_NB_QUEUES     IXGBE_MAX_RX_QUEUE_NUM
 #define IXGBE_DCB_NB_QUEUES          IXGBE_MAX_RX_QUEUE_NUM
 #define IXGBE_NONE_MODE_TX_NB_QUEUES 64
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] ixgbe: return err for too many interrupt queues
  2016-03-28  0:39 [dpdk-dev] [PATCH] ixgbe: return err for too many interrupt queues Wang Xiao W
@ 2016-03-28  1:25 ` Lu, Wenzhuo
  2016-03-30 18:02   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Lu, Wenzhuo @ 2016-03-28  1:25 UTC (permalink / raw)
  To: Wang, Xiao W; +Cc: dev

Hi,


> -----Original Message-----
> From: Wang, Xiao W
> Sent: Monday, March 28, 2016 8:40 AM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; Wang, Xiao W
> Subject: [PATCH] ixgbe: return err for too many interrupt queues
> 
> The lower 16 bits of EICR register are used for queue interrupts, dpdk framework
> take over the first bit for other interrupts like LSC, so there're only 15 bits left for
> queue interrupts mapping.
> This patch adds a check for the num of interrupt queues at dev_start.
> 
> Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

* Re: [dpdk-dev] [PATCH] ixgbe: return err for too many interrupt queues
  2016-03-28  1:25 ` Lu, Wenzhuo
@ 2016-03-30 18:02   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-03-30 18:02 UTC (permalink / raw)
  To: Wang, Xiao W; +Cc: dev, Lu, Wenzhuo

> > The lower 16 bits of EICR register are used for queue interrupts, dpdk framework
> > take over the first bit for other interrupts like LSC, so there're only 15 bits left for
> > queue interrupts mapping.
> > This patch adds a check for the num of interrupt queues at dev_start.
> > 
> > Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-03-30 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-28  0:39 [dpdk-dev] [PATCH] ixgbe: return err for too many interrupt queues Wang Xiao W
2016-03-28  1:25 ` Lu, Wenzhuo
2016-03-30 18:02   ` Thomas Monjalon

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