| 7167 | } |
| 7168 | |
| 7169 | static int |
| 7170 | ixgbe_timesync_read_tx_timestamp(struct rte_eth_dev *dev, |
| 7171 | struct timespec *timestamp) |
| 7172 | { |
| 7173 | struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 7174 | struct ixgbe_adapter *adapter = dev->data->dev_private; |
| 7175 | uint32_t tsync_txctl; |
| 7176 | uint64_t tx_tstamp_cycles; |
| 7177 | uint64_t ns; |
| 7178 | |
| 7179 | tsync_txctl = IXGBE_READ_REG(hw, IXGBE_TSYNCTXCTL); |
| 7180 | if ((tsync_txctl & IXGBE_TSYNCTXCTL_VALID) == 0) |
| 7181 | return -EINVAL; |
| 7182 | |
| 7183 | tx_tstamp_cycles = ixgbe_read_tx_tstamp_cyclecounter(dev); |
| 7184 | ns = rte_timecounter_update(&adapter->tx_tstamp_tc, tx_tstamp_cycles); |
| 7185 | *timestamp = rte_ns_to_timespec(ns); |
| 7186 | |
| 7187 | return 0; |
| 7188 | } |
| 7189 | |
| 7190 | static int |
| 7191 | ixgbe_get_reg_length(struct rte_eth_dev *dev) |
nothing calls this directly
no test coverage detected