DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH v3 2/3] examples/l3fwd: use reserved IPv4/IPv6 addresses
Date: Mon, 18 Jun 2018 14:35:56 -0700	[thread overview]
Message-ID: <20180618213557.15209-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20180618213557.15209-1-stephen@networkplumber.org>

The example should use the IPv4 addresses defined in RFC5735 and
the IPv6 addresses defined in RFC5180 for the L3 forwarding example
Longest Prefix Match table.

Fixes: 268888b5b020 ("examples/l3fwd: modularize")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/l3fwd/l3fwd_lpm.c | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index a747126a2404..3724f79c1924 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -40,26 +40,28 @@ struct ipv6_l3fwd_lpm_route {
 	uint8_t  if_out;
 };
 
+/* 192.18.0.0/16 are set aside for RFC2544 benchmarking. */
 static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
-	{IPv4(1, 1, 1, 0), 24, 0},
-	{IPv4(2, 1, 1, 0), 24, 1},
-	{IPv4(3, 1, 1, 0), 24, 2},
-	{IPv4(4, 1, 1, 0), 24, 3},
-	{IPv4(5, 1, 1, 0), 24, 4},
-	{IPv4(6, 1, 1, 0), 24, 5},
-	{IPv4(7, 1, 1, 0), 24, 6},
-	{IPv4(8, 1, 1, 0), 24, 7},
+	{IPv4(192, 18, 0, 0), 24, 0},
+	{IPv4(192, 18, 1, 0), 24, 1},
+	{IPv4(192, 18, 2, 0), 24, 2},
+	{IPv4(192, 18, 3, 0), 24, 3},
+	{IPv4(192, 18, 4, 0), 24, 4},
+	{IPv4(192, 18, 5, 0), 24, 5},
+	{IPv4(192, 18, 6, 0), 24, 6},
+	{IPv4(192, 18, 7, 0), 24, 7},
 };
 
+/* 2001:0200::/48 is IANA reserved address range for IPv6 benchmarking (RFC5180) */
 static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = {
-	{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 0},
-	{{2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 1},
-	{{3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 2},
-	{{4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 3},
-	{{5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 4},
-	{{6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 5},
-	{{7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 6},
-	{{8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 48, 7},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0}, 48, 0},
 };
 
 #define IPV4_L3FWD_LPM_NUM_ROUTES \
-- 
2.17.1

  parent reply	other threads:[~2018-06-18 21:36 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 21:35 [dpdk-dev] [PATCH v3 0/3] use RFC addresses for testing Stephen Hemminger
2018-06-18 21:35 ` [dpdk-dev] [PATCH v3 1/3] testpmd: add ability to set tx IP and UDP parameters Stephen Hemminger
2018-06-22  9:12   ` Iremonger, Bernard
2018-10-29  2:25     ` Thomas Monjalon
2018-06-26 11:47   ` Shahaf Shuler
2018-06-26 11:51   ` Shahaf Shuler
2019-04-02 20:39   ` [dpdk-dev] [PATCH v4 0/3] use RFC addresses in test applications Stephen Hemminger
2019-04-02 20:39     ` Stephen Hemminger
2019-04-02 20:39     ` [dpdk-dev] [PATCH v4 1/3] app/testpmd: add ability to set Tx IP and UDP parameters Stephen Hemminger
2019-04-02 20:39       ` Stephen Hemminger
2019-04-08 12:51       ` Iremonger, Bernard
2019-04-08 12:51         ` Iremonger, Bernard
2019-04-02 20:39     ` [dpdk-dev] [PATCH v4 2/3] examples/l3fwd: use reserved IPv4/IPv6 addresses Stephen Hemminger
2019-04-02 20:39       ` Stephen Hemminger
2019-04-08 13:07       ` Iremonger, Bernard
2019-04-08 13:07         ` Iremonger, Bernard
2019-04-09 17:14         ` Stephen Hemminger
2019-04-09 17:14           ` Stephen Hemminger
2019-04-02 20:39     ` [dpdk-dev] [PATCH v4 3/3] examples/l3fwd: format the IP addresses for printing Stephen Hemminger
2019-04-02 20:39       ` Stephen Hemminger
2019-04-08 13:14       ` Iremonger, Bernard
2019-04-08 13:14         ` Iremonger, Bernard
2019-04-09 18:20     ` [dpdk-dev] [PATCH v5 0/3] use RFC addresses in test applications Stephen Hemminger
2019-04-09 18:20       ` Stephen Hemminger
2019-04-09 18:20       ` [dpdk-dev] [PATCH v5 1/3] app/testpmd: add ability to set Tx IP and UDP parameters Stephen Hemminger
2019-04-09 18:20         ` Stephen Hemminger
2019-04-10 10:07         ` Iremonger, Bernard
2019-04-10 10:07           ` Iremonger, Bernard
2019-04-09 18:20       ` [dpdk-dev] [PATCH v5 2/3] examples/l3fwd: use reserved IPv4/IPv6 addresses Stephen Hemminger
2019-04-09 18:20         ` Stephen Hemminger
2019-04-10  8:56         ` Iremonger, Bernard
2019-04-10  8:56           ` Iremonger, Bernard
2019-04-09 18:20       ` [dpdk-dev] [PATCH v5 3/3] examples/l3fwd: format the IP addresses for printing Stephen Hemminger
2019-04-09 18:20         ` Stephen Hemminger
2019-04-10 17:41       ` [dpdk-dev] [PATCH v6 0/3] use IPv4 addresses reserved for testing Stephen Hemminger
2019-04-10 17:41         ` Stephen Hemminger
2019-04-10 17:41         ` [dpdk-dev] [PATCH v6 1/3] app/testpmd: add ability to set Tx IP and UDP parameters Stephen Hemminger
2019-04-10 17:41           ` Stephen Hemminger
2019-04-11  9:02           ` Iremonger, Bernard
2019-04-11  9:02             ` Iremonger, Bernard
2019-04-10 17:41         ` [dpdk-dev] [PATCH v6 2/3] examples/l3fwd: use reserved IPv4/IPv6 addresses Stephen Hemminger
2019-04-10 17:41           ` Stephen Hemminger
2019-04-11  9:08           ` Iremonger, Bernard
2019-04-11  9:08             ` Iremonger, Bernard
2019-04-10 17:41         ` [dpdk-dev] [PATCH v6 3/3] examples/l3fwd: format the IP addresses for printing Stephen Hemminger
2019-04-10 17:41           ` Stephen Hemminger
2019-04-21 21:55         ` [dpdk-dev] [PATCH v6 0/3] use IPv4 addresses reserved for testing Thomas Monjalon
2019-04-21 21:55           ` Thomas Monjalon
2018-06-18 21:35 ` Stephen Hemminger [this message]
2018-06-22  9:19   ` [dpdk-dev] [PATCH v3 2/3] examples/l3fwd: use reserved IPv4/IPv6 addresses Iremonger, Bernard
2018-06-18 21:35 ` [dpdk-dev] [PATCH v3 3/3] examples/l3fwd: format the IP addresses for printing Stephen Hemminger
2018-06-22 10:23   ` Iremonger, Bernard
2018-06-22 13:44     ` 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=20180618213557.15209-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --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).