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

Ori Kam orika at mellanox.com
Wed Apr 8 08:52:51 CEST 2020


Hi Guy,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Guy Kaneti
> Sent: Tuesday, April 7, 2020 7:37 PM
> To: Ori Kam <orika at mellanox.com>; Jerin Jacob <jerinjacobk at gmail.com>;
> Thomas Monjalon <thomas at monjalon.net>
> Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; xiang.w.wang at intel.com;
> Pavan Nikhilesh Bhagavatula <pbhagavatula at marvell.com>; 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: Ori Kam <orika at mellanox.com>
> > Sent: Tuesday, April 07, 2020 7:29 PM
> > To: Guy Kaneti <guyk at marvell.com>; Jerin Jacob <jerinjacobk at gmail.com>;
> > Thomas Monjalon <thomas at monjalon.net>
> > Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> > xiang.w.wang at intel.com; Pavan Nikhilesh Bhagavatula
> > <pbhagavatula at marvell.com>; 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
> >
> > Hi Guy,
> > Thanks for your review
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces at dpdk.org> On Behalf Of Guy Kaneti
> > > Sent: Tuesday, April 7, 2020 5:22 PM
> > > To: Ori Kam <orika at mellanox.com>; Jerin Jacob <jerinjacobk at gmail.com>;
> > > Thomas Monjalon <thomas at monjalon.net>
> > > Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> > > xiang.w.wang at intel.com; Pavan Nikhilesh Bhagavatula
> > > <pbhagavatula at marvell.com>; 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
> > >
> > > 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatches.d
> pdk.org%2Fpatch%2F67309%2F&data=02%7C01%7Corika%40mellanox.co
> m%7C5a297f12b59e49eb078e08d7db11fc2c%7Ca652971c7d2e4d9ba6a4d1492
> 56f461b%7C0%7C0%7C637218742604895700&sdata=6jJU9mMnmjf7fcMb
> rV00QMG8qcHt%2BfuPULHsUSbwTeY%3D&reserved=0
> 

No problem, I added it  when I had use for it.

It would be great if you can add your ack.

> > > >+	regex_devices[dev_id] = dev;
> > > >+	res = dev_id;
> > > >+	return res;
> > > >+}


More information about the dev mailing list