DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gray, Mark D" <mark.d.gray@intel.com>
To: "Saha, Avik (AWS)" <aviksaha@amazon.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Safe practices for adding to rte_table_hash_lru
Date: Thu, 25 Sep 2014 08:03:03 +0000	[thread overview]
Message-ID: <738D45BC1F695740A983F43CFE1B7EA92D743985@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <A4A7819F3AE089479B8A88B97202C75D37BE7F88@ex10-mbx-9001.ant.amazon.com>

> 
> Hey guys
>    Is it safe to add an entry to the rte_table_hash while the pipeline is being
> run - for instance if I were to try and add an entry on a port reader action
> when the packet enters the pipeline?

If the table is part of the pipeline, it is not safe. i.e. the table is not threadsafe.

You can use a control message ring to add entries to the table in an 
asynchronous manner. Your main dpdk loop would then periodically handle
these messages. There are examples of this in Intel DPDK vSwitch (https://github.com/01org/dpdk-ovs)
and also, I think, in the DPDK ip_pipeline sample application.

> 
> Thanks
> Avik

      parent reply	other threads:[~2014-09-25  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 19:38 Saha, Avik (AWS)
2014-09-24 20:11 ` Neil Horman
2014-09-25  8:03 ` Gray, Mark D [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=738D45BC1F695740A983F43CFE1B7EA92D743985@IRSMSX102.ger.corp.intel.com \
    --to=mark.d.gray@intel.com \
    --cc=aviksaha@amazon.com \
    --cc=dev@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).