From: Qi Zhang <qi.z.zhang@intel.com>
To: thomas.monjalon@6wind.com
Cc: dev@dpdk.org, jingjing.wu@intel.com, Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [PATCH] eal: fix max number of interrupt request
Date: Thu, 9 Feb 2017 14:59:43 -0500 [thread overview]
Message-ID: <1486670383-5286-1-git-send-email-qi.z.zhang@intel.com> (raw)
The max number of interrupt request is possible
be changed after rte_intr_callback_register, so
in get_max_intr, we need to check if nessesary to
update the max_intr.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index b5b3f2b..92a19cb 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -287,6 +287,8 @@ get_max_intr(const struct rte_intr_handle *intr_handle)
if (src->intr_handle.fd != intr_handle->fd)
continue;
+ if (src->intr_handle.max_intr < intr_handle->max_intr)
+ src->intr_handle.max_intr = intr_handle->max_intr;
if (!src->intr_handle.max_intr)
src->intr_handle.max_intr = 1;
else if (src->intr_handle.max_intr > RTE_MAX_RXTX_INTR_VEC_ID)
--
2.7.4
next reply other threads:[~2017-02-10 3:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 19:59 Qi Zhang [this message]
2017-02-10 10:18 ` Thomas Monjalon
2017-02-13 1:16 ` Zhang, Qi Z
2017-02-13 21:28 ` Thomas Monjalon
2017-02-14 0:13 ` Zhang, Qi Z
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=1486670383-5286-1-git-send-email-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=thomas.monjalon@6wind.com \
/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).