Lines Matching refs:rt

141 	struct dn_route *rt, **rtp;  in SMP_TIMER_NAME()  local
149 while((rt=*rtp) != NULL) { in SMP_TIMER_NAME()
150 if (atomic_read(&rt->u.dst.__refcnt) || in SMP_TIMER_NAME()
151 (now - rt->u.dst.lastuse) < expire) { in SMP_TIMER_NAME()
152 rtp = &rt->u.rt_next; in SMP_TIMER_NAME()
155 *rtp = rt->u.rt_next; in SMP_TIMER_NAME()
156 rt->u.rt_next = NULL; in SMP_TIMER_NAME()
157 dst_free(&rt->u.dst); in SMP_TIMER_NAME()
172 struct dn_route *rt, **rtp; in dn_dst_gc() local
182 while((rt=*rtp) != NULL) { in dn_dst_gc()
183 if (atomic_read(&rt->u.dst.__refcnt) || in dn_dst_gc()
184 (now - rt->u.dst.lastuse) < expire) { in dn_dst_gc()
185 rtp = &rt->u.rt_next; in dn_dst_gc()
188 *rtp = rt->u.rt_next; in dn_dst_gc()
189 rt->u.rt_next = NULL; in dn_dst_gc()
190 dst_free(&rt->u.dst); in dn_dst_gc()
226 static void dn_insert_route(struct dn_route *rt, unsigned hash) in dn_insert_route() argument
231 rt->u.rt_next = dn_rt_hash_table[hash].chain; in dn_insert_route()
232 dn_rt_hash_table[hash].chain = rt; in dn_insert_route()
234 dst_hold(&rt->u.dst); in dn_insert_route()
235 rt->u.dst.__use++; in dn_insert_route()
236 rt->u.dst.lastuse = now; in dn_insert_route()
244 struct dn_route *rt, *next; in SMP_TIMER_NAME() local
249 if ((rt = xchg(&dn_rt_hash_table[i].chain, NULL)) == NULL) in SMP_TIMER_NAME()
252 for(; rt; rt=next) { in SMP_TIMER_NAME()
253 next = rt->u.rt_next; in SMP_TIMER_NAME()
254 rt->u.rt_next = NULL; in SMP_TIMER_NAME()
255 dst_free((struct dst_entry *)rt); in SMP_TIMER_NAME()
603 struct dn_route *rt = (struct dn_route *)dst; in dn_output() local
615 cb->src = rt->rt_saddr; in dn_output()
616 cb->dst = rt->rt_daddr; in dn_output()
713 struct dn_route *rt = NULL; in dn_route_output_slow() local
789 if ((rt = dst_alloc(&dn_dst_ops)) == NULL) { in dn_route_output_slow()
796 rt->key.saddr = src; in dn_route_output_slow()
797 rt->rt_saddr = src; in dn_route_output_slow()
798 rt->key.daddr = dst; in dn_route_output_slow()
799 rt->rt_daddr = dst; in dn_route_output_slow()
800 rt->key.oif = neigh ? neigh->dev->ifindex : -1; in dn_route_output_slow()
801 rt->key.iif = 0; in dn_route_output_slow()
802 rt->key.fwmark = 0; in dn_route_output_slow()
804 rt->u.dst.neighbour = neigh; in dn_route_output_slow()
805 rt->u.dst.dev = neigh ? neigh->dev : NULL; in dn_route_output_slow()
806 if (rt->u.dst.dev) in dn_route_output_slow()
807 dev_hold(rt->u.dst.dev); in dn_route_output_slow()
808 rt->u.dst.lastuse = jiffies; in dn_route_output_slow()
809 rt->u.dst.output = dn_output; in dn_route_output_slow()
810 rt->u.dst.input = dn_rt_bug; in dn_route_output_slow()
812 if (dn_dev_islocal(neigh->dev, rt->rt_daddr)) in dn_route_output_slow()
813 rt->u.dst.input = dn_nsp_rx; in dn_route_output_slow()
815 hash = dn_hash(rt->key.saddr, rt->key.daddr); in dn_route_output_slow()
816 dn_insert_route(rt, hash); in dn_route_output_slow()
817 *pprt = &rt->u.dst; in dn_route_output_slow()
825 struct dn_route *rt = NULL; in dn_route_output() local
829 for(rt = dn_rt_hash_table[hash].chain; rt; rt = rt->u.rt_next) { in dn_route_output()
830 if ((dst == rt->key.daddr) && in dn_route_output()
831 (src == rt->key.saddr) && in dn_route_output()
832 (rt->key.iif == 0) && in dn_route_output()
833 (rt->key.oif != 0)) { in dn_route_output()
834 rt->u.dst.lastuse = jiffies; in dn_route_output()
835 dst_hold(&rt->u.dst); in dn_route_output()
836 rt->u.dst.__use++; in dn_route_output()
838 *pprt = &rt->u.dst; in dn_route_output()
850 struct dn_route *rt = NULL; in dn_route_input_slow() local
970 if ((rt = dst_alloc(&dn_dst_ops)) == NULL) { in dn_route_input_slow()
975 rt->key.saddr = cb->src; in dn_route_input_slow()
976 rt->rt_saddr = saddr; in dn_route_input_slow()
977 rt->key.daddr = cb->dst; in dn_route_input_slow()
978 rt->rt_daddr = daddr; in dn_route_input_slow()
979 rt->key.oif = 0; in dn_route_input_slow()
980 rt->key.iif = dev->ifindex; in dn_route_input_slow()
981 rt->key.fwmark = fwmark; in dn_route_input_slow()
983 rt->u.dst.neighbour = neigh; in dn_route_input_slow()
984 rt->u.dst.dev = neigh ? neigh->dev : NULL; in dn_route_input_slow()
985 if (rt->u.dst.dev) in dn_route_input_slow()
986 dev_hold(rt->u.dst.dev); in dn_route_input_slow()
987 rt->u.dst.lastuse = jiffies; in dn_route_input_slow()
988 rt->u.dst.output = dnrt_output; in dn_route_input_slow()
989 rt->u.dst.input = dnrt_input; in dn_route_input_slow()
991 hash = dn_hash(rt->key.saddr, rt->key.daddr); in dn_route_input_slow()
992 dn_insert_route(rt, hash); in dn_route_input_slow()
993 skb->dst = (struct dst_entry *)rt; in dn_route_input_slow()
1000 struct dn_route *rt; in dn_route_input() local
1008 for(rt = dn_rt_hash_table[hash].chain; rt != NULL; rt = rt->u.rt_next) { in dn_route_input()
1009 if ((rt->key.saddr == cb->src) && in dn_route_input()
1010 (rt->key.daddr == cb->dst) && in dn_route_input()
1011 (rt->key.oif == 0) && in dn_route_input()
1013 (rt->key.fwmark == skb->nfmark) && in dn_route_input()
1015 (rt->key.iif == cb->iif)) { in dn_route_input()
1016 rt->u.dst.lastuse = jiffies; in dn_route_input()
1017 dst_hold(&rt->u.dst); in dn_route_input()
1018 rt->u.dst.__use++; in dn_route_input()
1020 skb->dst = (struct dst_entry *)rt; in dn_route_input()
1031 struct dn_route *rt = (struct dn_route *)skb->dst; in dn_rt_fill_info() local
1048 RTA_PUT(skb, RTA_DST, 2, &rt->rt_daddr); in dn_rt_fill_info()
1049 RTA_PUT(skb, RTA_SRC, 2, &rt->rt_saddr); in dn_rt_fill_info()
1050 if (rt->u.dst.dev) in dn_rt_fill_info()
1051 RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->u.dst.dev->ifindex); in dn_rt_fill_info()
1052 if (rt->u.dst.window) in dn_rt_fill_info()
1053 RTA_PUT(skb, RTAX_WINDOW, sizeof(unsigned), &rt->u.dst.window); in dn_rt_fill_info()
1054 if (rt->u.dst.rtt) in dn_rt_fill_info()
1055 RTA_PUT(skb, RTAX_RTT, sizeof(unsigned), &rt->u.dst.rtt); in dn_rt_fill_info()
1072 struct dn_route *rt = NULL; in dn_cache_getroute() local
1112 rt = (struct dn_route *)skb->dst; in dn_cache_getroute()
1114 err = dn_route_output((struct dst_entry **)&rt, dst, src, 0); in dn_cache_getroute()
1117 if (!err && rt->u.dst.error) in dn_cache_getroute()
1118 err = rt->u.dst.error; in dn_cache_getroute()
1124 skb->dst = &rt->u.dst; in dn_cache_getroute()
1152 struct dn_route *rt; in dn_cache_dump() local
1169 for(rt = dn_rt_hash_table[h].chain, idx = 0; rt; rt = rt->u.rt_next, idx++) { in dn_cache_dump()
1172 skb->dst = dst_clone(&rt->u.dst); in dn_cache_dump()
1197 struct dn_route *rt; in decnet_cache_get_info() local
1203 rt = dn_rt_hash_table[i].chain; in decnet_cache_get_info()
1204 for(; rt != NULL; rt = rt->u.rt_next) { in decnet_cache_get_info()
1206 rt->u.dst.dev ? rt->u.dst.dev->name : "*", in decnet_cache_get_info()
1207 dn_addr2asc(dn_ntohs(rt->rt_daddr), buf1), in decnet_cache_get_info()
1208 dn_addr2asc(dn_ntohs(rt->rt_saddr), buf2), in decnet_cache_get_info()
1209 atomic_read(&rt->u.dst.__refcnt), in decnet_cache_get_info()
1210 rt->u.dst.__use, in decnet_cache_get_info()
1211 (int)rt->u.dst.rtt in decnet_cache_get_info()