* [PATCH net-next] enetc: add software timestamping
@ 2019-12-10 0:15 Michael Walle
2019-12-11 1:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Walle @ 2019-12-10 0:15 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: David S . Miller, Claudiu Manoil, Michael Walle
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>
---
drivers/net/ethernet/freescale/enetc/enetc.c | 2 ++
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 17739906c966..2ee4a2cd4780 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -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);
tx_ring->next_to_use = i;
+ skb_tx_timestamp(skb);
+
/* let H/W know BD ring has been updated */
enetc_wr_reg(tx_ring->tpir, i); /* includes wmb() */
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
index 880a8ed8bb47..301ee0dde02d 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
@@ -579,6 +579,7 @@ static int enetc_get_ts_info(struct net_device *ndev,
(1 << HWTSTAMP_FILTER_ALL);
#else
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
+ SOF_TIMESTAMPING_TX_SOFTWARE |
SOF_TIMESTAMPING_SOFTWARE;
#endif
return 0;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] enetc: add software timestamping
2019-12-10 0:15 [PATCH net-next] enetc: add software timestamping Michael Walle
@ 2019-12-11 1:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-11 1:32 UTC (permalink / raw)
To: michael; +Cc: netdev, linux-kernel, claudiu.manoil
From: Michael Walle <michael@walle.cc>
Date: Tue, 10 Dec 2019 01:15:37 +0100
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-11 1:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 0:15 [PATCH net-next] enetc: add software timestamping Michael Walle
2019-12-11 1:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).