1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27#ifndef _I40E_PROTOTYPE_H_
28#define _I40E_PROTOTYPE_H_
29
30#include "i40e_type.h"
31#include "i40e_alloc.h"
32#include "i40e_virtchnl.h"
33
34
35
36
37
38
39
40
41
42i40e_status i40evf_init_adminq(struct i40e_hw *hw);
43i40e_status i40evf_shutdown_adminq(struct i40e_hw *hw);
44void i40e_adminq_init_ring_data(struct i40e_hw *hw);
45i40e_status i40evf_clean_arq_element(struct i40e_hw *hw,
46 struct i40e_arq_event_info *e,
47 u16 *events_pending);
48i40e_status i40evf_asq_send_command(struct i40e_hw *hw,
49 struct i40e_aq_desc *desc,
50 void *buff,
51 u16 buff_size,
52 struct i40e_asq_cmd_details *cmd_details);
53bool i40evf_asq_done(struct i40e_hw *hw);
54
55
56void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
57 void *desc, void *buffer, u16 buf_len);
58
59void i40e_idle_aq(struct i40e_hw *hw);
60void i40evf_resume_aq(struct i40e_hw *hw);
61bool i40evf_check_asq_alive(struct i40e_hw *hw);
62i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
63const char *i40evf_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err);
64const char *i40evf_stat_str(struct i40e_hw *hw, i40e_status stat_err);
65
66i40e_status i40evf_aq_get_rss_lut(struct i40e_hw *hw, u16 seid,
67 bool pf_lut, u8 *lut, u16 lut_size);
68i40e_status i40evf_aq_set_rss_lut(struct i40e_hw *hw, u16 seid,
69 bool pf_lut, u8 *lut, u16 lut_size);
70i40e_status i40evf_aq_get_rss_key(struct i40e_hw *hw,
71 u16 seid,
72 struct i40e_aqc_get_set_rss_key_data *key);
73i40e_status i40evf_aq_set_rss_key(struct i40e_hw *hw,
74 u16 seid,
75 struct i40e_aqc_get_set_rss_key_data *key);
76
77i40e_status i40e_set_mac_type(struct i40e_hw *hw);
78
79extern struct i40e_rx_ptype_decoded i40evf_ptype_lookup[];
80
81static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)
82{
83 return i40evf_ptype_lookup[ptype];
84}
85
86
87
88
89void i40e_vf_parse_hw_config(struct i40e_hw *hw,
90 struct i40e_virtchnl_vf_resource *msg);
91i40e_status i40e_vf_reset(struct i40e_hw *hw);
92i40e_status i40e_aq_send_msg_to_pf(struct i40e_hw *hw,
93 enum i40e_virtchnl_ops v_opcode,
94 i40e_status v_retval,
95 u8 *msg, u16 msglen,
96 struct i40e_asq_cmd_details *cmd_details);
97i40e_status i40e_set_filter_control(struct i40e_hw *hw,
98 struct i40e_filter_control_settings *settings);
99i40e_status i40e_aq_add_rem_control_packet_filter(struct i40e_hw *hw,
100 u8 *mac_addr, u16 ethtype, u16 flags,
101 u16 vsi_seid, u16 queue, bool is_add,
102 struct i40e_control_filter_stats *stats,
103 struct i40e_asq_cmd_details *cmd_details);
104void i40e_add_filter_to_drop_tx_flow_control_frames(struct i40e_hw *hw,
105 u16 vsi_seid);
106i40e_status i40evf_aq_rx_ctl_read_register(struct i40e_hw *hw,
107 u32 reg_addr, u32 *reg_val,
108 struct i40e_asq_cmd_details *cmd_details);
109u32 i40evf_read_rx_ctl(struct i40e_hw *hw, u32 reg_addr);
110i40e_status i40evf_aq_rx_ctl_write_register(struct i40e_hw *hw,
111 u32 reg_addr, u32 reg_val,
112 struct i40e_asq_cmd_details *cmd_details);
113void i40evf_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val);
114i40e_status i40e_read_phy_register(struct i40e_hw *hw, u8 page,
115 u16 reg, u8 phy_addr, u16 *value);
116i40e_status i40e_write_phy_register(struct i40e_hw *hw, u8 page,
117 u16 reg, u8 phy_addr, u16 value);
118u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num);
119i40e_status i40e_blink_phy_link_led(struct i40e_hw *hw,
120 u32 time, u32 interval);
121#endif
122