> -----Original Message----- > From: Ajit Khaparde <ajit.khapa...@broadcom.com> > Sent: Wednesday, October 7, 2020 7:18 AM > To: Ori Kam <or...@nvidia.com> > Cc: Suanming Mou <suanmi...@nvidia.com>; Ori Kam > <or...@mellanox.com>; John McNamara <john.mcnam...@intel.com>; > Marko Kovacevic <marko.kovace...@intel.com>; NBU-Contact-Thomas > Monjalon <tho...@monjalon.net>; Ferruh Yigit <ferruh.yi...@intel.com>; > Andrew Rybchenko <arybche...@solarflare.com>; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 2/2] ethdev: make rte_flow API thread > safe > > > > +static inline void > > > +flow_lock(struct rte_eth_dev *dev) > > > > Maybe change the name to flow_safe_enter > > Since this function doesn't always lock. > I feel fts_enter() sounds better.
I would prefer to take that one if no other better names. : ) > > > > > > +{ > > > + if (!(dev->data->dev_flags & > > > RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE)) > > > + pthread_mutex_lock(&dev->data->fts_mutex); > > > +} > > > + > > > +static inline void > > > +flow_unlock(struct rte_eth_dev *dev) > > > > Maybe change the name flow_safe_leave > > Same reason as above. > On the same lines.. fts_exit()