DPDK usage discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Nidhia Varghese <nidhiavarghese93@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] [dpdk-dev] Sharing of pipelines in IP_PIPELINE application
Date: Mon, 17 Jul 2017 13:03:46 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BA811D5@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <CAAx9ALUdrf3+8jL=NM4a-neCQ4icP-biME0BotmzuJnYcmTpyg@mail.gmail.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nidhia Varghese
> Sent: Wednesday, July 5, 2017 10:44 AM
> To: dev@dpdk.org; users@dpdk.org
> Subject: [dpdk-dev] Sharing of pipelines in IP_PIPELINE application
> 
> Hi,
> 
> I want to create a Mac-Learning pipeline application where upstream learns
> the incoming source mac and incoming port. For downstream I have to
> forward
> the traffic based on this mac-learning table created during the upstream.
> My idea is:
> 
>    - Share the mac-learning pipeline between upstream and downstream
>    communication. (ie., use the same pipeline for US and DS)  Thus I will be
>    able to use the same mac-learning table for both upstream and
> downstream.
> 
> Is it possible to do so? Or is there any other way to use the mac-learning
> table in a shared manner?
> 
> Thanks for your reply and help.
> 
> Regards,
> Nidhia Varghese

Hi Nidhia,

Is the upstream processing very different than downstream processing, or is the functional difference limited to different configuration (e.g. MAC address, IP address, etc) of same functionality?

Assuming same/similar functionality (e.g. L2 bridging):
-it makes sense to design a  single pipeline type to handling both upstream and downstream
-the U and D ports are all input ports in the same pipeline
-the learning is simply an action (input port or table action) executed as part of the packet reception: it simply adds a new entry (if not already present) to the forwarding table
-where there is learning, there is probably aging as well, which could be a request coming from control plane:
	-CP can maintain its own copy of the forwarding table (so CP has to be notified by learning events)
	-periodically, CP can examine a set of N entries and check if any needs to be purged: if yes, send a request to DP to purge that entry from its forwarding table

Assuming different functionality (e.g. edge router):
-it makes sense to design two different pipeline types, one for U and one for D
-typically, the NICs that are U input ports serve as the D output ports, the other NICs that are D input ports serve as the U output ports
-in this case, probably the U learning action is to notify the CP of a learning event, which CP then translates into a request to D to add a new entry to its forwarding table

Note that, as we discussed in other threads, we avoid directly sharing the same table between two pipelines, which can run on different CPU cores:
- Each pipeline owns its tables (only one table writer and reader)
	-This way, we avoid concurrency issues: locks per table or table entry => performance issue
	-This way, we avoid the ping-pong of cache lines between CPU cores => performance issue
-If need be, the same table is replicated to multiple DP pipeline instances rather than share the same table (for the above reasons)
	-All the table instances are kept in-sync by the CP

Regards,
Cristian


      reply	other threads:[~2017-07-17 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05  9:43 [dpdk-users] " Nidhia Varghese
2017-07-17 13:03 ` Dumitrescu, Cristian [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=3EB4FA525960D640B5BDFFD6A3D891267BA811D5@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=nidhiavarghese93@gmail.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).