[dpdk-dev] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx callback lists
Pattan, Reshma
reshma.pattan at intel.com
Wed Jun 15 07:30:10 CEST 2016
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, June 14, 2016 9:00 PM
> To: Pattan, Reshma <reshma.pattan at intel.com>
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx
> callback lists
>
> 2016-06-14 10:38, Reshma Pattan:
> > Added spinlocks around add/remove logic of Rx and Tx callbacks to
> > avoid corruption of callback lists in multithreaded context.
> >
> > Signed-off-by: Reshma Pattan <reshma.pattan at intel.com>
>
> Why cb->next is not locked in burst functions?
It is safe to do "read access" here and doesn't require any locking as rx/tx burst is initiated by only local user(control plane) thread.
> Just protecting add/remove but not its usage seems useless.
Here locks were required around add/remove to protect "write access" because write to callback list is now done from 2 threads
i.e. one from local user thread(control plane) and another from pdump control thread(initiated by remote pdump request).
Thanks,
Reshma
More information about the dev
mailing list