Lines Matching full:scope
116 if (handle->scope == NET_SHAPER_SCOPE_UNSPEC) in net_shaper_fill_handle()
123 if (nla_put_u32(msg, NET_SHAPER_A_HANDLE_SCOPE, handle->scope) || in net_shaper_fill_handle()
124 (handle->scope >= NET_SHAPER_SCOPE_QUEUE && in net_shaper_fill_handle()
215 return FIELD_PREP(NET_SHAPER_SCOPE_MASK, handle->scope) | in net_shaper_handle_to_index()
222 handle->scope = FIELD_GET(NET_SHAPER_SCOPE_MASK, index); in net_shaper_index_to_handle()
229 switch (handle->scope) { in net_shaper_default_parent()
233 parent->scope = NET_SHAPER_SCOPE_UNSPEC; in net_shaper_default_parent()
238 parent->scope = NET_SHAPER_SCOPE_NETDEV; in net_shaper_default_parent()
312 if (handle->scope == NET_SHAPER_SCOPE_NODE && in net_shaper_pre_insert()
425 handle->scope = nla_get_u32(tb[NET_SHAPER_A_HANDLE_SCOPE]); in net_shaper_parse_handle()
427 /* The default id for NODE scope shapers is an invalid one in net_shaper_parse_handle()
435 else if (handle->scope == NET_SHAPER_SCOPE_NODE) in net_shaper_parse_handle()
451 ops->capabilities(binding, shaper->handle.scope, &caps); in net_shaper_validate_caps()
477 if (shaper->handle.scope == NET_SHAPER_SCOPE_QUEUE && in net_shaper_validate_caps()
528 if (shaper->handle.scope == NET_SHAPER_SCOPE_UNSPEC) { in net_shaper_parse_info()
573 ops->capabilities(binding, shaper->handle.scope, &caps); in net_shaper_validate_nesting()
576 "Nesting not supported for scope %d", in net_shaper_validate_nesting()
577 shaper->handle.scope); in net_shaper_validate_nesting()
605 if (shaper->handle.scope != NET_SHAPER_SCOPE_QUEUE) { in net_shaper_parse_leaf()
610 if (node->handle.scope == NET_SHAPER_SCOPE_NODE) { in net_shaper_parse_leaf()
637 if (shaper->handle.scope != NET_SHAPER_SCOPE_NODE && in net_shaper_parse_node()
638 shaper->handle.scope != NET_SHAPER_SCOPE_NETDEV) { in net_shaper_parse_node()
649 if (shaper->parent.scope != NET_SHAPER_SCOPE_NODE && in net_shaper_parse_node()
650 shaper->parent.scope != NET_SHAPER_SCOPE_NETDEV) { in net_shaper_parse_node()
828 /* The 'set' operation can't create node-scope shapers. */ in net_shaper_nl_set_doit()
830 if (handle.scope == NET_SHAPER_SCOPE_NODE && in net_shaper_nl_set_doit()
874 if (parent_handle.scope == NET_SHAPER_SCOPE_NODE) { in __net_shaper_delete()
924 if (node->handle.scope == NET_SHAPER_SCOPE_NODE) { in __net_shaper_group()
932 node->handle.scope, node->handle.id); in __net_shaper_group()
936 /* When unspecified, the node parent scope is inherited from in __net_shaper_group()
939 if (node->parent.scope == NET_SHAPER_SCOPE_UNSPEC) { in __net_shaper_group()
951 if (node->parent.scope == NET_SHAPER_SCOPE_NODE) { in __net_shaper_group()
955 node->parent.scope, node->parent.id); in __net_shaper_group()
965 /* For newly created node scope shaper, the following will in __net_shaper_group()
1028 /* A scope NODE shaper can be nested only to the NETDEV scope in net_shaper_pre_del_node()
1032 if (WARN_ON_ONCE(node.handle.scope != NET_SHAPER_SCOPE_NETDEV)) in net_shaper_pre_del_node()
1058 update_node = node.handle.scope != NET_SHAPER_SCOPE_NETDEV; in net_shaper_pre_del_node()
1098 if (handle.scope == NET_SHAPER_SCOPE_NODE) { in net_shaper_nl_delete_doit()
1209 if (leaves[i].parent.scope == NET_SHAPER_SCOPE_NODE && in net_shaper_nl_group_doit()
1261 enum net_shaper_scope scope, unsigned long flags, in net_shaper_cap_fill_one() argument
1272 nla_put_u32(msg, NET_SHAPER_A_CAPS_SCOPE, scope)) in net_shaper_cap_fill_one()
1294 enum net_shaper_scope scope; in net_shaper_nl_cap_get_doit() local
1303 scope = nla_get_u32(info->attrs[NET_SHAPER_A_CAPS_SCOPE]); in net_shaper_nl_cap_get_doit()
1305 ops->capabilities(binding, scope, &flags); in net_shaper_nl_cap_get_doit()
1313 ret = net_shaper_cap_fill_one(msg, binding, scope, flags, info); in net_shaper_nl_cap_get_doit()
1333 enum net_shaper_scope scope; in net_shaper_nl_cap_get_dumpit() local
1338 for (scope = 0; scope <= NET_SHAPER_SCOPE_MAX; ++scope) { in net_shaper_nl_cap_get_dumpit()
1341 ops->capabilities(binding, scope, &flags); in net_shaper_nl_cap_get_dumpit()
1345 ret = net_shaper_cap_fill_one(skb, binding, scope, flags, in net_shaper_nl_cap_get_dumpit()
1409 handle.scope = NET_SHAPER_SCOPE_QUEUE; in net_shaper_set_real_num_tx_queues()
1424 if (parent_handle.scope != NET_SHAPER_SCOPE_NODE) in net_shaper_set_real_num_tx_queues()