[dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core functions

Ori Kam orika at mellanox.com
Wed Apr 22 23:36:19 CEST 2020


Hi Guy,


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Guy Kaneti
> Sent: Sunday, April 19, 2020 1:39 PM
> To: Ori Kam <orika at mellanox.com>; Thomas Monjalon
> <thomas at monjalon.net>; Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> xiang.w.wang at intel.com; Pavan Nikhilesh Bhagavatula
> <pbhagavatula at marvell.com>
> Cc: dev at dpdk.org; Shahaf Shuler <shahafs at mellanox.com>;
> hemant.agrawal at nxp.com; Opher Reviv <opher at mellanox.com>; Alex
> Rosenbaum <alexr at mellanox.com>; Dovrat Zifroni <dovrat at marvell.com>;
> Prasun Kapoor <pkapoor at marvell.com>; nipun.gupta at nxp.com;
> bruce.richardson at intel.com; yang.a.hong at intel.com; harry.chang at intel.com;
> gu.jian1 at zte.com.cn; shanjiangh at chinatelecom.cn;
> zhangy.yun at chinatelecom.cn; lixingfu at huachentel.com; wushuai at inspur.com;
> yuyingxia at yxlink.com; fanchenggang at sunyainfo.com;
> davidfgao at tencent.com; liuzhong1 at chinaunicom.cn;
> zhaoyong11 at huawei.com; oc at yunify.com; jim at netgate.com;
> hongjun.ni at intel.com; j.bromhead at titan-ic.com; deri at ntop.org;
> fc at napatech.com; arthur.su at lionic.com; Parav Pandit <parav at mellanox.com>
> Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core
> functions
> 
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces at dpdk.org> On Behalf Of Ori Kam
> > Sent: Wednesday, April 08, 2020 11:40 AM
> > To: Thomas Monjalon <thomas at monjalon.net>; Jerin Jacob Kollanukkaran
> > <jerinj at marvell.com>; xiang.w.wang at intel.com; Pavan Nikhilesh
> > Bhagavatula <pbhagavatula at marvell.com>
> > Cc: dev at dpdk.org; Shahaf Shuler <shahafs at mellanox.com>;
> > hemant.agrawal at nxp.com; Opher Reviv <opher at mellanox.com>; Alex
> > Rosenbaum <alexr at mellanox.com>; Dovrat Zifroni <dovrat at marvell.com>;
> > Prasun Kapoor <pkapoor at marvell.com>; nipun.gupta at nxp.com;
> > bruce.richardson at intel.com; yang.a.hong at intel.com;
> > harry.chang at intel.com; gu.jian1 at zte.com.cn; shanjiangh at chinatelecom.cn;
> > zhangy.yun at chinatelecom.cn; lixingfu at huachentel.com;
> > wushuai at inspur.com; yuyingxia at yxlink.com;
> > fanchenggang at sunyainfo.com; davidfgao at tencent.com;
> > liuzhong1 at chinaunicom.cn; zhaoyong11 at huawei.com; oc at yunify.com;
> > jim at netgate.com; hongjun.ni at intel.com; j.bromhead at titan-ic.com;
> > deri at ntop.org; fc at napatech.com; arthur.su at lionic.com; Parav Pandit
> > <parav at mellanox.com>
> > Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core
> > functions
> >
> >
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces at dpdk.org> On Behalf Of Thomas Monjalon
> > > Sent: Monday, April 6, 2020 4:30 PM
> > > To: Ori Kam <orika at mellanox.com>; Jerin Jacob Kollanukkaran
> > > <jerinj at marvell.com>; xiang.w.wang at intel.com; Pavan Nikhilesh
> > > Bhagavatula <pbhagavatula at marvell.com>
> > > Cc: dev at dpdk.org; Shahaf Shuler <shahafs at mellanox.com>;
> > > hemant.agrawal at nxp.com; Opher Reviv <opher at mellanox.com>; Alex
> > > Rosenbaum <alexr at mellanox.com>; Dovrat Zifroni
> > <dovrat at marvell.com>;
> > > Prasun Kapoor <pkapoor at marvell.com>; nipun.gupta at nxp.com;
> > > bruce.richardson at intel.com; yang.a.hong at intel.com;
> > > harry.chang at intel.com; gu.jian1 at zte.com.cn;
> > > shanjiangh at chinatelecom.cn; zhangy.yun at chinatelecom.cn;
> > > lixingfu at huachentel.com; wushuai at inspur.com; yuyingxia at yxlink.com;
> > > fanchenggang at sunyainfo.com; davidfgao at tencent.com;
> > > liuzhong1 at chinaunicom.cn; zhaoyong11 at huawei.com; oc at yunify.com;
> > > jim at netgate.com; hongjun.ni at intel.com; j.bromhead at titan-ic.com;
> > > deri at ntop.org; fc at napatech.com; arthur.su at lionic.com; Parav Pandit
> > > <parav at mellanox.com>
> > > Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev
> > > core functions
> > >
> > > 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.
> > >
> > > > 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.
> > >
> > >
> > I agree with Thomas, let's discuss this when adding the PMDs.
> 
> I am writing a now the Marvell OcteonTx2 PMD and I think that a PCI helper is
> missing.
> When registering a PCI device, a .remove function is registered of type
> pci_remove_t *remove;
> 
> typedef int (pci_remove_t)(struct rte_pci_device *);
> because this function receives struct rte_pci_device * as an argument
> It is required to have a helper function to retrieve struct rte_regexdev *dev
> based on the device name (or another way).
> similar to rte_cryptodev_pmd_get_named_dev(const char *name)i

Will add.

Thanks,
Ori




More information about the dev mailing list