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 15C1DA0096 for ; Wed, 10 Apr 2019 19:41:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3B7A81B3A4; Wed, 10 Apr 2019 19:41:48 +0200 (CEST) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 1E7BE1B2AF for ; Wed, 10 Apr 2019 19:41:38 +0200 (CEST) Received: by mail-pl1-f194.google.com with SMTP id w23so1854791ply.4 for ; Wed, 10 Apr 2019 10:41:38 -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=EPVXjhJ083pVs32eU5ZyTvr7yCTBLlBJlHfovYTUCAo=; b=Zn0CZuPm/w5WAo7tfOlJNm8TBkWFviJc/zFDGKFFUK+1Iz10WP+ma3Q+0A0n/UXRXU RBdxr4GgGQTA7oMxwTR/E5CFl32Lc8ZS7A3w9XSWBO2RMoMHkIW+ZEaqyEcJZERDcxHm tnBhaLBL23XDqyukxIBxNWVXeZXa/n8GITvirZXDB+flIFSdODzbDnGeZFa/WEKm8YK+ d2LsOJfyEp23OrVOXlVj0rVVMsD35Id5AThoysXih5RirzCbtXmpS00aJm3x61m/zTMK QtVXtJLG6g/ginioU6swtDYnHjvwWWNokGbaadVm+8AvTtVNctUkrcixylPIXGNRTyaa aZ6A== 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=EPVXjhJ083pVs32eU5ZyTvr7yCTBLlBJlHfovYTUCAo=; b=HlU1ZmYnDQYg6uOgwW3RMe3tzSjcNpV/hcKHI41OuJxo75Ge04MlcLupNCAlTjB16I XDfKiknFGo2BqSQoWLB4y5hXM6+Ji14Kc5DhbacaIW2q/R7gLbNoFgYYSZ9V7io2ME2G dPaXjaOphaUF5ug52/AmgQvt7ehR8W6Y1f1AdhuXvYiSgobkl8MUatG4IfU/GCGUasEq TlEigik/06t2zRzOZI1jPAF/o75RDZBbogykwBEIdbVv/LA7kthcRNQs1rfM43l0ShHN MH3eV8vkPtoKrM2adpiSvk8L37GTVkp9h/2q3ZEJqZ7kYFbNmkxB4hIDYCzT69Xjd9ee jonA== X-Gm-Message-State: APjAAAUt+hG0mv3ZUWQwQ4xIK5o/g2iBLiZ0rq6KHQ5aXX3eApl0ogkr kOq/hXMqRaDXeDs+jnNOfZaztBl6crduiA== X-Google-Smtp-Source: APXvYqw8Q/UgaN95A7cSdWzhFMGEG/SzTzbtUQx/G46Pgr6vXHNh9eOWTVHDJmVjMJC87kNmk//Nlg== X-Received: by 2002:a17:902:9341:: with SMTP id g1mr7322276plp.81.1554918097443; Wed, 10 Apr 2019 10:41:37 -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 l69sm50229696pga.73.2019.04.10.10.41.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 10:41:36 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 10 Apr 2019 10:41:31 -0700 Message-Id: <20190410174132.8349-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190410174132.8349-1-stephen@networkplumber.org> References: <20190409182006.12944-1-stephen@networkplumber.org> <20190410174132.8349-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v6 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: <20190410174131.aQ64HEOTOGsYexP_CfnS4IzTMYLVzkoiFuF2AYj6xB8@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 --- 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