> -----Original Message----- > From: Ori Kam <[email protected]> > Sent: Tuesday, April 07, 2020 7:29 PM > To: Guy Kaneti <[email protected]>; Jerin Jacob <[email protected]>; > Thomas Monjalon <[email protected]> > Cc: Jerin Jacob Kollanukkaran <[email protected]>; > [email protected]; Pavan Nikhilesh Bhagavatula > <[email protected]>; [email protected]; Shahaf Shuler > <[email protected]>; [email protected]; Opher Reviv > <[email protected]>; Alex Rosenbaum <[email protected]>; Dovrat > Zifroni <[email protected]>; Prasun Kapoor <[email protected]>; > [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; Parav Pandit > <[email protected]> > Subject: RE: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core > functions > > Hi Guy, > Thanks for your review > > > -----Original Message----- > > From: dev <[email protected]> On Behalf Of Guy Kaneti > > Sent: Tuesday, April 7, 2020 5:22 PM > > To: Ori Kam <[email protected]>; Jerin Jacob <[email protected]>; > > Thomas Monjalon <[email protected]> > > Cc: Jerin Jacob Kollanukkaran <[email protected]>; > > [email protected]; Pavan Nikhilesh Bhagavatula > > <[email protected]>; [email protected]; Shahaf Shuler > > <[email protected]>; [email protected]; Opher Reviv > > <[email protected]>; Alex Rosenbaum <[email protected]>; Dovrat > > Zifroni <[email protected]>; Prasun Kapoor <[email protected]>; > > [email protected]; [email protected]; > > [email protected]; [email protected]; [email protected]; > > [email protected]; [email protected]; > > [email protected]; [email protected]; [email protected]; > > [email protected]; [email protected]; > > [email protected]; [email protected]; [email protected]; > > [email protected]; [email protected]; [email protected]; > > [email protected]; [email protected]; [email protected]; Parav Pandit > > <[email protected]> > > Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev > > core functions > > > > Hi Ori, > > > > >+int > > >+rte_regexdev_register(struct rte_regexdev *dev) { > > >+ uint16_t dev_id; > > >+ int res; > > >+ > > >+ if (dev->dev_ops == NULL) { > > >+ RTE_REGEXDEV_LOG(ERR, "RegEx device invalid device > > ops\n"); > > >+ return -EINVAL; > > >+ } > > >+ if (regexdev_allocated(dev->dev_name) != NULL) { > > >+ RTE_REGEXDEV_LOG > > >+ (ERR, "RegEx device with name %s already > > allocated\n", > > >+ dev->dev_name); > > >+ return -ENOMEM; > > >+ } > > >+ dev_id = regexdev_find_free_dev(); > > >+ if (dev_id == RTE_MAX_REGEXDEV_DEVS) { > > >+ RTE_REGEXDEV_LOG > > >+ (ERR, "Reached maximum number of regex devs\n"); > > >+ return -ENOMEM; > > >+ } > > >+ dev->dev_id = dev_id; > > > > dev is of type struct rte_regexdev *, but I don't see in the > > definition of struct rte_regexdev a field dev_id > > > > The definition of rte_regexdev appears in rte_regecdev_core.h and the last > member in this struct is the dev_id. (line146) it is added in this commit. >
I was looking for it in [v1,2/4] regexdev: add regex core h file https://patches.dpdk.org/patch/67309/ > > >+ regex_devices[dev_id] = dev; > > >+ res = dev_id; > > >+ return res; > > >+}

