xref: /f-stack/dpdk/drivers/net/i40e/base/i40e_diag.h (revision 0c6bd470)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2001-2020 Intel Corporation
3  */
4 
5 #ifndef _I40E_DIAG_H_
6 #define _I40E_DIAG_H_
7 
8 #include "i40e_type.h"
9 
10 enum i40e_lb_mode {
11 	I40E_LB_MODE_NONE       = 0x0,
12 	I40E_LB_MODE_PHY_LOCAL  = I40E_AQ_LB_PHY_LOCAL,
13 	I40E_LB_MODE_PHY_REMOTE = I40E_AQ_LB_PHY_REMOTE,
14 	I40E_LB_MODE_MAC_LOCAL  = I40E_AQ_LB_MAC_LOCAL,
15 };
16 
17 struct i40e_diag_reg_test_info {
18 	u32 offset;	/* the base register */
19 	u32 mask;	/* bits that can be tested */
20 	u32 elements;	/* number of elements if array */
21 	u32 stride;	/* bytes between each element */
22 };
23 
24 enum i40e_status_code i40e_diag_set_loopback(struct i40e_hw *hw,
25 					     enum i40e_lb_mode mode);
26 enum i40e_status_code i40e_diag_fw_alive_test(struct i40e_hw *hw);
27 enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw);
28 enum i40e_status_code i40e_diag_eeprom_test(struct i40e_hw *hw);
29 
30 #endif /* _I40E_DIAG_H_ */
31