Lines Matching full:mpls
10 #include <linux/mpls.h>
81 if (index < net->mpls.platform_labels) { in mpls_route_input_rcu()
83 rcu_dereference(net->mpls.platform_label); in mpls_route_input_rcu()
299 * the incoming MPLS header, otherwise decrement the in mpls_egress()
304 net->mpls.ip_ttl_propagate)) in mpls_egress()
321 * the incoming MPLS header, otherwise decrement the in mpls_egress()
326 net->mpls.ip_ttl_propagate)) in mpls_egress()
559 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_route_update()
575 platform_label = rtnl_dereference(net->mpls.platform_label); in find_free_label()
576 platform_labels = net->mpls.platform_labels; in find_free_label()
950 if (is_ok && *index >= net->mpls.platform_labels) { in mpls_label_ok()
956 *index = array_index_nospec(*index, net->mpls.platform_labels); in mpls_label_ok()
983 /* Append makes no sense with mpls */ in mpls_route_add()
986 NL_SET_ERR_MSG(extack, "MPLS does not support route append"); in mpls_route_add()
991 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_route_add()
1400 char path[sizeof("net/mpls/conf/") + IFNAMSIZ]; in mpls_dev_sysctl_register()
1418 snprintf(path, sizeof(path), "net/mpls/conf/%s", dev->name); in mpls_dev_sysctl_register()
1503 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_ifdown()
1504 for (index = 0; index < net->mpls.platform_labels; index++) { in mpls_ifdown()
1584 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_ifup()
1585 for (index = 0; index < net->mpls.platform_labels; index++) { in mpls_ifup()
1833 NL_SET_ERR_MSG(extack, "rtm_dst_len must be 20 for MPLS"); in rtm_to_route_config()
1837 NL_SET_ERR_MSG(extack, "rtm_src_len must be 0 for MPLS"); in rtm_to_route_config()
1841 NL_SET_ERR_MSG(extack, "rtm_tos must be 0 for MPLS"); in rtm_to_route_config()
1846 "MPLS only supports the main route table"); in rtm_to_route_config()
1851 /* As mpls uses destination specific addresses in rtm_to_route_config()
1857 "Invalid route scope - MPLS only supports UNIVERSE"); in rtm_to_route_config()
1862 "Invalid route type - MPLS only supports UNICAST"); in rtm_to_route_config()
1866 NL_SET_ERR_MSG(extack, "rtm_flags must be 0 for MPLS"); in rtm_to_route_config()
1907 NL_SET_ERR_MSG(extack, "MPLS does not support RTA_GATEWAY attribute"); in rtm_to_route_config()
2203 /* for MPLS, there is only 1 table with fixed type and flags. in mpls_dump_routes()
2216 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_dump_routes()
2217 platform_labels = net->mpls.platform_labels; in mpls_dump_routes()
2344 NL_SET_ERR_MSG_MOD(extack, "rtm_dst_len must be 20 for MPLS"); in mpls_valid_getroute_req()
2575 old = rtnl_dereference(net->mpls.platform_label); in resize_platform_label_table()
2576 old_limit = net->mpls.platform_labels; in resize_platform_label_table()
2603 net->mpls.platform_labels = limit; in resize_platform_label_table()
2604 rcu_assign_pointer(net->mpls.platform_label, labels); in resize_platform_label_table()
2629 int platform_labels = net->mpls.platform_labels; in mpls_platform_labels()
2661 .data = MPLS_NS_SYSCTL_OFFSET(mpls.ip_ttl_propagate),
2670 .data = MPLS_NS_SYSCTL_OFFSET(mpls.default_ttl),
2685 net->mpls.platform_labels = 0; in mpls_net_init()
2686 net->mpls.platform_label = NULL; in mpls_net_init()
2687 net->mpls.ip_ttl_propagate = 1; in mpls_net_init()
2688 net->mpls.default_ttl = 255; in mpls_net_init()
2700 net->mpls.ctl = register_net_sysctl(net, "net/mpls", table); in mpls_net_init()
2701 if (net->mpls.ctl == NULL) { in mpls_net_init()
2716 table = net->mpls.ctl->ctl_table_arg; in mpls_net_exit()
2717 unregister_net_sysctl_table(net->mpls.ctl); in mpls_net_exit()
2730 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_net_exit()
2731 platform_labels = net->mpls.platform_labels; in mpls_net_exit()
2783 pr_err("Can't add mpls over gre tunnel ops\n"); in mpls_init()