eal/bsd: fix memory segment index display
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 28 Jun 2018 11:41:47 +0000 (12:41 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Jul 2018 22:58:26 +0000 (00:58 +0200)
Segment index was set to 0 at start but was never incremented.
This has no consequences other than displayed number of segments
allocated at initialization. Fix this by incrementing it after
displaying.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/bsdapp/eal/eal_memory.c

index a5e0347..ca06de2 100644 (file)
@@ -200,7 +200,7 @@ rte_eal_hugepage_init(void)
 
                        RTE_LOG(INFO, EAL, "Mapped memory segment %u @ %p: physaddr:0x%"
                                        PRIx64", len %zu\n",
-                                       seg_idx, addr, physaddr, page_sz);
+                                       seg_idx++, addr, physaddr, page_sz);
 
                        total_mem += seg->len;
                }