From: Somnath Kotur Date: Fri, 12 Mar 2021 05:21:09 +0000 (+0530) Subject: net/bnxt: fix Rx and Tx timestamps X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=71f5872dd131983932cbfeb5f71345c53473fa81;p=dpdk.git net/bnxt: fix Rx and Tx timestamps 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: b11cceb83a34 ("net/bnxt: support timesync") Cc: stable@dpdk.org Reviewed-by: Lance Richardson Reviewed-by: Ajit Khaparde Signed-off-by: Somnath Kotur --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 7124f48013..6cc6af0a66 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3428,6 +3428,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; } @@ -3578,6 +3580,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; }