enetc: add software timestamping
Provide a software TX timestamp and add it to the ethtool query interface. skb_tx_timestamp() is also needed if one would like to use PHY timestamping. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
bb9d8454bb
commit
4caefbce06
@@ -227,6 +227,8 @@ static int enetc_map_tx_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb,
|
|||||||
enetc_bdr_idx_inc(tx_ring, &i);
|
enetc_bdr_idx_inc(tx_ring, &i);
|
||||||
tx_ring->next_to_use = i;
|
tx_ring->next_to_use = i;
|
||||||
|
|
||||||
|
skb_tx_timestamp(skb);
|
||||||
|
|
||||||
/* let H/W know BD ring has been updated */
|
/* let H/W know BD ring has been updated */
|
||||||
enetc_wr_reg(tx_ring->tpir, i); /* includes wmb() */
|
enetc_wr_reg(tx_ring->tpir, i); /* includes wmb() */
|
||||||
|
|
||||||
|
@@ -579,6 +579,7 @@ static int enetc_get_ts_info(struct net_device *ndev,
|
|||||||
(1 << HWTSTAMP_FILTER_ALL);
|
(1 << HWTSTAMP_FILTER_ALL);
|
||||||
#else
|
#else
|
||||||
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
|
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||||
|
SOF_TIMESTAMPING_TX_SOFTWARE |
|
||||||
SOF_TIMESTAMPING_SOFTWARE;
|
SOF_TIMESTAMPING_SOFTWARE;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user