DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix Tx timestamp init
@ 2021-03-16  5:40 Somnath Kotur
  2021-03-18  0:45 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Somnath Kotur @ 2021-03-16  5:40 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, Somnath Kotur, stable, Kalesh Anakkur Purayil,
	Lance Richardson, Ajit Kumar Khaparde

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")
Cc: stable@dpdk.org

Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6cc6af0a66..3cda3bd4a5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: fix Tx timestamp init
  2021-03-16  5:40 [dpdk-dev] [PATCH] net/bnxt: fix Tx timestamp init Somnath Kotur
@ 2021-03-18  0:45 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2021-03-18  0:45 UTC (permalink / raw)
  To: Somnath Kotur
  Cc: dpdk-dev, Ferruh Yigit, dpdk stable, Kalesh Anakkur Purayil,
	Lance Richardson

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

On Mon, Mar 15, 2021 at 10:41 PM Somnath Kotur
<somnath.kotur@broadcom.com> wrote:
>
> 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")
> Cc: stable@dpdk.org
>
> Reviewed-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 6cc6af0a66..3cda3bd4a5 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-18  0:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16  5:40 [dpdk-dev] [PATCH] net/bnxt: fix Tx timestamp init Somnath Kotur
2021-03-18  0:45 ` Ajit Khaparde

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).