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 A59C22B88 for ; Thu, 23 Feb 2017 06:21:42 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2017 21:21:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,197,1484035200"; d="scan'208";a="1114466600" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.129.189]) by fmsmga001.fm.intel.com with ESMTP; 22 Feb 2017 21:21:39 -0800 From: Qi Zhang To: thomas.monjalon@6wind.com Cc: dev@dpdk.org, Qi Zhang Date: Wed, 22 Feb 2017 17:17:00 -0500 Message-Id: <1487801822-30938-1-git-send-email-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/2] eal: clean up interrupt handle 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: Thu, 23 Feb 2017 05:21:43 -0000 In an interrupt callback function, the paramter intr_handle which is registered at rte_intr_callback_register call is passed back. It is supposed to feed rte_intr_enable, but it is not gareenteed to contain paramters as required, since it is a copy of rte_ethdev->intr_handle, if some field need to be updated (like max_intr) driver need to unregister and register the callback function again. So is it necessary to pass back a copy of intr_handle? why don't use rte_ethdev->intr_handle directly to feed rte_intr_enable? if look at the prototpye of rte_intr_callback_fn, void* cb_arg can be used to pass anything by the driver and the typical way is to pass a rte_ethdev(or any embedded bus dev) instance (actually, almost all driver implemented this already), and use this instance to get the right intr_handle. One of the patch clean up this and the other update the test code to sync with the interface change. Qi Zhang (2): eal: improve interrupt handle test: update test code for interrupt callback change app/test/test_interrupts.c | 23 +++++++-------- drivers/net/bnxt/bnxt_irq.c | 3 +- drivers/net/e1000/em_ethdev.c | 8 ++---- drivers/net/e1000/igb_ethdev.c | 15 ++++------ drivers/net/enic/enic_main.c | 3 +- drivers/net/fm10k/fm10k_ethdev.c | 12 +++----- drivers/net/i40e/i40e_ethdev.c | 8 ++---- drivers/net/i40e/i40e_ethdev_vf.c | 5 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++----- drivers/net/nfp/nfp_net.c | 6 ++-- drivers/net/qede/qede_ethdev.c | 4 +-- drivers/net/sfc/sfc_intr.c | 10 ++++--- drivers/net/virtio/virtio_ethdev.c | 5 ++-- lib/librte_eal/common/include/rte_interrupts.h | 3 +- lib/librte_eal/linuxapp/eal/eal_alarm.c | 5 ++-- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 39 ++++---------------------- 16 files changed, 57 insertions(+), 106 deletions(-) -- 2.7.4