Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 18:16:08 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347864 - stable/11/sys/dev/mlx5/mlx5_en
Message-ID:  <201905161816.x4GIG8eY033986@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu May 16 18:16:08 2019
New Revision: 347864
URL: https://svnweb.freebsd.org/changeset/base/347864

Log:
  MFC r347308:
  Extend the counters framework in mlx5en(4).
  
  Allow more macro arguments and split the variable type and name into
  separate arguments. This allows simple and powerful copy and extraction
  of values from IFC based structures into SYSCTLs with the use of a single
  macro.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/dev/mlx5/mlx5_en/en.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_en/en.h	Thu May 16 18:13:47 2019	(r347863)
+++ stable/11/sys/dev/mlx5/mlx5_en/en.h	Thu May 16 18:16:08 2019	(r347864)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved.
+ * Copyright (c) 2015-2019 Mellanox Technologies. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -145,48 +145,48 @@ struct mlx5e_cq;
 
 typedef void (mlx5e_cq_comp_t)(struct mlx5_core_cq *);
 
-#define	MLX5E_STATS_COUNT(a,b,c,d) a
-#define	MLX5E_STATS_VAR(a,b,c,d) b;
-#define	MLX5E_STATS_DESC(a,b,c,d) c, d,
+#define	MLX5E_STATS_COUNT(a, ...) a
+#define	MLX5E_STATS_VAR(a, b, c, ...) b c;
+#define	MLX5E_STATS_DESC(a, b, c, d, e, ...) d, e,
 
 #define	MLX5E_VPORT_STATS(m)						\
   /* HW counters */							\
-  m(+1, u64 rx_packets, "rx_packets", "Received packets")		\
-  m(+1, u64 rx_bytes, "rx_bytes", "Received bytes")			\
-  m(+1, u64 tx_packets, "tx_packets", "Transmitted packets")		\
-  m(+1, u64 tx_bytes, "tx_bytes", "Transmitted bytes")			\
-  m(+1, u64 rx_error_packets, "rx_error_packets", "Received error packets") \
-  m(+1, u64 rx_error_bytes, "rx_error_bytes", "Received error bytes")	\
-  m(+1, u64 tx_error_packets, "tx_error_packets", "Transmitted error packets") \
-  m(+1, u64 tx_error_bytes, "tx_error_bytes", "Transmitted error bytes") \
-  m(+1, u64 rx_unicast_packets, "rx_unicast_packets", "Received unicast packets") \
-  m(+1, u64 rx_unicast_bytes, "rx_unicast_bytes", "Received unicast bytes") \
-  m(+1, u64 tx_unicast_packets, "tx_unicast_packets", "Transmitted unicast packets") \
-  m(+1, u64 tx_unicast_bytes, "tx_unicast_bytes", "Transmitted unicast bytes") \
-  m(+1, u64 rx_multicast_packets, "rx_multicast_packets", "Received multicast packets") \
-  m(+1, u64 rx_multicast_bytes, "rx_multicast_bytes", "Received multicast bytes") \
-  m(+1, u64 tx_multicast_packets, "tx_multicast_packets", "Transmitted multicast packets") \
-  m(+1, u64 tx_multicast_bytes, "tx_multicast_bytes", "Transmitted multicast bytes") \
-  m(+1, u64 rx_broadcast_packets, "rx_broadcast_packets", "Received broadcast packets") \
-  m(+1, u64 rx_broadcast_bytes, "rx_broadcast_bytes", "Received broadcast bytes") \
-  m(+1, u64 tx_broadcast_packets, "tx_broadcast_packets", "Transmitted broadcast packets") \
-  m(+1, u64 tx_broadcast_bytes, "tx_broadcast_bytes", "Transmitted broadcast bytes") \
-  m(+1, u64 rx_out_of_buffer, "rx_out_of_buffer", "Receive out of buffer, no recv wqes events") \
+  m(+1, u64, rx_packets, "rx_packets", "Received packets")		\
+  m(+1, u64, rx_bytes, "rx_bytes", "Received bytes")			\
+  m(+1, u64, tx_packets, "tx_packets", "Transmitted packets")		\
+  m(+1, u64, tx_bytes, "tx_bytes", "Transmitted bytes")			\
+  m(+1, u64, rx_error_packets, "rx_error_packets", "Received error packets") \
+  m(+1, u64, rx_error_bytes, "rx_error_bytes", "Received error bytes")	\
+  m(+1, u64, tx_error_packets, "tx_error_packets", "Transmitted error packets") \
+  m(+1, u64, tx_error_bytes, "tx_error_bytes", "Transmitted error bytes") \
+  m(+1, u64, rx_unicast_packets, "rx_unicast_packets", "Received unicast packets") \
+  m(+1, u64, rx_unicast_bytes, "rx_unicast_bytes", "Received unicast bytes") \
+  m(+1, u64, tx_unicast_packets, "tx_unicast_packets", "Transmitted unicast packets") \
+  m(+1, u64, tx_unicast_bytes, "tx_unicast_bytes", "Transmitted unicast bytes") \
+  m(+1, u64, rx_multicast_packets, "rx_multicast_packets", "Received multicast packets") \
+  m(+1, u64, rx_multicast_bytes, "rx_multicast_bytes", "Received multicast bytes") \
+  m(+1, u64, tx_multicast_packets, "tx_multicast_packets", "Transmitted multicast packets") \
+  m(+1, u64, tx_multicast_bytes, "tx_multicast_bytes", "Transmitted multicast bytes") \
+  m(+1, u64, rx_broadcast_packets, "rx_broadcast_packets", "Received broadcast packets") \
+  m(+1, u64, rx_broadcast_bytes, "rx_broadcast_bytes", "Received broadcast bytes") \
+  m(+1, u64, tx_broadcast_packets, "tx_broadcast_packets", "Transmitted broadcast packets") \
+  m(+1, u64, tx_broadcast_bytes, "tx_broadcast_bytes", "Transmitted broadcast bytes") \
+  m(+1, u64, rx_out_of_buffer, "rx_out_of_buffer", "Receive out of buffer, no recv wqes events") \
   /* SW counters */							\
-  m(+1, u64 tso_packets, "tso_packets", "Transmitted TSO packets")	\
-  m(+1, u64 tso_bytes, "tso_bytes", "Transmitted TSO bytes")		\
-  m(+1, u64 lro_packets, "lro_packets", "Received LRO packets")		\
-  m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes")		\
-  m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO")	\
-  m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO")	\
-  m(+1, u64 rx_csum_good, "rx_csum_good", "Received checksum valid packets") \
-  m(+1, u64 rx_csum_none, "rx_csum_none", "Received no checksum packets") \
-  m(+1, u64 tx_csum_offload, "tx_csum_offload", "Transmit checksum offload packets") \
-  m(+1, u64 tx_queue_dropped, "tx_queue_dropped", "Transmit queue dropped") \
-  m(+1, u64 tx_defragged, "tx_defragged", "Transmit queue defragged") \
-  m(+1, u64 rx_wqe_err, "rx_wqe_err", "Receive WQE errors") \
-  m(+1, u64 tx_jumbo_packets, "tx_jumbo_packets", "TX packets greater than 1518 octets") \
-  m(+1, u64 rx_steer_missed_packets, "rx_steer_missed_packets", "RX packets dropped by steering rule(s)")
+  m(+1, u64, tso_packets, "tso_packets", "Transmitted TSO packets")	\
+  m(+1, u64, tso_bytes, "tso_bytes", "Transmitted TSO bytes")		\
+  m(+1, u64, lro_packets, "lro_packets", "Received LRO packets")		\
+  m(+1, u64, lro_bytes, "lro_bytes", "Received LRO bytes")		\
+  m(+1, u64, sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO")	\
+  m(+1, u64, sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO")	\
+  m(+1, u64, rx_csum_good, "rx_csum_good", "Received checksum valid packets") \
+  m(+1, u64, rx_csum_none, "rx_csum_none", "Received no checksum packets") \
+  m(+1, u64, tx_csum_offload, "tx_csum_offload", "Transmit checksum offload packets") \
+  m(+1, u64, tx_queue_dropped, "tx_queue_dropped", "Transmit queue dropped") \
+  m(+1, u64, tx_defragged, "tx_defragged", "Transmit queue defragged") \
+  m(+1, u64, rx_wqe_err, "rx_wqe_err", "Receive WQE errors") \
+  m(+1, u64, tx_jumbo_packets, "tx_jumbo_packets", "TX packets greater than 1518 octets") \
+  m(+1, u64, rx_steer_missed_packets, "rx_steer_missed_packets", "RX packets dropped by steering rule(s)")
 
 #define	MLX5E_VPORT_STATS_NUM (0 MLX5E_VPORT_STATS(MLX5E_STATS_COUNT))
 
@@ -197,128 +197,129 @@ struct mlx5e_vport_stats {
 };
 
 #define	MLX5E_PPORT_IEEE802_3_STATS(m)					\
-  m(+1, u64 frames_tx, "frames_tx", "Frames transmitted")		\
-  m(+1, u64 frames_rx, "frames_rx", "Frames received")			\
-  m(+1, u64 check_seq_err, "check_seq_err", "Sequence errors")		\
-  m(+1, u64 alignment_err, "alignment_err", "Alignment errors")	\
-  m(+1, u64 octets_tx, "octets_tx", "Bytes transmitted")		\
-  m(+1, u64 octets_received, "octets_received", "Bytes received")	\
-  m(+1, u64 multicast_xmitted, "multicast_xmitted", "Multicast transmitted") \
-  m(+1, u64 broadcast_xmitted, "broadcast_xmitted", "Broadcast transmitted") \
-  m(+1, u64 multicast_rx, "multicast_rx", "Multicast received")	\
-  m(+1, u64 broadcast_rx, "broadcast_rx", "Broadcast received")	\
-  m(+1, u64 in_range_len_errors, "in_range_len_errors", "In range length errors") \
-  m(+1, u64 out_of_range_len, "out_of_range_len", "Out of range length errors") \
-  m(+1, u64 too_long_errors, "too_long_errors", "Too long errors")	\
-  m(+1, u64 symbol_err, "symbol_err", "Symbol errors")			\
-  m(+1, u64 mac_control_tx, "mac_control_tx", "MAC control transmitted") \
-  m(+1, u64 mac_control_rx, "mac_control_rx", "MAC control received")	\
-  m(+1, u64 unsupported_op_rx, "unsupported_op_rx", "Unsupported operation received") \
-  m(+1, u64 pause_ctrl_rx, "pause_ctrl_rx", "Pause control received")	\
-  m(+1, u64 pause_ctrl_tx, "pause_ctrl_tx", "Pause control transmitted")
+  m(+1, u64, frames_tx, "frames_tx", "Frames transmitted")		\
+  m(+1, u64, frames_rx, "frames_rx", "Frames received")			\
+  m(+1, u64, check_seq_err, "check_seq_err", "Sequence errors")		\
+  m(+1, u64, alignment_err, "alignment_err", "Alignment errors")	\
+  m(+1, u64, octets_tx, "octets_tx", "Bytes transmitted")		\
+  m(+1, u64, octets_received, "octets_received", "Bytes received")	\
+  m(+1, u64, multicast_xmitted, "multicast_xmitted", "Multicast transmitted") \
+  m(+1, u64, broadcast_xmitted, "broadcast_xmitted", "Broadcast transmitted") \
+  m(+1, u64, multicast_rx, "multicast_rx", "Multicast received")	\
+  m(+1, u64, broadcast_rx, "broadcast_rx", "Broadcast received")	\
+  m(+1, u64, in_range_len_errors, "in_range_len_errors", "In range length errors") \
+  m(+1, u64, out_of_range_len, "out_of_range_len", "Out of range length errors") \
+  m(+1, u64, too_long_errors, "too_long_errors", "Too long errors")	\
+  m(+1, u64, symbol_err, "symbol_err", "Symbol errors")			\
+  m(+1, u64, mac_control_tx, "mac_control_tx", "MAC control transmitted") \
+  m(+1, u64, mac_control_rx, "mac_control_rx", "MAC control received")	\
+  m(+1, u64, unsupported_op_rx, "unsupported_op_rx", "Unsupported operation received") \
+  m(+1, u64, pause_ctrl_rx, "pause_ctrl_rx", "Pause control received")	\
+  m(+1, u64, pause_ctrl_tx, "pause_ctrl_tx", "Pause control transmitted")
 
 #define	MLX5E_PPORT_RFC2819_STATS(m)					\
-  m(+1, u64 drop_events, "drop_events", "Dropped events")		\
-  m(+1, u64 octets, "octets", "Octets")					\
-  m(+1, u64 pkts, "pkts", "Packets")					\
-  m(+1, u64 broadcast_pkts, "broadcast_pkts", "Broadcast packets")	\
-  m(+1, u64 multicast_pkts, "multicast_pkts", "Multicast packets")	\
-  m(+1, u64 crc_align_errors, "crc_align_errors", "CRC alignment errors") \
-  m(+1, u64 undersize_pkts, "undersize_pkts", "Undersized packets")	\
-  m(+1, u64 oversize_pkts, "oversize_pkts", "Oversized packets")	\
-  m(+1, u64 fragments, "fragments", "Fragments")			\
-  m(+1, u64 jabbers, "jabbers", "Jabbers")				\
-  m(+1, u64 collisions, "collisions", "Collisions")
+  m(+1, u64, drop_events, "drop_events", "Dropped events")		\
+  m(+1, u64, octets, "octets", "Octets")					\
+  m(+1, u64, pkts, "pkts", "Packets")					\
+  m(+1, u64, broadcast_pkts, "broadcast_pkts", "Broadcast packets")	\
+  m(+1, u64, multicast_pkts, "multicast_pkts", "Multicast packets")	\
+  m(+1, u64, crc_align_errors, "crc_align_errors", "CRC alignment errors") \
+  m(+1, u64, undersize_pkts, "undersize_pkts", "Undersized packets")	\
+  m(+1, u64, oversize_pkts, "oversize_pkts", "Oversized packets")	\
+  m(+1, u64, fragments, "fragments", "Fragments")			\
+  m(+1, u64, jabbers, "jabbers", "Jabbers")				\
+  m(+1, u64, collisions, "collisions", "Collisions")
 
 #define	MLX5E_PPORT_RFC2819_STATS_DEBUG(m)				\
-  m(+1, u64 p64octets, "p64octets", "Bytes")				\
-  m(+1, u64 p65to127octets, "p65to127octets", "Bytes")			\
-  m(+1, u64 p128to255octets, "p128to255octets", "Bytes")		\
-  m(+1, u64 p256to511octets, "p256to511octets", "Bytes")		\
-  m(+1, u64 p512to1023octets, "p512to1023octets", "Bytes")		\
-  m(+1, u64 p1024to1518octets, "p1024to1518octets", "Bytes")		\
-  m(+1, u64 p1519to2047octets, "p1519to2047octets", "Bytes")		\
-  m(+1, u64 p2048to4095octets, "p2048to4095octets", "Bytes")		\
-  m(+1, u64 p4096to8191octets, "p4096to8191octets", "Bytes")		\
-  m(+1, u64 p8192to10239octets, "p8192to10239octets", "Bytes")
+  m(+1, u64, p64octets, "p64octets", "Bytes")				\
+  m(+1, u64, p65to127octets, "p65to127octets", "Bytes")			\
+  m(+1, u64, p128to255octets, "p128to255octets", "Bytes")		\
+  m(+1, u64, p256to511octets, "p256to511octets", "Bytes")		\
+  m(+1, u64, p512to1023octets, "p512to1023octets", "Bytes")		\
+  m(+1, u64, p1024to1518octets, "p1024to1518octets", "Bytes")		\
+  m(+1, u64, p1519to2047octets, "p1519to2047octets", "Bytes")		\
+  m(+1, u64, p2048to4095octets, "p2048to4095octets", "Bytes")		\
+  m(+1, u64, p4096to8191octets, "p4096to8191octets", "Bytes")		\
+  m(+1, u64, p8192to10239octets, "p8192to10239octets", "Bytes")
 
 #define	MLX5E_PPORT_RFC2863_STATS_DEBUG(m)				\
-  m(+1, u64 in_octets, "in_octets", "In octets")			\
-  m(+1, u64 in_ucast_pkts, "in_ucast_pkts", "In unicast packets")	\
-  m(+1, u64 in_discards, "in_discards", "In discards")			\
-  m(+1, u64 in_errors, "in_errors", "In errors")			\
-  m(+1, u64 in_unknown_protos, "in_unknown_protos", "In unknown protocols") \
-  m(+1, u64 out_octets, "out_octets", "Out octets")			\
-  m(+1, u64 out_ucast_pkts, "out_ucast_pkts", "Out unicast packets")	\
-  m(+1, u64 out_discards, "out_discards", "Out discards")		\
-  m(+1, u64 out_errors, "out_errors", "Out errors")			\
-  m(+1, u64 in_multicast_pkts, "in_multicast_pkts", "In multicast packets") \
-  m(+1, u64 in_broadcast_pkts, "in_broadcast_pkts", "In broadcast packets") \
-  m(+1, u64 out_multicast_pkts, "out_multicast_pkts", "Out multicast packets") \
-  m(+1, u64 out_broadcast_pkts, "out_broadcast_pkts", "Out broadcast packets")
+  m(+1, u64, in_octets, "in_octets", "In octets")			\
+  m(+1, u64, in_ucast_pkts, "in_ucast_pkts", "In unicast packets")	\
+  m(+1, u64, in_discards, "in_discards", "In discards")			\
+  m(+1, u64, in_errors, "in_errors", "In errors")			\
+  m(+1, u64, in_unknown_protos, "in_unknown_protos", "In unknown protocols") \
+  m(+1, u64, out_octets, "out_octets", "Out octets")			\
+  m(+1, u64, out_ucast_pkts, "out_ucast_pkts", "Out unicast packets")	\
+  m(+1, u64, out_discards, "out_discards", "Out discards")		\
+  m(+1, u64, out_errors, "out_errors", "Out errors")			\
+  m(+1, u64, in_multicast_pkts, "in_multicast_pkts", "In multicast packets") \
+  m(+1, u64, in_broadcast_pkts, "in_broadcast_pkts", "In broadcast packets") \
+  m(+1, u64, out_multicast_pkts, "out_multicast_pkts", "Out multicast packets") \
+  m(+1, u64, out_broadcast_pkts, "out_broadcast_pkts", "Out broadcast packets")
 
 #define	MLX5E_PPORT_ETHERNET_EXTENDED_STATS_DEBUG(m)				\
-  m(+1, u64 port_transmit_wait_high, "port_transmit_wait_high", "Port transmit wait high") \
-  m(+1, u64 ecn_marked, "ecn_marked", "ECN marked")			\
-  m(+1, u64 no_buffer_discard_mc, "no_buffer_discard_mc", "No buffer discard mc") \
-  m(+1, u64 rx_ebp, "rx_ebp", "RX EBP")					\
-  m(+1, u64 tx_ebp, "tx_ebp", "TX EBP")					\
-  m(+1, u64 rx_buffer_almost_full, "rx_buffer_almost_full", "RX buffer almost full") \
-  m(+1, u64 rx_buffer_full, "rx_buffer_full", "RX buffer full")	\
-  m(+1, u64 rx_icrc_encapsulated, "rx_icrc_encapsulated", "RX ICRC encapsulated") \
-  m(+1, u64 ex_reserved_0, "ex_reserved_0", "Reserved") \
-  m(+1, u64 ex_reserved_1, "ex_reserved_1", "Reserved") \
-  m(+1, u64 tx_stat_p64octets, "tx_stat_p64octets", "Bytes")			\
-  m(+1, u64 tx_stat_p65to127octets, "tx_stat_p65to127octets", "Bytes")		\
-  m(+1, u64 tx_stat_p128to255octets, "tx_stat_p128to255octets", "Bytes")	\
-  m(+1, u64 tx_stat_p256to511octets, "tx_stat_p256to511octets", "Bytes")	\
-  m(+1, u64 tx_stat_p512to1023octets, "tx_stat_p512to1023octets", "Bytes")	\
-  m(+1, u64 tx_stat_p1024to1518octets, "tx_stat_p1024to1518octets", "Bytes")	\
-  m(+1, u64 tx_stat_p1519to2047octets, "tx_stat_p1519to2047octets", "Bytes")	\
-  m(+1, u64 tx_stat_p2048to4095octets, "tx_stat_p2048to4095octets", "Bytes")	\
-  m(+1, u64 tx_stat_p4096to8191octets, "tx_stat_p4096to8191octets", "Bytes")	\
-  m(+1, u64 tx_stat_p8192to10239octets, "tx_stat_p8192to10239octets", "Bytes")
+  m(+1, u64, port_transmit_wait_high, "port_transmit_wait_high", "Port transmit wait high") \
+  m(+1, u64, ecn_marked, "ecn_marked", "ECN marked")			\
+  m(+1, u64, no_buffer_discard_mc, "no_buffer_discard_mc", "No buffer discard mc") \
+  m(+1, u64, rx_ebp, "rx_ebp", "RX EBP")					\
+  m(+1, u64, tx_ebp, "tx_ebp", "TX EBP")					\
+  m(+1, u64, rx_buffer_almost_full, "rx_buffer_almost_full", "RX buffer almost full") \
+  m(+1, u64, rx_buffer_full, "rx_buffer_full", "RX buffer full")	\
+  m(+1, u64, rx_icrc_encapsulated, "rx_icrc_encapsulated", "RX ICRC encapsulated") \
+  m(+1, u64, ex_reserved_0, "ex_reserved_0", "Reserved") \
+  m(+1, u64, ex_reserved_1, "ex_reserved_1", "Reserved") \
+  m(+1, u64, tx_stat_p64octets, "tx_stat_p64octets", "Bytes")			\
+  m(+1, u64, tx_stat_p65to127octets, "tx_stat_p65to127octets", "Bytes")		\
+  m(+1, u64, tx_stat_p128to255octets, "tx_stat_p128to255octets", "Bytes")	\
+  m(+1, u64, tx_stat_p256to511octets, "tx_stat_p256to511octets", "Bytes")	\
+  m(+1, u64, tx_stat_p512to1023octets, "tx_stat_p512to1023octets", "Bytes")	\
+  m(+1, u64, tx_stat_p1024to1518octets, "tx_stat_p1024to1518octets", "Bytes")	\
+  m(+1, u64, tx_stat_p1519to2047octets, "tx_stat_p1519to2047octets", "Bytes")	\
+  m(+1, u64, tx_stat_p2048to4095octets, "tx_stat_p2048to4095octets", "Bytes")	\
+  m(+1, u64, tx_stat_p4096to8191octets, "tx_stat_p4096to8191octets", "Bytes")	\
+  m(+1, u64, tx_stat_p8192to10239octets, "tx_stat_p8192to10239octets", "Bytes")
 
-#define	MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(m)                                    		\
-  m(+1, u64 time_since_last_clear, "time_since_last_clear",				\
-			"Time since the last counters clear event (msec)")		\
-  m(+1, u64 symbol_errors, "symbol_errors", "Symbol errors")				\
-  m(+1, u64 sync_headers_errors, "sync_headers_errors", "Sync header error counter")	\
-  m(+1, u64 bip_errors_lane0, "edpl_bip_errors_lane0",					\
-			"Indicates the number of PRBS errors on lane 0")		\
-  m(+1, u64 bip_errors_lane1, "edpl_bip_errors_lane1",					\
-			"Indicates the number of PRBS errors on lane 1")		\
-  m(+1, u64 bip_errors_lane2, "edpl_bip_errors_lane2",					\
-			"Indicates the number of PRBS errors on lane 2")		\
-  m(+1, u64 bip_errors_lane3, "edpl_bip_errors_lane3",					\
-			"Indicates the number of PRBS errors on lane 3")		\
-  m(+1, u64 fc_corrected_blocks_lane0, "fc_corrected_blocks_lane0",			\
-			"FEC correctable block counter lane 0")				\
-  m(+1, u64 fc_corrected_blocks_lane1, "fc_corrected_blocks_lane1",			\
-			"FEC correctable block counter lane 1")				\
-  m(+1, u64 fc_corrected_blocks_lane2, "fc_corrected_blocks_lane2",			\
-			"FEC correctable block counter lane 2")				\
-  m(+1, u64 fc_corrected_blocks_lane3, "fc_corrected_blocks_lane3",			\
-			"FEC correctable block counter lane 3")				\
-  m(+1, u64 rs_corrected_blocks, "rs_corrected_blocks",					\
-			"FEC correcable block counter")					\
-  m(+1, u64 rs_uncorrectable_blocks, "rs_uncorrectable_blocks",				\
-			"FEC uncorrecable block counter")				\
-  m(+1, u64 rs_no_errors_blocks, "rs_no_errors_blocks",					\
-			"The number of RS-FEC blocks received that had no errors")	\
-  m(+1, u64 rs_single_error_blocks, "rs_single_error_blocks",				\
-			"The number of corrected RS-FEC blocks received that had"	\
-			"exactly 1 error symbol")					\
-  m(+1, u64 rs_corrected_symbols_total, "rs_corrected_symbols_total",			\
-			"Port FEC corrected symbol counter")				\
-  m(+1, u64 rs_corrected_symbols_lane0, "rs_corrected_symbols_lane0",			\
-			"FEC corrected symbol counter lane 0")				\
-  m(+1, u64 rs_corrected_symbols_lane1, "rs_corrected_symbols_lane1",			\
-			"FEC corrected symbol counter lane 1")				\
-  m(+1, u64 rs_corrected_symbols_lane2, "rs_corrected_symbols_lane2",			\
-			"FEC corrected symbol counter lane 2")				\
-  m(+1, u64 rs_corrected_symbols_lane3, "rs_corrected_symbols_lane3",			\
-			"FEC corrected symbol counter lane 3")
+#define	MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(m)			\
+  m(+1, u64, time_since_last_clear, "time_since_last_clear",		\
+    "Time since the last counters clear event (msec)")			\
+  m(+1, u64, symbol_errors, "symbol_errors", "Symbol errors")		\
+  m(+1, u64, sync_headers_errors, "sync_headers_errors",		\
+    "Sync header error counter")					\
+  m(+1, u64, bip_errors_lane0, "edpl_bip_errors_lane0",			\
+    "Indicates the number of PRBS errors on lane 0")			\
+  m(+1, u64, bip_errors_lane1, "edpl_bip_errors_lane1",			\
+    "Indicates the number of PRBS errors on lane 1")			\
+  m(+1, u64, bip_errors_lane2, "edpl_bip_errors_lane2",			\
+    "Indicates the number of PRBS errors on lane 2")			\
+  m(+1, u64, bip_errors_lane3, "edpl_bip_errors_lane3",			\
+    "Indicates the number of PRBS errors on lane 3")			\
+  m(+1, u64, fc_corrected_blocks_lane0, "fc_corrected_blocks_lane0",	\
+    "FEC correctable block counter lane 0")				\
+  m(+1, u64, fc_corrected_blocks_lane1, "fc_corrected_blocks_lane1",	\
+    "FEC correctable block counter lane 1")				\
+  m(+1, u64, fc_corrected_blocks_lane2, "fc_corrected_blocks_lane2",	\
+    "FEC correctable block counter lane 2")				\
+  m(+1, u64, fc_corrected_blocks_lane3, "fc_corrected_blocks_lane3",	\
+    "FEC correctable block counter lane 3")				\
+  m(+1, u64, rs_corrected_blocks, "rs_corrected_blocks",		\
+    "FEC correcable block counter")					\
+  m(+1, u64, rs_uncorrectable_blocks, "rs_uncorrectable_blocks",	\
+    "FEC uncorrecable block counter")					\
+  m(+1, u64, rs_no_errors_blocks, "rs_no_errors_blocks",		\
+    "The number of RS-FEC blocks received that had no errors")		\
+  m(+1, u64, rs_single_error_blocks, "rs_single_error_blocks",		\
+    "The number of corrected RS-FEC blocks received that had"		\
+    "exactly 1 error symbol")						\
+  m(+1, u64, rs_corrected_symbols_total, "rs_corrected_symbols_total",	\
+    "Port FEC corrected symbol counter")				\
+  m(+1, u64, rs_corrected_symbols_lane0, "rs_corrected_symbols_lane0",	\
+    "FEC corrected symbol counter lane 0")				\
+  m(+1, u64, rs_corrected_symbols_lane1, "rs_corrected_symbols_lane1",	\
+    "FEC corrected symbol counter lane 1")				\
+  m(+1, u64, rs_corrected_symbols_lane2, "rs_corrected_symbols_lane2",	\
+    "FEC corrected symbol counter lane 2")				\
+  m(+1, u64, rs_corrected_symbols_lane3, "rs_corrected_symbols_lane3",	\
+    "FEC corrected symbol counter lane 3")
 
 /* Per priority statistics for PFC */
 #define	MLX5E_PPORT_PER_PRIO_STATS_SUB(m,n,p)			\
@@ -347,7 +348,7 @@ struct mlx5e_vport_stats {
 	"device_stall_critical_watermark", "Device stall critical watermark")
 
 #define	MLX5E_PPORT_PER_PRIO_STATS_PREFIX(m,p,c,t,f,s,d) \
-  m(c, t pri_##p##_##f, "prio" #p "_" s, "Priority " #p " - " d)
+  m(c, t, pri_##p##_##f, "prio" #p "_" s, "Priority " #p " - " d)
 
 #define	MLX5E_PPORT_PER_PRIO_STATS_NUM_PRIO 8
 
@@ -409,14 +410,14 @@ struct mlx5e_port_stats_debug {
 };
 
 #define	MLX5E_RQ_STATS(m)					\
-  m(+1, u64 packets, "packets", "Received packets")		\
-  m(+1, u64 bytes, "bytes", "Received bytes")			\
-  m(+1, u64 csum_none, "csum_none", "Received packets")		\
-  m(+1, u64 lro_packets, "lro_packets", "Received LRO packets")	\
-  m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes")	\
-  m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO")	\
-  m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO")	\
-  m(+1, u64 wqe_err, "wqe_err", "Received packets")
+  m(+1, u64, packets, "packets", "Received packets")		\
+  m(+1, u64, bytes, "bytes", "Received bytes")			\
+  m(+1, u64, csum_none, "csum_none", "Received packets")		\
+  m(+1, u64, lro_packets, "lro_packets", "Received LRO packets")	\
+  m(+1, u64, lro_bytes, "lro_bytes", "Received LRO bytes")	\
+  m(+1, u64, sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO")	\
+  m(+1, u64, sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO")	\
+  m(+1, u64, wqe_err, "wqe_err", "Received packets")
 
 #define	MLX5E_RQ_STATS_NUM (0 MLX5E_RQ_STATS(MLX5E_STATS_COUNT))
 
@@ -427,14 +428,14 @@ struct mlx5e_rq_stats {
 };
 
 #define	MLX5E_SQ_STATS(m)						\
-  m(+1, u64 packets, "packets", "Transmitted packets")			\
-  m(+1, u64 bytes, "bytes", "Transmitted bytes")			\
-  m(+1, u64 tso_packets, "tso_packets", "Transmitted packets")		\
-  m(+1, u64 tso_bytes, "tso_bytes", "Transmitted bytes")		\
-  m(+1, u64 csum_offload_none, "csum_offload_none", "Transmitted packets")	\
-  m(+1, u64 defragged, "defragged", "Transmitted packets")		\
-  m(+1, u64 dropped, "dropped", "Transmitted packets")			\
-  m(+1, u64 nop, "nop", "Transmitted packets")
+  m(+1, u64, packets, "packets", "Transmitted packets")			\
+  m(+1, u64, bytes, "bytes", "Transmitted bytes")			\
+  m(+1, u64, tso_packets, "tso_packets", "Transmitted packets")		\
+  m(+1, u64, tso_bytes, "tso_bytes", "Transmitted bytes")		\
+  m(+1, u64, csum_offload_none, "csum_offload_none", "Transmitted packets")	\
+  m(+1, u64, defragged, "defragged", "Transmitted packets")		\
+  m(+1, u64, dropped, "dropped", "Transmitted packets")			\
+  m(+1, u64, nop, "nop", "Transmitted packets")
 
 #define	MLX5E_SQ_STATS_NUM (0 MLX5E_SQ_STATS(MLX5E_STATS_COUNT))
 
@@ -492,32 +493,31 @@ struct mlx5e_params {
 };
 
 #define	MLX5E_PARAMS(m)							\
-  m(+1, u64 tx_queue_size_max, "tx_queue_size_max", "Max send queue size") \
-  m(+1, u64 rx_queue_size_max, "rx_queue_size_max", "Max receive queue size") \
-  m(+1, u64 tx_queue_size, "tx_queue_size", "Default send queue size")	\
-  m(+1, u64 rx_queue_size, "rx_queue_size", "Default receive queue size") \
-  m(+1, u64 channels, "channels", "Default number of channels")		\
-  m(+1, u64 channels_rsss, "channels_rsss", "Default channels receive side scaling stride") \
-  m(+1, u64 coalesce_usecs_max, "coalesce_usecs_max", "Maximum usecs for joining packets") \
-  m(+1, u64 coalesce_pkts_max, "coalesce_pkts_max", "Maximum packets to join") \
-  m(+1, u64 rx_coalesce_usecs, "rx_coalesce_usecs", "Limit in usec for joining rx packets") \
-  m(+1, u64 rx_coalesce_pkts, "rx_coalesce_pkts", "Maximum number of rx packets to join") \
-  m(+1, u64 rx_coalesce_mode, "rx_coalesce_mode", "0: EQE fixed mode 1: CQE fixed mode 2: EQE auto mode 3: CQE auto mode") \
-  m(+1, u64 tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \
-  m(+1, u64 tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \
-  m(+1, u64 tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \
-  m(+1, u64 tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \
-  m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \
-  m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \
-  m(+1, u64 cqe_zipping, "cqe_zipping", "0 : CQE zipping disabled") \
-  m(+1, u64 modify_tx_dma, "modify_tx_dma", "0: Enable TX 1: Disable TX") \
-  m(+1, u64 modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \
-  m(+1, u64 diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \
-  m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: Enabled") \
-  m(+1, u64 hw_mtu, "hw_mtu", "Current hardware MTU value") \
-  m(+1, u64 mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 1: Disabled") \
-  m(+1, u64 uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: Disabled")
-
+  m(+1, u64, tx_queue_size_max, "tx_queue_size_max", "Max send queue size") \
+  m(+1, u64, rx_queue_size_max, "rx_queue_size_max", "Max receive queue size") \
+  m(+1, u64, tx_queue_size, "tx_queue_size", "Default send queue size")	\
+  m(+1, u64, rx_queue_size, "rx_queue_size", "Default receive queue size") \
+  m(+1, u64, channels, "channels", "Default number of channels")		\
+  m(+1, u64, channels_rsss, "channels_rsss", "Default channels receive side scaling stride") \
+  m(+1, u64, coalesce_usecs_max, "coalesce_usecs_max", "Maximum usecs for joining packets") \
+  m(+1, u64, coalesce_pkts_max, "coalesce_pkts_max", "Maximum packets to join") \
+  m(+1, u64, rx_coalesce_usecs, "rx_coalesce_usecs", "Limit in usec for joining rx packets") \
+  m(+1, u64, rx_coalesce_pkts, "rx_coalesce_pkts", "Maximum number of rx packets to join") \
+  m(+1, u64, rx_coalesce_mode, "rx_coalesce_mode", "0: EQE fixed mode 1: CQE fixed mode 2: EQE auto mode 3: CQE auto mode") \
+  m(+1, u64, tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \
+  m(+1, u64, tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \
+  m(+1, u64, tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \
+  m(+1, u64, tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \
+  m(+1, u64, tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \
+  m(+1, u64, hw_lro, "hw_lro", "set to enable hw_lro") \
+  m(+1, u64, cqe_zipping, "cqe_zipping", "0 : CQE zipping disabled") \
+  m(+1, u64, modify_tx_dma, "modify_tx_dma", "0: Enable TX 1: Disable TX") \
+  m(+1, u64, modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \
+  m(+1, u64, diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \
+  m(+1, u64, diag_general_enable, "diag_general_enable", "0: Disabled 1: Enabled") \
+  m(+1, u64, hw_mtu, "hw_mtu", "Current hardware MTU value") \
+  m(+1, u64, mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 1: Disabled") \
+  m(+1, u64, uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: Disabled")
 
 #define	MLX5E_PARAMS_NUM (0 MLX5E_PARAMS(MLX5E_STATS_COUNT))
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161816.x4GIG8eY033986>