[dpdk-dev] [PATCH v2 2/2] ethdev: make rte_flow API thread safe

Suanming Mou suanmingm at nvidia.com
Wed Oct 7 02:50:10 CEST 2020



> -----Original Message-----
> From: Ajit Khaparde <ajit.khaparde at broadcom.com>
> Sent: Wednesday, October 7, 2020 7:18 AM
> To: Ori Kam <orika at nvidia.com>
> Cc: Suanming Mou <suanmingm at nvidia.com>; Ori Kam
> <orika at mellanox.com>; John McNamara <john.mcnamara at intel.com>;
> Marko Kovacevic <marko.kovacevic at intel.com>; NBU-Contact-Thomas
> Monjalon <thomas at monjalon.net>; Ferruh Yigit <ferruh.yigit at intel.com>;
> Andrew Rybchenko <arybchenko at solarflare.com>; dev at 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()


More information about the dev mailing list