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 9AFFCA0548; Wed, 1 Jun 2022 13:15:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40EE140689; Wed, 1 Jun 2022 13:15:53 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id 698894003F for ; Wed, 1 Jun 2022 13:15:51 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id 1so1606037ljp.8 for ; Wed, 01 Jun 2022 04:15:51 -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:mime-version :content-transfer-encoding; bh=wP7ttZT9Um0TPiISVA4+oTHyzspPKX95EJ/P1PjqSXo=; b=ILfUW6h9XHeDeQtmFt8azV4hxAxsbw+Dq+G0tLTJaNrdoJBMNUzKwzyQQsLVS18PQf F6RUri6XZl8xHUcsXx5jlPTDSwMtYu+VL3SLHwKaOk9UeJhE0fXZUCWgI+v8tsmqIV7s YELo+ASWr/++fXJqKOt7bAKXfqURW9CudegYzZOv4IarsVwHV5kZJ4VL/A4pbcWPDlif AIr4fHfQYF8qW9lqXSIiDNEr0jA1nUI80Csd71Whpb/dXTon2xXNgw0WJ1ouGH+awO3g HOqrDQ6Z0t/6g6JnMv9G8fHJ++zMaph8eRDfGNUy+r0xnmpjBKJSFaKKd8sqbMt+Lbcz q1+A== 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:mime-version :content-transfer-encoding; bh=wP7ttZT9Um0TPiISVA4+oTHyzspPKX95EJ/P1PjqSXo=; b=AVoaMkwDww31BV+NcjVHTPXXub5ZeJY6BzwZljWpGWmLunSSvqR285XY7g/13P9zX3 yu1bQBcxtzCTMAhZi2EIAPg+Da69m7uUTz9L0E0Wx8KZ5mL+MF7LIkbyZeGR7OZMAv0G q5AxRoldkLb962U1nMl0OBMCyQtpxgDGXN03HCiD0dOi3803O18ti3+RMHQl4SEdf+f1 PFUPZVFRccKVfrJ6vaiFq+DGt0ge8+1bb49P/ZRuQikVz5Gyiw5oogZcNjqFJTAq6N95 F6RN5/x2vitWgKP+mlb/uiljWylPZFxoEX+57zvnPMs4Nlww/Ao9QIhNxPwn7zj/FQJ1 wVQA== X-Gm-Message-State: AOAM532aZp9x0+j62QGe9I9apctdSutwE9X+HYsebRW022crn75XtM+m F08o+6bhF5Mz0859qhi7GcKXgw== X-Google-Smtp-Source: ABdhPJxQmeJapSh2+Tdk/VwyM98DBXdB8UrzPyQH27apadtSol50KiIkryOxob+UBo+uyfnVqvFi6A== X-Received: by 2002:a05:651c:233:b0:255:58b9:1f53 with SMTP id z19-20020a05651c023300b0025558b91f53mr6078950ljn.143.1654082150910; Wed, 01 Jun 2022 04:15:50 -0700 (PDT) Received: from toster.semihalf.net (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id h16-20020a2e5310000000b0024f3d1dae87sm268553ljb.15.2022.06.01.04.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 04:15:50 -0700 (PDT) From: Stanislaw Kardach To: Vladimir Medvedkin Cc: Stanislaw Kardach , dev@dpdk.org, Frank Zhao , Sam Grove , upstream@semihalf.com, Stephen Hemminger Subject: [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup Date: Wed, 1 Jun 2022 13:15:41 +0200 Message-Id: <20220601111542.401360-1-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 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 Acked-by: Vladimir Medvedkin Acked-by: Stephen Hemminger --- 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