[0/2] Enable eal event hotplug for i40e
mbox series

Message ID 1530787185-5915-1-git-send-email-jia.guo@intel.com
Headers show
Series
  • Enable eal event hotplug for i40e
Related show

Message

Jeff Guo July 5, 2018, 10:39 a.m. UTC
As we may know, we have eal event for rte device hotplug and ethdev event
for ethdev hotplug. Some ethdev need to use eal event to detect hotplug
behaviors, the privors way is register eal event callback in app, but
seems that it will have some race between these 2 event process. In oder
to fix the problem, it might be better to find a way to combind these 2
events detect.

This patch set introduce a way to combind these 2 event, by register the
eal event callback in pmd driver and trigger the ethdev hotplug event in
the callback. That will let the ethdev device can easy process hotplug by a
common way.

Here let i40 pmd driver for example, other driver which support hotplug
feature could be use this way to enable hotplug.

Jeff Guo (2):
  net/i40e: enable hotplug in i40e
  testpmd: remove the dev event callback register

 app/test-pmd/testpmd.c         | 76 ------------------------------------------
 drivers/net/i40e/i40e_ethdev.c | 46 ++++++++++++++++++++++++-
 2 files changed, 45 insertions(+), 77 deletions(-)

Comments

Jeff Guo July 11, 2018, 11:58 a.m. UTC | #1
As we may know, we have eal event for rte device hotplug and ethdev event
for ethdev hotplug. Some ethdev need to use eal event to detect hotplug
behaviors, the privors way is register eal event callback in app, but seems
that it will have some race between these 2 event processes. In oder to fix
the it, it might be better to find a way to combind these 2 events detect.

This patch set introduce a way to combind these 2 event, by register the
ethdev eal event callback in ether dev and trigger the ethdev hotplug event
in the callback. That will let the ethdev device can easy process hotplug
by a common way.

Here let i40e/ixgbe pmd driver for example, other driver which support
hotplug feature could be use this way to detect and process hotplug.

patch history:
v5->v4:
refine some code style and typo

v4->v3:
change to use device event handler install api

v3->v2:
remove the callback from driver to ethdev for common.

v2->v1:
add ixgbe hotplug detect case.
refine some doc.

Jeff Guo (4):
  ethdev: Add eal device event callback
  net/ixgbe: install ethdev hotplug handler in ixgbe
  net/i40e: install hotplug handler in i40e
  testpmd: remove the dev event callback register

 app/test-pmd/testpmd.c                   | 76 --------------------------------
 doc/guides/rel_notes/release_18_08.rst   | 12 +++++
 drivers/net/i40e/i40e_ethdev.c           |  8 +++-
 drivers/net/ixgbe/ixgbe_ethdev.c         |  8 +++-
 lib/librte_ethdev/rte_ethdev.c           | 59 +++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev_driver.h    | 32 ++++++++++++++
 lib/librte_ethdev/rte_ethdev_version.map |  2 +
 7 files changed, 119 insertions(+), 78 deletions(-)