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 7B357A0096 for ; Tue, 9 Apr 2019 20:20:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A524F548B; Tue, 9 Apr 2019 20:20:22 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 4F7454F94 for ; Tue, 9 Apr 2019 20:20:15 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id k3so9780974pga.6 for ; Tue, 09 Apr 2019 11:20:15 -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=SSSBLoR9OE8Q/R/fg+Z/hF+vnCUmmcMnxJaqkkrYwP7Hu0LhqiwdPVoSKGdpuA1EtY i34LXJ6d82qX3uKNIBNminK7NlIaOsQXhTjT09Gr6u6vuGfYr3SLGY6+6g9H0XDBL4Td h6R7s4qFwqMkE1KKhSnXSSlU1jucJtneFfasTvnXgDCiA0CD2qRDnK90Kq+1w8PUJ7MY TXuINtCHH3MvLJtYyWvGfDA3fcfPN3x3SDzljI1LfvtPEbobNg+SL/ncQx0kwKZqwZde TgrkK6I+3VWscN7U2rxbFln2c5+6cCEFMljbIxcIAdivoDDhcaCZUm+305jeJssSfP+F 1EGw== 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=NhTWhdTgRvywkQTkAOZuurhY4loBSvl1ObzSakSNUxpLg3KOfbruXgletIZcshYX5Q RTm03+N/DPdDvtYjRFpnMZKB8owDMsopZ449Cj1O4R1Hxz+tIB7N8kT39qwoMmhrE8L+ g5shx2aAp551UXGpJ311IS1l+zZ9S2mZTN/gVFhn4sOYuxd2V4M/AGHOM2KLS0DbezUu Zxjseku52/gF0JOaId8o/Hph62OREH0nwH3PBOsOiXP+K0Jg96vVYkn3GDMRZsOQcOoK JYCg5LGzSzt9SjhnFJFczYkUBC6fn3Y3ARKCMoQ7hVcSssKDweL4AezkIJRAYA7p1eP7 tUPA== X-Gm-Message-State: APjAAAU8TxFg56Ue4cMhLm1Ft7VzvLj08qtGtyGVM9byy3iWoUuNKjL6 31UiGLaaM7WzfkhUYOYtsFZvs4nb/QQgfw== X-Google-Smtp-Source: APXvYqzW7J66S4DpPpEkxlH8Co5k6yhw7mE/EnzlYBm2QoSFlRGiga/USijxmQgIx9tBQ+/jz7tS6g== X-Received: by 2002:a62:e412:: with SMTP id r18mr38067653pfh.207.1554834013852; Tue, 09 Apr 2019 11:20: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 128sm18538293pgb.47.2019.04.09.11.20.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 11:20:12 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 9 Apr 2019 11:20:05 -0700 Message-Id: <20190409182006.12944-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190409182006.12944-1-stephen@networkplumber.org> References: <20190402203907.28679-1-stephen@networkplumber.org> <20190409182006.12944-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v5 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: <20190409182005.cW8tpKHRrq8ebJpRSKIA_4RxIZOlmAgLRe0mL8hJIuE@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