From: Stephen Hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
To: Zhou Danny <danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On Tue, 3 Feb 2015 16:18:27 +0800
Zhou Danny <danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 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.
next prev parent 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 [PATCH v2 0/5] Interrupt mode for PMD Zhou Danny
[not found] ` <1422951511-28143-1-git-send-email-danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-03 8:18 ` [PATCH v2 1/5] ethdev: add rx interrupt enable/disable functions Zhou Danny
[not found] ` <1422951511-28143-2-git-send-email-danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-03 23:42 ` Stephen Hemminger [this message]
2015-02-04 2:18 ` Zhou, Danny
2015-02-03 8:18 ` [PATCH v2 2/5] ixgbe: enable rx queue interrupts for both PF and VF Zhou Danny
2015-02-03 8:18 ` [PATCH v2 3/5] igb: enable rx queue interrupts for PF Zhou Danny
[not found] ` <1422951511-28143-4-git-send-email-danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-12 10:00 ` Liang, Cunming
[not found] ` <D0158A423229094DA7ABF71CF2FA0DA3118D9469-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-12 10:29 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB977258213E52E4-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-13 2:48 ` Zhou, Danny
[not found] ` <DFDF335405C17848924A094BC35766CF0AA95887-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-13 7:20 ` Zhou, Danny
[not found] ` <DFDF335405C17848924A094BC35766CF0AA96019-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-13 9:53 ` Ananyev, Konstantin
2015-02-03 8:18 ` [PATCH v2 4/5] eal: add per rx queue interrupt handling based on VFIO Zhou Danny
[not found] ` <1422951511-28143-5-git-send-email-danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-13 3:48 ` Liang, Cunming
[not found] ` <D0158A423229094DA7ABF71CF2FA0DA3118D9994-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-17 8:14 ` Zhou, Danny
2015-02-03 8:18 ` [PATCH v2 5/5] l3fwd-power: enable one-shot rx interrupt and polling/interrupt mode switch Zhou Danny
2015-02-03 23:40 ` [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-otpzqlsittunbdjkjebofr2eb7je58tq@public.gmane.org \
--cc=danny.zhou-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.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).