DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: thomas.monjalon@6wind.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [PATCH 0/2] eal: clean up interrupt handle
Date: Wed, 22 Feb 2017 17:17:00 -0500	[thread overview]
Message-ID: <1487801822-30938-1-git-send-email-qi.z.zhang@intel.com> (raw)

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

             reply	other threads:[~2017-02-23  5:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 22:17 Qi Zhang [this message]
2017-02-22 22:17 ` [dpdk-dev] [PATCH 1/2] " Qi Zhang
2017-02-27 16:19   ` Jan Blunck
2017-02-28  1:22     ` Zhang, Qi Z
2017-02-22 22:17 ` [dpdk-dev] [PATCH 2/2] test: update test code Qi Zhang
2017-03-07  9:19 ` [dpdk-dev] [PATCH v2 0/3] clean up interrupt handle Qi Zhang
2017-03-07  9:19   ` [dpdk-dev] [PATCH v2 1/3] vfio: keep interrupt source read only Qi Zhang
2017-03-10 13:05     ` Thomas Monjalon
2017-03-10 13:26     ` Burakov, Anatoly
2017-03-07  9:19   ` [dpdk-dev] [PATCH v2 2/3] eal: clean up interrupt handle Qi Zhang
2017-03-30 16:39     ` Thomas Monjalon
2017-03-31  0:57       ` Zhang, Qi Z
2017-03-07  9:19   ` [dpdk-dev] [PATCH v2 3/3] app/test: update test code Qi Zhang
2017-03-10 13:04     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487801822-30938-1-git-send-email-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).