Skip to contentSkip to conversation

build: add option to override max ethports

PATCH Superseded Chas Williams 4 participants 15 messages Jan 31, 2019 – Feb 26, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

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
index db32499b3..e59507065 100644
@@ -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
index d3732e953..7606f5d7b 100644
@@ -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
index 574054597..e54eedc66 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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.

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
index db32499b3..e59507065 100644
@@ -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
index d3732e953..7606f5d7b 100644
@@ -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 +0 -0
index 574054597..e54eedc66 100644

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

#2 lore raw
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_ethports which defaults to the current value.

Agree with the idea. Just one small comment below re alphabetical order.

Otherwise:

...

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.

#3 lore raw
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_ethports which defaults to the current value.

Agree with the idea. Just one small comment below re alphabetical order.

Otherwise:

...

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#integers

I 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.

#4 lore raw
In reply to Bruce Richardson
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_ethports which defaults to the current value.

Agree with the idea. Just one small comment below re alphabetical order.

Otherwise:

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
index db32499b3..e59507065 100644
@@ -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 -0
index d3732e953..7606f5d7b 100644
@@ -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
index 574054597..e54eedc66 100644
@@ -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
#5 lore raw

PATCH v2 1/2 build: add option to override max ethports

In reply to 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.

---
 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
index db32499b3..e59507065 100644
@@ -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
index d3732e953..7606f5d7b 100644
@@ -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
index 574054597..499573ed4 100644
@@ -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
#6 lore raw
Quoted 4 lines · 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.

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
---
 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
index db32499b3..e59507065 100644
@@ -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
index d3732e953..7606f5d7b 100644
@@ -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
index 574054597..499573ed4 100644
@@ -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
#7 lore raw
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_ethports which 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
---
  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
index db32499b3..e59507065 100644
@@ -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
index d3732e953..7606f5d7b 100644
@@ -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
index 574054597..499573ed4 100644
@@ -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
#8 lore raw

PATCH v2 2/2 build: fix option ordering

In reply to Chas Williams

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
index 499573ed4..db448c74e 100644
@@ -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
#10 lore raw

PATCH v3 1/2 build: add option to override max ethports

In reply to 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.

---
 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
index db32499b3..e59507065 100644
@@ -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
index d3732e953..7606f5d7b 100644
@@ -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
index 574054597..5bae08bb3 100644
@@ -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
#11 lore raw

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
index 5bae08bb3..c6454fe29 100644
@@ -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
#14 lore raw
In reply to Chas Williams

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_ethports which defaults to the current value.

---

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.