Lines Matching refs:u

231 		for (r = rt_hash_table[i].chain; r; r = r->u.rt_next) {  in rt_cache_get_info()
243 r->u.dst.dev ? r->u.dst.dev->name : "*", in rt_cache_get_info()
247 atomic_read(&r->u.dst.__refcnt), in rt_cache_get_info()
248 r->u.dst.__use, in rt_cache_get_info()
251 (r->u.dst.advmss ? in rt_cache_get_info()
252 (int) r->u.dst.advmss + 40 : 0), in rt_cache_get_info()
253 r->u.dst.window, in rt_cache_get_info()
254 (int)((r->u.dst.rtt >> 3) + r->u.dst.rttvar), in rt_cache_get_info()
256 r->u.dst.hh ? in rt_cache_get_info()
257 atomic_read(&r->u.dst.hh->hh_refcnt) : in rt_cache_get_info()
259 r->u.dst.hh ? in rt_cache_get_info()
260 (r->u.dst.hh->hh_output == in rt_cache_get_info()
327 dst_free(&rt->u.dst); in rt_free()
333 dst_free(&rt->u.dst); in rt_drop()
341 rth->key.iif && rth->u.rt_next; in rt_fast_clean()
347 rth->u.dst.expires; in rt_valuable()
355 if (atomic_read(&rth->u.dst.__refcnt)) in rt_may_expire()
359 if (rth->u.dst.expires && in rt_may_expire()
360 time_after_eq(jiffies, rth->u.dst.expires)) in rt_may_expire()
363 age = jiffies - rth->u.dst.lastuse; in rt_may_expire()
379 u32 score = jiffies - rt->u.dst.lastuse; in rt_score()
410 if (rth->u.dst.expires) { in SMP_TIMER_NAME()
412 if (time_before_eq(now, rth->u.dst.expires)) { in SMP_TIMER_NAME()
414 rthp = &rth->u.rt_next; in SMP_TIMER_NAME()
419 rthp = &rth->u.rt_next; in SMP_TIMER_NAME()
424 *rthp = rth->u.rt_next; in SMP_TIMER_NAME()
459 next = rth->u.rt_next; in SMP_TIMER_NAME()
592 rthp = &rth->u.rt_next; in rt_garbage_collect()
595 *rthp = rth->u.rt_next; in rt_garbage_collect()
673 *rthp = rth->u.rt_next; in rt_intern_hash()
674 rth->u.rt_next = rt_hash_table[hash].chain; in rt_intern_hash()
677 rth->u.dst.__use++; in rt_intern_hash()
678 dst_hold(&rth->u.dst); in rt_intern_hash()
679 rth->u.dst.lastuse = now; in rt_intern_hash()
687 if (!atomic_read(&rth->u.dst.__refcnt)) { in rt_intern_hash()
699 rthp = &rth->u.rt_next; in rt_intern_hash()
710 *candp = cand->u.rt_next; in rt_intern_hash()
719 int err = arp_bind_neighbour(&rt->u.dst); in rt_intern_hash()
750 rt->u.rt_next = rt_hash_table[hash].chain; in rt_intern_hash()
752 if (rt->u.rt_next) { in rt_intern_hash()
756 for (trt = rt->u.rt_next; trt; trt = trt->u.rt_next) in rt_intern_hash()
832 rthp = &(*rthp)->u.rt_next) in rt_del()
834 *rthp = rt->u.rt_next; in rt_del()
886 rthp = &rth->u.rt_next; in ip_rt_redirect()
892 rth->u.dst.error || in ip_rt_redirect()
894 rth->u.dst.dev != dev) in ip_rt_redirect()
897 dst_hold(&rth->u.dst); in ip_rt_redirect()
909 rt->u.dst.__use = 1; in ip_rt_redirect()
910 atomic_set(&rt->u.dst.__refcnt, 1); in ip_rt_redirect()
911 if (rt->u.dst.dev) in ip_rt_redirect()
912 dev_hold(rt->u.dst.dev); in ip_rt_redirect()
913 rt->u.dst.lastuse = jiffies; in ip_rt_redirect()
914 rt->u.dst.neighbour = NULL; in ip_rt_redirect()
915 rt->u.dst.hh = NULL; in ip_rt_redirect()
916 rt->u.dst.obsolete = 0; in ip_rt_redirect()
924 dst_confirm(&rth->u.dst); in ip_rt_redirect()
929 if (arp_bind_neighbour(&rt->u.dst) || in ip_rt_redirect()
930 !(rt->u.dst.neighbour->nud_state & in ip_rt_redirect()
932 if (rt->u.dst.neighbour) in ip_rt_redirect()
933 neigh_event_send(rt->u.dst.neighbour, NULL); in ip_rt_redirect()
975 rt->u.dst.expires) { in ipv4_negative_advice()
1011 struct in_device *in_dev = in_dev_get(rt->u.dst.dev); in ip_rt_send_redirect()
1022 if (time_after(jiffies, rt->u.dst.rate_last + ip_rt_redirect_silence)) in ip_rt_send_redirect()
1023 rt->u.dst.rate_tokens = 0; in ip_rt_send_redirect()
1028 if (rt->u.dst.rate_tokens >= ip_rt_redirect_number) { in ip_rt_send_redirect()
1029 rt->u.dst.rate_last = jiffies; in ip_rt_send_redirect()
1037 (rt->u.dst.rate_last + in ip_rt_send_redirect()
1038 (ip_rt_redirect_load << rt->u.dst.rate_tokens)))) { in ip_rt_send_redirect()
1040 rt->u.dst.rate_last = jiffies; in ip_rt_send_redirect()
1041 ++rt->u.dst.rate_tokens; in ip_rt_send_redirect()
1044 rt->u.dst.rate_tokens == ip_rt_redirect_number && in ip_rt_send_redirect()
1062 switch (rt->u.dst.error) { in ip_error()
1078 rt->u.dst.rate_tokens += now - rt->u.dst.rate_last; in ip_error()
1079 if (rt->u.dst.rate_tokens > ip_rt_error_burst) in ip_error()
1080 rt->u.dst.rate_tokens = ip_rt_error_burst; in ip_error()
1081 rt->u.dst.rate_last = now; in ip_error()
1082 if (rt->u.dst.rate_tokens >= ip_rt_error_cost) { in ip_error()
1083 rt->u.dst.rate_tokens -= ip_rt_error_cost; in ip_error()
1127 rth = rth->u.rt_next) { in ip_rt_frag_needed()
1134 !(rth->u.dst.mxlock & (1 << RTAX_MTU))) { in ip_rt_frag_needed()
1141 old_mtu >= rth->u.dst.pmtu && in ip_rt_frag_needed()
1147 if (mtu <= rth->u.dst.pmtu) { in ip_rt_frag_needed()
1148 if (mtu < rth->u.dst.pmtu) { in ip_rt_frag_needed()
1149 dst_confirm(&rth->u.dst); in ip_rt_frag_needed()
1152 rth->u.dst.mxlock |= in ip_rt_frag_needed()
1155 rth->u.dst.pmtu = mtu; in ip_rt_frag_needed()
1156 dst_set_expires(&rth->u.dst, in ip_rt_frag_needed()
1212 dst_set_expires(&rt->u.dst, 0); in ipv4_link_failure()
1243 src = inet_select_addr(rt->u.dst.dev, rt->rt_gateway, in ip_rt_get_source()
1250 src = inet_select_addr(rt->u.dst.dev, rt->rt_gateway, in ip_rt_get_source()
1258 if (!(rt->u.dst.tclassid & 0xFFFF)) in set_class_tag()
1259 rt->u.dst.tclassid |= tag & 0xFFFF; in set_class_tag()
1260 if (!(rt->u.dst.tclassid & 0xFFFF0000)) in set_class_tag()
1261 rt->u.dst.tclassid |= tag & 0xFFFF0000; in set_class_tag()
1273 memcpy(&rt->u.dst.mxlock, fi->fib_metrics, in rt_set_nexthop()
1276 rt->u.dst.pmtu = rt->u.dst.dev->mtu; in rt_set_nexthop()
1277 if (rt->u.dst.mxlock & (1 << RTAX_MTU) && in rt_set_nexthop()
1279 rt->u.dst.pmtu > 576) in rt_set_nexthop()
1280 rt->u.dst.pmtu = 576; in rt_set_nexthop()
1283 rt->u.dst.tclassid = FIB_RES_NH(*res).nh_tclassid; in rt_set_nexthop()
1286 rt->u.dst.pmtu = rt->u.dst.dev->mtu; in rt_set_nexthop()
1288 if (rt->u.dst.pmtu > IP_MAX_MTU) in rt_set_nexthop()
1289 rt->u.dst.pmtu = IP_MAX_MTU; in rt_set_nexthop()
1290 if (rt->u.dst.advmss == 0) in rt_set_nexthop()
1291 rt->u.dst.advmss = max_t(unsigned int, rt->u.dst.dev->mtu - 40, in rt_set_nexthop()
1293 if (rt->u.dst.advmss > 65535 - 40) in rt_set_nexthop()
1294 rt->u.dst.advmss = 65535 - 40; in rt_set_nexthop()
1335 rth->u.dst.output= ip_rt_bug; in ip_route_input_mc()
1337 atomic_set(&rth->u.dst.__refcnt, 1); in ip_route_input_mc()
1338 rth->u.dst.flags= DST_HOST; in ip_route_input_mc()
1352 rth->u.dst.tclassid = itag; in ip_route_input_mc()
1356 rth->u.dst.dev = &loopback_dev; in ip_route_input_mc()
1357 dev_hold(rth->u.dst.dev); in ip_route_input_mc()
1364 rth->u.dst.input= ip_local_deliver; in ip_route_input_mc()
1370 rth->u.dst.input = ip_mr_input; in ip_route_input_mc()
1543 atomic_set(&rth->u.dst.__refcnt, 1); in ip_route_input_slow()
1544 rth->u.dst.flags= DST_HOST; in ip_route_input_slow()
1562 rth->u.dst.dev = out_dev->dev; in ip_route_input_slow()
1563 dev_hold(rth->u.dst.dev); in ip_route_input_slow()
1567 rth->u.dst.input = ip_forward; in ip_route_input_slow()
1568 rth->u.dst.output = ip_output; in ip_route_input_slow()
1576 struct net_device *odev = rth->u.dst.dev; in ip_route_input_slow()
1580 dev->accept_fastpath(dev, &rth->u.dst) == 0) in ip_route_input_slow()
1618 rth->u.dst.output= ip_rt_bug; in ip_route_input_slow()
1620 atomic_set(&rth->u.dst.__refcnt, 1); in ip_route_input_slow()
1621 rth->u.dst.flags= DST_HOST; in ip_route_input_slow()
1635 rth->u.dst.tclassid = itag; in ip_route_input_slow()
1639 rth->u.dst.dev = &loopback_dev; in ip_route_input_slow()
1640 dev_hold(rth->u.dst.dev); in ip_route_input_slow()
1644 rth->u.dst.input= ip_local_deliver; in ip_route_input_slow()
1647 rth->u.dst.input= ip_error; in ip_route_input_slow()
1648 rth->u.dst.error= -err; in ip_route_input_slow()
1718 for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) { in ip_route_input()
1727 rth->u.dst.lastuse = jiffies; in ip_route_input()
1728 dst_hold(&rth->u.dst); in ip_route_input()
1729 rth->u.dst.__use++; in ip_route_input()
1998 atomic_set(&rth->u.dst.__refcnt, 1); in ip_route_output_slow()
1999 rth->u.dst.flags= DST_HOST; in ip_route_output_slow()
2015 rth->u.dst.dev = dev_out; in ip_route_output_slow()
2020 rth->u.dst.output=ip_output; in ip_route_output_slow()
2025 rth->u.dst.input = ip_local_deliver; in ip_route_output_slow()
2031 rth->u.dst.output = ip_mc_output; in ip_route_output_slow()
2040 rth->u.dst.input = ip_mr_input; in ip_route_output_slow()
2041 rth->u.dst.output = ip_mc_output; in ip_route_output_slow()
2078 for (rth = rt_hash_table[hash].chain; rth; rth = rth->u.rt_next) { in ip_route_output_key()
2088 rth->u.dst.lastuse = jiffies; in ip_route_output_key()
2089 dst_hold(&rth->u.dst); in ip_route_output_key()
2090 rth->u.dst.__use++; in ip_route_output_key()
2133 if (rt->u.dst.dev) in rt_fill_info()
2134 RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->u.dst.dev->ifindex); in rt_fill_info()
2136 if (rt->u.dst.tclassid) in rt_fill_info()
2137 RTA_PUT(skb, RTA_FLOW, 4, &rt->u.dst.tclassid); in rt_fill_info()
2145 if (rtnetlink_put_metrics(skb, &rt->u.dst.mxlock) < 0) in rt_fill_info()
2147 ci.rta_lastuse = jiffies - rt->u.dst.lastuse; in rt_fill_info()
2148 ci.rta_used = rt->u.dst.__use; in rt_fill_info()
2149 ci.rta_clntref = atomic_read(&rt->u.dst.__refcnt); in rt_fill_info()
2150 if (rt->u.dst.expires) in rt_fill_info()
2151 ci.rta_expires = rt->u.dst.expires - jiffies; in rt_fill_info()
2154 ci.rta_error = rt->u.dst.error; in rt_fill_info()
2241 if (!err && rt->u.dst.error) in inet_rtm_getroute()
2242 err = -rt->u.dst.error; in inet_rtm_getroute()
2252 skb->dst = &rt->u.dst; in inet_rtm_getroute()
2291 rt = rt->u.rt_next, idx++) { in ip_rt_dump()
2294 skb->dst = dst_clone(&rt->u.dst); in ip_rt_dump()