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 8447CA055A; Fri, 27 May 2022 13:17:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6237140E78; Fri, 27 May 2022 13:17:10 +0200 (CEST) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mails.dpdk.org (Postfix) with ESMTP id 4419E40E5A for ; Fri, 27 May 2022 13:17:09 +0200 (CEST) Received: by mail-lf1-f45.google.com with SMTP id l30so1282445lfj.3 for ; Fri, 27 May 2022 04:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+xQbIec/3wzEBE+V3G91BPzjA3Rsx4g7OWXpOF6wcd0=; b=wLZSOJbhPb0UhYno3A2CQqIEs4CHZfPaW7c7XBt+24jz+eNF1v4nOf6FETTA0hIBJ/ ytf0ys8e5xiZk4Hj4BdUgGVj1jGhwIrgapjutC7S+mJbQIr/mrb/Xl6/17AS5lICXFTW PSNxebsA8A4bXnzxJBO2t+Jp05dQbcia4DvUCyXNYXODbp2kaTCO/kIZ28RzPCe7DQDu 9VEY7uijBiX5t1CU+mX5z0JbIHaE8/nyVrBUsx//tCW7fIrDHIbhevet3IaiWuGDcG4P QbjEWyOtoHuuI1irf1TvH3zTwUlqeAqQWZvK7u4Od33QbaxjSZBunnEDLnKSACmFrrNa 8TcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+xQbIec/3wzEBE+V3G91BPzjA3Rsx4g7OWXpOF6wcd0=; b=6aMGgyLSp55vBbKc4UM1uMk1ZeW+QJEM8e7bWpE0vznxAhQ+U4BhlTGk+Az509AQ1l Nf6+P8KkGCzcBcBkEVHQ4uSFUUN4y1AVcvyg+4xXWE0eOwwj1zoD/Lm0dpbhbF+I0G93 JZ4zjxjJCs3pDIHp6mEenWotHUzENTGizNaZsU7iDDvdA2wOGDhCSxYJ5TOiOEn9Z2dg dxZGGb+JxkRF9CWS38ZL5Vrlx7by7J5nsvLw/OIS0yKlqXwAN5Z9MlKbFcTCyxyj/zll vO0BPup/FAolSlFUTZnP95zn67wWPoyUrKcEfR6vwNTvSCkgn6d6eRVEPubjOSVBNUOE B3rQ== X-Gm-Message-State: AOAM530IwjcHHoZoJ2Hd0xouREvgG0NUbSDREi9NXkpgnVYAdgj0aJ5h qRJamhsTBlEgZlokxSqdaGE0AJFjtKysBOQUmQ/Ncw== X-Google-Smtp-Source: ABdhPJzalfxeZfYG9N36hIafmrxtIhh78/I7GrlsHWtT9axQa+bj1woVCA9z5/DGI3ntz43FlmJMb/CeeujUHyVTjdE= X-Received: by 2002:a05:6512:1520:b0:443:ec43:5fe8 with SMTP id bq32-20020a056512152000b00443ec435fe8mr29938991lfb.589.1653650228729; Fri, 27 May 2022 04:17:08 -0700 (PDT) MIME-Version: 1.0 References: <20220510115824.457885-1-kda@semihalf.com> In-Reply-To: From: =?UTF-8?Q?Stanis=C5=82aw_Kardach?= Date: Fri, 27 May 2022 13:16:32 +0200 Message-ID: Subject: Re: [PATCH 1/1] lpm: add a scalar version of lookupx4 function To: "Medvedkin, Vladimir" Cc: Michal Mazurek , dev , Frank Zhao , Sam Grove , Marcin Wojtas , upstream@semihalf.com, Bruce Richardson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, May 24, 2022 at 6:28 PM Stanis=C5=82aw Kardach w= rote: > That said I wonder why do we have different const requirements for > rte_lpm_lookup() and rte_lpm_lookupx4(): > static inline int rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, > uint32_t *next_hop) > static inline void rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t > ip, uint32_t hop[4], uint32_t defv); > I think both should be const. > To re-iterate the question, should I also post a patch for changing rte_lpm_lookup() to add "const" to "struct rte_lpm *lpm" argument? rte_lpm_lookup_bulk_func() and rte_lpm_lookupx4() already take lpm as const. I'm pushing because otherwise I get a const discard warning in the scalar version of rte_lpm_lookupx4() utilizing rte_lpm_lookup(). Best Regards, Stanislaw Kardach