DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup
@ 2022-06-01 11:15 Stanislaw Kardach
  2022-06-01 11:15 ` [PATCH v4 2/2] lpm: add a scalar version of lookupx4 function Stanislaw Kardach
  2022-06-02 20:52 ` [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup Thomas Monjalon
  0 siblings, 2 replies; 7+ messages in thread
From: Stanislaw Kardach @ 2022-06-01 11:15 UTC (permalink / raw)
  To: Vladimir Medvedkin
  Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, upstream,
	Stephen Hemminger

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 <kda@semihalf.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-03  9:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 11:15 [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
2022-06-01 11:15 ` [PATCH v4 2/2] lpm: add a scalar version of lookupx4 function Stanislaw Kardach
2022-06-01 11:52   ` Medvedkin, Vladimir
2022-06-03  9:23     ` Thomas Monjalon
2022-06-02 20:52 ` [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup Thomas Monjalon
2022-06-03  7:29   ` Bruce Richardson
2022-06-03  7:43     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).