From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 6AD60A0530;
	Sun, 26 Jan 2020 02:09:46 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id EB3871B75C;
	Sun, 26 Jan 2020 02:09:27 +0100 (CET)
Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com
 [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 7F5A64C98
 for <dev@dpdk.org>; Sun, 26 Jan 2020 02:09:24 +0100 (CET)
Received: by mail-pl1-f195.google.com with SMTP id p9so2379262plk.9
 for <dev@dpdk.org>; Sat, 25 Jan 2020 17:09:24 -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=X7argtl64QadPyPusopfCglPzIhOlGRHNClkdOL532A=;
 b=qmawQbcP1CHDgRZTPcspe83JBM/xuu/8fMnDJa28VmWmLCiOkD1OWFvGA9S4EyYtmR
 mEVNcr3/oZUD0I4+do/WpfZCq+Hi5Zejoil4cdBiquYQ39tSe3RqejasRmUWCa61MO5o
 qvDVJ5GUtHPh2EycbuQBbhIrw9nR85W8SZJdY+PvAw3z4zIvuBBuCk4UWjJb0WnEqzae
 Ksdfi1TNlCKlzpZhIM6YXrYQuoscVmMqATY+zmNDOdYbQopGGcABBZYoLuPqsrq0ddSd
 FAxMqX2cTNvg84ncl2dbcDmYDp9SKkZIxCvG/85B55XEqduQ8WYEJaef1yqL5WnI8MfK
 4cVA==
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=X7argtl64QadPyPusopfCglPzIhOlGRHNClkdOL532A=;
 b=aevw69CkmdT1H8mycThic21TvC6FqOEwbVocqZsbdQrwZQPyC4kAqFcRZvOH+P3Foz
 LGpYQ0UKb9M07LzwkOGeVVGkxNrVdcFhWxymce85pSAEpFsdJqSUFX465VjwQ5BMEJ+8
 OtFQVU2gdY/heSkUTa8wcbsCxE328adbY8PopKseLpfpI+vZJGCn2iQtv7R9C7v/YG8c
 UZypfDIQtADOEth7i3lcWcI99UzZemeBDmNTOqlQ0Ld170AyotjOfRJQJe3270ER5T42
 6iPgrS1v8k6X9K0+WOg+FEibzd0xx2Tp5kjqrJ98GePg9jjwoznmZo1sMlUCooPJKOIx
 PlEA==
X-Gm-Message-State: APjAAAUOtcFLq3uZkWysvwOcd6kBy0kN6yravM+X9Aqleo+6OTjyIyV9
 Inqoo93gd28uINzqvI99prFDtt543KU=
X-Google-Smtp-Source: APXvYqzoNOtn6AwF++JCM4BrH9CyRJzJjgZ58r7n9tl08nxdgQIETJcEwjMKKNp/K5llBiDC0cPSGw==
X-Received: by 2002:a17:90a:3a86:: with SMTP id
 b6mr7186505pjc.96.1580000963067; 
 Sat, 25 Jan 2020 17:09:23 -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.21
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 25 Jan 2020 17:09:22 -0800 (PST)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 25 Jan 2020 17:09:09 -0800
Message-Id: <20200126010911.3733-4-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 3/5] examples/l3fwd: make lookup struct static
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

The lookup structure is only used in the lpm code and does
not have to be global.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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 b6802d63ba1d..486f19963fc4 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -73,8 +73,8 @@ static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = {
 #define IPV6_L3FWD_LPM_MAX_RULES         1024
 #define IPV6_L3FWD_LPM_NUMBER_TBL8S (1 << 16)
 
-struct rte_lpm *ipv4_l3fwd_lpm_lookup_struct[NB_SOCKETS];
-struct rte_lpm6 *ipv6_l3fwd_lpm_lookup_struct[NB_SOCKETS];
+static struct rte_lpm *ipv4_l3fwd_lpm_lookup_struct[NB_SOCKETS];
+static struct rte_lpm6 *ipv6_l3fwd_lpm_lookup_struct[NB_SOCKETS];
 
 static inline uint16_t
 lpm_get_ipv4_dst_port(void *ipv4_hdr, uint16_t portid, void *lookup_struct)
-- 
2.20.1