Hi Guy,
Thanks for your review

> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Guy Kaneti
> Sent: Tuesday, April 7, 2020 5:22 PM
> To: Ori Kam <or...@mellanox.com>; Jerin Jacob <jerinjac...@gmail.com>;
> Thomas Monjalon <tho...@monjalon.net>
> Cc: 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
> 
> 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.

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

Reply via email to