drivers/net: build Cavium NIC PMDs with meson

Add Cavium octeontx and thunder nicvf to meson build infrastructure.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Pavan Nikhilesh 2018-01-19 23:45:19 +05:30 committed by Bruce Richardson
parent de0cee7b34
commit 7f615033d6
7 changed files with 72 additions and 2 deletions

View File

@ -3,7 +3,8 @@
drivers = ['af_packet', 'bonding',
'e1000', 'fm10k', 'i40e', 'ixgbe',
'null', 'pcap', 'ring']
'null', 'octeontx', 'pcap', 'ring',
'thunderx']
std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std
std_deps += ['bus_vdev'] # same with vdev bus

View File

@ -0,0 +1,21 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
sources = [
'octeontx_pkovf.c',
'octeontx_pkivf.c',
'octeontx_bgx.c'
]
depends = ['ethdev', 'mempool_octeontx']
static_objs = []
foreach d: depends
static_objs += [get_variable('static_rte_' + d)]
endforeach
base_lib = static_library('octeontx_base', sources,
c_args: cflags,
dependencies: static_objs,
)
base_objs = base_lib.extract_all_objects()

View File

@ -0,0 +1,13 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
subdir('base')
objs = [base_objs]
sources = files('octeontx_rxtx.c',
'octeontx_ethdev.c'
)
deps += ['mempool_octeontx', 'eventdev']
includes += include_directories('base')

View File

@ -16,7 +16,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
EXPORT_MAP := rte_pmd_thunderx_nicvf_version.map
EXPORT_MAP := rte_pmd_thunderx_version.map
LIBABIVER := 1

View File

@ -0,0 +1,15 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
sources = [
'nicvf_hw.c',
'nicvf_mbox.c',
'nicvf_bsvf.c'
]
base_lib = static_library('nicvf_base', sources,
c_args: cflags,
dependencies: static_rte_ethdev
)
base_objs = base_lib.extract_all_objects()

View File

@ -0,0 +1,20 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
subdir('base')
objs = [base_objs]
sources = files('nicvf_rxtx.c',
'nicvf_ethdev.c',
'nicvf_svf.c'
)
if cc.has_argument('-fno-prefetch-loop-arrays')
cflags += '-fno-prefetch-loop-arrays'
endif
if cc.has_argument('-Wno-maybe-uninitialized')
cflags += '-Wno-maybe-uninitialized'
endif
includes += include_directories('base')