From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by dpdk.org (Postfix) with ESMTP id 907E93195 for ; Mon, 18 Jun 2018 23:36:03 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id z24-v6so8816012pfe.7 for ; Mon, 18 Jun 2018 14:36:03 -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=sqy0tZXrPh0RsZiVNskwIYihTDxgsS7NQctgkjqrIx4=; b=wJVy32CL1MJaZneGlSqq05Sheo4iJceCOV4U5BLH3asxjxw/DIksDp15WB70NahcZQ 46igB/nXwRPOLq0b0lUgredCMUkR1/bIKu5NU/DLi2ah2P7Yo0zoPPdnAVvLjSSdc7hk baaCzoORrWVvcIjt7/QOPFHtT5tv6KdAQnoLkZeQ8L21it74wYLR3OM7+/WzADiWannp 4OrL9eVhhQUdBPAN0mstjyh3PqJx8WhKTa8lmDvHqc+C4dz+wmNMYqmFCLTjoBO504jo bGfo8UI2f05TR1dazRs+rE+OdzRfb08iX50Ekv1v/A31yXpcfYyJXyF+n+VZXYsR6AGy pGcA== 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=sqy0tZXrPh0RsZiVNskwIYihTDxgsS7NQctgkjqrIx4=; b=nn7qcTw8BO7biEi9L3whWlJ8yRutraJ/ZHKOQO70QI1pp9jF41ahC5utlddeV4cb7u AMYTQ7fTl7smzuUFRASkCSQbbXHckzVnc0AS34BoRxQ0zQ1hHwnv4sZ7PDj/F+OdzkpP oxFHzgCBgjVkj44FkPDwFfAa9FJRG6QTaoS+xBWvEhdF9nfedDv9iKK8v+nPQspHQXlG vVIROLqt+oAQVkMRPBlfzYhYEwjfwDndExgLzMI1qwafQZL5UoTgF/nQA5QvKSIMpKSG lb3Q+u+04jEgd472pW8JQhp1udr3J0oK3+Drrb22eAngEKF37hIO7KE695kwoT1hX3t4 z06A== X-Gm-Message-State: APt69E1he0evtYDyHedRzb76HB2x7VZz0Q/kfRQkaaZLnojElFJ6We67 nr9brYNe57E0gDABi7dk8G3st93WC+o= X-Google-Smtp-Source: ADUXVKIMq9DfBhS+fYd3HkmIY/66v2FPdhurHSX5Gx/76qcnCEALKo2Xqr++r7Jc4izN8l7n42difQ== X-Received: by 2002:a62:f615:: with SMTP id x21-v6mr15151648pfh.43.1529357762239; Mon, 18 Jun 2018 14:36:02 -0700 (PDT) Received: from xeon-e3.lan (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id n70-v6sm34246969pfh.140.2018.06.18.14.36.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 14:36:01 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 18 Jun 2018 14:35:56 -0700 Message-Id: <20180618213557.15209-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618213557.15209-1-stephen@networkplumber.org> References: <20180618213557.15209-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v3 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: , X-List-Received-Date: Mon, 18 Jun 2018 21:36:04 -0000 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 --- 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