Lines Matching refs:extack

226 				  struct netlink_ext_ack *extack)  in call_nexthop_notifiers()  argument
230 .extack = extack, in call_nexthop_notifiers()
241 NL_SET_ERR_MSG(extack, "Failed to initialize nexthop notifier info"); in call_nexthop_notifiers()
329 struct netlink_ext_ack *extack) in __call_nexthop_res_bucket_notifiers() argument
333 .extack = extack, in __call_nexthop_res_bucket_notifiers()
381 struct netlink_ext_ack *extack) in call_nexthop_res_bucket_notifiers() argument
387 force, oldi, newi, extack); in call_nexthop_res_bucket_notifiers()
391 struct netlink_ext_ack *extack) in call_nexthop_res_table_notifiers() argument
395 .extack = extack, in call_nexthop_res_table_notifiers()
412 NL_SET_ERR_MSG(extack, "Failed to initialize nexthop notifier info"); in call_nexthop_res_table_notifiers()
427 struct netlink_ext_ack *extack) in call_nexthop_notifier() argument
431 .extack = extack, in call_nexthop_notifier()
918 struct netlink_ext_ack *extack) in nh_fill_res_bucket() argument
990 bool *is_fdb, struct netlink_ext_ack *extack) in valid_group_nh() argument
997 NL_SET_ERR_MSG(extack, in valid_group_nh()
1002 NL_SET_ERR_MSG(extack, in valid_group_nh()
1011 NL_SET_ERR_MSG(extack, in valid_group_nh()
1022 struct netlink_ext_ack *extack) in nh_check_attr_fdb_group() argument
1029 NL_SET_ERR_MSG(extack, "FDB nexthop group can only have fdb nexthops"); in nh_check_attr_fdb_group()
1036 NL_SET_ERR_MSG(extack, "FDB nexthop group cannot have mixed family nexthops"); in nh_check_attr_fdb_group()
1045 u16 nh_grp_type, struct netlink_ext_ack *extack) in nh_check_attr_group() argument
1054 NL_SET_ERR_MSG(extack, in nh_check_attr_group()
1065 NL_SET_ERR_MSG(extack, "Reserved fields in nexthop_grp must be 0"); in nh_check_attr_group()
1069 NL_SET_ERR_MSG(extack, "Invalid value for weight"); in nh_check_attr_group()
1074 NL_SET_ERR_MSG(extack, "Nexthop id can not be used twice in a group"); in nh_check_attr_group()
1089 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_check_attr_group()
1092 if (!valid_group_nh(nh, len, &is_fdb_nh, extack)) in nh_check_attr_group()
1095 if (nhg_fdb && nh_check_attr_fdb_group(nh, &nh_family, extack)) in nh_check_attr_group()
1099 NL_SET_ERR_MSG(extack, "Non FDB nexthop group cannot have fdb nexthops"); in nh_check_attr_group()
1114 NL_SET_ERR_MSG(extack, in nh_check_attr_group()
1258 struct netlink_ext_ack *extack) in check_src_addr() argument
1261 NL_SET_ERR_MSG(extack, "IPv6 routes using source address can not use nexthop objects"); in check_src_addr()
1268 struct netlink_ext_ack *extack) in fib6_check_nexthop() argument
1279 if (cfg && check_src_addr(&cfg->fc_src, extack) < 0) in fib6_check_nexthop()
1297 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib6_check_nexthop()
1303 NL_SET_ERR_MSG(extack, "IPv6 routes can not use an IPv4 nexthop"); in fib6_check_nexthop()
1312 struct netlink_ext_ack *extack) in fib6_check_nh_list() argument
1320 if (check_src_addr(&f6i->fib6_src.addr, extack) < 0) in fib6_check_nh_list()
1324 return fib6_check_nexthop(new, NULL, extack); in fib6_check_nh_list()
1328 struct netlink_ext_ack *extack) in nexthop_check_scope() argument
1331 NL_SET_ERR_MSG(extack, in nexthop_check_scope()
1337 NL_SET_ERR_MSG(extack, "Scope mismatch with nexthop"); in nexthop_check_scope()
1349 struct netlink_ext_ack *extack) in fib_check_nexthop() argument
1359 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1365 NL_SET_ERR_MSG(extack, "Route with host scope can not have multiple nexthops"); in fib_check_nexthop()
1372 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1376 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1380 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1388 struct netlink_ext_ack *extack) in fib_check_nh_list() argument
1395 err = fib_check_nexthop(new, fi->fib_scope, extack); in fib_check_nh_list()
1507 struct netlink_ext_ack extack; in nh_res_bucket_migrate() local
1529 new_nhge->nh, &extack); in nh_res_bucket_migrate()
1531 pr_err_ratelimited("%s\n", extack._msg); in nh_res_bucket_migrate()
1738 struct netlink_ext_ack extack; in remove_nh_grp_entry() local
1800 &extack); in remove_nh_grp_entry()
1802 pr_err("%s\n", extack._msg); in remove_nh_grp_entry()
1934 struct netlink_ext_ack *extack) in replace_nexthop_grp() argument
1943 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with a nexthop."); in replace_nexthop_grp()
1951 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with one of a different type."); in replace_nexthop_grp()
1957 extack); in replace_nexthop_grp()
1970 NL_SET_ERR_MSG(extack, "Can not change number of buckets of a resilient nexthop group."); in replace_nexthop_grp()
1980 err = call_nexthop_res_table_notifiers(net, new, extack); in replace_nexthop_grp()
2041 struct netlink_ext_ack *extack) in replace_nexthop_single_notify_res() argument
2056 extack); in replace_nexthop_single_notify_res()
2073 extack); in replace_nexthop_single_notify_res()
2083 struct netlink_ext_ack *extack) in replace_nexthop_single_notify() argument
2090 group_nh, extack); in replace_nexthop_single_notify()
2095 extack); in replace_nexthop_single_notify()
2103 struct netlink_ext_ack *extack) in replace_nexthop_single() argument
2111 NL_SET_ERR_MSG(extack, "Can not replace a nexthop with a nexthop group."); in replace_nexthop_single()
2115 err = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new, extack); in replace_nexthop_single()
2144 extack); in replace_nexthop_single()
2176 call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, old, extack); in replace_nexthop_single()
2222 struct netlink_ext_ack *extack) in replace_nexthop() argument
2231 err = fib_check_nh_list(old, new, extack); in replace_nexthop()
2235 err = fib6_check_nh_list(old, new, extack); in replace_nexthop()
2251 …NL_SET_ERR_MSG(extack, "Blackhole nexthop can not be a member of a group with more than one path"); in replace_nexthop()
2255 err = fib_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2259 err = fib6_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2265 err = replace_nexthop_grp(net, old, new, cfg, extack); in replace_nexthop()
2267 err = replace_nexthop_single(net, old, new, extack); in replace_nexthop()
2281 struct nh_config *cfg, struct netlink_ext_ack *extack) in insert_nexthop() argument
2307 rc = replace_nexthop(net, nh, new_nh, cfg, extack); in insert_nexthop()
2320 NL_SET_ERR_MSG(extack, "Replace specified without create and no entry exists"); in insert_nexthop()
2336 NL_SET_ERR_MSG(extack, "Number of buckets not specified for nexthop group insertion"); in insert_nexthop()
2356 rc = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new_nh, extack); in insert_nexthop()
2508 struct netlink_ext_ack *extack) in nh_create_ipv4() argument
2523 err = fib_nh_init(net, fib_nh, &fib_cfg, 1, extack); in nh_create_ipv4()
2533 err = fib_check_nh(net, fib_nh, tb_id, 0, extack); in nh_create_ipv4()
2547 struct netlink_ext_ack *extack) in nh_create_ipv6() argument
2567 extack); in nh_create_ipv6()
2581 struct netlink_ext_ack *extack) in nexthop_create() argument
2614 err = nh_create_ipv4(net, nh, nhi, cfg, extack); in nexthop_create()
2617 err = nh_create_ipv6(net, nh, nhi, cfg, extack); in nexthop_create()
2638 struct netlink_ext_ack *extack) in nexthop_add() argument
2644 NL_SET_ERR_MSG(extack, "Replace requires nexthop id"); in nexthop_add()
2651 NL_SET_ERR_MSG(extack, "No unused id"); in nexthop_add()
2659 nh = nexthop_create(net, cfg, extack); in nexthop_add()
2669 err = insert_nexthop(net, nh, cfg, extack); in nexthop_add()
2681 struct netlink_ext_ack *extack) in rtm_nh_get_timer() argument
2695 NL_SET_ERR_MSG(extack, "Timer value too large"); in rtm_nh_get_timer()
2705 struct netlink_ext_ack *extack) in rtm_to_nh_config_grp_res() argument
2713 res, rtm_nh_res_policy_new, extack); in rtm_to_nh_config_grp_res()
2723 NL_SET_ERR_MSG(extack, "Number of buckets needs to be non-0"); in rtm_to_nh_config_grp_res()
2732 extack); in rtm_to_nh_config_grp_res()
2740 extack); in rtm_to_nh_config_grp_res()
2745 struct netlink_ext_ack *extack) in rtm_to_nh_config() argument
2753 rtm_nh_policy_new, extack); in rtm_to_nh_config()
2759 NL_SET_ERR_MSG(extack, "Invalid values in ancillary header"); in rtm_to_nh_config()
2763 NL_SET_ERR_MSG(extack, "Invalid nexthop flags in ancillary header"); in rtm_to_nh_config()
2776 NL_SET_ERR_MSG(extack, "Invalid address family"); in rtm_to_nh_config()
2796 NL_SET_ERR_MSG(extack, "Fdb attribute can not be used with encap, oif or blackhole"); in rtm_to_nh_config()
2800 NL_SET_ERR_MSG(extack, "Unsupported nexthop flags in ancillary header"); in rtm_to_nh_config()
2808 NL_SET_ERR_MSG(extack, "Invalid family for group"); in rtm_to_nh_config()
2818 NL_SET_ERR_MSG(extack, "Invalid group type"); in rtm_to_nh_config()
2822 cfg->nh_grp_type, extack); in rtm_to_nh_config()
2828 cfg, extack); in rtm_to_nh_config()
2837 NL_SET_ERR_MSG(extack, "Blackhole attribute can not be used with gateway, oif, encap or fdb"); in rtm_to_nh_config()
2847 NL_SET_ERR_MSG(extack, "Device attribute required for non-blackhole and non-fdb nexthops"); in rtm_to_nh_config()
2857 NL_SET_ERR_MSG(extack, "Invalid device index"); in rtm_to_nh_config()
2860 NL_SET_ERR_MSG(extack, "Nexthop device is not up"); in rtm_to_nh_config()
2864 NL_SET_ERR_MSG(extack, "Carrier for nexthop device is down"); in rtm_to_nh_config()
2877 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
2884 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
2890 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
2897 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
2907 NL_SET_ERR_MSG(extack, "LWT encapsulation type is missing"); in rtm_to_nh_config()
2912 err = lwtunnel_valid_encap_type(cfg->nh_encap_type, extack); in rtm_to_nh_config()
2917 NL_SET_ERR_MSG(extack, "LWT encapsulation attribute is missing"); in rtm_to_nh_config()
2929 struct netlink_ext_ack *extack) in rtm_new_nexthop() argument
2936 err = rtm_to_nh_config(net, skb, nlh, &cfg, extack); in rtm_new_nexthop()
2938 nh = nexthop_add(net, &cfg, extack); in rtm_new_nexthop()
2948 struct netlink_ext_ack *extack) in __nh_valid_get_del_req() argument
2953 NL_SET_ERR_MSG(extack, "Invalid values in header"); in __nh_valid_get_del_req()
2958 NL_SET_ERR_MSG(extack, "Nexthop id is missing"); in __nh_valid_get_del_req()
2964 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in __nh_valid_get_del_req()
2972 struct netlink_ext_ack *extack) in nh_valid_get_del_req() argument
2979 rtm_nh_policy_get, extack); in nh_valid_get_del_req()
2983 return __nh_valid_get_del_req(nlh, tb, id, extack); in nh_valid_get_del_req()
2988 struct netlink_ext_ack *extack) in rtm_del_nexthop() argument
3000 err = nh_valid_get_del_req(nlh, &id, extack); in rtm_del_nexthop()
3015 struct netlink_ext_ack *extack) in rtm_get_nexthop() argument
3023 err = nh_valid_get_del_req(nlh, &id, extack); in rtm_get_nexthop()
3100 struct netlink_ext_ack *extack) in __nh_valid_dump_req() argument
3108 NL_SET_ERR_MSG(extack, "Invalid device index"); in __nh_valid_dump_req()
3116 NL_SET_ERR_MSG(extack, "Invalid master device index"); in __nh_valid_dump_req()
3126 NL_SET_ERR_MSG(extack, "Invalid values in header for nexthop dump request"); in __nh_valid_dump_req()
3142 rtm_nh_policy_dump, cb->extack); in nh_valid_dump_req()
3146 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_req()
3238 struct netlink_ext_ack *extack) in nexthop_find_group_resilient() argument
3248 NL_SET_ERR_MSG(extack, "Not a nexthop group"); in nexthop_find_group_resilient()
3254 NL_SET_ERR_MSG(extack, "Nexthop group not of type resilient"); in nexthop_find_group_resilient()
3262 struct netlink_ext_ack *extack) in nh_valid_dump_nhid() argument
3269 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_valid_dump_nhid()
3294 err = nh_valid_dump_nhid(tb[NHA_ID], &filter->nh_id, cb->extack); in nh_valid_dump_bucket_req()
3304 cb->extack); in nh_valid_dump_bucket_req()
3310 cb->extack); in nh_valid_dump_bucket_req()
3315 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_bucket_req()
3373 cb->extack); in rtm_dump_nexthop_bucket_nh()
3424 cb->extack); in rtm_dump_nexthop_bucket()
3451 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req_res_bucket() argument
3457 res, rtm_nh_res_bucket_policy_get, extack); in nh_valid_get_bucket_req_res_bucket()
3462 NL_SET_ERR_MSG(extack, "Bucket index is missing"); in nh_valid_get_bucket_req_res_bucket()
3472 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req() argument
3479 rtm_nh_policy_get_bucket, extack); in nh_valid_get_bucket_req()
3483 err = __nh_valid_get_del_req(nlh, tb, id, extack); in nh_valid_get_bucket_req()
3488 NL_SET_ERR_MSG(extack, "Bucket information is missing"); in nh_valid_get_bucket_req()
3493 bucket_index, extack); in nh_valid_get_bucket_req()
3502 struct netlink_ext_ack *extack) in rtm_get_nexthop_bucket() argument
3513 err = nh_valid_get_bucket_req(nlh, &id, &bucket_index, extack); in rtm_get_nexthop_bucket()
3517 nh = nexthop_find_group_resilient(net, id, extack); in rtm_get_nexthop_bucket()
3524 NL_SET_ERR_MSG(extack, "Bucket index out of bounds"); in rtm_get_nexthop_bucket()
3535 0, extack); in rtm_get_nexthop_bucket()
3596 struct netlink_ext_ack *extack) in nexthops_dump() argument
3606 err = call_nexthop_notifier(nb, net, event_type, nh, extack); in nexthops_dump()
3615 struct netlink_ext_ack *extack) in register_nexthop_notifier() argument
3620 err = nexthops_dump(net, nb, NEXTHOP_EVENT_REPLACE, extack); in register_nexthop_notifier()