Hi Bernard,

Thanks for your review! Comments inline.

+                                       rte_exit(EXIT_FAILURE,
+                                               "mp-alloc %s invalid - must be:
"
+                                               "native, anon or xmem\n",

Should xmemhuge be added to above line?


Yes :)

+                                                optarg);
                        }
                        if (!strcmp(lgopts[opt_idx].name, "port-numa-config"))
{
                                if (parse_portnuma_config(optarg))
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
001f0e552..255a9c664 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -27,6 +27,7 @@
  #include <rte_log.h>
  #include <rte_debug.h>

<snip>

+static int
+pagesz_flags(uint64_t page_sz)
+{
+       /* as per mmap() manpage, all page sizes are log2 of page size
+        * shifted by MAP_HUGE_SHIFT
+        */
+       int log2 = log2_u64(page_sz);

Missing blank line after declarations.


Thanks, will fix.

+       return (log2 << HUGE_SHIFT);
+}
+
+static void *
+alloc_mem(size_t memsz, size_t pgsz, bool huge) {
+       void *addr;
+       int flags;
+
+       /* allocate anon

<snip>

--
2.17.1

The following checkpatch warnings is testpmd.c should probably be fixed.

WARNING: line over 80 characters
#332: FILE: app/test-pmd/testpmd.c:685:
+                       TESTPMD_LOG(ERR, "Cannot allocate memory for iova 
addresses\n");

WARNING: line over 80 characters
#441: FILE: app/test-pmd/testpmd.c:798:
+                       TESTPMD_LOG(INFO, "preferred mempool ops selected: 
%s\n",

WARNING: line over 80 characters
#476: FILE: app/test-pmd/testpmd.c:829:
+                               rte_exit(EXIT_FAILURE, "Could not create external 
memory\n");

WARNING: line over 80 characters
#481: FILE: app/test-pmd/testpmd.c:834:
+                               rte_exit(EXIT_FAILURE, "Could not get external 
memory socket ID\n");

WARNING: line over 80 characters
#483: FILE: app/test-pmd/testpmd.c:836:
+                       TESTPMD_LOG(INFO, "preferred mempool ops selected: 
%s\n",

WARNING: line over 80 characters
#492: FILE: app/test-pmd/testpmd.c:845:
+                       rte_exit(EXIT_FAILURE, "Invalid mempool creation 
mode\n");

Regards,

Bernard.



These should be ignored (and they indeed are ignored by DPDK's own checkpatch script). Strings are allowed to go over 80 characters so as to not make it hard to grep for them.

--
Thanks,
Anatoly

Reply via email to