Skip to content

Commit

Permalink
Merge branch 'net-cadence-macb-modernize-statistics-reporting'
Browse files Browse the repository at this point in the history
Sean Anderson says:

====================
net: cadence: macb: Modernize statistics reporting

Implement the modern interfaces for statistics reporting.
====================

Link: https://patch.msgid.link/20250214212703.2618652-1-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Feb 19, 2025
2 parents c900e49 + f6af690 commit d5b595d
Show file tree
Hide file tree
Showing 2 changed files with 235 additions and 85 deletions.
130 changes: 64 additions & 66 deletions drivers/net/ethernet/cadence/macb.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,75 +951,73 @@ struct macb_tx_skb {
* device stats by a periodic timer.
*/
struct macb_stats {
u32 rx_pause_frames;
u32 tx_ok;
u32 tx_single_cols;
u32 tx_multiple_cols;
u32 rx_ok;
u32 rx_fcs_errors;
u32 rx_align_errors;
u32 tx_deferred;
u32 tx_late_cols;
u32 tx_excessive_cols;
u32 tx_underruns;
u32 tx_carrier_errors;
u32 rx_resource_errors;
u32 rx_overruns;
u32 rx_symbol_errors;
u32 rx_oversize_pkts;
u32 rx_jabbers;
u32 rx_undersize_pkts;
u32 sqe_test_errors;
u32 rx_length_mismatch;
u32 tx_pause_frames;
u64 rx_pause_frames;
u64 tx_ok;
u64 tx_single_cols;
u64 tx_multiple_cols;
u64 rx_ok;
u64 rx_fcs_errors;
u64 rx_align_errors;
u64 tx_deferred;
u64 tx_late_cols;
u64 tx_excessive_cols;
u64 tx_underruns;
u64 tx_carrier_errors;
u64 rx_resource_errors;
u64 rx_overruns;
u64 rx_symbol_errors;
u64 rx_oversize_pkts;
u64 rx_jabbers;
u64 rx_undersize_pkts;
u64 sqe_test_errors;
u64 rx_length_mismatch;
u64 tx_pause_frames;
};

struct gem_stats {
u32 tx_octets_31_0;
u32 tx_octets_47_32;
u32 tx_frames;
u32 tx_broadcast_frames;
u32 tx_multicast_frames;
u32 tx_pause_frames;
u32 tx_64_byte_frames;
u32 tx_65_127_byte_frames;
u32 tx_128_255_byte_frames;
u32 tx_256_511_byte_frames;
u32 tx_512_1023_byte_frames;
u32 tx_1024_1518_byte_frames;
u32 tx_greater_than_1518_byte_frames;
u32 tx_underrun;
u32 tx_single_collision_frames;
u32 tx_multiple_collision_frames;
u32 tx_excessive_collisions;
u32 tx_late_collisions;
u32 tx_deferred_frames;
u32 tx_carrier_sense_errors;
u32 rx_octets_31_0;
u32 rx_octets_47_32;
u32 rx_frames;
u32 rx_broadcast_frames;
u32 rx_multicast_frames;
u32 rx_pause_frames;
u32 rx_64_byte_frames;
u32 rx_65_127_byte_frames;
u32 rx_128_255_byte_frames;
u32 rx_256_511_byte_frames;
u32 rx_512_1023_byte_frames;
u32 rx_1024_1518_byte_frames;
u32 rx_greater_than_1518_byte_frames;
u32 rx_undersized_frames;
u32 rx_oversize_frames;
u32 rx_jabbers;
u32 rx_frame_check_sequence_errors;
u32 rx_length_field_frame_errors;
u32 rx_symbol_errors;
u32 rx_alignment_errors;
u32 rx_resource_errors;
u32 rx_overruns;
u32 rx_ip_header_checksum_errors;
u32 rx_tcp_checksum_errors;
u32 rx_udp_checksum_errors;
u64 tx_octets;
u64 tx_frames;
u64 tx_broadcast_frames;
u64 tx_multicast_frames;
u64 tx_pause_frames;
u64 tx_64_byte_frames;
u64 tx_65_127_byte_frames;
u64 tx_128_255_byte_frames;
u64 tx_256_511_byte_frames;
u64 tx_512_1023_byte_frames;
u64 tx_1024_1518_byte_frames;
u64 tx_greater_than_1518_byte_frames;
u64 tx_underrun;
u64 tx_single_collision_frames;
u64 tx_multiple_collision_frames;
u64 tx_excessive_collisions;
u64 tx_late_collisions;
u64 tx_deferred_frames;
u64 tx_carrier_sense_errors;
u64 rx_octets;
u64 rx_frames;
u64 rx_broadcast_frames;
u64 rx_multicast_frames;
u64 rx_pause_frames;
u64 rx_64_byte_frames;
u64 rx_65_127_byte_frames;
u64 rx_128_255_byte_frames;
u64 rx_256_511_byte_frames;
u64 rx_512_1023_byte_frames;
u64 rx_1024_1518_byte_frames;
u64 rx_greater_than_1518_byte_frames;
u64 rx_undersized_frames;
u64 rx_oversize_frames;
u64 rx_jabbers;
u64 rx_frame_check_sequence_errors;
u64 rx_length_field_frame_errors;
u64 rx_symbol_errors;
u64 rx_alignment_errors;
u64 rx_resource_errors;
u64 rx_overruns;
u64 rx_ip_header_checksum_errors;
u64 rx_tcp_checksum_errors;
u64 rx_udp_checksum_errors;
};

/* Describes the name and offset of an individual statistic register, as
Expand Down
Loading

0 comments on commit d5b595d

Please sign in to comment.