Skip to contentSkip to conversation

net/bnxt: fix Tx timestamp init

PATCH In review Somnath Kotur 2 participants 2 messages Mar 16, 2021 – Mar 18, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

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")
---
 drivers/net/bnxt/bnxt_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/bnxt/bnxt_ethdev.c +1 -0
index 6cc6af0a66..3cda3bd4a5 100644
@@ -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
#1 lore raw
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")

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
index 6cc6af0a66..3cda3bd4a5 100644
@@ -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