DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: cumming.lian@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/5] ethdev: check for rxq interrupt support
Date: Mon, 18 May 2015 10:40:10 -0700	[thread overview]
Message-ID: <1431970814-25951-2-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1431970814-25951-1-git-send-email-stephen@networkplumber.org>

Not all devices support rxq interrupt yet.
It is better to check for interrupt support in driver at configuration
time than waiting for later failures.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_ether/rte_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index cb586ff..ad15837 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1183,6 +1183,14 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 	}
 
 	/*
+	 * If Receive Queue interrupt is enabled, check that
+	 * the device supports interrupt control.
+	 */
+	if (dev_conf->intr_conf.rxq == 1)
+		FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable,
+				    -EINVAL);
+
+	/*
 	 * If jumbo frames are enabled, check that the maximum RX packet
 	 * length is supported by the configured device.
 	 */
-- 
2.1.4

  reply	other threads:[~2015-05-18 17:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 17:40 [dpdk-dev] [PATCH 0/5] receive IRQ related patches Stephen Hemminger
2015-05-18 17:40 ` Stephen Hemminger [this message]
2015-05-18 17:40 ` [dpdk-dev] [PATCH 2/5] ethdev: remove unnecessary checks Stephen Hemminger
2015-05-18 17:40 ` [dpdk-dev] [PATCH 3/5] ethdev: fix errors if RTE_ETHDEV_DEBUG enabled Stephen Hemminger
2015-05-18 17:40 ` [dpdk-dev] [PATCH 4/5] uio: new driver with MSI-X support Stephen Hemminger
2015-05-25  6:01   ` Liang, Cunming
2015-05-25 17:41     ` Stephen Hemminger
2015-05-18 17:40 ` [dpdk-dev] [PATCH 5/5] uio: integrate " Stephen Hemminger
2015-05-25  8:55   ` Liang, Cunming
2015-05-25 17:42     ` Stephen Hemminger
2015-07-09  0:28 ` [dpdk-dev] [PATCH 0/5] receive IRQ related patches 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=1431970814-25951-2-git-send-email-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=cumming.lian@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).