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

Function ixgbe_read_tx_tstamp_cyclecounter

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

Source from the content-addressed store, hash-verified

6945}
6946
6947static uint64_t
6948ixgbe_read_tx_tstamp_cyclecounter(struct rte_eth_dev *dev)
6949{
6950 struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
6951 uint64_t tx_tstamp_cycles;
6952
6953 switch (hw->mac.type) {
6954 case ixgbe_mac_X550:
6955 case ixgbe_mac_X550EM_x:
6956 case ixgbe_mac_X550EM_a:
6957 /* TXSTMPL stores ns and TXSTMPH stores seconds. */
6958 tx_tstamp_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_TXSTMPL);
6959 tx_tstamp_cycles += (uint64_t)IXGBE_READ_REG(hw, IXGBE_TXSTMPH)
6960 * NSEC_PER_SEC;
6961 break;
6962 default:
6963 /* TXSTMPL stores ns and TXSTMPH stores seconds. */
6964 tx_tstamp_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_TXSTMPL);
6965 tx_tstamp_cycles |= (uint64_t)IXGBE_READ_REG(hw, IXGBE_TXSTMPH)
6966 << 32;
6967 }
6968
6969 return tx_tstamp_cycles;
6970}
6971
6972static void
6973ixgbe_start_timecounters(struct rte_eth_dev *dev)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected