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>
uint16_t ss_offset;
uint64_t ss_iova;
uint64_t ss_param_iova;
-#if defined(RTE_LIBRTE_IEEE1588)
/*stores timestamp of last received packet on dev*/
uint64_t rx_timestamp;
/*stores timestamp of last received tx confirmation packet on dev*/
* it corresponds to last packet transmitted
*/
struct dpaa2_queue *next_tx_conf_queue;
-#endif
struct rte_eth_dev *eth_dev; /**< Pointer back to holding ethdev */
void dpaa2_flow_clean(struct rte_eth_dev *dev);
uint16_t dpaa2_dev_tx_conf(void *queue) __rte_unused;
-#if defined(RTE_LIBRTE_IEEE1588)
int dpaa2_timesync_enable(struct rte_eth_dev *dev);
int dpaa2_timesync_disable(struct rte_eth_dev *dev);
int dpaa2_timesync_read_time(struct rte_eth_dev *dev,
uint32_t flags __rte_unused);
int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
struct timespec *timestamp);
-#endif
#endif /* _DPAA2_ETHDEV_H */
return 0;
}
+#if defined(RTE_LIBRTE_IEEE1588)
static int
dpaa2_create_dprtc_device(int vdev_fd __rte_unused,
struct vfio_device_info *obj_info __rte_unused,
};
RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
+#endif
'dpaa2_flow.c',
'dpaa2_rxtx.c',
'dpaa2_sparser.c',
+ 'dpaa2_ptp.c',
+ 'mc/dprtc.c',
'mc/dpkg.c',
'mc/dpdmux.c',
'mc/dpni.c')
-if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
- sources += files('mc/dprtc.c')
- sources += files('dpaa2_ptp.c')
-endif
-
includes += include_directories('base', 'mc')
install_headers('rte_pmd_dpaa2.h')