0001
0002
0003
0004 #ifndef _ICE_FLEX_PIPE_H_
0005 #define _ICE_FLEX_PIPE_H_
0006
0007 #include "ice_type.h"
0008
0009
0010 #define ICE_PKG_SUPP_VER_MAJ 1
0011 #define ICE_PKG_SUPP_VER_MNR 3
0012
0013
0014 #define ICE_PKG_FMT_VER_MAJ 1
0015 #define ICE_PKG_FMT_VER_MNR 0
0016 #define ICE_PKG_FMT_VER_UPD 0
0017 #define ICE_PKG_FMT_VER_DFT 0
0018
0019 #define ICE_PKG_CNT 4
0020
0021 enum ice_ddp_state {
0022
0023
0024
0025 ICE_DDP_PKG_SUCCESS = 0,
0026
0027
0028
0029
0030 ICE_DDP_PKG_ALREADY_LOADED = -1,
0031
0032
0033
0034
0035 ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED = -2,
0036
0037
0038 ICE_DDP_PKG_ALREADY_LOADED_NOT_SUPPORTED = -3,
0039
0040
0041
0042
0043 ICE_DDP_PKG_COMPATIBLE_ALREADY_LOADED = -4,
0044
0045
0046
0047
0048 ICE_DDP_PKG_FW_MISMATCH = -5,
0049
0050
0051 ICE_DDP_PKG_INVALID_FILE = -6,
0052
0053
0054
0055
0056 ICE_DDP_PKG_FILE_VERSION_TOO_HIGH = -7,
0057
0058
0059
0060
0061 ICE_DDP_PKG_FILE_VERSION_TOO_LOW = -8,
0062
0063
0064 ICE_DDP_PKG_FILE_SIGNATURE_INVALID = -9,
0065
0066
0067
0068
0069 ICE_DDP_PKG_FILE_REVISION_TOO_LOW = -10,
0070
0071
0072 ICE_DDP_PKG_LOAD_ERROR = -11,
0073
0074
0075 ICE_DDP_PKG_ERR = -12
0076 };
0077
0078 int
0079 ice_acquire_change_lock(struct ice_hw *hw, enum ice_aq_res_access_type access);
0080 void ice_release_change_lock(struct ice_hw *hw);
0081 int
0082 ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 fv_idx,
0083 u8 *prot, u16 *off);
0084 void
0085 ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type,
0086 unsigned long *bm);
0087 void
0088 ice_init_prof_result_bm(struct ice_hw *hw);
0089 int
0090 ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups,
0091 unsigned long *bm, struct list_head *fv_list);
0092 int
0093 ice_pkg_buf_unreserve_section(struct ice_buf_build *bld, u16 count);
0094 u16 ice_pkg_buf_get_free_space(struct ice_buf_build *bld);
0095 int
0096 ice_aq_upload_section(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf,
0097 u16 buf_size, struct ice_sq_cd *cd);
0098 bool
0099 ice_get_open_tunnel_port(struct ice_hw *hw, u16 *port,
0100 enum ice_tunnel_type type);
0101 int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table,
0102 unsigned int idx, struct udp_tunnel_info *ti);
0103 int ice_udp_tunnel_unset_port(struct net_device *netdev, unsigned int table,
0104 unsigned int idx, struct udp_tunnel_info *ti);
0105 int ice_set_dvm_boost_entries(struct ice_hw *hw);
0106
0107
0108 bool ice_hw_ptype_ena(struct ice_hw *hw, u16 ptype);
0109
0110
0111 int
0112 ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
0113 const struct ice_ptype_attributes *attr, u16 attr_cnt,
0114 struct ice_fv_word *es, u16 *masks);
0115 int
0116 ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);
0117 int
0118 ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);
0119 enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);
0120 enum ice_ddp_state
0121 ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);
0122 bool ice_is_init_pkg_successful(enum ice_ddp_state state);
0123 int ice_init_hw_tbls(struct ice_hw *hw);
0124 void ice_free_seg(struct ice_hw *hw);
0125 void ice_fill_blk_tbls(struct ice_hw *hw);
0126 void ice_clear_hw_tbls(struct ice_hw *hw);
0127 void ice_free_hw_tbls(struct ice_hw *hw);
0128 int ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id);
0129 struct ice_buf_build *
0130 ice_pkg_buf_alloc_single_section(struct ice_hw *hw, u32 type, u16 size,
0131 void **section);
0132 struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld);
0133 void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld);
0134
0135 #endif