[dpdk-dev] [dpdk-users] Sharing Data structure between logical cores in DPDK- regarding

Van Haaren, Harry harry.van.haaren at intel.com
Fri Dec 6 17:51:40 CET 2019


> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Friday, December 6, 2019 4:31 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: Tom Barbette <barbette at kth.se>; Perugu Hemasai Chandra Prasad
> <hemasaiperugu at 5g.iith.ac.in>; users at dpdk.org; dev at dpdk.org
> Subject: Re: [dpdk-users] [dpdk-dev] Sharing Data structure between logical
> cores in DPDK- regarding

Hey Stephen,

[OT] Please watch your snipping of > characters and Wrote: strings, I'm not the original author of the question, but from snipping it looks like that below.


> On Thu, 5 Dec 2019 10:54:59 +0000
> "Van Haaren, Harry" <harry.van.haaren at intel.com> wrote:
> 
> >          I have a small doubt, can we share a data structure between
> > > multiple logical cores in DPDK without locking?
> 
> Sure, learn to use RCU!!

Good suggestion, apart from Atomics or Mutex based locking schemes, RCU (Read Copy Update) is another method of (semi) synchronizing/sharing data-structures across threads.

DPDK has some RCU mechanics in lib/librte_rcu/ library, perhaps they are of interest. The implementation here is particularly for reclaiming memory after a Quiescent State point has been reached by all threads.


More information about the dev mailing list