xref: /openbmc/linux/drivers/infiniband/hw/irdma/ws.h (revision 22c03398)
1 /* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB */
2 /* Copyright (c) 2015 - 2020 Intel Corporation */
3 #ifndef IRDMA_WS_H
4 #define IRDMA_WS_H
5 
6 #include "osdep.h"
7 
8 enum irdma_ws_node_type {
9 	WS_NODE_TYPE_PARENT,
10 	WS_NODE_TYPE_LEAF,
11 };
12 
13 enum irdma_ws_match_type {
14 	WS_MATCH_TYPE_VSI,
15 	WS_MATCH_TYPE_TC,
16 };
17 
18 struct irdma_ws_node {
19 	struct list_head siblings;
20 	struct list_head child_list_head;
21 	struct irdma_ws_node *parent;
22 	u64 lan_qs_handle; /* opaque handle used by LAN */
23 	u32 l2_sched_node_id;
24 	u16 index;
25 	u16 qs_handle;
26 	u16 vsi_index;
27 	u8 traffic_class;
28 	u8 user_pri;
29 	u8 rel_bw;
30 	u8 abstraction_layer; /* used for splitting a TC */
31 	u8 prio_type;
32 	bool type_leaf:1;
33 	bool enable:1;
34 };
35 
36 struct irdma_sc_vsi;
37 enum irdma_status_code irdma_ws_add(struct irdma_sc_vsi *vsi, u8 user_pri);
38 void irdma_ws_remove(struct irdma_sc_vsi *vsi, u8 user_pri);
39 void irdma_ws_reset(struct irdma_sc_vsi *vsi);
40 
41 #endif /* IRDMA_WS_H */
42