[dpdk-dev] [PATCH] bus/vdev: add custom scan hook
jianfeng.tan at intel.com
Mon Dec 4 09:08:17 CET 2017
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Friday, December 1, 2017 4:42 PM
> To: Tan, Jianfeng
> Cc: dev at dpdk.org
> Subject: Re: [PATCH] bus/vdev: add custom scan hook
> 01/12/2017 06:48, Tan, Jianfeng:
> > Hi Thomas,
> > Please help us to understand why we need this.
> > On 12/1/2017 8:36 AM, Thomas Monjalon wrote:
> > > The scan callback allows to spawn a vdev automatically
> > > given some custom scan rules.
> > These two new APIs (rte_vdev_add_custom_scan and
> > rte_vdev_remove_custom_scan) are called by applications?
> Yes, the application can use it but it can also be used by a DPDK
> driver or library.
> > If so, why not just constructing them in the parameters before passing
> > to rte_eal_init?
> It is not only for initialization because it will also work when
> we will have some hotplug mechanism where the scan is run during run-time.
> > > It is especially useful to create a TAP device automatically
> > > connected to a netdevice as remote.
> > It sounds like an use case. Without this patch, I suppose we can already
> > do this?
> Yes we can already update the devargs list.
> But this hook will help to do it on hotplug events.
Do you mean, we will have the udev monitoring framework, and after monitoring the uevent (hotplug), we want to automatically add a vdev (tap) for that detected physical device which is managed by kernel?
Considering the scan hook is added in bus->parse(), how this can happen automatically?
More information about the dev