git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/dpaa2: remove useless C++ include guard
[dpdk.git]
/
drivers
/
net
/
dpaa2
/
dpaa2_ptp.c
diff --git
a/drivers/net/dpaa2/dpaa2_ptp.c
b/drivers/net/dpaa2/dpaa2_ptp.c
index
316912f
..
3a4536d
100644
(file)
--- a/
drivers/net/dpaa2/dpaa2_ptp.c
+++ b/
drivers/net/dpaa2/dpaa2_ptp.c
@@
-10,7
+10,7
@@
#include <unistd.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdarg.h>
-#include <
rte_ethdev
.h>
+#include <
ethdev_driver
.h>
#include <rte_log.h>
#include <rte_eth_ctrl.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_eth_ctrl.h>
#include <rte_malloc.h>
@@
-111,10
+111,12
@@
int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
{
struct dpaa2_dev_priv *priv = dev->data->dev_private;
{
struct dpaa2_dev_priv *priv = dev->data->dev_private;
- if (priv->next_tx_conf_queue)
- dpaa2_dev_tx_conf(priv->next_tx_conf_queue);
- else
+ if (priv->next_tx_conf_queue) {
+ while (!priv->tx_timestamp)
+ dpaa2_dev_tx_conf(priv->next_tx_conf_queue);
+ } else {
return -1;
return -1;
+ }
*timestamp = rte_ns_to_timespec(priv->tx_timestamp);
return 0;
*timestamp = rte_ns_to_timespec(priv->tx_timestamp);
return 0;
@@
-129,6
+131,7
@@
int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
return 0;
}
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,
static int
dpaa2_create_dprtc_device(int vdev_fd __rte_unused,
struct vfio_device_info *obj_info __rte_unused,
@@
-147,7
+150,7
@@
dpaa2_create_dprtc_device(int vdev_fd __rte_unused,
}
/* Open the dprtc object */
}
/* Open the dprtc object */
- dprtc_dev->dprtc.regs =
rte_mcp_ptr_list[MC_PORTAL_INDEX]
;
+ dprtc_dev->dprtc.regs =
dpaa2_get_mcp_ptr(MC_PORTAL_INDEX)
;
ret = dprtc_open(&dprtc_dev->dprtc, CMD_PRI_LOW, dprtc_id,
&dprtc_dev->token);
if (ret) {
ret = dprtc_open(&dprtc_dev->dprtc, CMD_PRI_LOW, dprtc_id,
&dprtc_dev->token);
if (ret) {
@@
-179,3
+182,4
@@
static struct rte_dpaa2_object rte_dpaa2_dprtc_obj = {
};
RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
};
RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
+#endif