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 02B43A0544; Fri, 27 May 2022 20:18:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBBD1410DC; Fri, 27 May 2022 20:18:33 +0200 (CEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 14CC740E78 for ; Fri, 27 May 2022 20:18:32 +0200 (CEST) Received: by mail-lf1-f41.google.com with SMTP id u23so8090987lfc.1 for ; Fri, 27 May 2022 11:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DUEGBou937xXZO2hVTTU9+mNu3KmWeD84Qaf9kgbcvI=; b=GMqJtRqzNDC7bUTP20Af43SMigyNP0/8O3CpuBENpXpSbgSrQPlb6peRG3TSVcTdzs K9zMZVzzYqaImKfUq9kibCtEWjBZ7U8rEsbaY4nvPDNwVlDk2HpbnJEMvBKGtmG8cDfp psBv39/yI/KElvUx81wWBZQP9gicNoxxe0F0yyjyEeDAD5cXz0gynmxX4HMmoNtiL5nB 4xLVFe4Nus9+7C7kxlaDUNYiGnrClRPHEHN6mXTbEbcu9rPFx6AENjaE9zG3/9dp61sB sKAFX/tbXfKSuNw4Vm6BdGR/10WwEANd74T9wGmv9W5rOsudTRpq6ScBmFeeKEWPPFMN 6q2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DUEGBou937xXZO2hVTTU9+mNu3KmWeD84Qaf9kgbcvI=; b=o017YG3WGNEy+Ew2MqKEZHqucmPzmbPmrb7KT/P+swfRgh0XKeIcaY5qmHDNyM+LeV Wb1LqwKJCoPtkxiyRPnBWSf+qecZRcIaQ9lIjfw9WQChGU6eCAekB7RKU9RIQY/vYU+X nO/mQKm/k7Yx3VrOZNuJWI00Tz61cLnLelBSIiqKlX23q1Ya8X3iNGNcy2c5jUbK8UkT jxn5EJuJ4VXl8Lpl4oGHTNPhtEHbDVRiPHTtZpInP+z/1kVKQQwTIDoLDcmZ74ntw4qP m+SGD7feVok0F9FAAo0SBwI1qNSMAeXRLq1UjRo5nw1grdeOerGVJ5AhuUzFahoBXglw GBxw== X-Gm-Message-State: AOAM531qW/AoDdCphPv4IgiNxz02WXnI03dq9PUleGFQXNigY6OOj2yt RJAo6yjTWwY8//DKWfcw5oUqBA== X-Google-Smtp-Source: ABdhPJzXNM9RXCYzVnUTPeFC7vjrzaYFMLcJD6yMRmJhur632o63C4JIBBXLkJRrPR4s8WNX4JRG+g== X-Received: by 2002:a19:7617:0:b0:478:66a4:c61d with SMTP id c23-20020a197617000000b0047866a4c61dmr21491706lff.600.1653675511513; Fri, 27 May 2022 11:18:31 -0700 (PDT) Received: from localhost.localdomain (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id f17-20020a193811000000b0047255d211a5sm958545lfa.212.2022.05.27.11.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:18:31 -0700 (PDT) From: Stanislaw Kardach To: Vladimir Medvedkin Cc: Stanislaw Kardach , dev@dpdk.org, Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: [PATCH v2 1/2] lpm: add const to lpm arg of rte_lpm_lookup Date: Fri, 27 May 2022 20:18:21 +0200 Message-Id: <20220527181822.716758-1-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220510115824.457885-1-kda@semihalf.com> References: <20220510115824.457885-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org All other rte_lpm_lookup* functions take lpm argument as a const. As the basic rte_lpm_lookup() performs the same function, it should also do that. As this function is inline, no API/ABI change happens. Signed-off-by: Stanislaw Kardach --- lib/lpm/rte_lpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lpm/rte_lpm.h b/lib/lpm/rte_lpm.h index eb91960e81..1cf863a146 100644 --- a/lib/lpm/rte_lpm.h +++ b/lib/lpm/rte_lpm.h @@ -279,7 +279,7 @@ rte_lpm_delete_all(struct rte_lpm *lpm); * -EINVAL for incorrect arguments, -ENOENT on lookup miss, 0 on lookup hit */ static inline int -rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop) +rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop) { unsigned tbl24_index = (ip >> 8); uint32_t tbl_entry; -- 2.30.2