build: add option to override max ethports
PATCH 1/1 build: add option to override max ethports
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.
--- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-)
config/meson.build +1 -0
@@ -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
config/rte_config.h +0 -1
@@ -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
meson_options.txt +2 -0
@@ -28,3 +28,5 @@ option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('max_ethports', type: 'string', value: '32', + description: 'maximum number of Ethernet devices in EAL')
Signature · 1 line
2.17.2
Quoted 5 lines · Chas Williams
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.Signed-off-by Chas Williams <[email protected]>
Agree with the idea. Just one small comment below re alphabetical order.
Otherwise:
Quoted 36 lines
--- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-)config/meson.build +1
-0@@ -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 overriddenconfig/rte_config.h +0
-1@@ -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 1meson_options.txt +0
-0
meson_options.txt option('use_hpet', type: 'boolean', value: false, · line 32
Quoted 5 lines
meson_options.txt +2
-0@@ -28,3 +28,5 @@ option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('max_ethports', type: 'string', value: '32', + description: 'maximum number of Ethernet devices in EAL')
We are trying to keep the options in alphabetical order, so this setting should be just before "max_lcores" rather than at the end.
Interestingly, I see that since 0.45 there is now the option of an "integer" option type. We should probably switch to use that once we bump our minimum meson version. [Luca, perhaps another change for your set?]
Ref: http://mesonbuild.com/Build-options.html#integers
Quoted 12 lines · Bruce Richardson
Quoted 5 lines · Chas Williams
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.Signed-off-by Chas Williams <[email protected]>Agree with the idea. Just one small comment below re alphabetical order.
Otherwise:
Acked-by Bruce Richardson <[email protected]>
...
Quoted 3 lines
We are trying to keep the options in alphabetical order, so this setting should be just before "
max_lcores" rather than at the end.
If you look at the last few lines in this file:
option('use_hpet', type: 'boolean', value: false,
description: 'use HPET timer in EAL')
option('tests', type: 'boolean', value: true,
description: 'build unit tests')
I couldn't detect any ordering so I just appended. I can submit a v2.
Quoted 4 lines
Interestingly, I see that since 0.45 there is now the option of an "integer" option type. We should probably switch to use that once we bump our minimum meson version. [Luca, perhaps another change for your set?]
Ref: http://mesonbuild.com/Build-options.html#integers
I just followed along with what everyone else was doing.
Quoted 20 lines · Chas Williams
Quoted 12 lines · Bruce Richardson
Quoted 5 lines · Chas Williams
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.Signed-off-by Chas Williams <[email protected]>Agree with the idea. Just one small comment below re alphabetical order.
Otherwise:
Acked-by Bruce Richardson <[email protected]>...
Quoted 3 lines
We are trying to keep the options in alphabetical order, so this setting should be just before "
max_lcores" rather than at the end.
Quoted 8 lines
If you look at the last few lines in this file:
option('use_hpet', type: 'boolean', value: false,
description: 'use HPET timer in EAL')
option('tests', type: 'boolean', value: true,
description: 'build unit tests')I couldn't detect any ordering so I just appended. I can submit a v2.
Yes, that was an oversight that was missed when we were adding those options, or I just got my alphabet scrambled in my mind. :-) Thanks for the v2.
Quoted 7 lines
Quoted 5 lines
Interestingly, I see that since 0.45 there is now the option of an "integer" option type. We should probably switch to use that once we bump our minimum meson version. [Luca, perhaps another change for your set?]
Ref: http://mesonbuild.com/Build-options.html#integersI just followed along with what everyone else was doing.
Yep, no problem here. Since we still support from 0.41 onwards we can't use integer anyway, so what you did is perfectly correct.
Quoted 60 lines · Bruce Richardson
Quoted 5 lines · Chas Williams
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.Signed-off-by Chas Williams <[email protected]>Agree with the idea. Just one small comment below re alphabetical order.
Otherwise:
Acked-by Bruce Richardson <[email protected]>Quoted 41 lines
---
config/meson.build | 1 +
config/rte_config.h | 1 -
meson_options.txt | 2 ++3 files changed, 3 insertions(+), 1 deletion(-)config/meson.build +1
-0@@ -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 overriddenconfig/rte_config.h +0
-0@@ -51,7 +51,6 @@ #define RTE_PKTMBUF_HEADROOM 128
/* ether defines */
-#defineRTE_MAX_ETHPORTS32
#defineRTE_MAX_QUEUES_PER_PORT1024
#defineRTE_ETHDEV_QUEUE_STAT_CNTRS16
#defineRTE_ETHDEV_RXTX_CALLBACKS1meson_options.txt +2
-0@@ -28,3 +28,5 @@ option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('max_ethports', type: 'string', value: '32', + description: 'maximum number of Ethernet devices in EAL')Quoted 1 line
--
We are trying to keep the options in alphabetical order, so this setting
should be just before "max_lcores" rather than at the end.
Quoted 6 lines
Interestingly, I see that since 0.45 there is now the option of an "integer" option type. We should probably switch to use that once we bump
our minimum meson version. [Luca, perhaps another change for your set?]
Ref: http://mesonbuild.com/Build-options.html#integers
Sounds good, I've added this change in v6 of the series
Signature · 2 lines
Kind regards, Luca Boccassi
PATCH v2 1/2 build: add option to override max ethports
In reply to Chas WilliamsAllow users and packagers to override the default RTE_MAX_ETHPORTS. This adds a new meson option, max_ethports which defaults to the current value.
--- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-)
config/meson.build +1 -0
@@ -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
config/rte_config.h +0 -1
@@ -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
meson_options.txt +2 -0
@@ -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: '64', + 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',
Signature · 1 line
2.17.2
Quoted 4 lines · Chas Williams
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.
Actually in this v2, you have changed it to 64 from 32. :-) Otherwise all fine, but perhaps this can be fixed on apply if no v3.
Quoted 48 lines
Signed-off-by Chas Williams <[email protected]>Acked-by Bruce Richardson <[email protected]>--- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-)config/meson.build +1
-0@@ -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 overriddenconfig/rte_config.h +0
-1@@ -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 1meson_options.txt +2
-0@@ -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: '64', + 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',Signature · 1 line
2.17.2
Quoted 8 lines · Bruce Richardson
Quoted 4 lines · Chas Williams
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.Actually in this v2, you have changed it to 64 from 32. :-) Otherwise all fine, but perhaps this can be fixed on apply if no v3.
Oops. I can make it 32 again.
Quoted 49 lines
Quoted 49 lines
Signed-off-by Chas Williams <[email protected]>Acked-by Bruce Richardson <[email protected]>--- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-)config/meson.build +1
-0@@ -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 overriddenconfig/rte_config.h +0
-1@@ -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 1meson_options.txt +2
-0@@ -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: '64', + 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',Signature · 1 line
2.17.2
PATCH v2 2/2 build: fix option ordering
In reply to Chas WilliamsSort the options alphabetically and make a note of the preferred order at the top of the file.
--- meson_options.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
meson_options.txt +8 -6
@@ -1,15 +1,17 @@ +# Please keep these options sorted alphabetically. + option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') -option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared', - description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') -option('enable_kmods', type: 'boolean', value: true, - description: 'build kernel modules') option('enable_docs', type: 'boolean', value: false, description: 'build documentation') +option('enable_kmods', type: 'boolean', value: true, + description: 'build kernel modules') option('examples', type: 'string', value: '', description: 'Comma-separated list of examples to build by default') +option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared', + description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers') option('kernel_dir', type: 'string', value: '',
@@ -26,7 +28,7 @@ option('max_numa_nodes', type: 'string', value: '4', description: 'maximum number of NUMA nodes supported by EAL') option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib') -option('use_hpet', type: 'boolean', value: false, - description: 'use HPET timer in EAL') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('use_hpet', type: 'boolean', value: false, + description: 'use HPET timer in EAL')
Signature · 1 line
2.17.2
Re: [PATCH 2/2,v2] build: fix option ordering
Quoted 8 lines · Chas Williams
Sort the options alphabetically and make a note of the preferred order at the top of the file.
Signed-off-by Chas Williams <[email protected]>--- meson_options.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
Thanks for the cleanup.
PATCH v3 1/2 build: add option to override max ethports
In reply to Chas WilliamsAllow users and packagers to override the default RTE_MAX_ETHPORTS. This adds a new meson option, max_ethports which defaults to the current value.
--- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-)
config/meson.build +1 -0
@@ -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
config/rte_config.h +0 -1
@@ -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
meson_options.txt +2 -0
@@ -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',
Signature · 1 line
2.17.2
PATCH v3 2/2 build: fix option ordering
Sort the options alphabetically and make a note of the preferred order at the top of the file.
--- meson_options.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
meson_options.txt +8 -6
@@ -1,15 +1,17 @@ +# Please keep these options sorted alphabetically. + option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') -option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared', - description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') -option('enable_kmods', type: 'boolean', value: true, - description: 'build kernel modules') option('enable_docs', type: 'boolean', value: false, description: 'build documentation') +option('enable_kmods', type: 'boolean', value: true, + description: 'build kernel modules') option('examples', type: 'string', value: '', description: 'Comma-separated list of examples to build by default') +option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared', + description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers') option('kernel_dir', type: 'string', value: '',
@@ -26,7 +28,7 @@ option('max_numa_nodes', type: 'string', value: '4', description: 'maximum number of NUMA nodes supported by EAL') option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib') -option('use_hpet', type: 'boolean', value: false, - description: 'use HPET timer in EAL') option('tests', type: 'boolean', value: true, description: 'build unit tests') +option('use_hpet', type: 'boolean', value: false, + description: 'use HPET timer in EAL')
Signature · 1 line
2.17.2
Re: [v3,PATCH 2/2] build: fix option ordering
Quoted 5 lines · Chas Williams
Sort the options alphabetically and make a note of the preferred order at the top of the file.
Signed-off-by Chas Williams <[email protected]>---
Re: [v3,PATCH 2/2] build: fix option ordering
07/02/2019 17:35, Bruce Richardson:
Quoted 6 lines · Chas Williams
Quoted 4 lines
Sort the options alphabetically and make a note of the preferred order at the top of the file.
Signed-off-by Chas Williams <[email protected]>Acked-by Bruce Richardson <[email protected]>
Series applied with a small fix in the meson description.
07/02/2019 16:53, Chas Williams:
meson_options.txt option('lib_musdk_dir', type: 'string', value: '', · line 22
Quoted 11 lines
Allow users and packagers to override the default
RTE_MAX_ETHPORTS. This adds a new meson option,max_ethportswhich defaults to the current value.Signed-off-by Chas Williams <[email protected]>Acked-by Bruce Richardson <[email protected]>---
meson_options.txt +2
-0+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.