Count number of transmitted packets that were hardware timestamped at the device DMA layer.
Unified · Split
| @@ -300,6 +300,11 @@ the software port. · 299 unmodified lines | ||
| 300 | 300 | in the beginning of the queue. This is a normal condition. |
| 301 | 301 | - Informative |
| 302 | 302 | |
| 303 | + * - `tx[i]_timestamps` | |
| 304 | + - Transmitted packets that were hardware timestamped at the device's DMA | |
| 305 | + layer. | |
| 306 | + - Informative | |
| 307 | + | |
| 303 | 308 | * - `tx[i]_added_vlan_packets` |
| 304 | 309 | - The number of packets sent where vlan tag insertion was offloaded to the |
| 305 | 310 | hardware. |
| @@ -2066,6 +2066,7 @@ static const struct counter_desc sq_stats_desc[] = { · 2065 unmodified lines | ||
| 2066 | 2066 | { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_partial_inner) }, |
| 2067 | 2067 | { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, added_vlan_packets) }, |
| 2068 | 2068 | { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, nop) }, |
| 2069 | + { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, timestamps) }, | |
| 2069 | 2070 | { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, mpwqe_blks) }, |
| 2070 | 2071 | { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, mpwqe_pkts) }, |
| 2071 | 2072 | #ifdef CONFIG_MLX5_EN_TLS |
| @@ -2218,6 +2219,7 @@ static const struct counter_desc qos_sq_stats_desc[] = { · 146 unmodified lines | ||
| 2218 | 2219 | { MLX5E_DECLARE_QOS_TX_STAT(struct mlx5e_sq_stats, csum_partial_inner) }, |
| 2219 | 2220 | { MLX5E_DECLARE_QOS_TX_STAT(struct mlx5e_sq_stats, added_vlan_packets) }, |
| 2220 | 2221 | { MLX5E_DECLARE_QOS_TX_STAT(struct mlx5e_sq_stats, nop) }, |
| 2222 | + { MLX5E_DECLARE_QOS_TX_STAT(struct mlx5e_sq_stats, timestamps) }, | |
| 2221 | 2223 | { MLX5E_DECLARE_QOS_TX_STAT(struct mlx5e_sq_stats, mpwqe_blks) }, |
| 2222 | 2224 | { MLX5E_DECLARE_QOS_TX_STAT(struct mlx5e_sq_stats, mpwqe_pkts) }, |
| 2223 | 2225 | #ifdef CONFIG_MLX5_EN_TLS |
| @@ -431,6 +431,7 @@ struct mlx5e_sq_stats { · 430 unmodified lines | ||
| 431 | 431 | u64 stopped; |
| 432 | 432 | u64 dropped; |
| 433 | 433 | u64 recover; |
| 434 | + u64 timestamps; | |
| 434 | 435 | /* dirtied @completion */ |
| 435 | 436 | u64 cqes ____cacheline_aligned_in_smp; |
| 436 | 437 | u64 wake; |
| @@ -750,11 +750,13 @@ static void mlx5e_consume_skb(struct mlx5e_txqsq *sq, struct sk_buff *skb, · 749 unmodified lines | ||
| 750 | 750 | u64 ts = get_cqe_ts(cqe); |
| 751 | 751 | |
| 752 | 752 | hwts.hwtstamp = mlx5e_cqe_ts_to_ns(sq->ptp_cyc2time, sq->clock, ts); |
| 753 | − if (sq->ptpsq) | |
| 753 | + if (sq->ptpsq) { | |
| 754 | 754 | mlx5e_skb_cb_hwtstamp_handler(skb, MLX5E_SKB_CB_CQE_HWTSTAMP, |
| 755 | 755 | hwts.hwtstamp, sq->ptpsq->cq_stats); |
| 756 | − else | |
| 756 | + } else { | |
| 757 | 757 | skb_tstamp_tx(skb, &hwts); |
| 758 | + sq->stats->timestamps++; | |
| 759 | + } | |
| 758 | 760 | } |
| 759 | 761 | |
| 760 | 762 | napi_consume_skb(skb, napi_budget); |