Lines Matching refs:extack

239 				  struct netlink_ext_ack *extack)  in call_nexthop_notifiers()  argument
243 .extack = extack, in call_nexthop_notifiers()
254 NL_SET_ERR_MSG(extack, "Failed to initialize nexthop notifier info"); in call_nexthop_notifiers()
341 struct netlink_ext_ack *extack) in __call_nexthop_res_bucket_notifiers() argument
345 .extack = extack, in __call_nexthop_res_bucket_notifiers()
393 struct netlink_ext_ack *extack) in call_nexthop_res_bucket_notifiers() argument
399 force, oldi, newi, extack); in call_nexthop_res_bucket_notifiers()
403 struct netlink_ext_ack *extack) in call_nexthop_res_table_notifiers() argument
407 .extack = extack, in call_nexthop_res_table_notifiers()
425 NL_SET_ERR_MSG(extack, "Failed to initialize nexthop notifier info"); in call_nexthop_res_table_notifiers()
440 struct netlink_ext_ack *extack) in call_nexthop_notifier() argument
444 .extack = extack, in call_nexthop_notifier()
1143 struct netlink_ext_ack *extack) in nh_fill_res_bucket() argument
1214 bool *is_fdb, struct netlink_ext_ack *extack) in valid_group_nh() argument
1221 NL_SET_ERR_MSG(extack, in valid_group_nh()
1226 NL_SET_ERR_MSG(extack, in valid_group_nh()
1235 NL_SET_ERR_MSG(extack, in valid_group_nh()
1246 struct netlink_ext_ack *extack) in nh_check_attr_fdb_group() argument
1253 NL_SET_ERR_MSG(extack, "FDB nexthop group can only have fdb nexthops"); in nh_check_attr_fdb_group()
1260 NL_SET_ERR_MSG(extack, "FDB nexthop group cannot have mixed family nexthops"); in nh_check_attr_fdb_group()
1269 u16 nh_grp_type, struct netlink_ext_ack *extack) in nh_check_attr_group() argument
1276 NL_SET_ERR_MSG(extack, in nh_check_attr_group()
1287 NL_SET_ERR_MSG(extack, "Reserved field in nexthop_grp must be 0"); in nh_check_attr_group()
1294 NL_SET_ERR_MSG(extack, "Invalid value for weight"); in nh_check_attr_group()
1299 NL_SET_ERR_MSG(extack, "Nexthop id can not be used twice in a group"); in nh_check_attr_group()
1318 NL_SET_ERR_MSG(extack, in nh_check_attr_group()
1327 struct netlink_ext_ack *extack) in nh_check_attr_group_rtnl() argument
1345 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_check_attr_group_rtnl()
1348 if (!valid_group_nh(nh, len, &is_fdb_nh, extack)) in nh_check_attr_group_rtnl()
1351 if (nhg_fdb && nh_check_attr_fdb_group(nh, &nh_family, extack)) in nh_check_attr_group_rtnl()
1355 NL_SET_ERR_MSG(extack, "Non FDB nexthop group cannot have fdb nexthops"); in nh_check_attr_group_rtnl()
1528 struct netlink_ext_ack *extack) in check_src_addr() argument
1531 NL_SET_ERR_MSG(extack, "IPv6 routes using source address can not use nexthop objects"); in check_src_addr()
1538 struct netlink_ext_ack *extack) in fib6_check_nexthop() argument
1549 if (cfg && check_src_addr(&cfg->fc_src, extack) < 0) in fib6_check_nexthop()
1567 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib6_check_nexthop()
1573 NL_SET_ERR_MSG(extack, "IPv6 routes can not use an IPv4 nexthop"); in fib6_check_nexthop()
1582 struct netlink_ext_ack *extack) in fib6_check_nh_list() argument
1590 if (check_src_addr(&f6i->fib6_src.addr, extack) < 0) in fib6_check_nh_list()
1594 return fib6_check_nexthop(new, NULL, extack); in fib6_check_nh_list()
1598 struct netlink_ext_ack *extack) in nexthop_check_scope() argument
1601 NL_SET_ERR_MSG(extack, in nexthop_check_scope()
1607 NL_SET_ERR_MSG(extack, "Scope mismatch with nexthop"); in nexthop_check_scope()
1619 struct netlink_ext_ack *extack) in fib_check_nexthop() argument
1629 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1635 NL_SET_ERR_MSG(extack, "Route with host scope can not have multiple nexthops"); in fib_check_nexthop()
1642 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1646 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1650 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1658 struct netlink_ext_ack *extack) in fib_check_nh_list() argument
1665 err = fib_check_nexthop(new, fi->fib_scope, extack); in fib_check_nh_list()
1777 struct netlink_ext_ack extack; in nh_res_bucket_migrate() local
1799 new_nhge->nh, &extack); in nh_res_bucket_migrate()
1801 pr_err_ratelimited("%s\n", extack._msg); in nh_res_bucket_migrate()
2010 struct netlink_ext_ack extack; in remove_nh_grp_entry() local
2074 &extack); in remove_nh_grp_entry()
2076 pr_err("%s\n", extack._msg); in remove_nh_grp_entry()
2232 struct netlink_ext_ack *extack) in replace_nexthop_grp() argument
2241 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with a nexthop."); in replace_nexthop_grp()
2249 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with one of a different type."); in replace_nexthop_grp()
2255 extack); in replace_nexthop_grp()
2268 NL_SET_ERR_MSG(extack, "Can not change number of buckets of a resilient nexthop group."); in replace_nexthop_grp()
2278 err = call_nexthop_res_table_notifiers(net, new, extack); in replace_nexthop_grp()
2339 struct netlink_ext_ack *extack) in replace_nexthop_single_notify_res() argument
2354 extack); in replace_nexthop_single_notify_res()
2371 extack); in replace_nexthop_single_notify_res()
2381 struct netlink_ext_ack *extack) in replace_nexthop_single_notify() argument
2388 group_nh, extack); in replace_nexthop_single_notify()
2393 extack); in replace_nexthop_single_notify()
2401 struct netlink_ext_ack *extack) in replace_nexthop_single() argument
2409 NL_SET_ERR_MSG(extack, "Can not replace a nexthop with a nexthop group."); in replace_nexthop_single()
2416 NL_SET_ERR_MSG(extack, "Cannot change nexthop FDB status while in a group"); in replace_nexthop_single()
2420 err = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new, extack); in replace_nexthop_single()
2449 extack); in replace_nexthop_single()
2481 call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, old, extack); in replace_nexthop_single()
2527 struct netlink_ext_ack *extack) in replace_nexthop() argument
2536 err = fib_check_nh_list(old, new, extack); in replace_nexthop()
2540 err = fib6_check_nh_list(old, new, extack); in replace_nexthop()
2556 …NL_SET_ERR_MSG(extack, "Blackhole nexthop can not be a member of a group with more than one path"); in replace_nexthop()
2560 err = fib_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2564 err = fib6_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2570 err = replace_nexthop_grp(net, old, new, cfg, extack); in replace_nexthop()
2572 err = replace_nexthop_single(net, old, new, extack); in replace_nexthop()
2586 struct nh_config *cfg, struct netlink_ext_ack *extack) in insert_nexthop() argument
2612 rc = replace_nexthop(net, nh, new_nh, cfg, extack); in insert_nexthop()
2625 NL_SET_ERR_MSG(extack, "Replace specified without create and no entry exists"); in insert_nexthop()
2641 NL_SET_ERR_MSG(extack, "Number of buckets not specified for nexthop group insertion"); in insert_nexthop()
2661 rc = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new_nh, extack); in insert_nexthop()
2822 struct netlink_ext_ack *extack) in nh_create_ipv4() argument
2837 err = fib_nh_init(net, fib_nh, &fib_cfg, 1, extack); in nh_create_ipv4()
2847 err = fib_check_nh(net, fib_nh, tb_id, 0, extack); in nh_create_ipv4()
2861 struct netlink_ext_ack *extack) in nh_create_ipv6() argument
2881 extack); in nh_create_ipv6()
2895 struct netlink_ext_ack *extack) in nexthop_create() argument
2928 err = nh_create_ipv4(net, nh, nhi, cfg, extack); in nexthop_create()
2931 err = nh_create_ipv6(net, nh, nhi, cfg, extack); in nexthop_create()
2952 struct netlink_ext_ack *extack) in nexthop_add() argument
2960 NL_SET_ERR_MSG(extack, "No unused id"); in nexthop_add()
2968 nh = nexthop_create(net, cfg, extack); in nexthop_add()
2978 err = insert_nexthop(net, nh, cfg, extack); in nexthop_add()
2990 struct netlink_ext_ack *extack) in rtm_nh_get_timer() argument
3004 NL_SET_ERR_MSG(extack, "Timer value too large"); in rtm_nh_get_timer()
3014 struct netlink_ext_ack *extack) in rtm_to_nh_config_grp_res() argument
3022 res, rtm_nh_res_policy_new, extack); in rtm_to_nh_config_grp_res()
3032 NL_SET_ERR_MSG(extack, "Number of buckets needs to be non-0"); in rtm_to_nh_config_grp_res()
3041 extack); in rtm_to_nh_config_grp_res()
3049 extack); in rtm_to_nh_config_grp_res()
3055 struct netlink_ext_ack *extack) in rtm_to_nh_config() argument
3062 NL_SET_ERR_MSG(extack, "Invalid values in ancillary header"); in rtm_to_nh_config()
3066 NL_SET_ERR_MSG(extack, "Invalid nexthop flags in ancillary header"); in rtm_to_nh_config()
3079 NL_SET_ERR_MSG(extack, "Invalid address family"); in rtm_to_nh_config()
3099 NL_SET_ERR_MSG(extack, "Fdb attribute can not be used with encap, oif or blackhole"); in rtm_to_nh_config()
3103 NL_SET_ERR_MSG(extack, "Unsupported nexthop flags in ancillary header"); in rtm_to_nh_config()
3111 NL_SET_ERR_MSG(extack, "Invalid family for group"); in rtm_to_nh_config()
3121 NL_SET_ERR_MSG(extack, "Invalid group type"); in rtm_to_nh_config()
3126 cfg->nh_grp_type, extack); in rtm_to_nh_config()
3132 cfg, extack); in rtm_to_nh_config()
3144 NL_SET_ERR_MSG(extack, "Blackhole attribute can not be used with gateway, oif, encap or fdb"); in rtm_to_nh_config()
3154 NL_SET_ERR_MSG(extack, "Device attribute required for non-blackhole and non-fdb nexthops"); in rtm_to_nh_config()
3165 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
3172 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
3178 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
3185 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
3195 NL_SET_ERR_MSG(extack, "LWT encapsulation type is missing"); in rtm_to_nh_config()
3200 err = lwtunnel_valid_encap_type(cfg->nh_encap_type, extack); in rtm_to_nh_config()
3205 NL_SET_ERR_MSG(extack, "LWT encapsulation attribute is missing"); in rtm_to_nh_config()
3210 NL_SET_ERR_MSG(extack, "Cannot enable nexthop hardware statistics for non-group nexthops"); in rtm_to_nh_config()
3221 struct netlink_ext_ack *extack) in rtm_to_nh_config_rtnl() argument
3224 return nh_check_attr_group_rtnl(net, tb, extack); in rtm_to_nh_config_rtnl()
3232 NL_SET_ERR_MSG(extack, "Invalid device index"); in rtm_to_nh_config_rtnl()
3237 NL_SET_ERR_MSG(extack, "Nexthop device is not up"); in rtm_to_nh_config_rtnl()
3242 NL_SET_ERR_MSG(extack, "Carrier for nexthop device is down"); in rtm_to_nh_config_rtnl()
3252 struct netlink_ext_ack *extack) in rtm_new_nexthop() argument
3262 rtm_nh_policy_new, extack); in rtm_new_nexthop()
3266 err = rtm_to_nh_config(net, skb, nlh, tb, &cfg, extack); in rtm_new_nexthop()
3271 NL_SET_ERR_MSG(extack, "Replace requires nexthop id"); in rtm_new_nexthop()
3278 err = rtm_to_nh_config_rtnl(net, tb, &cfg, extack); in rtm_new_nexthop()
3282 nh = nexthop_add(net, &cfg, extack); in rtm_new_nexthop()
3294 struct netlink_ext_ack *extack) in nh_valid_get_del_req() argument
3299 NL_SET_ERR_MSG(extack, "Invalid values in header"); in nh_valid_get_del_req()
3304 NL_SET_ERR_MSG(extack, "Nexthop id is missing"); in nh_valid_get_del_req()
3310 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_valid_get_del_req()
3322 struct netlink_ext_ack *extack) in rtm_del_nexthop() argument
3337 extack); in rtm_del_nexthop()
3341 err = nh_valid_get_del_req(nlh, tb, &id, NULL, extack); in rtm_del_nexthop()
3360 struct netlink_ext_ack *extack) in rtm_get_nexthop() argument
3372 extack); in rtm_get_nexthop()
3376 err = nh_valid_get_del_req(nlh, tb, &id, &op_flags, extack); in rtm_get_nexthop()
3454 struct netlink_ext_ack *extack) in __nh_valid_dump_req() argument
3462 NL_SET_ERR_MSG(extack, "Invalid device index"); in __nh_valid_dump_req()
3470 NL_SET_ERR_MSG(extack, "Invalid master device index"); in __nh_valid_dump_req()
3480 NL_SET_ERR_MSG(extack, "Invalid values in header for nexthop dump request"); in __nh_valid_dump_req()
3496 rtm_nh_policy_dump, cb->extack); in nh_valid_dump_req()
3502 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_req()
3615 struct netlink_ext_ack *extack) in nexthop_find_group_resilient() argument
3625 NL_SET_ERR_MSG(extack, "Not a nexthop group"); in nexthop_find_group_resilient()
3631 NL_SET_ERR_MSG(extack, "Nexthop group not of type resilient"); in nexthop_find_group_resilient()
3639 struct netlink_ext_ack *extack) in nh_valid_dump_nhid() argument
3646 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_valid_dump_nhid()
3671 err = nh_valid_dump_nhid(tb[NHA_ID], &filter->nh_id, cb->extack); in nh_valid_dump_bucket_req()
3681 cb->extack); in nh_valid_dump_bucket_req()
3687 cb->extack); in nh_valid_dump_bucket_req()
3692 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_bucket_req()
3747 cb->extack); in rtm_dump_nexthop_bucket_nh()
3790 cb->extack); in rtm_dump_nexthop_bucket()
3808 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req_res_bucket() argument
3814 res, rtm_nh_res_bucket_policy_get, extack); in nh_valid_get_bucket_req_res_bucket()
3819 NL_SET_ERR_MSG(extack, "Bucket index is missing"); in nh_valid_get_bucket_req_res_bucket()
3829 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req() argument
3836 rtm_nh_policy_get_bucket, extack); in nh_valid_get_bucket_req()
3840 err = nh_valid_get_del_req(nlh, tb, id, NULL, extack); in nh_valid_get_bucket_req()
3845 NL_SET_ERR_MSG(extack, "Bucket information is missing"); in nh_valid_get_bucket_req()
3850 bucket_index, extack); in nh_valid_get_bucket_req()
3859 struct netlink_ext_ack *extack) in rtm_get_nexthop_bucket() argument
3870 err = nh_valid_get_bucket_req(nlh, &id, &bucket_index, extack); in rtm_get_nexthop_bucket()
3874 nh = nexthop_find_group_resilient(net, id, extack); in rtm_get_nexthop_bucket()
3881 NL_SET_ERR_MSG(extack, "Bucket index out of bounds"); in rtm_get_nexthop_bucket()
3892 0, extack); in rtm_get_nexthop_bucket()
3953 struct netlink_ext_ack *extack) in nexthops_dump() argument
3963 err = call_nexthop_notifier(nb, net, event_type, nh, extack); in nexthops_dump()
3972 struct netlink_ext_ack *extack) in register_nexthop_notifier() argument
3977 err = nexthops_dump(net, nb, NEXTHOP_EVENT_REPLACE, extack); in register_nexthop_notifier()