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()
1281 struct netlink_ext_ack *extack) in check_src_addr() argument
1284 NL_SET_ERR_MSG(extack, "IPv6 routes using source address can not use nexthop objects"); in check_src_addr()
1291 struct netlink_ext_ack *extack) in fib6_check_nexthop() argument
1302 if (cfg && check_src_addr(&cfg->fc_src, extack) < 0) in fib6_check_nexthop()
1320 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib6_check_nexthop()
1326 NL_SET_ERR_MSG(extack, "IPv6 routes can not use an IPv4 nexthop"); in fib6_check_nexthop()
1335 struct netlink_ext_ack *extack) in fib6_check_nh_list() argument
1343 if (check_src_addr(&f6i->fib6_src.addr, extack) < 0) in fib6_check_nh_list()
1347 return fib6_check_nexthop(new, NULL, extack); in fib6_check_nh_list()
1351 struct netlink_ext_ack *extack) in nexthop_check_scope() argument
1354 NL_SET_ERR_MSG(extack, in nexthop_check_scope()
1360 NL_SET_ERR_MSG(extack, "Scope mismatch with nexthop"); in nexthop_check_scope()
1372 struct netlink_ext_ack *extack) in fib_check_nexthop() argument
1382 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1388 NL_SET_ERR_MSG(extack, "Route with host scope can not have multiple nexthops"); in fib_check_nexthop()
1395 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1399 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1403 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1411 struct netlink_ext_ack *extack) in fib_check_nh_list() argument
1418 err = fib_check_nexthop(new, fi->fib_scope, extack); in fib_check_nh_list()
1530 struct netlink_ext_ack extack; in nh_res_bucket_migrate() local
1552 new_nhge->nh, &extack); in nh_res_bucket_migrate()
1554 pr_err_ratelimited("%s\n", extack._msg); in nh_res_bucket_migrate()
1761 struct netlink_ext_ack extack; in remove_nh_grp_entry() local
1823 &extack); in remove_nh_grp_entry()
1825 pr_err("%s\n", extack._msg); in remove_nh_grp_entry()
1957 struct netlink_ext_ack *extack) in replace_nexthop_grp() argument
1966 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with a nexthop."); in replace_nexthop_grp()
1974 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with one of a different type."); in replace_nexthop_grp()
1980 extack); in replace_nexthop_grp()
1993 NL_SET_ERR_MSG(extack, "Can not change number of buckets of a resilient nexthop group."); in replace_nexthop_grp()
2003 err = call_nexthop_res_table_notifiers(net, new, extack); in replace_nexthop_grp()
2064 struct netlink_ext_ack *extack) in replace_nexthop_single_notify_res() argument
2079 extack); in replace_nexthop_single_notify_res()
2096 extack); in replace_nexthop_single_notify_res()
2106 struct netlink_ext_ack *extack) in replace_nexthop_single_notify() argument
2113 group_nh, extack); in replace_nexthop_single_notify()
2118 extack); in replace_nexthop_single_notify()
2126 struct netlink_ext_ack *extack) in replace_nexthop_single() argument
2134 NL_SET_ERR_MSG(extack, "Can not replace a nexthop with a nexthop group."); in replace_nexthop_single()
2138 err = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new, extack); in replace_nexthop_single()
2167 extack); in replace_nexthop_single()
2199 call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, old, extack); in replace_nexthop_single()
2245 struct netlink_ext_ack *extack) in replace_nexthop() argument
2254 err = fib_check_nh_list(old, new, extack); in replace_nexthop()
2258 err = fib6_check_nh_list(old, new, extack); in replace_nexthop()
2274 …NL_SET_ERR_MSG(extack, "Blackhole nexthop can not be a member of a group with more than one path"); in replace_nexthop()
2278 err = fib_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2282 err = fib6_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2288 err = replace_nexthop_grp(net, old, new, cfg, extack); in replace_nexthop()
2290 err = replace_nexthop_single(net, old, new, extack); in replace_nexthop()
2304 struct nh_config *cfg, struct netlink_ext_ack *extack) in insert_nexthop() argument
2330 rc = replace_nexthop(net, nh, new_nh, cfg, extack); in insert_nexthop()
2343 NL_SET_ERR_MSG(extack, "Replace specified without create and no entry exists"); in insert_nexthop()
2359 NL_SET_ERR_MSG(extack, "Number of buckets not specified for nexthop group insertion"); in insert_nexthop()
2379 rc = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new_nh, extack); in insert_nexthop()
2531 struct netlink_ext_ack *extack) in nh_create_ipv4() argument
2546 err = fib_nh_init(net, fib_nh, &fib_cfg, 1, extack); in nh_create_ipv4()
2556 err = fib_check_nh(net, fib_nh, tb_id, 0, extack); in nh_create_ipv4()
2570 struct netlink_ext_ack *extack) in nh_create_ipv6() argument
2590 extack); in nh_create_ipv6()
2604 struct netlink_ext_ack *extack) in nexthop_create() argument
2637 err = nh_create_ipv4(net, nh, nhi, cfg, extack); in nexthop_create()
2640 err = nh_create_ipv6(net, nh, nhi, cfg, extack); in nexthop_create()
2661 struct netlink_ext_ack *extack) in nexthop_add() argument
2667 NL_SET_ERR_MSG(extack, "Replace requires nexthop id"); in nexthop_add()
2674 NL_SET_ERR_MSG(extack, "No unused id"); in nexthop_add()
2682 nh = nexthop_create(net, cfg, extack); in nexthop_add()
2692 err = insert_nexthop(net, nh, cfg, extack); in nexthop_add()
2704 struct netlink_ext_ack *extack) in rtm_nh_get_timer() argument
2718 NL_SET_ERR_MSG(extack, "Timer value too large"); in rtm_nh_get_timer()
2728 struct netlink_ext_ack *extack) in rtm_to_nh_config_grp_res() argument
2736 res, rtm_nh_res_policy_new, extack); in rtm_to_nh_config_grp_res()
2746 NL_SET_ERR_MSG(extack, "Number of buckets needs to be non-0"); in rtm_to_nh_config_grp_res()
2755 extack); in rtm_to_nh_config_grp_res()
2763 extack); in rtm_to_nh_config_grp_res()
2768 struct netlink_ext_ack *extack) in rtm_to_nh_config() argument
2776 rtm_nh_policy_new, extack); in rtm_to_nh_config()
2782 NL_SET_ERR_MSG(extack, "Invalid values in ancillary header"); in rtm_to_nh_config()
2786 NL_SET_ERR_MSG(extack, "Invalid nexthop flags in ancillary header"); in rtm_to_nh_config()
2799 NL_SET_ERR_MSG(extack, "Invalid address family"); in rtm_to_nh_config()
2819 NL_SET_ERR_MSG(extack, "Fdb attribute can not be used with encap, oif or blackhole"); in rtm_to_nh_config()
2823 NL_SET_ERR_MSG(extack, "Unsupported nexthop flags in ancillary header"); in rtm_to_nh_config()
2831 NL_SET_ERR_MSG(extack, "Invalid family for group"); in rtm_to_nh_config()
2841 NL_SET_ERR_MSG(extack, "Invalid group type"); in rtm_to_nh_config()
2845 cfg->nh_grp_type, extack); in rtm_to_nh_config()
2851 cfg, extack); in rtm_to_nh_config()
2860 NL_SET_ERR_MSG(extack, "Blackhole attribute can not be used with gateway, oif, encap or fdb"); in rtm_to_nh_config()
2870 NL_SET_ERR_MSG(extack, "Device attribute required for non-blackhole and non-fdb nexthops"); in rtm_to_nh_config()
2880 NL_SET_ERR_MSG(extack, "Invalid device index"); in rtm_to_nh_config()
2883 NL_SET_ERR_MSG(extack, "Nexthop device is not up"); in rtm_to_nh_config()
2887 NL_SET_ERR_MSG(extack, "Carrier for nexthop device is down"); in rtm_to_nh_config()
2900 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
2907 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
2913 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
2920 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
2930 NL_SET_ERR_MSG(extack, "LWT encapsulation type is missing"); in rtm_to_nh_config()
2935 err = lwtunnel_valid_encap_type(cfg->nh_encap_type, extack); in rtm_to_nh_config()
2940 NL_SET_ERR_MSG(extack, "LWT encapsulation attribute is missing"); in rtm_to_nh_config()
2952 struct netlink_ext_ack *extack) in rtm_new_nexthop() argument
2959 err = rtm_to_nh_config(net, skb, nlh, &cfg, extack); in rtm_new_nexthop()
2961 nh = nexthop_add(net, &cfg, extack); in rtm_new_nexthop()
2971 struct netlink_ext_ack *extack) in __nh_valid_get_del_req() argument
2976 NL_SET_ERR_MSG(extack, "Invalid values in header"); in __nh_valid_get_del_req()
2981 NL_SET_ERR_MSG(extack, "Nexthop id is missing"); in __nh_valid_get_del_req()
2987 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in __nh_valid_get_del_req()
2995 struct netlink_ext_ack *extack) in nh_valid_get_del_req() argument
3002 rtm_nh_policy_get, extack); in nh_valid_get_del_req()
3006 return __nh_valid_get_del_req(nlh, tb, id, extack); in nh_valid_get_del_req()
3011 struct netlink_ext_ack *extack) in rtm_del_nexthop() argument
3023 err = nh_valid_get_del_req(nlh, &id, extack); in rtm_del_nexthop()
3038 struct netlink_ext_ack *extack) in rtm_get_nexthop() argument
3046 err = nh_valid_get_del_req(nlh, &id, extack); in rtm_get_nexthop()
3123 struct netlink_ext_ack *extack) in __nh_valid_dump_req() argument
3131 NL_SET_ERR_MSG(extack, "Invalid device index"); in __nh_valid_dump_req()
3139 NL_SET_ERR_MSG(extack, "Invalid master device index"); in __nh_valid_dump_req()
3149 NL_SET_ERR_MSG(extack, "Invalid values in header for nexthop dump request"); in __nh_valid_dump_req()
3165 rtm_nh_policy_dump, cb->extack); in nh_valid_dump_req()
3169 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_req()
3256 struct netlink_ext_ack *extack) in nexthop_find_group_resilient() argument
3266 NL_SET_ERR_MSG(extack, "Not a nexthop group"); in nexthop_find_group_resilient()
3272 NL_SET_ERR_MSG(extack, "Nexthop group not of type resilient"); in nexthop_find_group_resilient()
3280 struct netlink_ext_ack *extack) in nh_valid_dump_nhid() argument
3287 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_valid_dump_nhid()
3312 err = nh_valid_dump_nhid(tb[NHA_ID], &filter->nh_id, cb->extack); in nh_valid_dump_bucket_req()
3322 cb->extack); in nh_valid_dump_bucket_req()
3328 cb->extack); in nh_valid_dump_bucket_req()
3333 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_bucket_req()
3388 cb->extack); in rtm_dump_nexthop_bucket_nh()
3431 cb->extack); in rtm_dump_nexthop_bucket()
3454 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req_res_bucket() argument
3460 res, rtm_nh_res_bucket_policy_get, extack); in nh_valid_get_bucket_req_res_bucket()
3465 NL_SET_ERR_MSG(extack, "Bucket index is missing"); in nh_valid_get_bucket_req_res_bucket()
3475 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req() argument
3482 rtm_nh_policy_get_bucket, extack); in nh_valid_get_bucket_req()
3486 err = __nh_valid_get_del_req(nlh, tb, id, extack); in nh_valid_get_bucket_req()
3491 NL_SET_ERR_MSG(extack, "Bucket information is missing"); in nh_valid_get_bucket_req()
3496 bucket_index, extack); in nh_valid_get_bucket_req()
3505 struct netlink_ext_ack *extack) in rtm_get_nexthop_bucket() argument
3516 err = nh_valid_get_bucket_req(nlh, &id, &bucket_index, extack); in rtm_get_nexthop_bucket()
3520 nh = nexthop_find_group_resilient(net, id, extack); in rtm_get_nexthop_bucket()
3527 NL_SET_ERR_MSG(extack, "Bucket index out of bounds"); in rtm_get_nexthop_bucket()
3538 0, extack); in rtm_get_nexthop_bucket()
3599 struct netlink_ext_ack *extack) in nexthops_dump() argument
3609 err = call_nexthop_notifier(nb, net, event_type, nh, extack); in nexthops_dump()
3618 struct netlink_ext_ack *extack) in register_nexthop_notifier() argument
3623 err = nexthops_dump(net, nb, NEXTHOP_EVENT_REPLACE, extack); in register_nexthop_notifier()