[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210824101238.21105-1-harini.katakam@xilinx.com>
Date: Tue, 24 Aug 2021 15:42:38 +0530
From: Harini Katakam <harini.katakam@...inx.com>
To: <nicolas.ferre@...rochip.com>, <davem@...emloft.net>,
<richardcochran@...il.com>, <claudiu.beznea@...rochip.com>,
<andrei.pistirica@...rochip.com>, <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<michal.simek@...inx.com>, <harinikatakamlinux@...il.com>,
<harini.katakam@...inx.com>
Subject: [RFC PATCH] net: macb: Process tx timestamp only on ptp packets
The current implementation timestamps all packets and also processes
the BD timestamp for the same. While it is true that HWTSTAMP_TX_ON
enables timestamps for outgoing packets, the sender of the packet
i.e. linuxptp enables timestamp for PTP or PTP event packets. Cadence
GEM IP has a provision to enable this in HW only for PTP packets.
Enable this option in DMA BD settings register to decrease overhead.
Signed-off-by: Harini Katakam <harini.katakam@...inx.com>
Acked-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Signed-off-by: Michal Simek <michal.simek@...inx.com>
---
drivers/net/ethernet/cadence/macb_ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_ptp.c b/drivers/net/ethernet/cadence/macb_ptp.c
index c2e1f163bb14..e4f26d972219 100644
--- a/drivers/net/ethernet/cadence/macb_ptp.c
+++ b/drivers/net/ethernet/cadence/macb_ptp.c
@@ -471,7 +471,7 @@ int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
return -ERANGE;
fallthrough;
case HWTSTAMP_TX_ON:
- tx_bd_control = TSTAMP_ALL_FRAMES;
+ tx_bd_control = TSTAMP_ALL_PTP_FRAMES;
break;
default:
return -ERANGE;
--
2.17.1
Powered by blists - more mailing lists