Lines Matching full:mpls

10 #include <linux/mpls.h>
82 if (index < net->mpls.platform_labels) { in mpls_route_input_rcu()
84 rcu_dereference(net->mpls.platform_label); in mpls_route_input_rcu()
300 * the incoming MPLS header, otherwise decrement the in mpls_egress()
305 net->mpls.ip_ttl_propagate)) in mpls_egress()
322 * the incoming MPLS header, otherwise decrement the in mpls_egress()
327 net->mpls.ip_ttl_propagate)) in mpls_egress()
562 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_route_update()
578 platform_label = rtnl_dereference(net->mpls.platform_label); in find_free_label()
579 platform_labels = net->mpls.platform_labels; in find_free_label()
953 if (is_ok && *index >= net->mpls.platform_labels) { in mpls_label_ok()
959 *index = array_index_nospec(*index, net->mpls.platform_labels); in mpls_label_ok()
986 /* Append makes no sense with mpls */ in mpls_route_add()
989 NL_SET_ERR_MSG(extack, "MPLS does not support route append"); in mpls_route_add()
994 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_route_add()
1384 char path[sizeof("net/mpls/conf/") + IFNAMSIZ]; in mpls_dev_sysctl_register()
1403 snprintf(path, sizeof(path), "net/mpls/conf/%s", dev->name); in mpls_dev_sysctl_register()
1488 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_ifdown()
1489 for (index = 0; index < net->mpls.platform_labels; index++) { in mpls_ifdown()
1565 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_ifup()
1566 for (index = 0; index < net->mpls.platform_labels; index++) { in mpls_ifup()
1812 NL_SET_ERR_MSG(extack, "rtm_dst_len must be 20 for MPLS"); in rtm_to_route_config()
1816 NL_SET_ERR_MSG(extack, "rtm_src_len must be 0 for MPLS"); in rtm_to_route_config()
1820 NL_SET_ERR_MSG(extack, "rtm_tos must be 0 for MPLS"); in rtm_to_route_config()
1825 "MPLS only supports the main route table"); in rtm_to_route_config()
1830 /* As mpls uses destination specific addresses in rtm_to_route_config()
1836 "Invalid route scope - MPLS only supports UNIVERSE"); in rtm_to_route_config()
1841 "Invalid route type - MPLS only supports UNICAST"); in rtm_to_route_config()
1845 NL_SET_ERR_MSG(extack, "rtm_flags must be 0 for MPLS"); in rtm_to_route_config()
1886 NL_SET_ERR_MSG(extack, "MPLS does not support RTA_GATEWAY attribute"); in rtm_to_route_config()
2180 /* for MPLS, there is only 1 table with fixed type and flags. in mpls_dump_routes()
2193 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_dump_routes()
2194 platform_labels = net->mpls.platform_labels; in mpls_dump_routes()
2320 NL_SET_ERR_MSG_MOD(extack, "rtm_dst_len must be 20 for MPLS"); in mpls_valid_getroute_req()
2551 old = rtnl_dereference(net->mpls.platform_label); in resize_platform_label_table()
2552 old_limit = net->mpls.platform_labels; in resize_platform_label_table()
2579 net->mpls.platform_labels = limit; in resize_platform_label_table()
2580 rcu_assign_pointer(net->mpls.platform_label, labels); in resize_platform_label_table()
2605 int platform_labels = net->mpls.platform_labels; in mpls_platform_labels()
2637 .data = MPLS_NS_SYSCTL_OFFSET(mpls.ip_ttl_propagate),
2646 .data = MPLS_NS_SYSCTL_OFFSET(mpls.default_ttl),
2661 net->mpls.platform_labels = 0; in mpls_net_init()
2662 net->mpls.platform_label = NULL; in mpls_net_init()
2663 net->mpls.ip_ttl_propagate = 1; in mpls_net_init()
2664 net->mpls.default_ttl = 255; in mpls_net_init()
2676 net->mpls.ctl = register_net_sysctl_sz(net, "net/mpls", table, in mpls_net_init()
2678 if (net->mpls.ctl == NULL) { in mpls_net_init()
2693 table = net->mpls.ctl->ctl_table_arg; in mpls_net_exit()
2694 unregister_net_sysctl_table(net->mpls.ctl); in mpls_net_exit()
2707 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_net_exit()
2708 platform_labels = net->mpls.platform_labels; in mpls_net_exit()
2766 pr_err("Can't add mpls over gre tunnel ops\n"); in mpls_init()