From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 532F1A0530; Sun, 26 Jan 2020 02:09:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D3011B952; Sun, 26 Jan 2020 02:09:29 +0100 (CET) Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by dpdk.org (Postfix) with ESMTP id B8D2F5B3A for ; Sun, 26 Jan 2020 02:09:25 +0100 (CET) Received: by mail-pj1-f67.google.com with SMTP id gv17so1576569pjb.1 for ; Sat, 25 Jan 2020 17:09:25 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=H2MaMZyuKvOpMuKMbVqnLtAlSYhNMP3EOxzQP2E6E/4=; b=SaF345hXTdufdmAS/59g0ZcBtAx1v+67mDeRHzXLvcLDAcARRGoPlEAfDnJE7HtWyb dg/9VLbNL5NgvQ3nB05h+yDfdIqQjKS05LldbrjNtsXyofu+zvqFtND/8tmCj+ZRFBV1 SyjoQ6o2t6y9a2dDKKb82f7zz/izwO6hLYKep4mXSAf92HpIHCsDS7CBDCo3aqkRHDSK L2u4tZn/DZw+B++Qd811uTGoJ1gQkRnASnTn9VifnUs5Z3/QaAggcl0CxAVvJGFPG2s7 GzXzj64X2hRre77Z/48k9VX4GzV9GbhgGLl0iJM2aeMrXAxXYhoAAWzmHfKlb46a+A8I Xs0A== 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:mime-version:content-transfer-encoding; bh=H2MaMZyuKvOpMuKMbVqnLtAlSYhNMP3EOxzQP2E6E/4=; b=AaCxWKjyOxBGzEgOzWbXHgGChkNI3RP7LJGC+P2GwumEydcc+cLrL0yvPy6l/PBJRG TZzrRFoBj5VTsJWiJJBjjwQJWDPHMgmr03TwCv6WGdDYhk9BVhNTOHGfI+wCmw42Kaal y5OOIziNg5e+GS0rYxOHdbY1IxtC7EGkHvjGnIeA/qJYMogAeXgvj/y5IN7YKlV5vBiI duBhMimgRfka9Ps830ZT0MGGXJHJ/ax0P+DLxTlqSRuzWVBI07T/eVSjixQS5znFMf4Z RE7eO+FASDSdDpYtdl3i+oHceXgE93lCvjPRu5cXu9NuvXgV236NEwO0qKEmuvZeylZF Rj6Q== X-Gm-Message-State: APjAAAVYyWu7bh4yjkY0WlRc0hQJ9W8tWxTUNh1fLIJGr3rjf18Xj9Pe AWJAgXPP8e4bUpBZgyFGd5exUb3b2zM= X-Google-Smtp-Source: APXvYqxFbs9m9ZPOoRhXVyVK3BPUKMcjEcQl5dscH+VioYwjT5Z9zjsSv3FE2rgvN2ke2xzDi1fzUg== X-Received: by 2002:a17:90b:941:: with SMTP id dw1mr7216536pjb.21.1580000964393; Sat, 25 Jan 2020 17:09:24 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id t1sm11560267pgq.23.2020.01.25.17.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2020 17:09:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Sat, 25 Jan 2020 17:09:10 -0800 Message-Id: <20200126010911.3733-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200126010911.3733-1-stephen@networkplumber.org> References: <20200126010911.3733-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 4/5] examples/l3fwd: make route array constant 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" The initial route setup array is unmodified by the lpm code and can be made constant. This depends on earlier patch to fix the rte_lpm6 to use const. Signed-off-by: Stephen Hemminger --- examples/l3fwd/l3fwd_lpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index 486f19963fc4..30f6385419ee 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -42,7 +42,7 @@ struct ipv6_l3fwd_lpm_route { }; /* 198.18.0.0/16 are set aside for RFC2544 benchmarking (RFC5735). */ -static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { +static const 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}, {RTE_IPV4(198, 18, 2, 0), 24, 2}, @@ -54,7 +54,7 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = { }; /* 2001:0200::/48 is IANA reserved range for IPv6 benchmarking (RFC5180) */ -static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = { +static const 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}, -- 2.20.1