MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_timesync_write_time

Function bnxt_timesync_write_time

dpdk/drivers/net/bnxt/bnxt_ethdev.c:3601–3618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3599}
3600
3601static int
3602bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
3603{
3604 uint64_t ns;
3605 struct bnxt *bp = dev->data->dev_private;
3606 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
3607
3608 if (!ptp)
3609 return -ENOTSUP;
3610
3611 ns = rte_timespec_to_ns(ts);
3612 /* Set the timecounters to a new value. */
3613 ptp->tc.nsec = ns;
3614 ptp->tx_tstamp_tc.nsec = ns;
3615 ptp->rx_tstamp_tc.nsec = ns;
3616
3617 return 0;
3618}
3619
3620static int
3621bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)

Callers

nothing calls this directly

Calls 1

rte_timespec_to_nsFunction · 0.85

Tested by

no test coverage detected