net/bnxt: fix Tx timestamp init
PATCH 1/1 net/bnxt: fix Tx timestamp init
Fix to read the sequence ID register to get Tx timestamp. Reading the sequence ID register is necessary for the HW FIFO to advance and thereby get the correct value of the timestamp on Tx side. This patch fixes that.
Fixes b11cceb83a3 ("net/bnxt: support timesync")
Reviewed-by Kalesh Anakkur Purayil <[email protected]>
Reviewed-by Lance Richardson <[email protected]>
Reviewed-by Ajit Kumar Khaparde <[email protected]>
Signed-off-by Somnath Kotur <[email protected]>
--- drivers/net/bnxt/bnxt_ethdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/bnxt/bnxt_ethdev.c +1 -0
@@ -3377,6 +3377,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts) ptp->tx_mapped_regs[BNXT_PTP_TX_TS_L])); *ts |= (uint64_t )rte_le_to_cpu_32 (rte_read32 ((uint8_t *)bp->bar0 + ptp->tx_mapped_regs[BNXT_PTP_TX_TS_H ])) <<32 ; +rte_read32 ((uint8_t *)bp->bar0 + ptp->tx_mapped_regs[BNXT_PTP_TX_SEQ ]);return 0 ; }
Signature · 1 line
2.28.0.497.g54e85e7
Quoted 6 lines · Somnath Kotur
Fix to read the sequence ID register to get Tx timestamp. Reading the sequence ID register is necessary for the HW FIFO to advance and thereby get the correct value of the timestamp on Tx side. This patch fixes that.
Quoted 7 lines
Fixes b11cceb83a3 ("net/bnxt: support timesync")Reviewed-by Kalesh Anakkur Purayil <[email protected]>Reviewed-by Lance Richardson <[email protected]>Reviewed-by Ajit Kumar Khaparde <[email protected]>Signed-off-by Somnath Kotur <[email protected]>
Patch applied to dpdk-next-net-brcm.
Quoted 19 lines
--- drivers/net/bnxt/bnxt_ethdev.c | 1 + 1 file changed, 1 insertion(+)drivers/net/bnxt/bnxt_ethdev.c +1
-1@@ -3377,6 +3377,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts) ptp->tx_mapped_regs[BNXT_PTP_TX_TS_L])); *ts |= (uint64_t )rte_le_to_cpu_32 (rte_read32 ((uint8_t *)bp->bar0 + ptp->tx_mapped_regs[BNXT_PTP_TX_TS_H ])) <<32 ; +rte_read32 ((uint8_t *)bp->bar0 + ptp->tx_mapped_regs[BNXT_PTP_TX_SEQ ]);return 0 ; } --2.28.0.497.g54e85e7