From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 366805A8C for ; Fri, 17 Jul 2015 08:16:30 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 16 Jul 2015 23:16:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,493,1432623600"; d="scan'208";a="730568418" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 16 Jul 2015 23:16:28 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t6H6GPMR014991; Fri, 17 Jul 2015 14:16:25 +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 t6H6GMqt032257; Fri, 17 Jul 2015 14:16:24 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t6H6GMiY032253; Fri, 17 Jul 2015 14:16:22 +0800 From: Cunming Liang To: dev@dpdk.org, thomas.monjalon@6wind.com, david.marchand@6wind.com Date: Fri, 17 Jul 2015 14:16:03 +0800 Message-Id: <1437113775-32199-2-git-send-email-cunming.liang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1437113775-32199-1-git-send-email-cunming.liang@intel.com> References: <1434686442-578-1-git-send-email-cunming.liang@intel.com> <1437113775-32199-1-git-send-email-cunming.liang@intel.com> Cc: shemming@brocade.com Subject: [dpdk-dev] [PATCH v14 01/13] eal/linux: add interrupt vectors support in intr_handle 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, 17 Jul 2015 06:16:30 -0000 The patch adds interrupt vectors support in rte_intr_handle. 'vec_en' is set when interrupt vectors are detected and associated event fds are set. Those event fds are stored in efds[]. 'intr_vec' is reserved for device driver to initialize the vector mapping table. Signed-off-by: Danny Zhou Signed-off-by: Cunming Liang --- v14 changes - per-patch basis ABI compatibility rework v7 changes: - add eptrs[], it's used to store the register rte_epoll_event instances. - add vec_en, to log the vector capability status. 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. .../linuxapp/eal/include/exec-env/rte_interrupts.h | 13 +++++++++++++ 1 file changed, 13 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 bdeb3fc..12b33c9 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,8 @@ #ifndef _RTE_LINUXAPP_INTERRUPTS_H_ #define _RTE_LINUXAPP_INTERRUPTS_H_ +#define RTE_MAX_RXTX_INTR_VEC_ID 32 + enum rte_intr_handle_type { RTE_INTR_HANDLE_UNKNOWN = 0, RTE_INTR_HANDLE_UIO, /**< uio device handle */ @@ -58,6 +60,17 @@ struct rte_intr_handle { }; int fd; /**< interrupt event file descriptor */ enum rte_intr_handle_type type; /**< handle type */ +#ifdef RTE_NEXT_ABI + /** + * RTE_NEXT_ABI will be removed from v2.2. + * It's only used to avoid ABI(unannounced) broken in v2.1. + * Make sure being aware of the impact before turning on the feature. + */ + uint32_t max_intr; /**< max interrupt requested */ + uint32_t nb_efd; /**< number of available efd(event fd) */ + int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping */ + int *intr_vec; /**< intr vector number array */ +#endif }; #endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */ -- 1.8.1.4