xref: /linux/drivers/net/ethernet/intel/ice/ice_base.h (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1eff380aaSAnirudh Venkataramanan /* SPDX-License-Identifier: GPL-2.0 */
2eff380aaSAnirudh Venkataramanan /* Copyright (c) 2019, Intel Corporation. */
3eff380aaSAnirudh Venkataramanan 
4eff380aaSAnirudh Venkataramanan #ifndef _ICE_BASE_H_
5eff380aaSAnirudh Venkataramanan #define _ICE_BASE_H_
6eff380aaSAnirudh Venkataramanan 
7eff380aaSAnirudh Venkataramanan #include "ice.h"
8eff380aaSAnirudh Venkataramanan 
93e5fb691SMaciej Fijalkowski int ice_vsi_cfg_single_rxq(struct ice_vsi *vsi, u16 q_idx);
103e5fb691SMaciej Fijalkowski int ice_vsi_cfg_rxqs(struct ice_vsi *vsi);
11eff380aaSAnirudh Venkataramanan int __ice_vsi_get_qs(struct ice_qs_cfg *qs_cfg);
1213a6233bSBrett Creeley int
1313a6233bSBrett Creeley ice_vsi_ctrl_one_rx_ring(struct ice_vsi *vsi, bool ena, u16 rxq_idx, bool wait);
1413a6233bSBrett Creeley int ice_vsi_wait_one_rx_ring(struct ice_vsi *vsi, bool ena, u16 rxq_idx);
15eff380aaSAnirudh Venkataramanan int ice_vsi_alloc_q_vectors(struct ice_vsi *vsi);
16eff380aaSAnirudh Venkataramanan void ice_vsi_map_rings_to_vectors(struct ice_vsi *vsi);
17eff380aaSAnirudh Venkataramanan void ice_vsi_free_q_vectors(struct ice_vsi *vsi);
18*a292ba98SMaciej Fijalkowski int ice_vsi_cfg_single_txq(struct ice_vsi *vsi, struct ice_tx_ring **tx_rings,
19*a292ba98SMaciej Fijalkowski 			   u16 q_idx);
20*a292ba98SMaciej Fijalkowski int ice_vsi_cfg_lan_txqs(struct ice_vsi *vsi);
21*a292ba98SMaciej Fijalkowski int ice_vsi_cfg_xdp_txqs(struct ice_vsi *vsi);
22eff380aaSAnirudh Venkataramanan void ice_cfg_itr(struct ice_hw *hw, struct ice_q_vector *q_vector);
23eff380aaSAnirudh Venkataramanan void
24eff380aaSAnirudh Venkataramanan ice_cfg_txq_interrupt(struct ice_vsi *vsi, u16 txq, u16 msix_idx, u16 itr_idx);
25eff380aaSAnirudh Venkataramanan void
26eff380aaSAnirudh Venkataramanan ice_cfg_rxq_interrupt(struct ice_vsi *vsi, u16 rxq, u16 msix_idx, u16 itr_idx);
27b8ab8858SJan Glaza void ice_trigger_sw_intr(struct ice_hw *hw, const struct ice_q_vector *q_vector);
28eff380aaSAnirudh Venkataramanan int
29eff380aaSAnirudh Venkataramanan ice_vsi_stop_tx_ring(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src,
30e72bba21SMaciej Fijalkowski 		     u16 rel_vmvf_num, struct ice_tx_ring *ring,
31eff380aaSAnirudh Venkataramanan 		     struct ice_txq_meta *txq_meta);
32eff380aaSAnirudh Venkataramanan void
33b8ab8858SJan Glaza ice_fill_txq_meta(const struct ice_vsi *vsi, struct ice_tx_ring *ring,
34eff380aaSAnirudh Venkataramanan 		  struct ice_txq_meta *txq_meta);
35eff380aaSAnirudh Venkataramanan #endif /* _ICE_BASE_H_ */
36