drivers/net: build Cavium NIC PMDs with meson
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Fri, 19 Jan 2018 18:15:19 +0000 (23:45 +0530)
committerBruce Richardson <bruce.richardson@intel.com>
Tue, 30 Jan 2018 20:58:59 +0000 (21:58 +0100)
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>
drivers/net/meson.build
drivers/net/octeontx/base/meson.build [new file with mode: 0644]
drivers/net/octeontx/meson.build [new file with mode: 0644]
drivers/net/thunderx/Makefile
drivers/net/thunderx/base/meson.build [new file with mode: 0644]
drivers/net/thunderx/meson.build [new file with mode: 0644]
drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map [deleted file]
drivers/net/thunderx/rte_pmd_thunderx_version.map [new file with mode: 0644]

index 72e1d35..f19a586 100644 (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
diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build
new file mode 100644 (file)
index 0000000..09f657a
--- /dev/null
@@ -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()
diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build
new file mode 100644 (file)
index 0000000..ef789ea
--- /dev/null
@@ -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')
index cc008bd..e6bf497 100644 (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
 
diff --git a/drivers/net/thunderx/base/meson.build b/drivers/net/thunderx/base/meson.build
new file mode 100644 (file)
index 0000000..c9d5a8f
--- /dev/null
@@ -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()
diff --git a/drivers/net/thunderx/meson.build b/drivers/net/thunderx/meson.build
new file mode 100644 (file)
index 0000000..69819a9
--- /dev/null
@@ -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')
diff --git a/drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map b/drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map
deleted file mode 100644 (file)
index 1901bcb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-DPDK_16.07 {
-
-       local: *;
-};
diff --git a/drivers/net/thunderx/rte_pmd_thunderx_version.map b/drivers/net/thunderx/rte_pmd_thunderx_version.map
new file mode 100644 (file)
index 0000000..1901bcb
--- /dev/null
@@ -0,0 +1,4 @@
+DPDK_16.07 {
+
+       local: *;
+};