[dpdk-dev] [PATCH v3 4/7] ethdev: synchronize port allocation
Thomas Monjalon
thomas at monjalon.net
Thu Jan 18 22:17:10 CET 2018
18/01/2018 21:52, Matan Azrad:
> From: Thomas Monjalon, Thursday, January 18, 2018 10:44 PM
> > 18/01/2018 17:35, Matan Azrad:
> > > rte_eth_dev_allocate(const char *name) {
> > > uint16_t port_id;
> > > - struct rte_eth_dev *eth_dev;
> > > + struct rte_eth_dev *eth_dev = NULL;
> > > +
> > > + /* Synchronize share data one time allocation between local
> > > + threads. */
> >
> > I don't understand the "one time" part of this comment.
> > Please could you try to rephrase it?
>
> One-time means this allocation will run only 1 time.
>
> After the first allocation the pointer is not null, so no calling anymore to this function.
Suggestion:
Synchronize local threads to allocate shared data only once.
More information about the dev
mailing list