From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 44164DE0 for ; Fri, 10 Feb 2017 04:04:06 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP; 09 Feb 2017 19:04:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,138,1484035200"; d="scan'208";a="64013241" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.129.189]) by fmsmga006.fm.intel.com with ESMTP; 09 Feb 2017 19:04:05 -0800 From: Qi Zhang To: thomas.monjalon@6wind.com Cc: dev@dpdk.org, jingjing.wu@intel.com, Qi Zhang Date: Thu, 9 Feb 2017 14:59:43 -0500 Message-Id: <1486670383-5286-1-git-send-email-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] eal: fix max number of interrupt request X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 03:04:07 -0000 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 --- 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