summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAnand B Jyoti <anand.b.jyoti@intel.com>2017-10-03 04:49:08 +0530
committerDeepak S <deepak.s@linux.intel.com>2017-10-04 14:32:48 -0700
commitf7fb94afdc0ab6d062989f9128c8412d748c2f03 (patch)
tree9e45da6e2045761f203582f990eb0d50c0bf29f4 /docs
parent5cbb7066aef466bad9a806ce04393ad739047447 (diff)
Docs: Update design and userguide for common gateway routing
JIRA: SAMPLEVNF-81 Updating design and userguide for common gateway routing functionality. Change-Id: I347f03d37469858a69d7fcca86de31ee03d08086 Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/testing/developer/design/04-SampleVNF_Design.rst55
-rw-r--r--docs/testing/user/userguide/05-How_to_run_SampleVNFs.rst25
2 files changed, 68 insertions, 12 deletions
diff --git a/docs/testing/developer/design/04-SampleVNF_Design.rst b/docs/testing/developer/design/04-SampleVNF_Design.rst
index cdef7448..dff8d535 100644
--- a/docs/testing/developer/design/04-SampleVNF_Design.rst
+++ b/docs/testing/developer/design/04-SampleVNF_Design.rst
@@ -108,6 +108,61 @@ This library provides API for taking decision of whether pkt belongs to local
system or to forwarding.It Provides API for IPv4/IPv6 local packet out send
function. It Provides API for packet forwarding - LPM lookup function.
+Common Code - Gateway routing
+-----------------------------
+
+Introduction
+^^^^^^^^^^^^
+
+Gateway common code is created to support routing functionality for both
+network and direct attached interfaces. It is supported for both IPv4 and
+IPv6 routes.
+
+The routeadd command is enhanced to support both net and host interfaces.
+The net is used to define the gateway and host is used for direct
+attached devices.
+
+The routing tables are allocated per port basis limited for MAX_PORTS. The
+number of route entries are supported upto 32 per interface. These sizes
+can be changed at compile time based on the requirement. Memory is
+allocated only for the nb_ports which is configured as per the VNF application
+configuration.
+
+Design
+^^^^^^
+The next hop IP and Port numbers are retrieved from the routing table based on
+the destinantion IP addreess. The destination IP address anded with mask is
+looked in the routing table for the match. The port/interface number which
+also stored as a part of the table entry is also retrieved.
+
+The routing table will be added with entries when the routeadd CLI command is
+executed through script or run time. There can be multiple routing entries per
+interface/port.
+
+The routeadd will report error if the match entry already exists or also if any
+of parameters provide in the commands are not valied. Example the if port
+number is bigger than the supported number ports/interface per application
+configuration.
+
+
+Reference routeadd command
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Following are typical reference commands and syntax for adding routes using the CLI.
+
+::
+
+;routeadd <net/host> <port #> <ipv4 nhip address in decimal> <Mask/NotApplicable>
+routeadd net 0 202.16.100.20 0xffff0000
+routeadd net 1 172.16.40.20 0xffff0000
+routeadd host 0 202.16.100.20
+routeadd host 1 172.16.40.20
+
+;routeadd <net/host> <port #> <ipv6 nhip address in hex> <Depth/NotApplicable>
+routeadd net 0 fec0::6a05:caff:fe30:21b0 64
+routeadd net 1 2012::6a05:caff:fe30:2081 64
+routeadd host 0 fec0::6a05:caff:fe30:21b0
+routeadd host 1 2012::6a05:caff:fe30:2081
vFW - Design
=============
diff --git a/docs/testing/user/userguide/05-How_to_run_SampleVNFs.rst b/docs/testing/user/userguide/05-How_to_run_SampleVNFs.rst
index dc764fa6..b5880645 100644
--- a/docs/testing/user/userguide/05-How_to_run_SampleVNFs.rst
+++ b/docs/testing/user/userguide/05-How_to_run_SampleVNFs.rst
@@ -221,9 +221,9 @@ Step 3: Bind the datapath ports to DPDK
link 1 config <VNF port 0 IP eg 172.16.40.10> 8
link 1 up
- ; routeadd <port #> <ipv4 nhip address in decimal> <Mask>
- routeadd 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
- routeadd 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
+ ; routeadd <net/host> <port #> <ipv4 nhip address in decimal> <Mask>
+ routeadd net 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
+ routeadd net 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
; IPv4 static ARP; disable if dynamic arp is enabled.
p 1 arpadd 0 <traffic generator port 0 IP eg 202.16.100.20> <traffic generator port 0 MAC>
@@ -288,9 +288,10 @@ Step 3: Bind the datapath ports to DPDK
link 1 down
link 1 config <VNF port 0 IP eg 172.16.40.10> 8
link 1 up
+
; routeadd <port #> <ipv4 nhip address in decimal> <Mask>
- routeadd 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
- routeadd 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
+ routeadd net 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
+ routeadd net 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
; IPv4 static ARP; disable if dynamic arp is enabled.
p 1 arpadd 0 <traffic generator port 0 IP eg 202.16.100.20> <traffic generator port 0 MAC>
@@ -355,9 +356,10 @@ Step 3: Bind the datapath ports to DPDK
link 1 down
link 1 config <VNF port 0 IP eg 172.16.40.10> 8
link 1 up
- ; routeadd <port #> <ipv4 nhip address in decimal> <Mask>
- routeadd 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
- routeadd 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
+
+ ; routeadd <net/host> <port #> <ipv4 nhip address in decimal> <Mask>
+ routeadd net 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
+ routeadd net 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
; IPv4 static ARP; disable if dynamic arp is enabled.
p 1 arpadd 0 <traffic generator port 0 IP eg 202.16.100.20> <traffic generator port 0 MAC>
@@ -427,10 +429,9 @@ Step 3: Bind the datapath ports to DPDK
;p <cgnapt pipeline id> entry addm <prv_ipv4/6> prvport> <pub_ip> <pub_port> <phy_port> <ttl> <no_of_entries> <end_prv_port> <end_pub_port>
;p 5 entry addm 202.16.100.20 1234 152.16.40.10 1 0 500 65535 1234 65535
-
- ; routeadd <port #> <ipv4 nhip address in decimal> <Mask>
- routeadd 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
- routeadd 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
+ ; routeadd <net/host> <port #> <ipv4 nhip address in decimal> <Mask>
+ routeadd net 0 <traffic generator port 0 IP eg 202.16.100.20> 0xff000000
+ routeadd net 1 <traffic generator port 1 IP eg 172.16.40.20> 0xff000000
; IPv4 static ARP; disable if dynamic arp is enabled.
p 1 arpadd 0 <traffic generator port 0 IP eg 202.16.100.20> <traffic generator port 0 MAC>