Lines Matching refs:index

44 static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index)  in mpls_route_input_rcu()  argument
48 if (index < net->mpls.platform_labels) { in mpls_route_input_rcu()
51 rt = rcu_dereference(platform_label[index]); in mpls_route_input_rcu()
279 static void mpls_notify_route(struct net *net, unsigned index, in mpls_notify_route() argument
289 if (rt && (index >= 16)) in mpls_notify_route()
290 rtmsg_lfib(event, index, rt, nlh, net, portid, nlm_flags); in mpls_notify_route()
293 static void mpls_route_update(struct net *net, unsigned index, in mpls_route_update() argument
303 rt = rtnl_dereference(platform_label[index]); in mpls_route_update()
305 rcu_assign_pointer(platform_label[index], new); in mpls_route_update()
309 mpls_notify_route(net, index, old, new, info); in mpls_route_update()
319 unsigned index; in find_free_label() local
323 for (index = 16; index < platform_labels; index++) { in find_free_label()
324 if (!rtnl_dereference(platform_label[index])) in find_free_label()
325 return index; in find_free_label()
336 unsigned index; in mpls_route_add() local
340 index = cfg->rc_label; in mpls_route_add()
343 if ((index == LABEL_NOT_SPECIFIED) && in mpls_route_add()
345 index = find_free_label(net); in mpls_route_add()
349 if (index < 16) in mpls_route_add()
353 if (index >= net->mpls.platform_labels) in mpls_route_add()
382 old = rtnl_dereference(platform_label[index]); in mpls_route_add()
407 mpls_route_update(net, index, NULL, rt, &cfg->rc_nlinfo); in mpls_route_add()
421 unsigned index; in mpls_route_del() local
424 index = cfg->rc_label; in mpls_route_del()
427 if (index < 16) in mpls_route_del()
431 if (index >= net->mpls.platform_labels) in mpls_route_del()
434 mpls_route_update(net, index, NULL, NULL, &cfg->rc_nlinfo); in mpls_route_del()
524 unsigned index; in mpls_ifdown() local
527 for (index = 0; index < net->mpls.platform_labels; index++) { in mpls_ifdown()
528 struct mpls_route *rt = rtnl_dereference(platform_label[index]); in mpls_ifdown()
680 int index; in rtm_to_route_config() local
721 for (index = 0; index <= RTA_MAX; index++) { in rtm_to_route_config()
722 struct nlattr *nla = tb[index]; in rtm_to_route_config()
726 switch(index) { in rtm_to_route_config()
864 unsigned int index; in mpls_dump_routes() local
868 index = cb->args[0]; in mpls_dump_routes()
869 if (index < 16) in mpls_dump_routes()
870 index = 16; in mpls_dump_routes()
874 for (; index < platform_labels; index++) { in mpls_dump_routes()
876 rt = rtnl_dereference(platform_label[index]); in mpls_dump_routes()
882 index, rt, NLM_F_MULTI) < 0) in mpls_dump_routes()
885 cb->args[0] = index; in mpls_dump_routes()
937 unsigned index; in resize_platform_label_table() local
976 for (index = limit; index < old_limit; index++) in resize_platform_label_table()
977 mpls_route_update(net, index, NULL, NULL, NULL); in resize_platform_label_table()
1080 unsigned int index; in mpls_net_exit() local
1098 for (index = 0; index < platform_labels; index++) { in mpls_net_exit()
1099 struct mpls_route *rt = rtnl_dereference(platform_label[index]); in mpls_net_exit()
1100 RCU_INIT_POINTER(platform_label[index], NULL); in mpls_net_exit()