From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0D96F5698 for ; Fri, 27 Feb 2015 05:56:58 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 26 Feb 2015 20:56:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,657,1418112000"; d="scan'208";a="672472525" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 26 Feb 2015 20:56:44 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t1R4uhZF008762; Fri, 27 Feb 2015 12:56:43 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t1R4ue4J010233; Fri, 27 Feb 2015 12:56:42 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t1R4uef3010229; Fri, 27 Feb 2015 12:56:40 +0800 From: Cunming Liang To: dev@dpdk.org Date: Fri, 27 Feb 2015 12:56:10 +0800 Message-Id: <1425012976-10173-3-git-send-email-cunming.liang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1425012976-10173-1-git-send-email-cunming.liang@intel.com> References: <1424710542-14637-1-git-send-email-danny.zhou@intel.com> <1425012976-10173-1-git-send-email-cunming.liang@intel.com> Subject: [dpdk-dev] [PATCH v6 2/8] eal/linux: add rx queue interrupt FDs to intr handle struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2015 04:56:59 -0000 Per vector event fd will store in rte_intr_handle during init. Device drivers take responsibility to fill queue-vec mapping table(vec_num[]). Signed-off-by: Danny Zhou Signed-off-by: Cunming Liang --- v6 changes: - add mapping table between irq vector number and queue id. v5 changes: - Create this new patch file for changed struct rte_intr_handle that other patches depend on, to avoid breaking git bisect. lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h index 6a159c7..9f45377 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h @@ -38,6 +38,9 @@ #ifndef _RTE_LINUXAPP_INTERRUPTS_H_ #define _RTE_LINUXAPP_INTERRUPTS_H_ +#define VFIO_MAX_RXTX_INTR_ID 32 +#define VFIO_MAX_QUEUE_ID VFIO_MAX_RXTX_INTR_ID + enum rte_intr_handle_type { RTE_INTR_HANDLE_UNKNOWN = 0, RTE_INTR_HANDLE_UIO, /**< uio device handle */ @@ -48,6 +51,9 @@ enum rte_intr_handle_type { RTE_INTR_HANDLE_MAX }; +#define RTE_INTR_EVENT_ADD 1UL +#define RTE_INTR_EVENT_DEL 2UL + /** Handle for interrupts. */ struct rte_intr_handle { union { @@ -57,6 +63,9 @@ struct rte_intr_handle { }; int fd; /**< interrupt event file descriptor */ enum rte_intr_handle_type type; /**< handle type */ + int max_intr; /**< max interrupt requested */ + int efds[VFIO_MAX_RXTX_INTR_ID]; /**< rxtx intr event fd for vfio */ + uint32_t vec_num[VFIO_MAX_QUEUE_ID]; /**< rxtx intr vector number */ }; #endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */ -- 1.8.1.4