mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
ionic: Update ionic_if.h with new extra port stats
Add a new structure to report additional statistics from the firmware to struct ionic_port_info. This new struct currently only contains FEC related statistics, but any new port-level statistics collected by the firmware would go into it. The new structure is located in the same area as the unused ionic_port_pb_stats structure, so this patch also removes that and its supporting enumerations since they was never used in this driver. Finally, to indicate firmware support for the new structure, introduce a new device capability that the driver can use to see if the attached device supports reporting these extra stats. Signed-off-by: Eric Joyner <eric.joyner@amd.com> Link: https://patch.msgid.link/20260614205303.48088-3-eric.joyner@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7678e69079
commit
433bc50081
|
|
@ -273,10 +273,12 @@ union ionic_drv_identity {
|
|||
* enum ionic_dev_capability - Device capabilities
|
||||
* @IONIC_DEV_CAP_VF_CTRL: Device supports VF ctrl operations
|
||||
* @IONIC_DEV_CAP_DISC_CMB: Device supports CMB discovery operations
|
||||
* @IONIC_DEV_CAP_EXTRA_STATS: Device supports extra stats schema
|
||||
*/
|
||||
enum ionic_dev_capability {
|
||||
IONIC_DEV_CAP_VF_CTRL = BIT(0),
|
||||
IONIC_DEV_CAP_DISC_CMB = BIT(1),
|
||||
IONIC_DEV_CAP_EXTRA_STATS = BIT(4),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -2329,7 +2331,7 @@ struct ionic_qos_identify_comp {
|
|||
/* Capri max supported, should be renamed. */
|
||||
#define IONIC_QOS_CLASS_MAX 7
|
||||
#define IONIC_QOS_PCP_MAX 8
|
||||
#define IONIC_QOS_CLASS_NAME_SZ 32
|
||||
#define IONIC_QOS_CLASS_NAME_SZ 32
|
||||
#define IONIC_QOS_DSCP_MAX 64
|
||||
#define IONIC_QOS_ALL_PCP 0xFF
|
||||
#define IONIC_DSCP_BLOCK_SIZE 8
|
||||
|
|
@ -2855,54 +2857,12 @@ struct ionic_mgmt_port_stats {
|
|||
__le64 frames_tx_pause;
|
||||
};
|
||||
|
||||
enum ionic_pb_buffer_drop_stats {
|
||||
IONIC_BUFFER_INTRINSIC_DROP = 0,
|
||||
IONIC_BUFFER_DISCARDED,
|
||||
IONIC_BUFFER_ADMITTED,
|
||||
IONIC_BUFFER_OUT_OF_CELLS_DROP,
|
||||
IONIC_BUFFER_OUT_OF_CELLS_DROP_2,
|
||||
IONIC_BUFFER_OUT_OF_CREDIT_DROP,
|
||||
IONIC_BUFFER_TRUNCATION_DROP,
|
||||
IONIC_BUFFER_PORT_DISABLED_DROP,
|
||||
IONIC_BUFFER_COPY_TO_CPU_TAIL_DROP,
|
||||
IONIC_BUFFER_SPAN_TAIL_DROP,
|
||||
IONIC_BUFFER_MIN_SIZE_VIOLATION_DROP,
|
||||
IONIC_BUFFER_ENQUEUE_ERROR_DROP,
|
||||
IONIC_BUFFER_INVALID_PORT_DROP,
|
||||
IONIC_BUFFER_INVALID_OUTPUT_QUEUE_DROP,
|
||||
IONIC_BUFFER_DROP_MAX,
|
||||
};
|
||||
|
||||
enum ionic_oflow_drop_stats {
|
||||
IONIC_OFLOW_OCCUPANCY_DROP,
|
||||
IONIC_OFLOW_EMERGENCY_STOP_DROP,
|
||||
IONIC_OFLOW_WRITE_BUFFER_ACK_FILL_UP_DROP,
|
||||
IONIC_OFLOW_WRITE_BUFFER_ACK_FULL_DROP,
|
||||
IONIC_OFLOW_WRITE_BUFFER_FULL_DROP,
|
||||
IONIC_OFLOW_CONTROL_FIFO_FULL_DROP,
|
||||
IONIC_OFLOW_DROP_MAX,
|
||||
};
|
||||
|
||||
/* struct ionic_port_pb_stats - packet buffers system stats
|
||||
* uses ionic_pb_buffer_drop_stats for drop_counts[]
|
||||
*/
|
||||
struct ionic_port_pb_stats {
|
||||
__le64 sop_count_in;
|
||||
__le64 eop_count_in;
|
||||
__le64 sop_count_out;
|
||||
__le64 eop_count_out;
|
||||
__le64 drop_counts[IONIC_BUFFER_DROP_MAX];
|
||||
__le64 input_queue_buffer_occupancy[IONIC_QOS_TC_MAX];
|
||||
__le64 input_queue_port_monitor[IONIC_QOS_TC_MAX];
|
||||
__le64 output_queue_port_monitor[IONIC_QOS_TC_MAX];
|
||||
__le64 oflow_drop_counts[IONIC_OFLOW_DROP_MAX];
|
||||
__le64 input_queue_good_pkts_in[IONIC_QOS_TC_MAX];
|
||||
__le64 input_queue_good_pkts_out[IONIC_QOS_TC_MAX];
|
||||
__le64 input_queue_err_pkts_in[IONIC_QOS_TC_MAX];
|
||||
__le64 input_queue_fifo_depth[IONIC_QOS_TC_MAX];
|
||||
__le64 input_queue_max_fifo_depth[IONIC_QOS_TC_MAX];
|
||||
__le64 input_queue_peak_occupancy[IONIC_QOS_TC_MAX];
|
||||
__le64 output_queue_buffer_occupancy[IONIC_QOS_TC_MAX];
|
||||
struct ionic_port_extra_stats {
|
||||
__le64 rsfec_correctable_blocks;
|
||||
__le64 rsfec_uncorrectable_blocks;
|
||||
__le64 fec_corrected_bits_total;
|
||||
__le64 rx_bits_phy;
|
||||
__le64 fec_codeword_error_bin[16];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -2950,7 +2910,7 @@ union ionic_port_identity {
|
|||
* @sprom_page2: Extended Transceiver sprom, page 2
|
||||
* @sprom_page17: Extended Transceiver sprom, page 17
|
||||
* @rsvd: reserved byte(s)
|
||||
* @pb_stats: uplink pb drop stats
|
||||
* @extra_stats: Extra port statistics data
|
||||
*/
|
||||
struct ionic_port_info {
|
||||
union ionic_port_config config;
|
||||
|
|
@ -2968,9 +2928,7 @@ struct ionic_port_info {
|
|||
};
|
||||
};
|
||||
u8 rsvd[376];
|
||||
|
||||
/* pb_stats must start at 2k offset */
|
||||
struct ionic_port_pb_stats pb_stats;
|
||||
struct ionic_port_extra_stats extra_stats;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user