Lines Matching defs:node

12  * irdma_alloc_node - Allocate a WS node and init
15 * @node_type: Type of node, leaf or parent
16 * @parent: parent node pointer
24 struct irdma_ws_node *node;
40 node = ws_mem.va;
41 node->index = node_index;
42 node->vsi_index = vsi->vsi_idx;
43 INIT_LIST_HEAD(&node->child_list_head);
45 node->type_leaf = true;
46 node->traffic_class = vsi->qos[user_pri].traffic_class;
47 node->user_pri = user_pri;
48 node->rel_bw = vsi->qos[user_pri].rel_bw;
49 if (!node->rel_bw)
50 node->rel_bw = 1;
52 node->lan_qs_handle = vsi->qos[user_pri].lan_qos_handle;
53 node->prio_type = IRDMA_PRIO_WEIGHTED_RR;
55 node->rel_bw = 1;
56 node->prio_type = IRDMA_PRIO_WEIGHTED_RR;
57 node->enable = true;
60 node->parent = parent;
62 return node;
66 * irdma_free_node - Free a WS node
68 * @node: Pointer to node to free
71 struct irdma_ws_node *node)
75 if (node->index)
76 irdma_free_ws_node_id(vsi->dev, node->index);
78 ws_mem.va = node;
84 * irdma_ws_cqp_cmd - Post CQP work scheduler node cmd
86 * @node: pointer to node
90 struct irdma_ws_node *node, u8 cmd)
94 node_info.id = node->index;
95 node_info.vsi = node->vsi_index;
96 if (node->parent)
97 node_info.parent_id = node->parent->index;
101 node_info.weight = node->rel_bw;
102 node_info.tc = node->traffic_class;
103 node_info.prio_type = node->prio_type;
104 node_info.type_leaf = node->type_leaf;
105 node_info.enable = node->enable;
111 if (node->type_leaf && cmd == IRDMA_OP_WS_ADD_NODE) {
112 node->qs_handle = node_info.qs_handle;
113 vsi->qos[node->user_pri].qs_handle = node_info.qs_handle;
120 * ws_find_node - Find SC WS node based on VSI id or TC
121 * @parent: parent node of First VSI or TC node
129 struct irdma_ws_node *node;
133 list_for_each_entry(node, &parent->child_list_head, siblings) {
134 if (node->vsi_index == match_val)
135 return node;
139 list_for_each_entry(node, &parent->child_list_head, siblings) {
140 if (node->traffic_class == match_val)
141 return node;
152 * irdma_tc_in_use - Checks to see if a leaf node is in use
182 * irdma_remove_leaf - Remove leaf node unconditionally
216 /* Check if VSI node can be freed */
221 /* Free head node there are no remaining VSI nodes */
256 ibdev_dbg(to_ibdev(vsi->dev), "WS: Creating root node\n");
273 /* Find a second tier node that matches the VSI */
277 /* If VSI node doesn't exist, add one */
299 "WS: Using node %d which represents VSI %d\n",
305 /* Add leaf node */
324 * callback to LAN to update the LAN tree with our node
338 "WS: Using node %d which represents VSI %d TC %d\n",
367 /* Free head node there are no remaining VSI nodes */
380 * irdma_ws_remove - Free WS scheduler node, update WS tree