From: Qi Zhang <qi.z.zhang@intel.com>
To: thomas@monjalon.net, konstantin.ananyev@intel.com,
declan.doherty@intel.com, ferruh.yigit@intel.com
Cc: dev@dpdk.org, benjamin.h.shelton@intel.com,
narender.vangati@intel.com, beilei.xing@intel.com,
wenzhuo.lu@intel.com, Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [RFC v2 0/2] ethdev: claim device reset as async
Date: Mon, 10 Sep 2018 21:46:33 +0800 [thread overview]
Message-ID: <20180910134633.6087-1-qi.z.zhang@intel.com> (raw)
Device reset may have the dependency, for example, a VF reset expects
PF ready, or a NIC function as a part of a SOC need to wait for other
parts of the system be ready, these are time-consuming tasks and will
block current thread.
So we claimed rte_eth_dev_reset as an async API, that makes things
easy for an application that what to reset the device from the interrupt
thread since typically a RTE_ETH_EVENT_INTR_RESET handler is invoked
in interrupt thread.
rte_eth_dev_reset will spawn a new thread to call ops->dev_reset, once
it is finished, it will raise the RTE_ETH_EVENT_RESET_COMPLETE event to
notify the application.
Application should not assume device reset is finished after
rte_eth_dev_reset return, it should always wait for a
RTE_ETH_EVENT_RESET_COMPLETE event and check the reset result.
v2:
- rte_eth_dev_reset will spawn a thread.
Qi Zhang (2):
ethdev: claim device reset as async
testpmd: enable async device reset
app/test-pmd/testpmd.c | 50 +++++++++++++++++++++++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.c | 48 ++++++++++++++++++++++++++++++++++++++--
lib/librte_ethdev/rte_ethdev.h | 48 ++++++++++++++++++++++++----------------
3 files changed, 124 insertions(+), 22 deletions(-)
--
2.13.6
next reply other threads:[~2018-09-10 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 13:46 Qi Zhang [this message]
2018-09-10 13:51 Qi Zhang
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=20180910134633.6087-1-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=benjamin.h.shelton@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=narender.vangati@intel.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@intel.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).