DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ophir Munk <ophirmu@nvidia.com>
To: <dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>
Cc: Ophir Munk <ophirmu@mellanox.com>, Matan Azrad <matan@nvidia.com>,
	"Thomas Monjalon" <thomas@monjalon.net>,
	Lior Margalit <lmargalit@nvidia.com>,
	"Asaf Penso" <asafp@nvidia.com>
Subject: [PATCH v1] config: make max memzones definition configurable
Date: Sun, 12 Feb 2023 10:53:19 +0200	[thread overview]
Message-ID: <20230212085319.693689-1-ophirmu@nvidia.com> (raw)

In current DPDK the RTE_MAX_MEMZONE definition is unconditionally hard
coded as 2560.  For applications requiring different values of this
parameter – it is more convenient to set its value as part of the meson
command line rather than changing the dpdk source code per application.
An example would be of an application that uses the DPDK mempool library
which is based on DPDK memzone library.  The application may need to
create a number of steering tables, each of which will require its own
mempool allocation.
This commit adds a meson optional parameter named max_memzones. If not
specified - it is set by default to 2560. The hard coded definition of
RTE_MAX_MEMZONE is removed. During meson build time the RTE_MAX_MEMZONE
can be optionally defined as the value of max_memzones parameter.

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
---
RFC:
https://patchwork.dpdk.org/project/dpdk/patch/20230130092302.376145-1-ophirmu@nvidia.com/

 config/meson.build  | 1 +
 config/rte_config.h | 1 -
 meson_options.txt   | 2 ++
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/config/meson.build b/config/meson.build
index 26f3168..b55390f 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -304,6 +304,7 @@ endforeach
 dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports'))
 dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
 dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp'))
+dpdk_conf.set('RTE_MAX_MEMZONE', get_option('max_memzones'))
 # values which have defaults which may be overridden
 dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
 dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
diff --git a/config/rte_config.h b/config/rte_config.h
index 7b8c85e..400e44e 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -34,7 +34,6 @@
 #define RTE_MAX_MEM_MB_PER_LIST 32768
 #define RTE_MAX_MEMSEG_PER_TYPE 32768
 #define RTE_MAX_MEM_MB_PER_TYPE 65536
-#define RTE_MAX_MEMZONE 2560
 #define RTE_MAX_TAILQ 32
 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
 #define RTE_MAX_VFIO_CONTAINERS 64
diff --git a/meson_options.txt b/meson_options.txt
index 0852849..62888fe 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -36,6 +36,8 @@ option('machine', type: 'string', value: 'auto', description:
        'Alias of cpu_instruction_set.')
 option('max_ethports', type: 'integer', value: 32, description:
        'maximum number of Ethernet devices')
+option('max_memzones', type: 'integer', value: 2560, description:
+       'maximum number of memory zones supported by EAL')
 option('max_lcores', type: 'string', value: 'default', description:
        'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.')
 option('max_numa_nodes', type: 'string', value: 'default', description:
-- 
2.8.4


             reply	other threads:[~2023-02-12  8:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12  8:53 Ophir Munk [this message]
2023-02-13 11:05 ` Bruce Richardson
2023-02-13 13:55   ` Thomas Monjalon
2023-02-13 14:52     ` Bruce Richardson
2023-02-13 17:04       ` Ophir Munk
2023-02-21 10:28         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230212085319.693689-1-ophirmu@nvidia.com \
    --to=ophirmu@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=lmargalit@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=ophirmu@mellanox.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).