[v3,1/2] build: add option to override max ethports

Message ID 20190207155318.12579-1-3chas3@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v3,1/2] build: add option to override max ethports |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Chas Williams Feb. 7, 2019, 3:53 p.m. UTC
  Allow users and packagers to override the default RTE_MAX_ETHPORTS.
This adds a new meson option, max_ethports which defaults to the
current value.

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build  | 1 +
 config/rte_config.h | 1 -
 meson_options.txt   | 2 ++
 3 files changed, 3 insertions(+), 1 deletion(-)
  

Comments

Thomas Monjalon Feb. 26, 2019, 8:19 p.m. UTC | #1
07/02/2019 16:53, Chas Williams:
> Allow users and packagers to override the default RTE_MAX_ETHPORTS.
> This adds a new meson option, max_ethports which defaults to the
> current value.
> 
> Signed-off-by: Chas Williams <3chas3@gmail.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> --- a/meson_options.txt
> +++ b/meson_options.txt
> +option('max_ethports', type: 'string', value: '32',
> +	description: 'maximum number of Ethernet devices in EAL')

Removing (while applying) "in EAL" because it is in ethdev lib.
  

Patch

diff --git a/config/meson.build b/config/meson.build
index db32499b3..e59507065 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -103,6 +103,7 @@  endforeach
 # set other values pulled from the build options
 dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))
 dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
+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_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))
 # values which have defaults which may be overridden
diff --git a/config/rte_config.h b/config/rte_config.h
index d3732e953..7606f5d7b 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -51,7 +51,6 @@ 
 #define RTE_PKTMBUF_HEADROOM 128
 
 /* ether defines */
-#define RTE_MAX_ETHPORTS 32
 #define RTE_MAX_QUEUES_PER_PORT 1024
 #define RTE_ETHDEV_QUEUE_STAT_CNTRS 16
 #define RTE_ETHDEV_RXTX_CALLBACKS 1
diff --git a/meson_options.txt b/meson_options.txt
index 574054597..5bae08bb3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,6 +18,8 @@  option('lib_musdk_dir', type: 'string', value: '',
 	description: 'path to the MUSDK library installation directory')
 option('machine', type: 'string', value: 'native',
 	description: 'set the target machine type')
+option('max_ethports', type: 'string', value: '32',
+	description: 'maximum number of Ethernet devices in EAL')
 option('max_lcores', type: 'string', value: '128',
 	description: 'maximum number of cores/threads supported by EAL')
 option('max_numa_nodes', type: 'string', value: '4',