Lines Matching refs:f6i
229 struct fib6_info *f6i; member
253 static inline bool fib6_check_expired(const struct fib6_info *f6i) in fib6_check_expired() argument
255 if (f6i->fib6_flags & RTF_EXPIRES) in fib6_check_expired()
256 return time_after(jiffies, f6i->expires); in fib6_check_expired()
260 static inline bool fib6_has_expires(const struct fib6_info *f6i) in fib6_has_expires() argument
262 return f6i->fib6_flags & RTF_EXPIRES; in fib6_has_expires()
270 static inline bool fib6_get_cookie_safe(const struct fib6_info *f6i, in fib6_get_cookie_safe() argument
276 fn = rcu_dereference(f6i->fib6_node); in fib6_get_cookie_safe()
319 static inline void fib6_info_hold(struct fib6_info *f6i) in fib6_info_hold() argument
321 refcount_inc(&f6i->fib6_ref); in fib6_info_hold()
324 static inline bool fib6_info_hold_safe(struct fib6_info *f6i) in fib6_info_hold_safe() argument
326 return refcount_inc_not_zero(&f6i->fib6_ref); in fib6_info_hold_safe()
329 static inline void fib6_info_release(struct fib6_info *f6i) in fib6_info_release() argument
331 if (f6i && refcount_dec_and_test(&f6i->fib6_ref)) in fib6_info_release()
332 call_rcu(&f6i->rcu, fib6_info_destroy_rcu); in fib6_info_release()
506 static inline void fib6_set_expires_locked(struct fib6_info *f6i, in fib6_set_expires_locked() argument
511 tb6 = f6i->fib6_table; in fib6_set_expires_locked()
512 f6i->expires = expires; in fib6_set_expires_locked()
513 if (tb6 && !fib6_has_expires(f6i)) in fib6_set_expires_locked()
514 hlist_add_head(&f6i->gc_link, &tb6->tb6_gc_hlist); in fib6_set_expires_locked()
515 f6i->fib6_flags |= RTF_EXPIRES; in fib6_set_expires_locked()
522 static inline void fib6_set_expires(struct fib6_info *f6i, in fib6_set_expires() argument
525 spin_lock_bh(&f6i->fib6_table->tb6_lock); in fib6_set_expires()
526 fib6_set_expires_locked(f6i, expires); in fib6_set_expires()
527 spin_unlock_bh(&f6i->fib6_table->tb6_lock); in fib6_set_expires()
530 static inline void fib6_clean_expires_locked(struct fib6_info *f6i) in fib6_clean_expires_locked() argument
532 if (fib6_has_expires(f6i)) in fib6_clean_expires_locked()
533 hlist_del_init(&f6i->gc_link); in fib6_clean_expires_locked()
534 f6i->fib6_flags &= ~RTF_EXPIRES; in fib6_clean_expires_locked()
535 f6i->expires = 0; in fib6_clean_expires_locked()
538 static inline void fib6_clean_expires(struct fib6_info *f6i) in fib6_clean_expires() argument
540 spin_lock_bh(&f6i->fib6_table->tb6_lock); in fib6_clean_expires()
541 fib6_clean_expires_locked(f6i); in fib6_clean_expires()
542 spin_unlock_bh(&f6i->fib6_table->tb6_lock); in fib6_clean_expires()
570 void fib6_update_sernum_stub(struct net *net, struct fib6_info *f6i);
572 void fib6_metric_set(struct fib6_info *f6i, int metric, u32 val);
573 static inline bool fib6_metric_locked(struct fib6_info *f6i, int metric) in fib6_metric_locked() argument
575 return !!(f6i->fib6_metrics->metrics[RTAX_LOCK - 1] & (1 << metric)); in fib6_metric_locked()
577 void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i,