Searched refs:fib_metrics (Results 1 – 5 of 5) sorted by relevance
/linux-6.6.21/net/ipv4/ |
D | metrics.c | 70 struct dst_metrics *fib_metrics; in ip_fib_metrics_init() local 76 fib_metrics = kzalloc(sizeof(*fib_metrics), GFP_KERNEL); in ip_fib_metrics_init() 77 if (unlikely(!fib_metrics)) in ip_fib_metrics_init() 80 err = ip_metrics_convert(net, fc_mx, fc_mx_len, fib_metrics->metrics, in ip_fib_metrics_init() 83 refcount_set(&fib_metrics->refcnt, 1); in ip_fib_metrics_init() 85 kfree(fib_metrics); in ip_fib_metrics_init() 86 fib_metrics = ERR_PTR(err); in ip_fib_metrics_init() 89 return fib_metrics; in ip_fib_metrics_init()
|
D | fib_semantics.c | 245 ip_fib_metrics_put(fi->fib_metrics); in free_fib_info_rcu() 429 memcmp(nfi->fib_metrics, fi->fib_metrics, in fib_find_info() 1040 fi_val = fi->fib_metrics->metrics[type - 1]; in fib_metrics_match() 1462 fi->fib_metrics = ip_fib_metrics_init(fi->fib_net, cfg->fc_mx, in fib_create_info() 1464 if (IS_ERR(fi->fib_metrics)) { in fib_create_info() 1465 err = PTR_ERR(fi->fib_metrics); in fib_create_info() 1815 if (rtnetlink_put_metrics(skb, fi->fib_metrics->metrics) < 0) in fib_dump_info()
|
D | route.c | 1404 fi->fib_metrics->metrics[RTAX_LOCK - 1] & (1 << RTAX_MTU)) in ip_mtu_from_fib_result() 1591 ip_dst_init_metrics(&rt->dst, fi->fib_metrics); in rt_set_nexthop()
|
/linux-6.6.21/include/net/ |
D | ip.h | 503 static inline void ip_fib_metrics_put(struct dst_metrics *fib_metrics) in ip_fib_metrics_put() argument 505 if (fib_metrics != &dst_default_metrics && in ip_fib_metrics_put() 506 refcount_dec_and_test(&fib_metrics->refcnt)) in ip_fib_metrics_put() 507 kfree(fib_metrics); in ip_fib_metrics_put() 512 void ip_dst_init_metrics(struct dst_entry *dst, struct dst_metrics *fib_metrics) in ip_dst_init_metrics() argument 514 dst_init_metrics(dst, fib_metrics->metrics, true); in ip_dst_init_metrics() 516 if (fib_metrics != &dst_default_metrics) { in ip_dst_init_metrics() 518 refcount_inc(&fib_metrics->refcnt); in ip_dst_init_metrics()
|
D | ip_fib.h | 149 struct dst_metrics *fib_metrics; member 150 #define fib_mtu fib_metrics->metrics[RTAX_MTU-1] 151 #define fib_window fib_metrics->metrics[RTAX_WINDOW-1] 152 #define fib_rtt fib_metrics->metrics[RTAX_RTT-1] 153 #define fib_advmss fib_metrics->metrics[RTAX_ADVMSS-1]
|