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

Function axgbe_timesync_read_time

dpdk/drivers/net/axgbe/axgbe_ethdev.c:1598–1610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1596}
1597
1598static int
1599axgbe_timesync_read_time(struct rte_eth_dev *dev,
1600 struct timespec *timestamp)
1601{
1602 uint64_t nsec;
1603 struct axgbe_port *pdata = dev->data->dev_private;
1604
1605 nsec = AXGMAC_IOREAD(pdata, MAC_STSR);
1606 nsec *= NSEC_PER_SEC;
1607 nsec += AXGMAC_IOREAD(pdata, MAC_STNR);
1608 *timestamp = rte_ns_to_timespec(nsec);
1609 return 0;
1610}
1611static int
1612axgbe_timesync_write_time(struct rte_eth_dev *dev,
1613 const struct timespec *timestamp)

Callers

nothing calls this directly

Calls 1

rte_ns_to_timespecFunction · 0.85

Tested by

no test coverage detected