build: add option to override max ethdev ports

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>
This commit is contained in:
Chas Williams 2019-02-07 10:53:17 -05:00 committed by Thomas Monjalon
parent d23e141ffa
commit d5555fc900
3 changed files with 3 additions and 1 deletions

View File

@ -105,6 +105,7 @@ endforeach
# set other values pulled from the build options # set other values pulled from the build options
dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores')) 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_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_LIBEAL_USE_HPET', get_option('use_hpet'))
dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id')) dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))
# values which have defaults which may be overridden # values which have defaults which may be overridden

View File

@ -51,7 +51,6 @@
#define RTE_PKTMBUF_HEADROOM 128 #define RTE_PKTMBUF_HEADROOM 128
/* ether defines */ /* ether defines */
#define RTE_MAX_ETHPORTS 32
#define RTE_MAX_QUEUES_PER_PORT 1024 #define RTE_MAX_QUEUES_PER_PORT 1024
#define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 #define RTE_ETHDEV_QUEUE_STAT_CNTRS 16
#define RTE_ETHDEV_RXTX_CALLBACKS 1 #define RTE_ETHDEV_RXTX_CALLBACKS 1

View File

@ -18,6 +18,8 @@ option('lib_musdk_dir', type: 'string', value: '',
description: 'path to the MUSDK library installation directory') description: 'path to the MUSDK library installation directory')
option('machine', type: 'string', value: 'native', option('machine', type: 'string', value: 'native',
description: 'set the target machine type') description: 'set the target machine type')
option('max_ethports', type: 'string', value: '32',
description: 'maximum number of Ethernet devices')
option('max_lcores', type: 'string', value: '128', option('max_lcores', type: 'string', value: '128',
description: 'maximum number of cores/threads supported by EAL') description: 'maximum number of cores/threads supported by EAL')
option('max_numa_nodes', type: 'string', value: '4', option('max_numa_nodes', type: 'string', value: '4',