Lines Matching refs:extack

225 				  struct netlink_ext_ack *extack)  in call_nexthop_notifiers()  argument
229 .extack = extack, in call_nexthop_notifiers()
240 NL_SET_ERR_MSG(extack, "Failed to initialize nexthop notifier info"); in call_nexthop_notifiers()
328 struct netlink_ext_ack *extack) in __call_nexthop_res_bucket_notifiers() argument
332 .extack = extack, in __call_nexthop_res_bucket_notifiers()
380 struct netlink_ext_ack *extack) in call_nexthop_res_bucket_notifiers() argument
386 force, oldi, newi, extack); in call_nexthop_res_bucket_notifiers()
390 struct netlink_ext_ack *extack) in call_nexthop_res_table_notifiers() argument
394 .extack = extack, in call_nexthop_res_table_notifiers()
411 NL_SET_ERR_MSG(extack, "Failed to initialize nexthop notifier info"); in call_nexthop_res_table_notifiers()
426 struct netlink_ext_ack *extack) in call_nexthop_notifier() argument
430 .extack = extack, in call_nexthop_notifier()
917 struct netlink_ext_ack *extack) in nh_fill_res_bucket() argument
989 bool *is_fdb, struct netlink_ext_ack *extack) in valid_group_nh() argument
996 NL_SET_ERR_MSG(extack, in valid_group_nh()
1001 NL_SET_ERR_MSG(extack, in valid_group_nh()
1010 NL_SET_ERR_MSG(extack, in valid_group_nh()
1021 struct netlink_ext_ack *extack) in nh_check_attr_fdb_group() argument
1028 NL_SET_ERR_MSG(extack, "FDB nexthop group can only have fdb nexthops"); in nh_check_attr_fdb_group()
1035 NL_SET_ERR_MSG(extack, "FDB nexthop group cannot have mixed family nexthops"); in nh_check_attr_fdb_group()
1044 u16 nh_grp_type, struct netlink_ext_ack *extack) in nh_check_attr_group() argument
1053 NL_SET_ERR_MSG(extack, in nh_check_attr_group()
1064 NL_SET_ERR_MSG(extack, "Reserved fields in nexthop_grp must be 0"); in nh_check_attr_group()
1068 NL_SET_ERR_MSG(extack, "Invalid value for weight"); in nh_check_attr_group()
1073 NL_SET_ERR_MSG(extack, "Nexthop id can not be used twice in a group"); in nh_check_attr_group()
1088 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_check_attr_group()
1091 if (!valid_group_nh(nh, len, &is_fdb_nh, extack)) in nh_check_attr_group()
1094 if (nhg_fdb && nh_check_attr_fdb_group(nh, &nh_family, extack)) in nh_check_attr_group()
1098 NL_SET_ERR_MSG(extack, "Non FDB nexthop group cannot have fdb nexthops"); in nh_check_attr_group()
1113 NL_SET_ERR_MSG(extack, in nh_check_attr_group()
1257 struct netlink_ext_ack *extack) in check_src_addr() argument
1260 NL_SET_ERR_MSG(extack, "IPv6 routes using source address can not use nexthop objects"); in check_src_addr()
1267 struct netlink_ext_ack *extack) in fib6_check_nexthop() argument
1278 if (cfg && check_src_addr(&cfg->fc_src, extack) < 0) in fib6_check_nexthop()
1296 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib6_check_nexthop()
1302 NL_SET_ERR_MSG(extack, "IPv6 routes can not use an IPv4 nexthop"); in fib6_check_nexthop()
1311 struct netlink_ext_ack *extack) in fib6_check_nh_list() argument
1319 if (check_src_addr(&f6i->fib6_src.addr, extack) < 0) in fib6_check_nh_list()
1323 return fib6_check_nexthop(new, NULL, extack); in fib6_check_nh_list()
1327 struct netlink_ext_ack *extack) in nexthop_check_scope() argument
1330 NL_SET_ERR_MSG(extack, in nexthop_check_scope()
1336 NL_SET_ERR_MSG(extack, "Scope mismatch with nexthop"); in nexthop_check_scope()
1348 struct netlink_ext_ack *extack) in fib_check_nexthop() argument
1358 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1364 NL_SET_ERR_MSG(extack, "Route with host scope can not have multiple nexthops"); in fib_check_nexthop()
1371 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1375 NL_SET_ERR_MSG(extack, "Route cannot point to a fdb nexthop"); in fib_check_nexthop()
1379 err = nexthop_check_scope(nhi, scope, extack); in fib_check_nexthop()
1387 struct netlink_ext_ack *extack) in fib_check_nh_list() argument
1394 err = fib_check_nexthop(new, fi->fib_scope, extack); in fib_check_nh_list()
1506 struct netlink_ext_ack extack; in nh_res_bucket_migrate() local
1528 new_nhge->nh, &extack); in nh_res_bucket_migrate()
1530 pr_err_ratelimited("%s\n", extack._msg); in nh_res_bucket_migrate()
1737 struct netlink_ext_ack extack; in remove_nh_grp_entry() local
1799 &extack); in remove_nh_grp_entry()
1801 pr_err("%s\n", extack._msg); in remove_nh_grp_entry()
1915 struct netlink_ext_ack *extack) in replace_nexthop_grp() argument
1924 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with a nexthop."); in replace_nexthop_grp()
1932 NL_SET_ERR_MSG(extack, "Can not replace a nexthop group with one of a different type."); in replace_nexthop_grp()
1938 extack); in replace_nexthop_grp()
1951 NL_SET_ERR_MSG(extack, "Can not change number of buckets of a resilient nexthop group."); in replace_nexthop_grp()
1961 err = call_nexthop_res_table_notifiers(net, new, extack); in replace_nexthop_grp()
2021 struct netlink_ext_ack *extack) in replace_nexthop_single_notify_res() argument
2036 extack); in replace_nexthop_single_notify_res()
2053 extack); in replace_nexthop_single_notify_res()
2063 struct netlink_ext_ack *extack) in replace_nexthop_single_notify() argument
2070 group_nh, extack); in replace_nexthop_single_notify()
2075 extack); in replace_nexthop_single_notify()
2083 struct netlink_ext_ack *extack) in replace_nexthop_single() argument
2091 NL_SET_ERR_MSG(extack, "Can not replace a nexthop with a nexthop group."); in replace_nexthop_single()
2095 err = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new, extack); in replace_nexthop_single()
2124 extack); in replace_nexthop_single()
2156 call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, old, extack); in replace_nexthop_single()
2202 struct netlink_ext_ack *extack) in replace_nexthop() argument
2211 err = fib_check_nh_list(old, new, extack); in replace_nexthop()
2215 err = fib6_check_nh_list(old, new, extack); in replace_nexthop()
2231 …NL_SET_ERR_MSG(extack, "Blackhole nexthop can not be a member of a group with more than one path"); in replace_nexthop()
2235 err = fib_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2239 err = fib6_check_nh_list(nhge->nh_parent, new, extack); in replace_nexthop()
2245 err = replace_nexthop_grp(net, old, new, cfg, extack); in replace_nexthop()
2247 err = replace_nexthop_single(net, old, new, extack); in replace_nexthop()
2261 struct nh_config *cfg, struct netlink_ext_ack *extack) in insert_nexthop() argument
2287 rc = replace_nexthop(net, nh, new_nh, cfg, extack); in insert_nexthop()
2300 NL_SET_ERR_MSG(extack, "Replace specified without create and no entry exists"); in insert_nexthop()
2316 NL_SET_ERR_MSG(extack, "Number of buckets not specified for nexthop group insertion"); in insert_nexthop()
2336 rc = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new_nh, extack); in insert_nexthop()
2487 struct netlink_ext_ack *extack) in nh_create_ipv4() argument
2502 err = fib_nh_init(net, fib_nh, &fib_cfg, 1, extack); in nh_create_ipv4()
2512 err = fib_check_nh(net, fib_nh, tb_id, 0, extack); in nh_create_ipv4()
2526 struct netlink_ext_ack *extack) in nh_create_ipv6() argument
2546 extack); in nh_create_ipv6()
2556 struct netlink_ext_ack *extack) in nexthop_create() argument
2589 err = nh_create_ipv4(net, nh, nhi, cfg, extack); in nexthop_create()
2592 err = nh_create_ipv6(net, nh, nhi, cfg, extack); in nexthop_create()
2613 struct netlink_ext_ack *extack) in nexthop_add() argument
2619 NL_SET_ERR_MSG(extack, "Replace requires nexthop id"); in nexthop_add()
2626 NL_SET_ERR_MSG(extack, "No unused id"); in nexthop_add()
2634 nh = nexthop_create(net, cfg, extack); in nexthop_add()
2644 err = insert_nexthop(net, nh, cfg, extack); in nexthop_add()
2656 struct netlink_ext_ack *extack) in rtm_nh_get_timer() argument
2670 NL_SET_ERR_MSG(extack, "Timer value too large"); in rtm_nh_get_timer()
2680 struct netlink_ext_ack *extack) in rtm_to_nh_config_grp_res() argument
2688 res, rtm_nh_res_policy_new, extack); in rtm_to_nh_config_grp_res()
2698 NL_SET_ERR_MSG(extack, "Number of buckets needs to be non-0"); in rtm_to_nh_config_grp_res()
2707 extack); in rtm_to_nh_config_grp_res()
2715 extack); in rtm_to_nh_config_grp_res()
2720 struct netlink_ext_ack *extack) in rtm_to_nh_config() argument
2728 rtm_nh_policy_new, extack); in rtm_to_nh_config()
2734 NL_SET_ERR_MSG(extack, "Invalid values in ancillary header"); in rtm_to_nh_config()
2738 NL_SET_ERR_MSG(extack, "Invalid nexthop flags in ancillary header"); in rtm_to_nh_config()
2751 NL_SET_ERR_MSG(extack, "Invalid address family"); in rtm_to_nh_config()
2771 NL_SET_ERR_MSG(extack, "Fdb attribute can not be used with encap, oif or blackhole"); in rtm_to_nh_config()
2775 NL_SET_ERR_MSG(extack, "Unsupported nexthop flags in ancillary header"); in rtm_to_nh_config()
2783 NL_SET_ERR_MSG(extack, "Invalid family for group"); in rtm_to_nh_config()
2793 NL_SET_ERR_MSG(extack, "Invalid group type"); in rtm_to_nh_config()
2797 cfg->nh_grp_type, extack); in rtm_to_nh_config()
2803 cfg, extack); in rtm_to_nh_config()
2812 NL_SET_ERR_MSG(extack, "Blackhole attribute can not be used with gateway, oif, encap or fdb"); in rtm_to_nh_config()
2822 NL_SET_ERR_MSG(extack, "Device attribute required for non-blackhole and non-fdb nexthops"); in rtm_to_nh_config()
2832 NL_SET_ERR_MSG(extack, "Invalid device index"); in rtm_to_nh_config()
2835 NL_SET_ERR_MSG(extack, "Nexthop device is not up"); in rtm_to_nh_config()
2839 NL_SET_ERR_MSG(extack, "Carrier for nexthop device is down"); in rtm_to_nh_config()
2852 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
2859 NL_SET_ERR_MSG(extack, "Invalid gateway"); in rtm_to_nh_config()
2865 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
2872 NL_SET_ERR_MSG(extack, in rtm_to_nh_config()
2882 NL_SET_ERR_MSG(extack, "LWT encapsulation type is missing"); in rtm_to_nh_config()
2887 err = lwtunnel_valid_encap_type(cfg->nh_encap_type, extack); in rtm_to_nh_config()
2892 NL_SET_ERR_MSG(extack, "LWT encapsulation attribute is missing"); in rtm_to_nh_config()
2904 struct netlink_ext_ack *extack) in rtm_new_nexthop() argument
2911 err = rtm_to_nh_config(net, skb, nlh, &cfg, extack); in rtm_new_nexthop()
2913 nh = nexthop_add(net, &cfg, extack); in rtm_new_nexthop()
2923 struct netlink_ext_ack *extack) in __nh_valid_get_del_req() argument
2928 NL_SET_ERR_MSG(extack, "Invalid values in header"); in __nh_valid_get_del_req()
2933 NL_SET_ERR_MSG(extack, "Nexthop id is missing"); in __nh_valid_get_del_req()
2939 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in __nh_valid_get_del_req()
2947 struct netlink_ext_ack *extack) in nh_valid_get_del_req() argument
2954 rtm_nh_policy_get, extack); in nh_valid_get_del_req()
2958 return __nh_valid_get_del_req(nlh, tb, id, extack); in nh_valid_get_del_req()
2963 struct netlink_ext_ack *extack) in rtm_del_nexthop() argument
2975 err = nh_valid_get_del_req(nlh, &id, extack); in rtm_del_nexthop()
2990 struct netlink_ext_ack *extack) in rtm_get_nexthop() argument
2998 err = nh_valid_get_del_req(nlh, &id, extack); in rtm_get_nexthop()
3075 struct netlink_ext_ack *extack) in __nh_valid_dump_req() argument
3083 NL_SET_ERR_MSG(extack, "Invalid device index"); in __nh_valid_dump_req()
3091 NL_SET_ERR_MSG(extack, "Invalid master device index"); in __nh_valid_dump_req()
3101 NL_SET_ERR_MSG(extack, "Invalid values in header for nexthop dump request"); in __nh_valid_dump_req()
3117 rtm_nh_policy_dump, cb->extack); in nh_valid_dump_req()
3121 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_req()
3213 struct netlink_ext_ack *extack) in nexthop_find_group_resilient() argument
3223 NL_SET_ERR_MSG(extack, "Not a nexthop group"); in nexthop_find_group_resilient()
3229 NL_SET_ERR_MSG(extack, "Nexthop group not of type resilient"); in nexthop_find_group_resilient()
3237 struct netlink_ext_ack *extack) in nh_valid_dump_nhid() argument
3244 NL_SET_ERR_MSG(extack, "Invalid nexthop id"); in nh_valid_dump_nhid()
3269 err = nh_valid_dump_nhid(tb[NHA_ID], &filter->nh_id, cb->extack); in nh_valid_dump_bucket_req()
3279 cb->extack); in nh_valid_dump_bucket_req()
3285 cb->extack); in nh_valid_dump_bucket_req()
3290 return __nh_valid_dump_req(nlh, tb, filter, cb->extack); in nh_valid_dump_bucket_req()
3348 cb->extack); in rtm_dump_nexthop_bucket_nh()
3399 cb->extack); in rtm_dump_nexthop_bucket()
3426 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req_res_bucket() argument
3432 res, rtm_nh_res_bucket_policy_get, extack); in nh_valid_get_bucket_req_res_bucket()
3437 NL_SET_ERR_MSG(extack, "Bucket index is missing"); in nh_valid_get_bucket_req_res_bucket()
3447 struct netlink_ext_ack *extack) in nh_valid_get_bucket_req() argument
3454 rtm_nh_policy_get_bucket, extack); in nh_valid_get_bucket_req()
3458 err = __nh_valid_get_del_req(nlh, tb, id, extack); in nh_valid_get_bucket_req()
3463 NL_SET_ERR_MSG(extack, "Bucket information is missing"); in nh_valid_get_bucket_req()
3468 bucket_index, extack); in nh_valid_get_bucket_req()
3477 struct netlink_ext_ack *extack) in rtm_get_nexthop_bucket() argument
3488 err = nh_valid_get_bucket_req(nlh, &id, &bucket_index, extack); in rtm_get_nexthop_bucket()
3492 nh = nexthop_find_group_resilient(net, id, extack); in rtm_get_nexthop_bucket()
3499 NL_SET_ERR_MSG(extack, "Bucket index out of bounds"); in rtm_get_nexthop_bucket()
3510 0, extack); in rtm_get_nexthop_bucket()
3571 struct netlink_ext_ack *extack) in nexthops_dump() argument
3581 err = call_nexthop_notifier(nb, net, event_type, nh, extack); in nexthops_dump()
3590 struct netlink_ext_ack *extack) in register_nexthop_notifier() argument
3595 err = nexthops_dump(net, nb, NEXTHOP_EVENT_REPLACE, extack); in register_nexthop_notifier()