| 5014 | } |
| 5015 | |
| 5016 | static int |
| 5017 | igb_timesync_read_tx_timestamp(struct rte_eth_dev *dev, |
| 5018 | struct timespec *timestamp) |
| 5019 | { |
| 5020 | struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 5021 | struct e1000_adapter *adapter = dev->data->dev_private; |
| 5022 | uint32_t tsync_txctl; |
| 5023 | uint64_t tx_tstamp_cycles; |
| 5024 | uint64_t ns; |
| 5025 | |
| 5026 | tsync_txctl = E1000_READ_REG(hw, E1000_TSYNCTXCTL); |
| 5027 | if ((tsync_txctl & E1000_TSYNCTXCTL_VALID) == 0) |
| 5028 | return -EINVAL; |
| 5029 | |
| 5030 | tx_tstamp_cycles = igb_read_tx_tstamp_cyclecounter(dev); |
| 5031 | ns = rte_timecounter_update(&adapter->tx_tstamp_tc, tx_tstamp_cycles); |
| 5032 | *timestamp = rte_ns_to_timespec(ns); |
| 5033 | |
| 5034 | return 0; |
| 5035 | } |
| 5036 | |
| 5037 | static int |
| 5038 | eth_igb_get_reg_length(struct rte_eth_dev *dev __rte_unused) |
nothing calls this directly
no test coverage detected