File Index
Files and directories
Sign in
FILE

health.h

File preview with syntax highlighting.

linux-6.19.14/drivers/net/ethernet/intel/ice/devlink/health.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright (c) 2024, Intel Corporation. */
 3
 4#ifndef _HEALTH_H_
 5#define _HEALTH_H_
 6
 7#include <linux/types.h>
 8
 9/**
10 * DOC: health.h
11 *
12 * This header file stores everything that is needed for broadly understood
13 * devlink health mechanism for ice driver.
14 */
15
16struct ice_aqc_health_status_elem;
17struct ice_pf;
18struct ice_tx_ring;
19struct ice_rq_event_info;
20
21enum ice_mdd_src {
22	ICE_MDD_SRC_TX_PQM,
23	ICE_MDD_SRC_TX_TCLAN,
24	ICE_MDD_SRC_TX_TDPU,
25	ICE_MDD_SRC_RX,
26};
27
28/**
29 * struct ice_health - stores ice devlink health reporters and accompanied data
30 * @fw: devlink health reporter for FW Health Status events
31 * @mdd: devlink health reporter for MDD detection event
32 * @port: devlink health reporter for Port Health Status events
33 * @tx_hang: devlink health reporter for tx_hang event
34 * @tx_hang_buf: pre-allocated place to put info for Tx hang reporter from
35 *               non-sleeping context
36 * @tx_ring: ring that the hang occurred on
37 * @head: descriptor head
38 * @intr: interrupt register value
39 * @vsi_num: VSI owning the queue that the hang occurred on
40 * @fw_status: buffer for last received FW Status event
41 * @port_status: buffer for last received Port Status event
42 */
43struct ice_health {
44	struct devlink_health_reporter *fw;
45	struct devlink_health_reporter *mdd;
46	struct devlink_health_reporter *port;
47	struct devlink_health_reporter *tx_hang;
48	struct_group_tagged(ice_health_tx_hang_buf, tx_hang_buf,
49		struct ice_tx_ring *tx_ring;
50		u32 head;
51		u32 intr;
52		u16 vsi_num;
53	);
54	struct ice_aqc_health_status_elem fw_status;
55	struct ice_aqc_health_status_elem port_status;
56};
57
58void ice_process_health_status_event(struct ice_pf *pf,
59				     struct ice_rq_event_info *event);
60
61void ice_health_init(struct ice_pf *pf);
62void ice_health_deinit(struct ice_pf *pf);
63void ice_health_clear(struct ice_pf *pf);
64
65void ice_prep_tx_hang_report(struct ice_pf *pf, struct ice_tx_ring *tx_ring,
66			     u16 vsi_num, u32 head, u32 intr);
67void ice_report_mdd_event(struct ice_pf *pf, enum ice_mdd_src src, u8 pf_num,
68			  u16 vf_num, u8 event, u16 queue);
69void ice_report_tx_hang(struct ice_pf *pf);
70
71#endif /* _HEALTH_H_ */
~/ Read-only file preview.