• Home
  • Raw
  • Download

Lines Matching refs:dst

89 u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old);
98 static inline bool dst_metrics_read_only(const struct dst_entry *dst) in dst_metrics_read_only() argument
100 return dst->_metrics & DST_METRICS_READ_ONLY; in dst_metrics_read_only()
103 void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old);
105 static inline void dst_destroy_metrics_generic(struct dst_entry *dst) in dst_destroy_metrics_generic() argument
107 unsigned long val = dst->_metrics; in dst_destroy_metrics_generic()
109 __dst_destroy_metrics_generic(dst, val); in dst_destroy_metrics_generic()
112 static inline u32 *dst_metrics_write_ptr(struct dst_entry *dst) in dst_metrics_write_ptr() argument
114 unsigned long p = dst->_metrics; in dst_metrics_write_ptr()
119 return dst->ops->cow_metrics(dst, p); in dst_metrics_write_ptr()
126 static inline void dst_init_metrics(struct dst_entry *dst, in dst_init_metrics() argument
130 dst->_metrics = ((unsigned long) src_metrics) | in dst_init_metrics()
145 static inline u32 *dst_metrics_ptr(struct dst_entry *dst) in dst_metrics_ptr() argument
147 return DST_METRICS_PTR(dst); in dst_metrics_ptr()
151 dst_metric_raw(const struct dst_entry *dst, const int metric) in dst_metric_raw() argument
153 u32 *p = DST_METRICS_PTR(dst); in dst_metric_raw()
159 dst_metric(const struct dst_entry *dst, const int metric) in dst_metric() argument
164 return dst_metric_raw(dst, metric); in dst_metric()
168 dst_metric_advmss(const struct dst_entry *dst) in dst_metric_advmss() argument
170 u32 advmss = dst_metric_raw(dst, RTAX_ADVMSS); in dst_metric_advmss()
173 advmss = dst->ops->default_advmss(dst); in dst_metric_advmss()
178 static inline void dst_metric_set(struct dst_entry *dst, int metric, u32 val) in dst_metric_set() argument
180 u32 *p = dst_metrics_write_ptr(dst); in dst_metric_set()
193 dst_feature(const struct dst_entry *dst, u32 feature) in dst_feature() argument
195 return dst_metric(dst, RTAX_FEATURES) & feature; in dst_feature()
200 static inline u32 dst_mtu(const struct dst_entry *dst) in dst_mtu() argument
202 return INDIRECT_CALL_INET(dst->ops->mtu, ip6_mtu, ipv4_mtu, dst); in dst_mtu()
206 static inline unsigned long dst_metric_rtt(const struct dst_entry *dst, int metric) in dst_metric_rtt() argument
208 return msecs_to_jiffies(dst_metric(dst, metric)); in dst_metric_rtt()
212 dst_allfrag(const struct dst_entry *dst) in dst_allfrag() argument
214 int ret = dst_feature(dst, RTAX_FEATURE_ALLFRAG); in dst_allfrag()
219 dst_metric_locked(const struct dst_entry *dst, int metric) in dst_metric_locked() argument
221 return dst_metric(dst, RTAX_LOCK) & (1 << metric); in dst_metric_locked()
224 static inline void dst_hold(struct dst_entry *dst) in dst_hold() argument
231 WARN_ON(atomic_inc_not_zero(&dst->__refcnt) == 0); in dst_hold()
234 static inline void dst_use_noref(struct dst_entry *dst, unsigned long time) in dst_use_noref() argument
236 if (unlikely(time != dst->lastuse)) { in dst_use_noref()
237 dst->__use++; in dst_use_noref()
238 dst->lastuse = time; in dst_use_noref()
242 static inline struct dst_entry *dst_clone(struct dst_entry *dst) in dst_clone() argument
244 if (dst) in dst_clone()
245 dst_hold(dst); in dst_clone()
246 return dst; in dst_clone()
249 void dst_release(struct dst_entry *dst);
251 void dst_release_immediate(struct dst_entry *dst);
293 static inline bool dst_hold_safe(struct dst_entry *dst) in dst_hold_safe() argument
295 return atomic_inc_not_zero(&dst->__refcnt); in dst_hold_safe()
308 struct dst_entry *dst = skb_dst(skb); in skb_dst_force() local
311 if (!dst_hold_safe(dst)) in skb_dst_force()
312 dst = NULL; in skb_dst_force()
314 skb->_skb_refdst = (unsigned long)dst; in skb_dst_force()
315 skb->slow_gro |= !!dst; in skb_dst_force()
367 const struct dst_entry *dst; in dst_tclassid() local
369 dst = skb_dst(skb); in dst_tclassid()
370 if (dst) in dst_tclassid()
371 return dst->tclassid; in dst_tclassid()
383 void dst_init(struct dst_entry *dst, struct dst_ops *ops,
386 struct dst_entry *dst_destroy(struct dst_entry *dst);
387 void dst_dev_put(struct dst_entry *dst);
389 static inline void dst_confirm(struct dst_entry *dst) in dst_confirm() argument
393 static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) in dst_neigh_lookup() argument
395 struct neighbour *n = dst->ops->neigh_lookup(dst, NULL, daddr); in dst_neigh_lookup()
399 static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst, in dst_neigh_lookup_skb() argument
404 if (WARN_ON_ONCE(!dst->ops->neigh_lookup)) in dst_neigh_lookup_skb()
407 n = dst->ops->neigh_lookup(dst, skb, NULL); in dst_neigh_lookup_skb()
412 static inline void dst_confirm_neigh(const struct dst_entry *dst, in dst_confirm_neigh() argument
415 if (dst->ops->confirm_neigh) in dst_confirm_neigh()
416 dst->ops->confirm_neigh(dst, daddr); in dst_confirm_neigh()
421 struct dst_entry *dst = skb_dst(skb); in dst_link_failure() local
422 if (dst && dst->ops && dst->ops->link_failure) in dst_link_failure()
423 dst->ops->link_failure(skb); in dst_link_failure()
426 static inline void dst_set_expires(struct dst_entry *dst, int timeout) in dst_set_expires() argument
433 if (dst->expires == 0 || time_before(expires, dst->expires)) in dst_set_expires()
434 dst->expires = expires; in dst_set_expires()
462 static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) in dst_check() argument
464 if (dst->obsolete) in dst_check()
465 dst = INDIRECT_CALL_INET(dst->ops->check, ip6_dst_check, in dst_check()
466 ipv4_dst_check, dst, cookie); in dst_check()
467 return dst; in dst_check()
505 static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) in dst_xfrm() argument
526 static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) in dst_xfrm() argument
528 return dst->xfrm; in dst_xfrm()
534 struct dst_entry *dst = skb_dst(skb); in skb_dst_update_pmtu() local
536 if (dst && dst->ops->update_pmtu) in skb_dst_update_pmtu()
537 dst->ops->update_pmtu(dst, NULL, skb, mtu, true); in skb_dst_update_pmtu()
543 struct dst_entry *dst = skb_dst(skb); in skb_dst_update_pmtu_no_confirm() local
545 if (dst && dst->ops->update_pmtu) in skb_dst_update_pmtu_no_confirm()
546 dst->ops->update_pmtu(dst, NULL, skb, mtu, false); in skb_dst_update_pmtu_no_confirm()
549 struct dst_entry *dst_blackhole_check(struct dst_entry *dst, u32 cookie);
550 void dst_blackhole_update_pmtu(struct dst_entry *dst, struct sock *sk,
552 void dst_blackhole_redirect(struct dst_entry *dst, struct sock *sk,
554 u32 *dst_blackhole_cow_metrics(struct dst_entry *dst, unsigned long old);
555 struct neighbour *dst_blackhole_neigh_lookup(const struct dst_entry *dst,
558 unsigned int dst_blackhole_mtu(const struct dst_entry *dst);