Hi 

Best,
Ori
> -----Original Message-----
> From: Jerin Jacob <jerinjac...@gmail.com>
> Sent: Monday, April 6, 2020 4:39 PM
> To: Thomas Monjalon <tho...@monjalon.net>
> Cc: Ori Kam <or...@mellanox.com>; Jerin Jacob Kollanukkaran
> <jer...@marvell.com>; xiang.w.w...@intel.com; Pavan Nikhilesh Bhagavatula
> <pbhagavat...@marvell.com>; dev@dpdk.org; Shahaf Shuler
> <shah...@mellanox.com>; hemant.agra...@nxp.com; Opher Reviv
> <op...@mellanox.com>; Alex Rosenbaum <al...@mellanox.com>; Dovrat
> Zifroni <dov...@marvell.com>; Prasun Kapoor <pkap...@marvell.com>;
> nipun.gu...@nxp.com; bruce.richard...@intel.com; yang.a.h...@intel.com;
> harry.ch...@intel.com; gu.ji...@zte.com.cn; shanjia...@chinatelecom.cn;
> zhangy....@chinatelecom.cn; lixin...@huachentel.com; wush...@inspur.com;
> yuying...@yxlink.com; fanchengg...@sunyainfo.com;
> davidf...@tencent.com; liuzho...@chinaunicom.cn;
> zhaoyon...@huawei.com; o...@yunify.com; j...@netgate.com;
> hongjun...@intel.com; j.bromh...@titan-ic.com; d...@ntop.org;
> f...@napatech.com; arthur...@lionic.com; Parav Pandit <pa...@mellanox.com>
> Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core
> functions
> 
> On Mon, Apr 6, 2020 at 7:00 PM Thomas Monjalon <tho...@monjalon.net>
> wrote:
> >
> > 06/04/2020 14:48, Pavan Nikhilesh Bhagavatula:
> > > > From: Pavan Nikhilesh Bhagavatula
> > > >> >> From: Pavan Nikhilesh Bhagavatula
> > > >> >>
> > > >> >> Looks like this implementation is incomplete?
> > > >> >> I don't see any pmd specific helper functions for @see
> > > >> >rte_cryptodev_pmd.c,
> > > >> >> rte_eventdev_pmd*
> > > >> >>
> > > >> >I think the current implementation includes all needed functions,
> > > >> >at least for the first stage.
> > > >> >You can find in rte_regexdev_driver.h the functions that should be
> > > >> >called
> > > >> >by the PMD. We have the register / unregister which acts the same
> > > >as
> > > >> >create
> > > >> >and destroy. For parsing argument the PMD may call
> > > >rte_kvargs_parse.
> > > >> >
> > > >>
> > > >> _driver.h should atleast include
> > > >> rte_regex_dev_pci_generic_probe/rte_regex_pmd_vdev_init
> > > >> else there would be a lot of code repetition and possibly udefined
> > > >behavior
> > > >> at the driver layer.
> > > >>
> > > >Why should they be included? At least in this stage, there is no code to
> > > >share
> > > >ethdev why should we add code for the vdev?
> > >
> > > Ok I think I failed to communicate my concerns across.
> > > Let me retry
> > >
> > > 1. SW based regex devices such as PCRE/Hyperscan rely on vdev framework
> > > i.e. user needs to pass an EAL argument --vdev="regex_pcre" for the driver
> to
> > > initialize all the other EAL subsystems (ethdev, eventdev, cryptodev,
> etc..)support this.
> >
> > vdev helpers do not have to be part of the first patches which define API.
> > It should be added when adding the first vdev driver.
> 
> Yes. When we add vdev, we should not rewrite again to support vdev.
> So care must taken for proper implementation in the first place avoid rework.
> 
> If it abstracts it properly adding vdev and PCI is a simple change.
> See
> 
> lib/librte_eventdev/rte_eventdev_pmd_vdev.h
> lib/librte_eventdev/rte_eventdev_pmd_pci.h
> 
> I think, the common code should take from other matured subsystem instead if
> writing from scratch,
> 
I agree with you about the rewrite, but this is why I don't want to add this 
code
until I know what this code should do and how it should be used.
I  don't agree, that one subsystem is like other one by default, and that if 
something
is done for one subsystem it should be done for other.
Not always what was done before is the best.

Some time back there was a long thread about ethdev and the rte device
where should it be released and by whom. 
My basic thinking is that unless proven otherwise the code should be in the PMD
this is also why it is important for me to get this rte level API acked.
when starting to implement the code for the PMD it will be cleared what 
is the shared code and how it is best to configure the system.
Also this is not external API so it can be changed at any time. 
Saying that I don't think we should wait long before adding such code.
I think that when we will have our first PMD we know better if such 
function is needed.
Also think about that maybe this PMD will be shared with the 
net PMD so such function will also introduce more complexity.

> 
> >
> > > 2. HW based independent regex devices that are exposed as PCI devices
> would need
> > >  pci probe helpers.
> >
> > Same, PCI helpers can be added while adding the first PCI driver.
> >
> > We can synchronize about how to split the work, avoiding two developers
> > doing the same thing. But let's not mandate this work to be done
> > as part of this first series.
> >
> >
> >

Reply via email to