| 4992 | } |
| 4993 | |
| 4994 | static int |
| 4995 | igb_timesync_read_rx_timestamp(struct rte_eth_dev *dev, |
| 4996 | struct timespec *timestamp, |
| 4997 | uint32_t flags __rte_unused) |
| 4998 | { |
| 4999 | struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 5000 | struct e1000_adapter *adapter = dev->data->dev_private; |
| 5001 | uint32_t tsync_rxctl; |
| 5002 | uint64_t rx_tstamp_cycles; |
| 5003 | uint64_t ns; |
| 5004 | |
| 5005 | tsync_rxctl = E1000_READ_REG(hw, E1000_TSYNCRXCTL); |
| 5006 | if ((tsync_rxctl & E1000_TSYNCRXCTL_VALID) == 0) |
| 5007 | return -EINVAL; |
| 5008 | |
| 5009 | rx_tstamp_cycles = igb_read_rx_tstamp_cyclecounter(dev); |
| 5010 | ns = rte_timecounter_update(&adapter->rx_tstamp_tc, rx_tstamp_cycles); |
| 5011 | *timestamp = rte_ns_to_timespec(ns); |
| 5012 | |
| 5013 | return 0; |
| 5014 | } |
| 5015 | |
| 5016 | static int |
| 5017 | igb_timesync_read_tx_timestamp(struct rte_eth_dev *dev, |
nothing calls this directly
no test coverage detected