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

Function ixgbe_read_systime_cyclecounter

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:6898–6920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6896}
6897
6898static uint64_t
6899ixgbe_read_systime_cyclecounter(struct rte_eth_dev *dev)
6900{
6901 struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
6902 uint64_t systime_cycles;
6903
6904 switch (hw->mac.type) {
6905 case ixgbe_mac_X550:
6906 case ixgbe_mac_X550EM_x:
6907 case ixgbe_mac_X550EM_a:
6908 /* SYSTIMEL stores ns and SYSTIMEH stores seconds. */
6909 systime_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_SYSTIML);
6910 systime_cycles += (uint64_t)IXGBE_READ_REG(hw, IXGBE_SYSTIMH)
6911 * NSEC_PER_SEC;
6912 break;
6913 default:
6914 systime_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_SYSTIML);
6915 systime_cycles |= (uint64_t)IXGBE_READ_REG(hw, IXGBE_SYSTIMH)
6916 << 32;
6917 }
6918
6919 return systime_cycles;
6920}
6921
6922static uint64_t
6923ixgbe_read_rx_tstamp_cyclecounter(struct rte_eth_dev *dev)

Callers 1

ixgbe_timesync_read_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected