ice: Configure VSIs for Tx/Rx
[linux-block.git] / drivers / net / ethernet / intel / ice / ice_sched.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2018, Intel Corporation. */
3
4 #ifndef _ICE_SCHED_H_
5 #define _ICE_SCHED_H_
6
7 #include "ice_common.h"
8
9 #define ICE_QGRP_LAYER_OFFSET   2
10
11 struct ice_sched_agg_vsi_info {
12         struct list_head list_entry;
13         DECLARE_BITMAP(tc_bitmap, ICE_MAX_TRAFFIC_CLASS);
14         u16 vsi_id;
15 };
16
17 struct ice_sched_agg_info {
18         struct list_head agg_vsi_list;
19         struct list_head list_entry;
20         DECLARE_BITMAP(tc_bitmap, ICE_MAX_TRAFFIC_CLASS);
21         u32 agg_id;
22         enum ice_agg_type agg_type;
23 };
24
25 /* FW AQ command calls */
26 enum ice_status ice_sched_init_port(struct ice_port_info *pi);
27 enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw);
28 void ice_sched_cleanup_all(struct ice_hw *hw);
29 struct ice_sched_node *
30 ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid);
31 enum ice_status
32 ice_sched_add_node(struct ice_port_info *pi, u8 layer,
33                    struct ice_aqc_txsched_elem_data *info);
34 void ice_free_sched_node(struct ice_port_info *pi, struct ice_sched_node *node);
35 struct ice_sched_node *ice_sched_get_tc_node(struct ice_port_info *pi, u8 tc);
36 struct ice_sched_node *
37 ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_id, u8 tc,
38                            u8 owner);
39 #endif /* _ICE_SCHED_H_ */