[dpdk-users] Accessing packet data from different lcores
Stephen Hemminger
stephen at networkplumber.org
Wed Feb 23 18:03:20 CET 2022
On Wed, 23 Feb 2022 16:10:00 +0000
"Ramin.Taraz at gd-ms.com" <Ramin.Taraz at gd-ms.com> wrote:
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> If this field is going to be referenced by other cores it needs to be done inside lock or use atomic builtin primitives.
>
>
> Mbufs are passed from core to core via rings so in practice there will 1 core accessing it at any time.
> Why should it be locked against multiple access?
More details please? which CPU type? and what type of ring?
If you are using DPDK rings, they use atomic operations which are equivalent to
locks.
You should experiment with adding thread fence (__atomic_thread_fence) to make
sure this is not your problem.
More information about the users
mailing list