From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 041A1728B for ; Wed, 28 Mar 2018 10:15:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 01:15:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,370,1517904000"; d="scan'208";a="41916383" Received: from jguo15x-mobl3.ccr.corp.intel.com (HELO [10.67.68.74]) ([10.67.68.74]) by fmsmga001.fm.intel.com with ESMTP; 28 Mar 2018 01:14:57 -0700 To: "Tan, Jianfeng" , stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net, motih@mellanox.com, harry.van.haaren@intel.com References: <1521610066-12966-3-git-send-email-jia.guo@intel.com> <1522063256-3997-1-git-send-email-jia.guo@intel.com> <1522063256-3997-2-git-send-email-jia.guo@intel.com> Cc: jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com From: "Guo, Jia" Message-ID: <78078df5-f69e-cd2b-67af-4035c490d422@intel.com> Date: Wed, 28 Mar 2018 16:14:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH V16 1/4] eal: add device event handle in interrupt thread 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: Wed, 28 Mar 2018 08:15:01 -0000 jianfeng On 3/27/2018 5:26 PM, Tan, Jianfeng wrote: > Hi, > > > On 3/26/2018 7:20 PM, Jeff Guo wrote: >> Add new interrupt handle type of RTE_INTR_HANDLE_DEV_EVENT, for >> device event interrupt monitor. > > A simple search of RTE_INTR_HANDLE_ALARM, we can see that we still > need to update rte_intr_enable()/rte_intr_disable(), and > test_interrupt_init(). > you are right about that. > Thanks, > Jianfeng > >> >> Signed-off-by: Jeff Guo >> --- >> v16->v15: >> split into small patch base on the function >> --- >> lib/librte_eal/common/include/rte_eal_interrupts.h | 1 + >> lib/librte_eal/linuxapp/eal/eal_interrupts.c | 5 ++++- >> 2 files changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/lib/librte_eal/common/include/rte_eal_interrupts.h >> b/lib/librte_eal/common/include/rte_eal_interrupts.h >> index 3f792a9..6eb4932 100644 >> --- a/lib/librte_eal/common/include/rte_eal_interrupts.h >> +++ b/lib/librte_eal/common/include/rte_eal_interrupts.h >> @@ -34,6 +34,7 @@ enum rte_intr_handle_type { >> RTE_INTR_HANDLE_ALARM, /**< alarm handle */ >> RTE_INTR_HANDLE_EXT, /**< external handler */ >> RTE_INTR_HANDLE_VDEV, /**< virtual device */ >> + RTE_INTR_HANDLE_DEV_EVENT, /**< device event handle */ >> RTE_INTR_HANDLE_MAX /**< count of elements */ >> }; >> diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c >> b/lib/librte_eal/linuxapp/eal/eal_interrupts.c >> index f86f22f..842acaa 100644 >> --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c >> +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c >> @@ -674,7 +674,10 @@ eal_intr_process_interrupts(struct epoll_event >> *events, int nfds) >> bytes_read = 0; >> call = true; >> break; >> - >> + case RTE_INTR_HANDLE_DEV_EVENT: >> + bytes_read = 0; >> + call = true; >> + break; >> default: >> bytes_read = 1; >> break; >