Lines Matching refs:fi
265 static struct net_device *netdev_switch_get_dev_by_nhs(struct fib_info *fi) in netdev_switch_get_dev_by_nhs() argument
274 for (nhsel = 0; nhsel < fi->fib_nhs; nhsel++) { in netdev_switch_get_dev_by_nhs()
275 const struct fib_nh *nh = &fi->fib_nh[nhsel]; in netdev_switch_get_dev_by_nhs()
313 int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi, in netdev_switch_fib_ipv4_add() argument
325 if (fi->fib_net->ipv4.fib_has_custom_rules) in netdev_switch_fib_ipv4_add()
329 if (fi->fib_net->ipv4.fib_offload_disabled) in netdev_switch_fib_ipv4_add()
332 dev = netdev_switch_get_dev_by_nhs(fi); in netdev_switch_fib_ipv4_add()
339 fi, tos, type, nlflags, in netdev_switch_fib_ipv4_add()
342 fi->fib_flags |= RTNH_F_OFFLOAD; in netdev_switch_fib_ipv4_add()
361 int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, in netdev_switch_fib_ipv4_del() argument
368 if (!(fi->fib_flags & RTNH_F_OFFLOAD)) in netdev_switch_fib_ipv4_del()
371 dev = netdev_switch_get_dev_by_nhs(fi); in netdev_switch_fib_ipv4_del()
378 fi, tos, type, tb_id); in netdev_switch_fib_ipv4_del()
380 fi->fib_flags &= ~RTNH_F_OFFLOAD; in netdev_switch_fib_ipv4_del()
392 void netdev_switch_fib_ipv4_abort(struct fib_info *fi) in netdev_switch_fib_ipv4_abort() argument
402 fib_flush_external(fi->fib_net); in netdev_switch_fib_ipv4_abort()
403 fi->fib_net->ipv4.fib_offload_disabled = true; in netdev_switch_fib_ipv4_abort()