ice: Configure VSIs for Tx/Rx
[linux-block.git] / drivers / net / ethernet / intel / ice / ice_sched.h
CommitLineData
9c20346b
AV
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
cdedef59
AV
9#define ICE_QGRP_LAYER_OFFSET 2
10
9c20346b
AV
11struct 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
17struct 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 */
dc49c772 26enum ice_status ice_sched_init_port(struct ice_port_info *pi);
9c20346b
AV
27enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw);
28void ice_sched_cleanup_all(struct ice_hw *hw);
dc49c772
AV
29struct ice_sched_node *
30ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid);
31enum ice_status
32ice_sched_add_node(struct ice_port_info *pi, u8 layer,
33 struct ice_aqc_txsched_elem_data *info);
9c20346b
AV
34void ice_free_sched_node(struct ice_port_info *pi, struct ice_sched_node *node);
35struct ice_sched_node *ice_sched_get_tc_node(struct ice_port_info *pi, u8 tc);
cdedef59
AV
36struct ice_sched_node *
37ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_id, u8 tc,
38 u8 owner);
9c20346b 39#endif /* _ICE_SCHED_H_ */