DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [RFC] hot plug failure handle mechanism
@ 2018-05-24  6:55 Guo, Jia
  2018-05-24 14:57 ` Matan Azrad
  2018-05-29 11:20 ` Bruce Richardson
  0 siblings, 2 replies; 10+ messages in thread
From: Guo, Jia @ 2018-05-24  6:55 UTC (permalink / raw)
  To: dev
  Cc: Ananyev, Konstantin, stephen, Richardson, Bruce, Yigit, Ferruh,
	gaetan.rivet, Wu, Jingjing, thomas, motih, matan, Van Haaren,
	Harry, Zhang, Qi Z, Zhang, Helin, jblunck, shreyansh.jain, Guo,
	Jia

As we know, hot plug is an importance feature whenever it use for the datacenter device's
fail-safe and consumption management , or use for the dynamic deployment  and SRIOV
Live Migration in SDN/NFV, it could be bring the higher flexibility and continuality of the
networking services in multiple use case in industry.

So let we see, dpdk as an importance networking combine framework with packet control
path/fast path lib and multiple diversity PMD drivers, what can it do to help if application want
to achieve their hot plug solution when they are working in packet processing by dpdk.

We already have a general device event mechanism, failsafe driver, bonding driver and hot plug/unplug
api in framework, app could use these api to develop functional, but for the case of hot plug failure handle,
that is removing a device at run-time will cause app trigger MMIO error and crash out, it is lack of a mechanism
to handle the failure when hot unplug device. At present, kernel only guantiy the hotplug handle safer on the
kernel side, but for the user mode side, no more specific 3rd tools such as udev/driverctl have especially
cover about these part of mechanism, and considerate feasibility of the implementation, runtime performance and
the general for almost user mode PMD driver, here a general hot plug failure handle mechanism in dpdk framework
would be proposed.

The hot plug failure handle mechanism should be come across as bellow:

1.      Add a new bus ops "handle_hot-unplug"in bus to handle bus read/write error, it is bus-specific and each

kind of bus can implement its own logic.

2.      Implement pci bus specific ops"pci_handle_hot_unplug", in the function, base on the

failure address to remap memory which belong to the corresponding device that unplugged.

3.      Implement a new sigbus handler, and register it when start device event monitoring,

once the MMIO sigbus error exposure, it will trigger the above hot plug failure handle mechanism,

that will keep app, that working on packet processing, would not be broken and crash, then could

keep going clean, fail-safe or other working task.

4.      Also also will introduce the solution by use testpmd to show the example of the whole procedure like that:

device unplug ->failure handle->stop forwarding->stop port->close port->detach port.

Best regards,

Jeff Guo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-15  8:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-24  6:55 [dpdk-dev] [RFC] hot plug failure handle mechanism Guo, Jia
2018-05-24 14:57 ` Matan Azrad
2018-05-25  7:49   ` Guo, Jia
2018-05-29 11:20 ` Bruce Richardson
2018-06-04  1:56   ` Guo, Jia
2018-06-06 12:54     ` Bruce Richardson
2018-06-06 13:11       ` Ananyev, Konstantin
2018-06-07  2:14       ` Guo, Jia
2018-06-14 21:37         ` Thomas Monjalon
2018-06-15  8:31           ` Guo, Jia

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).