DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Guo, Jia" <jia.guo@intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"gaetan.rivet@6wind.com" <gaetan.rivet@6wind.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"motih@mellanox.com" <motih@mellanox.com>,
	"Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: "jblunck@infradead.org" <jblunck@infradead.org>,
	"shreyansh.jain@nxp.com" <shreyansh.jain@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Zhang, Helin" <helin.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH V18 1/5] bus: introduce device hot unplug handle
Date: Fri, 6 Apr 2018 18:54:28 +0800	[thread overview]
Message-ID: <6f629d49-a085-e0de-d030-ef173d14bdab@intel.com> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E36514C8368@SHSMSX103.ccr.corp.intel.com>

thanks.


On 4/4/2018 12:31 PM, Tan, Jianfeng wrote:
>
>> -----Original Message-----
>> From: Guo, Jia
>> Sent: Wednesday, April 4, 2018 2:17 AM
>> To: stephen@networkplumber.org; Richardson, Bruce; Yigit, Ferruh;
>> Ananyev, Konstantin; gaetan.rivet@6wind.com; Wu, Jingjing;
>> thomas@monjalon.net; motih@mellanox.com; Van Haaren, Harry; Tan,
>> Jianfeng
>> Cc: jblunck@infradead.org; shreyansh.jain@nxp.com; dev@dpdk.org; Guo,
>> Jia; Zhang, Helin
>> Subject: [PATCH V18 1/5] bus: introduce device hot unplug handle
>>
>> As of device hot unplug, we need some preparatory measures so that we will
>> not encounter memory fault after device have been plug out of the system,
>> and also let we could recover the running data path but not been break.
>> This allows the buses to handle device hot unplug event.
>> In the following patch, will show how to handle the case for pci bus.
> Squeeze this patch with the next one.
>
>> Signed-off-by: Jeff Guo <jia.guo@intel.com>
>> ---
>> v16->v15:
>> split patch, and remove the ops from RTE_VERIFY
>> ---
>>   lib/librte_eal/common/include/rte_bus.h | 15 +++++++++++++++
>>   1 file changed, 15 insertions(+)
>>
>> diff --git a/lib/librte_eal/common/include/rte_bus.h
>> b/lib/librte_eal/common/include/rte_bus.h
>> index 6fb0834..ecd8b1c 100644
>> --- a/lib/librte_eal/common/include/rte_bus.h
>> +++ b/lib/librte_eal/common/include/rte_bus.h
>> @@ -168,6 +168,19 @@ typedef int (*rte_bus_unplug_t)(struct rte_device
>> *dev);
>>   typedef int (*rte_bus_parse_t)(const char *name, void *addr);
>>
>>   /**
>> + * Implementation specific hot unplug handler function which is responsible
>> + * for handle the failure when hot unplug the device, guaranty the system
>> + * would not crash in the case.
>> + * @param dev
>> + *	Pointer of the device structure.
>> + *
>> + * @return
>> + *	0 on success.
>> + *	!0 on error.
>> + */
>> +typedef int (*rte_bus_handle_hot_unplug_t)(struct rte_device *dev);
>> +
>> +/**
>>    * Bus scan policies
>>    */
>>   enum rte_bus_scan_mode {
>> @@ -209,6 +222,8 @@ struct rte_bus {
>>   	rte_bus_plug_t plug;         /**< Probe single device for drivers */
>>   	rte_bus_unplug_t unplug;     /**< Remove single device from driver
>> */
>>   	rte_bus_parse_t parse;       /**< Parse a device name */
>> +	rte_bus_handle_hot_unplug_t handle_hot_unplug; /**< handle when device
>> +							hot unplug */
> May be just rte_bus_hot_unplug_t hot_unplug /**< Handle hot unplug device event */
>
>>   	struct rte_bus_conf conf;    /**< Bus configuration */
>>   	rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu
>> class */
>>   };
>> --
>> 2.7.4

  reply	other threads:[~2018-04-06 10:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 18:17 [dpdk-dev] [PATCH V18 0/5] add hot plug failure and auto bind handler Jeff Guo
2018-04-03 18:17 ` [dpdk-dev] [PATCH V18 1/5] bus: introduce device hot unplug handle Jeff Guo
2018-04-04  4:31   ` Tan, Jianfeng
2018-04-06 10:54     ` Guo, Jia [this message]
2018-04-03 18:17 ` [dpdk-dev] [PATCH V18 2/5] bus/pci: implement handle hot unplug operation Jeff Guo
2018-04-04  5:25   ` Tan, Jianfeng
2018-04-06 10:57     ` Guo, Jia
2018-04-03 18:17 ` [dpdk-dev] [PATCH V18 3/5] eal: add failure handler mechanism for hot plug Jeff Guo
2018-04-04  2:58   ` Zhang, Qi Z
2018-04-06 10:53     ` Guo, Jia
2018-04-03 18:17 ` [dpdk-dev] [PATCH V18 4/5] eal: add driver auto bind for hot insertion Jeff Guo
2018-04-03 18:17 ` [dpdk-dev] [PATCH V18 5/5] app/testpmd: use auto handle for hotplug Jeff Guo
2018-04-06 10:56   ` [dpdk-dev] [PATCH V19 0/4] add hot plug failure and auto bind handler Jeff Guo
2018-04-06 10:56     ` [dpdk-dev] [PATCH V19 1/4] bus/pci: introduce device hot unplug handle Jeff Guo
2018-04-09 17:47       ` Ananyev, Konstantin
2018-04-11 11:37         ` Guo, Jia
2018-04-06 10:56     ` [dpdk-dev] [PATCH V19 2/4] eal: add failure handler mechanism for hot plug Jeff Guo
2018-04-06 14:03       ` Zhang, Qi Z
2018-04-06 14:24         ` Zhang, Qi Z
2018-04-11 11:50           ` Guo, Jia
2018-04-11 11:49         ` Guo, Jia
2018-04-09 17:42       ` Ananyev, Konstantin
2018-04-11 11:34         ` Guo, Jia
2018-04-06 10:56     ` [dpdk-dev] [PATCH V19 3/4] eal: add driver auto bind for hot insertion Jeff Guo
2018-04-06 10:56     ` [dpdk-dev] [PATCH V19 4/4] app/testpmd: use auto handle for hotplug Jeff Guo
2018-04-12  5:31       ` Matan Azrad
2018-04-13 10:48         ` Guo, Jia
2018-04-13 14:58           ` Matan Azrad

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=6f629d49-a085-e0de-d030-ef173d14bdab@intel.com \
    --to=jia.guo@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=harry.van.haaren@intel.com \
    --cc=helin.zhang@intel.com \
    --cc=jblunck@infradead.org \
    --cc=jianfeng.tan@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=motih@mellanox.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).