From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
Somnath Kotur <somnath.kotur@broadcom.com>,
stable@dpdk.org, Lance Richardson <lance.richardson@broadcom.com>,
Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Subject: [dpdk-stable] [PATCH 2/2] net/bnxt: fix Rx and Tx timestamp assignment
Date: Fri, 12 Mar 2021 10:51:09 +0530 [thread overview]
Message-ID: <20210312052109.9847-3-somnath.kotur@broadcom.com> (raw)
In-Reply-To: <20210312052109.9847-1-somnath.kotur@broadcom.com>
timesync adjust and write_time APIs needed to account for the Rx and Tx
timestamp counters as well. Fix it since it was not done earlier.
Fixes: b11cceb83a3 ("net/bnxt: support timesync")
Cc: stable@dpdk.org
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 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3f28e0ea45..6d0719f2d8 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3427,6 +3427,8 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
ns = rte_timespec_to_ns(ts);
/* Set the timecounters to a new value. */
ptp->tc.nsec = ns;
+ ptp->tx_tstamp_tc.nsec = ns;
+ ptp->rx_tstamp_tc.nsec = ns;
return 0;
}
@@ -3577,6 +3579,8 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
return 0;
ptp->tc.nsec += delta;
+ ptp->tx_tstamp_tc.nsec += delta;
+ ptp->rx_tstamp_tc.nsec += delta;
return 0;
}
--
2.28.0.497.g54e85e7
prev parent reply other threads:[~2021-03-12 5:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210312052109.9847-1-somnath.kotur@broadcom.com>
2021-03-12 5:21 ` [dpdk-stable] [PATCH 1/2] net/bnxt: fix to return count in xstats get op in all cases Somnath Kotur
2021-03-12 5:21 ` Somnath Kotur [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210312052109.9847-3-somnath.kotur@broadcom.com \
--to=somnath.kotur@broadcom.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=lance.richardson@broadcom.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).