From: "Zhou, Danny" <danny.zhou@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 1/5] ethdev: add rx interrupt enable/disable functions
Date: Wed, 4 Feb 2015 02:18:19 +0000 [thread overview]
Message-ID: <DFDF335405C17848924A094BC35766CF0AA7D1A1@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20150203154236.4af58a57@urahara>
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, February 04, 2015 7:43 AM
> To: Zhou, Danny
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 1/5] ethdev: add rx interrupt enable/disable functions
>
> 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.
Well, for ixgbe and igb, PMD just sets the specific bit on the interrupt mask
register without checking if it fails or not. But I agree it should allow return
errors. Will provide a fix for both enable and disable functions in v3 patch set.
next prev parent reply other threads:[~2015-02-04 2:18 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
2015-02-04 2:18 ` Zhou, Danny [this message]
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=DFDF335405C17848924A094BC35766CF0AA7D1A1@SHSMSX104.ccr.corp.intel.com \
--to=danny.zhou@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).