Lines Matching full:shapers
25 struct xarray shapers; member
257 if (!hierarchy || xa_get_mark(&hierarchy->shapers, index, in net_shaper_lookup()
261 return xa_load(&hierarchy->shapers, index); in net_shaper_lookup()
280 xa_init_flags(&hierarchy->shapers, XA_FLAGS_ALLOC); in net_shaper_hierarchy_setup()
307 cur = xa_load(&hierarchy->shapers, index); in net_shaper_pre_insert()
321 ret = xa_alloc(&hierarchy->shapers, &index, NULL, in net_shaper_pre_insert()
341 xa_lock(&hierarchy->shapers); in net_shaper_pre_insert()
342 prev = __xa_store(&hierarchy->shapers, index, cur, GFP_KERNEL); in net_shaper_pre_insert()
343 __xa_set_mark(&hierarchy->shapers, index, NET_SHAPER_NOT_VALID); in net_shaper_pre_insert()
344 xa_unlock(&hierarchy->shapers); in net_shaper_pre_insert()
355 xa_erase(&hierarchy->shapers, index); in net_shaper_pre_insert()
363 int nr_shapers, const struct net_shaper *shapers) in net_shaper_commit() argument
370 xa_lock(&hierarchy->shapers); in net_shaper_commit()
372 index = net_shaper_handle_to_index(&shapers[i].handle); in net_shaper_commit()
374 cur = xa_load(&hierarchy->shapers, index); in net_shaper_commit()
381 __xa_clear_mark(&hierarchy->shapers, index, in net_shaper_commit()
383 *cur = shapers[i]; in net_shaper_commit()
385 xa_unlock(&hierarchy->shapers); in net_shaper_commit()
398 xa_lock(&hierarchy->shapers); in net_shaper_rollback()
399 xa_for_each_marked(&hierarchy->shapers, index, cur, in net_shaper_rollback()
401 __xa_erase(&hierarchy->shapers, index); in net_shaper_rollback()
404 xa_unlock(&hierarchy->shapers); in net_shaper_rollback()
427 /* The default id for NODE scope shapers is an invalid one in net_shaper_parse_handle()
790 for (; (shaper = xa_find(&hierarchy->shapers, &ctx->start_index, in net_shaper_nl_get_dumpit()
828 /* The 'set' operation can't create node-scope shapers. */ in net_shaper_nl_set_doit()
870 xa_erase(&hierarchy->shapers, net_shaper_handle_to_index(&handle)); in __net_shaper_delete()
903 NL_SET_ERR_MSG_FMT(extack, "All the leaves shapers must have the same old parent"); in net_shaper_parent_from_leaves()
983 /* The leaves shapers will be nested to the node, update the in __net_shaper_group()
1042 xa_for_each(&hierarchy->shapers, index, cur) { in net_shaper_pre_del_node()
1205 /* Record the node shapers that this group() operation can make in net_shaper_nl_group_doit()
1364 xa_lock(&hierarchy->shapers); in net_shaper_flush()
1365 xa_for_each(&hierarchy->shapers, index, cur) { in net_shaper_flush()
1366 __xa_erase(&hierarchy->shapers, index); in net_shaper_flush()
1369 xa_unlock(&hierarchy->shapers); in net_shaper_flush()
1398 /* Only drivers implementing shapers support ensure in net_shaper_set_real_num_tx_queues()
1420 xa_erase(&hierarchy->shapers, index); in net_shaper_set_real_num_tx_queues()