From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EAA8FA0679 for ; Tue, 2 Apr 2019 22:39:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C6AC1B184; Tue, 2 Apr 2019 22:39:19 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 4397B1B13A for ; Tue, 2 Apr 2019 22:39:14 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id b65so6837811plb.6 for ; Tue, 02 Apr 2019 13:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ADwu+sB8FOuB6j+XjwKBgAnbwkO3j2SRWaMKmPAxYk8=; b=us+/zHwKeq2aPHafEUVA8cEazy3rYDRZFgkZz5WMwfDFP0IQzBuZFj9f3qbf22vfz5 M4WYW6NzawhFsiwN0ypReyZAFptnD2qvz3kqS7tNKaVBcDYxTPRh/c1+g4cMzLqsB3ja qxHxuuk3KKv7DYt+2eUkElxIbv+XtC5Bo9hcn89ZZbb0adUFM6RJ4pEbClSR9d+wc8He Xn0eOQ5HjdrsM1uWiHyQhoRVYzjKNqFO0MAxwJvkmyZFSeR+ScJMW6Exg/O90P/cqoeX 6SSxlNKzSRWdhj0kKPnMz/XSY7j6GQo2mwvkSGM8A6EIpgHQDVdWDWNNlmfPK9KyaVjx hw4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ADwu+sB8FOuB6j+XjwKBgAnbwkO3j2SRWaMKmPAxYk8=; b=BCkYoA3AgpgIZ7rox20nJyo1hNH0vMKvD0KGCQ7T3Is7gHl7+iZNDLaBrbyIBLiOUk PaCbat1f+8Oz1IPsxIG7nRQeogwqgyq8Z7dUJqhxRXnALeWhrYWS9AC2mLzFFou9yzgw Kskh5wHbHMbiFJNjK2Fki7iqHMWAza/KJK1rLJLBJlwYlyArAPBJg+cV1KwPfDcKpQK0 WtwSrM8ZWWSMuwuwbZUj3JjEwNZH0BDHGZ4h7wRyLrKc8zunlO/UCAtEssfpYZYH+9Pl sPWPGZ08SQsvJxumosQiWDuIkElQPvJtmHXQCp50T6labOnqzxEXPtCB6IF1W4h/Z2k5 b7ag== X-Gm-Message-State: APjAAAU7/PRSXfCIO7qsRLWKP3mvMb8fMN2cy46l0rQzFkvoRFHcLVZR DTatJmh0EEA70qqBPDTeP1L+IgFnPLfcaA== X-Google-Smtp-Source: APXvYqyYUFYjyy8dUq9H2zSroqrq6fRREVIkJ6M73N6YvZhiuAYx8BQTNaSYCLON3Hugc0PnsEIQLA== X-Received: by 2002:a17:902:e109:: with SMTP id cc9mr19960830plb.148.1554237553048; Tue, 02 Apr 2019 13:39:13 -0700 (PDT) Received: from shemminger-XPS-13-9360.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id t64sm34191748pfa.86.2019.04.02.13.39.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 13:39:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 2 Apr 2019 13:39:06 -0700 Message-Id: <20190402203907.28679-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190402203907.28679-1-stephen@networkplumber.org> References: <20180618213557.15209-2-stephen@networkplumber.org> <20190402203907.28679-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v4 2/3] examples/l3fwd: use reserved IPv4/IPv6 addresses X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190402203906.5C4guVE2ghYYqxoOJec0kMd9dlqU8roObioyTo9oIyo@z> The l3fwd 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. Signed-off-by: Stephen Hemminger --- v4 - fix IPv6 /48 entries 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 b1dc195ad8cb..3191fc4c2639 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -39,26 +39,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 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}, 48, 0}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, 48, 1}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0}, 48, 2}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0}, 48, 3}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0}, 48, 4}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0}, 48, 5}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0}, 48, 6}, + {{32, 1, 2, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0}, 48, 7}, }; #define IPV4_L3FWD_LPM_NUM_ROUTES \ -- 2.17.1