net/dpaa2: fix build with timesync functions
authorChenxu Di <chenxux.di@intel.com>
Tue, 6 Oct 2020 17:16:37 +0000 (18:16 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:18:47 +0000 (19:18 +0200)
commitc6299a086711b0578fcebe6a2ee99f3cba6faa54
tree98b8e3cc1cecdb1cf16759b8da00bacc672e6f26
parent77888192967c7cfbbdc6836e712660e967a912c6
net/dpaa2: fix build with timesync functions

Some timesync related source files are built only when
'RTE_LIBRTE_IEEE1588' config is set, which is missing in meson.

Building with '-DRTE_LIBRTE_IEEE1588' cflag will enable timesync
functionality in the files that are build, but it won't build files
that require 'RTE_LIBRTE_IEEE1588' config.
This causes the build error.

Fixing by removing config check in meson file and build all .c files by
default, but wrap relevant code part with 'RTE_LIBRTE_IEEE1588' macro.

Also removing 'RTE_LIBRTE_IEEE1588' ifdef around some fields of the data
structures, to not require finer grained macro wraps on the functions
using them.
Since the registration of the function disabled with macro check, having
functions compiled shouldn't affect the functionality.

Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module")
Cc: stable@dpdk.org
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
drivers/net/dpaa2/dpaa2_ethdev.h
drivers/net/dpaa2/dpaa2_ptp.c
drivers/net/dpaa2/meson.build