DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com
Subject: [dpdk-dev] [PATCH 2/2] ip_pipeline: enable swap action in network layers configuration file
Date: Fri, 26 Aug 2016 22:21:45 +0100	[thread overview]
Message-ID: <1472246505-55970-2-git-send-email-jasvinder.singh@intel.com> (raw)
In-Reply-To: <1472246505-55970-1-git-send-email-jasvinder.singh@intel.com>

The network_layers configuration file (config/network_layers.cfg)
demonstrates the various network layer components such as TCP, UDP,
ICMP etc, which can be easily integrated into ip pipeline
infrastructure.

The loopback function (implemented using passthrough pipeline) is
updated to perform swap operation on the IP source and destination
address, and UDP source and destination ports.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/config/network_layers.cfg |  4 ++++
 examples/ip_pipeline/config/network_layers.sh  | 10 +++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/examples/ip_pipeline/config/network_layers.cfg b/examples/ip_pipeline/config/network_layers.cfg
index 8054d9f..397b5d7 100644
--- a/examples/ip_pipeline/config/network_layers.cfg
+++ b/examples/ip_pipeline/config/network_layers.cfg
@@ -203,12 +203,16 @@ type = PASS-THROUGH ; Loop-back (UDP place-holder)
 core = 1
 pktq_in = SWQ2
 pktq_out = SWQ0
+swap = 282 286 ; IPSRC <-> IPDST
+swap = 290 292 ; PORTSRC <-> PORTDST
 
 [PIPELINE5]
 type = PASS-THROUGH ; Loop-back (TCP place-holder)
 core = 1
 pktq_in = SWQ3
 pktq_out = SWQ1
+swap = 282 286 ; IPSRC <-> IPDST
+swap = 290 292 ; PORTSRC <-> PORTDST
 
 [PIPELINE6]
 type = PASS-THROUGH ; Drop (ICMP place-holder)
diff --git a/examples/ip_pipeline/config/network_layers.sh b/examples/ip_pipeline/config/network_layers.sh
index 3b86beb..449b006 100644
--- a/examples/ip_pipeline/config/network_layers.sh
+++ b/examples/ip_pipeline/config/network_layers.sh
@@ -56,7 +56,7 @@ p 1 route add 100.3.0.0 16 port 3 ether 10.3.0.2
 # Prio = 1 (High): [SA = ANY, DA = 10.1.0.1, SP = ANY, DP = 1001, PROTO = UDP] => Allow
 # Prio = 1 (High): [SA = ANY, DA = 10.2.0.1, SP = ANY, DP = 1002, PROTO = UDP] => Allow
 # Prio = 1 (High): [SA = ANY, DA = 10.3.0.1, SP = ANY, DP = 1003, PROTO = UDP] => Allow
-p 1 firewall add default 1 #SINK0
+p 2 firewall add default 1 #SINK0
 p 2 firewall add priority 1 ipv4 0.0.0.0 0 10.0.0.1 32 0 65535 1000 1000 17 0xF port 0
 p 2 firewall add priority 1 ipv4 0.0.0.0 0 10.1.0.1 32 0 65535 1001 1001 17 0xF port 0
 p 2 firewall add priority 1 ipv4 0.0.0.0 0 10.2.0.1 32 0 65535 1002 1002 17 0xF port 0
@@ -72,8 +72,8 @@ p 2 firewall add priority 1 ipv4 0.0.0.0 0 10.3.0.1 32 0 65535 1003 1003 17 0xF
 # TCP [SA = 100.2.0.10, DA = 10.2.0.1, SP = 1002, DP = 80] => socket ID = 2
 # TCP [SA = 100.3.0.10, DA = 10.3.0.1, SP = 1003, DP = 80] => socket ID = 3
 p 3 flow add default 1 #SINK1
-p 3 flow add ipv4 100.0.0.10 10.0.0.1 1000 80 6 port 1 id 0
-p 3 flow add ipv4 100.1.0.10 10.1.0.1 1001 80 6 port 1 id 1
-p 3 flow add ipv4 100.2.0.10 10.2.0.1 1002 80 6 port 1 id 2
-p 3 flow add ipv4 100.3.0.10 10.3.0.1 1003 80 6 port 1 id 3
+p 3 flow add ipv4 100.0.0.10 10.0.0.1 1000 80 6 port 0 id 0
+p 3 flow add ipv4 100.1.0.10 10.1.0.1 1001 80 6 port 0 id 1
+p 3 flow add ipv4 100.2.0.10 10.2.0.1 1002 80 6 port 0 id 2
+p 3 flow add ipv4 100.3.0.10 10.3.0.1 1003 80 6 port 0 id 3
 #p 3 flow ls
-- 
2.5.5

  reply	other threads:[~2016-08-26 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26 21:21 [dpdk-dev] [PATCH 1/2] ip_pipeline: add packet fields swap action to pass-through pipeline Jasvinder Singh
2016-08-26 21:21 ` Jasvinder Singh [this message]
2016-10-12 20:45   ` [dpdk-dev] [PATCH 2/2] ip_pipeline: enable swap action in network layers configuration file Thomas Monjalon

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=1472246505-55970-2-git-send-email-jasvinder.singh@intel.com \
    --to=jasvinder.singh@intel.com \
    --cc=cristian.dumitrescu@intel.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).