public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
* [PATCH] fib: fix name of main TRIE instance memory region
@ 2026-03-16 13:05 Andrew Rybchenko
  2026-03-16 15:30 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Rybchenko @ 2026-03-16 13:05 UTC (permalink / raw)
  To: dev; +Cc: Vladimir Medvedkin

mem_name was built, but not used when memory is allocated.

Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/fib/trie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index fa5d9ec6b0..cd61446dd3 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -678,7 +678,7 @@ trie_create(const char *name, int socket_id,
 	num_tbl8 = conf->trie.num_tbl8;
 
 	snprintf(mem_name, sizeof(mem_name), "DP_%s", name);
-	dp = rte_zmalloc_socket(name, sizeof(struct rte_trie_tbl) +
+	dp = rte_zmalloc_socket(mem_name, sizeof(struct rte_trie_tbl) +
 		TRIE_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t),
 		RTE_CACHE_LINE_SIZE, socket_id);
 	if (dp == NULL) {
-- 
2.47.3


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

* Re: [PATCH] fib: fix name of main TRIE instance memory region
  2026-03-16 13:05 [PATCH] fib: fix name of main TRIE instance memory region Andrew Rybchenko
@ 2026-03-16 15:30 ` Stephen Hemminger
  2026-03-16 16:06   ` Andrew Rybchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2026-03-16 15:30 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dev, Vladimir Medvedkin

On Mon, 16 Mar 2026 16:05:18 +0300
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> wrote:

> mem_name was built, but not used when memory is allocated.
> 
> Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---

Ok but the name argument is only used for tracing.
It can just be NULL

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

* Re: [PATCH] fib: fix name of main TRIE instance memory region
  2026-03-16 15:30 ` Stephen Hemminger
@ 2026-03-16 16:06   ` Andrew Rybchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2026-03-16 16:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Vladimir Medvedkin

On 3/16/26 6:30 PM, Stephen Hemminger wrote:
> On Mon, 16 Mar 2026 16:05:18 +0300
> Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> wrote:
> 
>> mem_name was built, but not used when memory is allocated.
>>
>> Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>> ---
> 
> Ok but the name argument is only used for tracing.
> It can just be NULL

Yes, I know. IMHO the consistency is the main issue here.
It is simply wrong to prepare mem_name and do not use it.
Obviously the second option is use delete above snprintf(),
but I try to follow the author idea as I understand it.


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

end of thread, other threads:[~2026-03-16 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 13:05 [PATCH] fib: fix name of main TRIE instance memory region Andrew Rybchenko
2026-03-16 15:30 ` Stephen Hemminger
2026-03-16 16:06   ` Andrew Rybchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox