1*3ec648c6SKrzysztof Kozlowski /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 23ae331c7SMustafa Ismail /* Copyright (c) 2015 - 2020 Intel Corporation */ 33ae331c7SMustafa Ismail #ifndef IRDMA_WS_H 43ae331c7SMustafa Ismail #define IRDMA_WS_H 53ae331c7SMustafa Ismail 63ae331c7SMustafa Ismail #include "osdep.h" 73ae331c7SMustafa Ismail 83ae331c7SMustafa Ismail enum irdma_ws_node_type { 93ae331c7SMustafa Ismail WS_NODE_TYPE_PARENT, 103ae331c7SMustafa Ismail WS_NODE_TYPE_LEAF, 113ae331c7SMustafa Ismail }; 123ae331c7SMustafa Ismail 133ae331c7SMustafa Ismail enum irdma_ws_match_type { 143ae331c7SMustafa Ismail WS_MATCH_TYPE_VSI, 153ae331c7SMustafa Ismail WS_MATCH_TYPE_TC, 163ae331c7SMustafa Ismail }; 173ae331c7SMustafa Ismail 183ae331c7SMustafa Ismail struct irdma_ws_node { 193ae331c7SMustafa Ismail struct list_head siblings; 203ae331c7SMustafa Ismail struct list_head child_list_head; 213ae331c7SMustafa Ismail struct irdma_ws_node *parent; 223ae331c7SMustafa Ismail u64 lan_qs_handle; /* opaque handle used by LAN */ 233ae331c7SMustafa Ismail u32 l2_sched_node_id; 243ae331c7SMustafa Ismail u16 index; 253ae331c7SMustafa Ismail u16 qs_handle; 263ae331c7SMustafa Ismail u16 vsi_index; 273ae331c7SMustafa Ismail u8 traffic_class; 283ae331c7SMustafa Ismail u8 user_pri; 293ae331c7SMustafa Ismail u8 rel_bw; 303ae331c7SMustafa Ismail u8 abstraction_layer; /* used for splitting a TC */ 313ae331c7SMustafa Ismail u8 prio_type; 323ae331c7SMustafa Ismail bool type_leaf:1; 333ae331c7SMustafa Ismail bool enable:1; 343ae331c7SMustafa Ismail }; 353ae331c7SMustafa Ismail 363ae331c7SMustafa Ismail struct irdma_sc_vsi; 372c4b14eaSShiraz Saleem int irdma_ws_add(struct irdma_sc_vsi *vsi, u8 user_pri); 383ae331c7SMustafa Ismail void irdma_ws_remove(struct irdma_sc_vsi *vsi, u8 user_pri); 393ae331c7SMustafa Ismail void irdma_ws_reset(struct irdma_sc_vsi *vsi); 403ae331c7SMustafa Ismail 413ae331c7SMustafa Ismail #endif /* IRDMA_WS_H */ 42