DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Ramin.Taraz@gd-ms.com" <Ramin.Taraz@gd-ms.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] Accessing packet data from different lcores
Date: Wed, 23 Feb 2022 09:03:20 -0800	[thread overview]
Message-ID: <20220223090320.2386cd6a@hermes.local> (raw)
In-Reply-To: <PH1P110MB1067D6D9E96784B6695B8140AE3C9@PH1P110MB1067.NAMP110.PROD.OUTLOOK.COM>

On Wed, 23 Feb 2022 16:10:00 +0000
"Ramin.Taraz@gd-ms.com" <Ramin.Taraz@gd-ms.com> wrote:

> -----Original Message-----
> From: Stephen Hemminger <stephen@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.

      reply	other threads:[~2022-02-23 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12  0:51 Ramin.Taraz
2022-02-23 15:15 ` Ramin.Taraz
2022-02-23 15:58   ` Stephen Hemminger
2022-02-23 16:10     ` Ramin.Taraz
2022-02-23 17:03       ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220223090320.2386cd6a@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=Ramin.Taraz@gd-ms.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).