Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-06 Thread Tan, Jianfeng
> No, it is in vdev_scan. > Look carefully the patch, especially after @@. I overlooked. Sorry about that. I don't have further comments. Please send v2 according to your own comments and document update. Thanks, Jianfeng

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-06 Thread Thomas Monjalon
06/12/2017 03:52, Tan, Jianfeng: > On 12/1/2017 8:36 AM, Thomas Monjalon wrote: > > +int > > +rte_vdev_add_custom_scan(rte_vdev_scan_callback callback, void *user_arg) > > +{ > > + struct vdev_custom_scan *custom_scan; > > + > > + rte_spinlock_lock(&vdev_custom_scan_lock); > > + > > + /* chec

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-05 Thread Tan, Jianfeng
On 12/1/2017 8:36 AM, Thomas Monjalon wrote: The scan callback allows to spawn a vdev automatically given some custom scan rules. It is especially useful to create a TAP device automatically connected to a netdevice as remote. Signed-off-by: Thomas Monjalon --- warning: to be tested --- dri

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-05 Thread Tan, Jianfeng
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Tuesday, December 5, 2017 11:21 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org > Subject: Re: [PATCH] bus/vdev: add custom scan hook > > 05/12/2017 14:56, Tan, Jianfeng: > > > > On 12/5/2017 4:41 PM, Thomas Monjalon wrote: > > > > > > 05/12/2

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-05 Thread Thomas Monjalon
05/12/2017 14:56, Tan, Jianfeng: > > On 12/5/2017 4:41 PM, Thomas Monjalon wrote: > > > > 05/12/2017 09:27, Tan, Jianfeng: > > > > > > > > > > On 12/4/2017 5:31 PM, Thomas Monjalon wrote: > > > > > > > > > > > > The hook is in bus->scan(). > > > > > > I think we should launch a bus scan when there

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-05 Thread Tan, Jianfeng
On 12/5/2017 4:41 PM, Thomas Monjalon wrote: 05/12/2017 09:27, Tan, Jianfeng: > > On 12/4/2017 5:31 PM, Thomas Monjalon wrote: > > > > The hook is in bus->scan(). > > I think we should launch a bus scan when there is a new device event. > > That's what I'm trying to say. We finally need

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-05 Thread Thomas Monjalon
05/12/2017 09:27, Tan, Jianfeng: > > On 12/4/2017 5:31 PM, Thomas Monjalon wrote: > > > > The hook is in bus->scan(). > > I think we should launch a bus scan when there is a new device event. > > That's what I'm trying to say. We finally need to execute a handler as > of a device event to finish

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-05 Thread Tan, Jianfeng
On 12/4/2017 5:31 PM, Thomas Monjalon wrote: The hook is in bus->scan(). I think we should launch a bus scan when there is a new device event. That's what I'm trying to say. We finally need to execute a handler as of a device event to finish the job. Then why not just keep the vdev plug i

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-04 Thread Thomas Monjalon
04/12/2017 09:08, Tan, Jianfeng: > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > > Hi, > > > > 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 ca

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-04 Thread Tan, Jianfeng
> -Original Message- > From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Friday, December 1, 2017 4:42 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org > Subject: Re: [PATCH] bus/vdev: add custom scan hook > > Hi, > > 01/12/2017 06:48, Tan, Jianfeng: > > Hi Thomas, > > > > Please help

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-12-01 Thread Thomas Monjalon
Hi, 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

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-11-30 Thread 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 application

Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-11-30 Thread Thomas Monjalon
01/12/2017 01:36, Thomas Monjalon: > The scan callback allows to spawn a vdev automatically > given some custom scan rules. > It is especially useful to create a TAP device automatically > connected to a netdevice as remote. > > Signed-off-by: Thomas Monjalon > --- > warning: to be tested > --- >

[dpdk-dev] [PATCH] bus/vdev: add custom scan hook

2017-11-30 Thread Thomas Monjalon
The scan callback allows to spawn a vdev automatically given some custom scan rules. It is especially useful to create a TAP device automatically connected to a netdevice as remote. Signed-off-by: Thomas Monjalon --- warning: to be tested --- drivers/bus/vdev/rte_bus_vdev.h | 29