summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
diff options
context:
space:
mode:
authorVadim Fedorenko <vadfed@meta.com>2024-05-30 13:47:51 -0700
committerJakub Kicinski <kuba@kernel.org>2024-06-01 16:02:51 -0700
commit165f87691a898aea113923224c269bae14749ebc (patch)
treea8714c1b5c18861737ef260334be46f6ff165143 /drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
parentfc5570e0bd56bb5acf271e809324a5ac79bb4b79 (diff)
downloadlwn-165f87691a898aea113923224c269bae14749ebc.tar.gz
lwn-165f87691a898aea113923224c269bae14749ebc.zip
bnxt_en: add timestamping statistics support
The ethtool_ts_stats structure was introduced earlier this year. Now it's time to support this group of counters in more drivers. This patch adds support to bnxt driver. Signed-off-by: Vadim Fedorenko <vadfed@meta.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://lore.kernel.org/r/20240530204751.99636-1-vadfed@meta.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
index 2c3415c8fc03..8c30b428a428 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
@@ -79,6 +79,12 @@ struct bnxt_pps {
struct pps_pin pins[BNXT_MAX_TSIO_PINS];
};
+struct bnxt_ptp_stats {
+ u64 ts_pkts;
+ u64 ts_lost;
+ atomic64_t ts_err;
+};
+
struct bnxt_ptp_cfg {
struct ptp_clock_info ptp_info;
struct ptp_clock *ptp_clock;
@@ -125,6 +131,8 @@ struct bnxt_ptp_cfg {
u32 refclk_mapped_regs[2];
u32 txts_tmo;
unsigned long abs_txts_tmo;
+
+ struct bnxt_ptp_stats stats;
};
#if BITS_PER_LONG == 32