netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen鹏 <mobemhit@gmail.com>
To: netdev@vger.kernel.org
Subject: Question about concurrent accesses to an eBPF map
Date: Wed, 9 Oct 2019 14:09:53 +0800	[thread overview]
Message-ID: <CANuct4v1GjHrkw8uwTdjzDWoq0ZVy6NY49TXT1QSO+d7eh9iCg@mail.gmail.com> (raw)

Hi,

Now I have an eBPF program which adds or updates elements in an eBPF
map. Meanwhile, I have a user space application which reads and
deletes elements in the aforementioned eBPF map. For a specific
element in the eBPF map, if an update happens between the read and
delete, I will lose some data. I'm using 4.9.30 upstream kernel, and
I'm wondering if there is any mechanism in eBPF which can make the
"read and delete" an atomic operation.

Thanks in advance,
Paul

                 reply	other threads:[~2019-10-09  6:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CANuct4v1GjHrkw8uwTdjzDWoq0ZVy6NY49TXT1QSO+d7eh9iCg@mail.gmail.com \
    --to=mobemhit@gmail.com \
    --cc=netdev@vger.kernel.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).