DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Zhou Danny <danny.zhou@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/5] ethdev: add rx interrupt enable/disable functions
Date: Tue, 3 Feb 2015 15:42:36 -0800	[thread overview]
Message-ID: <20150203154236.4af58a57@urahara> (raw)
In-Reply-To: <1422951511-28143-2-git-send-email-danny.zhou@intel.com>

On Tue,  3 Feb 2015 16:18:27 +0800
Zhou Danny <danny.zhou@intel.com> wrote:

> +
> +int
> +rte_eth_dev_rx_queue_intr_enable(uint8_t port_id,
> +				uint16_t queue_id)
> +{
> +	struct rte_eth_dev *dev;
> +
> +	if (port_id >= nb_ports) {
> +		PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> +		return (-ENODEV);
> +	}
> +
> +	dev = &rte_eth_devices[port_id];
> +	if (dev == NULL) {
> +		PMD_DEBUG_TRACE("Invalid port device\n");
> +		return (-ENODEV);
> +	}
> +
> +	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, -ENOTSUP);
> +	(*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id);
> +	return 0;

The interrupt setup might fail for device specific reasons.
You should give the device specific function a chance to
return error as well.

  reply	other threads:[~2015-02-03 23:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  8:18 [dpdk-dev] [PATCH v2 0/5] Interrupt mode for PMD Zhou Danny
2015-02-03  8:18 ` [dpdk-dev] [PATCH v2 1/5] ethdev: add rx interrupt enable/disable functions Zhou Danny
2015-02-03 23:42   ` Stephen Hemminger [this message]
2015-02-04  2:18     ` Zhou, Danny
2015-02-03  8:18 ` [dpdk-dev] [PATCH v2 2/5] ixgbe: enable rx queue interrupts for both PF and VF Zhou Danny
2015-02-03  8:18 ` [dpdk-dev] [PATCH v2 3/5] igb: enable rx queue interrupts for PF Zhou Danny
2015-02-12 10:00   ` Liang, Cunming
2015-02-12 10:29     ` Ananyev, Konstantin
2015-02-13  2:48       ` Zhou, Danny
2015-02-13  7:20         ` Zhou, Danny
2015-02-13  9:53           ` Ananyev, Konstantin
2015-02-03  8:18 ` [dpdk-dev] [PATCH v2 4/5] eal: add per rx queue interrupt handling based on VFIO Zhou Danny
2015-02-13  3:48   ` Liang, Cunming
2015-02-17  8:14     ` Zhou, Danny
2015-02-03  8:18 ` [dpdk-dev] [PATCH v2 5/5] l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switch Zhou Danny
2015-02-03 23:40 ` [dpdk-dev] [PATCH v2 0/5] Interrupt mode for PMD Stephen Hemminger
2015-02-04  1:55   ` Zhou, Danny

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=20150203154236.4af58a57@urahara \
    --to=stephen@networkplumber.org \
    --cc=danny.zhou@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).