1c7648810STony Nguyen /* SPDX-License-Identifier: GPL-2.0 */ 2c7648810STony Nguyen /* Copyright (c) 2019, Intel Corporation. */ 3c7648810STony Nguyen 4c7648810STony Nguyen #ifndef _ICE_FLEX_PIPE_H_ 5c7648810STony Nguyen #define _ICE_FLEX_PIPE_H_ 6c7648810STony Nguyen 7c7648810STony Nguyen #include "ice_type.h" 8c7648810STony Nguyen 95e24d598STony Nguyen int 10fd2a6b71SDan Nowlin ice_acquire_change_lock(struct ice_hw *hw, enum ice_aq_res_access_type access); 11fd2a6b71SDan Nowlin void ice_release_change_lock(struct ice_hw *hw); 125e24d598STony Nguyen int 13fd2a6b71SDan Nowlin ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 fv_idx, 14fd2a6b71SDan Nowlin u8 *prot, u16 *off); 15450052a4SDan Nowlin void 16450052a4SDan Nowlin ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type, 17450052a4SDan Nowlin unsigned long *bm); 18450052a4SDan Nowlin void 19450052a4SDan Nowlin ice_init_prof_result_bm(struct ice_hw *hw); 205e24d598STony Nguyen int 21*e5dd661bSMichal Swiatkowski ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups, 22450052a4SDan Nowlin unsigned long *bm, struct list_head *fv_list); 23a1ffafb0SBrett Creeley int 24a1ffafb0SBrett Creeley ice_pkg_buf_unreserve_section(struct ice_buf_build *bld, u16 count); 25a1ffafb0SBrett Creeley u16 ice_pkg_buf_get_free_space(struct ice_buf_build *bld); 26a1ffafb0SBrett Creeley int 27a1ffafb0SBrett Creeley ice_aq_upload_section(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf, 28a1ffafb0SBrett Creeley u16 buf_size, struct ice_sq_cd *cd); 29cac2a27cSHenry Tieman bool 30de6acd1cSMichal Swiatkowski ice_get_open_tunnel_port(struct ice_hw *hw, u16 *port, 31de6acd1cSMichal Swiatkowski enum ice_tunnel_type type); 32b20e6c17SJakub Kicinski int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table, 33b20e6c17SJakub Kicinski unsigned int idx, struct udp_tunnel_info *ti); 34b20e6c17SJakub Kicinski int ice_udp_tunnel_unset_port(struct net_device *netdev, unsigned int table, 35b20e6c17SJakub Kicinski unsigned int idx, struct udp_tunnel_info *ti); 36a1ffafb0SBrett Creeley int ice_set_dvm_boost_entries(struct ice_hw *hw); 37a4e82a81STony Nguyen 388818b954SHaiyue Wang /* Rx parser PTYPE functions */ 398818b954SHaiyue Wang bool ice_hw_ptype_ena(struct ice_hw *hw, u16 ptype); 408818b954SHaiyue Wang 418818b954SHaiyue Wang /* XLT2/VSI group functions */ 425e24d598STony Nguyen int 4331ad4e4eSTony Nguyen ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[], 44cbad5db8SQi Zhang const struct ice_ptype_attributes *attr, u16 attr_cnt, 45b199dddbSQi Zhang struct ice_fv_word *es, u16 *masks); 465e24d598STony Nguyen int 47451f2c44STony Nguyen ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl); 485e24d598STony Nguyen int 492c61054cSTony Nguyen ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl); 50247dd97dSWojciech Drewek enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len); 51247dd97dSWojciech Drewek enum ice_ddp_state 52c7648810STony Nguyen ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len); 53247dd97dSWojciech Drewek bool ice_is_init_pkg_successful(enum ice_ddp_state state); 545e24d598STony Nguyen int ice_init_hw_tbls(struct ice_hw *hw); 55c7648810STony Nguyen void ice_free_seg(struct ice_hw *hw); 56462acf6aSTony Nguyen void ice_fill_blk_tbls(struct ice_hw *hw); 5732d63fa1STony Nguyen void ice_clear_hw_tbls(struct ice_hw *hw); 5832d63fa1STony Nguyen void ice_free_hw_tbls(struct ice_hw *hw); 595518ac2aSTony Nguyen int ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id); 60a1ffafb0SBrett Creeley struct ice_buf_build * 61a1ffafb0SBrett Creeley ice_pkg_buf_alloc_single_section(struct ice_hw *hw, u32 type, u16 size, 62a1ffafb0SBrett Creeley void **section); 63a1ffafb0SBrett Creeley struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld); 64a1ffafb0SBrett Creeley void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld); 65a1ffafb0SBrett Creeley 66c7648810STony Nguyen #endif /* _ICE_FLEX_PIPE_H_ */ 67