From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A2FBA0A02 for ; Mon, 17 May 2021 18:15:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1296140041; Mon, 17 May 2021 18:15:26 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 4432E40041 for ; Mon, 17 May 2021 18:15:25 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1liftt-0008Ct-0O; Mon, 17 May 2021 16:15:25 +0000 From: Christian Ehrhardt To: Conor Walsh Cc: Vladimir Medvedkin , dpdk stable Date: Mon, 17 May 2021 18:09:11 +0200 Message-Id: <20210517161039.3132619-122-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> References: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' has been queued to stable release 19.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/19/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/34bb672c0c978ad7ed90af691bc57a1cb8b57b68 Thanks. Christian Ehrhardt --- >From 34bb672c0c978ad7ed90af691bc57a1cb8b57b68 Mon Sep 17 00:00:00 2001 From: Conor Walsh Date: Fri, 16 Apr 2021 17:19:37 +0000 Subject: [PATCH] examples/l3fwd: fix LPM IPv6 subnets [ upstream commit 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef ] Any IP within the 2001:200::/48 subnet will match all the routes given instead of 1 individual route and the application cannot differentiate between them. The change in this patch allows the ports to be individually matched using smaller /64 ranges for each port. These smaller subnet ranges are still within the 2001:200::/48 subnet range set aside for benchmarking in RFC5180. l3fwd will now use 2001:200:0:{0-7}::/64 where 0-7 is the port ID for IPv6. Fixes: 37afe381bde4 ("examples/l3fwd: use reserved IP addresses") Signed-off-by: Conor Walsh Acked-by: Vladimir Medvedkin --- examples/l3fwd/l3fwd_lpm.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index 349de2703c..c6b67cea2e 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -41,7 +41,10 @@ struct ipv6_l3fwd_lpm_route { uint8_t if_out; }; -/* 198.18.0.0/16 are set aside for RFC2544 benchmarking (RFC5735). */ +/* + * 198.18.0.0/16 are set aside for RFC2544 benchmarking (RFC5735). + * 198.18.{0-7}.0/24 = Port {0-7} + */ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { {RTE_IPV4(198, 18, 0, 0), 24, 0}, {RTE_IPV4(198, 18, 1, 0), 24, 1}, @@ -53,16 +56,19 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { {RTE_IPV4(198, 18, 7, 0), 24, 7}, }; -/* 2001:0200::/48 is IANA reserved range for IPv6 benchmarking (RFC5180) */ +/* + * 2001:200::/48 is IANA reserved range for IPv6 benchmarking (RFC5180). + * 2001:200:0:{0-7}::/64 = Port {0-7} + */ static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = { - {{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}, + {{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, 1, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 1}, + {{32, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 2}, + {{32, 1, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 3}, + {{32, 1, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 4}, + {{32, 1, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 5}, + {{32, 1, 2, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 6}, + {{32, 1, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 7}, }; #define IPV4_L3FWD_LPM_NUM_ROUTES \ -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-17 17:40:34.204903671 +0200 +++ 0122-examples-l3fwd-fix-LPM-IPv6-subnets.patch 2021-05-17 17:40:29.351810894 +0200 @@ -1 +1 @@ -From 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef Mon Sep 17 00:00:00 2001 +From 34bb672c0c978ad7ed90af691bc57a1cb8b57b68 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 375746fef0..5af87dbd69 100644 +index 349de2703c..c6b67cea2e 100644 @@ -28 +29 @@ -@@ -42,7 +42,10 @@ struct ipv6_l3fwd_lpm_route { +@@ -41,7 +41,10 @@ struct ipv6_l3fwd_lpm_route { @@ -37 +38 @@ - static const struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { + static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { @@ -40 +41 @@ -@@ -54,16 +57,19 @@ static const struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { +@@ -53,16 +56,19 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { @@ -49 +50 @@ - static const struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = { + static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = { @@ -68 +69 @@ - #define IPV4_L3FWD_LPM_MAX_RULES 1024 + #define IPV4_L3FWD_LPM_NUM_ROUTES \