Lines Matching refs:idev
67 struct inet6_dev *idev; in ipv6_sock_ac_join() local
114 idev = __in6_dev_get(dev); in ipv6_sock_ac_join()
115 if (!idev) { in ipv6_sock_ac_join()
123 ishost = !idev->cnf.forwarding; in ipv6_sock_ac_join()
139 err = __ipv6_dev_ac_inc(idev, addr); in ipv6_sock_ac_join()
284 int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr) in __ipv6_dev_ac_inc() argument
293 write_lock_bh(&idev->lock); in __ipv6_dev_ac_inc()
294 if (idev->dead) { in __ipv6_dev_ac_inc()
299 for (aca = idev->ac_list; aca; aca = aca->aca_next) { in __ipv6_dev_ac_inc()
307 net = dev_net(idev->dev); in __ipv6_dev_ac_inc()
308 f6i = addrconf_f6i_alloc(net, idev, addr, true, GFP_ATOMIC); in __ipv6_dev_ac_inc()
320 aca->aca_next = idev->ac_list; in __ipv6_dev_ac_inc()
321 idev->ac_list = aca; in __ipv6_dev_ac_inc()
327 write_unlock_bh(&idev->lock); in __ipv6_dev_ac_inc()
333 addrconf_join_solict(idev->dev, &aca->aca_addr); in __ipv6_dev_ac_inc()
338 write_unlock_bh(&idev->lock); in __ipv6_dev_ac_inc()
345 int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr) in __ipv6_dev_ac_dec() argument
351 write_lock_bh(&idev->lock); in __ipv6_dev_ac_dec()
353 for (aca = idev->ac_list; aca; aca = aca->aca_next) { in __ipv6_dev_ac_dec()
359 write_unlock_bh(&idev->lock); in __ipv6_dev_ac_dec()
363 write_unlock_bh(&idev->lock); in __ipv6_dev_ac_dec()
369 idev->ac_list = aca->aca_next; in __ipv6_dev_ac_dec()
370 write_unlock_bh(&idev->lock); in __ipv6_dev_ac_dec()
372 addrconf_leave_solict(idev, &aca->aca_addr); in __ipv6_dev_ac_dec()
374 ip6_del_rt(dev_net(idev->dev), aca->aca_rt, false); in __ipv6_dev_ac_dec()
383 struct inet6_dev *idev = __in6_dev_get(dev); in ipv6_dev_ac_dec() local
385 if (!idev) in ipv6_dev_ac_dec()
387 return __ipv6_dev_ac_dec(idev, addr); in ipv6_dev_ac_dec()
390 void ipv6_ac_destroy_dev(struct inet6_dev *idev) in ipv6_ac_destroy_dev() argument
394 write_lock_bh(&idev->lock); in ipv6_ac_destroy_dev()
395 while ((aca = idev->ac_list) != NULL) { in ipv6_ac_destroy_dev()
396 idev->ac_list = aca->aca_next; in ipv6_ac_destroy_dev()
397 write_unlock_bh(&idev->lock); in ipv6_ac_destroy_dev()
401 addrconf_leave_solict(idev, &aca->aca_addr); in ipv6_ac_destroy_dev()
403 ip6_del_rt(dev_net(idev->dev), aca->aca_rt, false); in ipv6_ac_destroy_dev()
407 write_lock_bh(&idev->lock); in ipv6_ac_destroy_dev()
409 write_unlock_bh(&idev->lock); in ipv6_ac_destroy_dev()
418 struct inet6_dev *idev; in ipv6_chk_acast_dev() local
421 idev = __in6_dev_get(dev); in ipv6_chk_acast_dev()
422 if (idev) { in ipv6_chk_acast_dev()
423 read_lock_bh(&idev->lock); in ipv6_chk_acast_dev()
424 for (aca = idev->ac_list; aca; aca = aca->aca_next) in ipv6_chk_acast_dev()
427 read_unlock_bh(&idev->lock); in ipv6_chk_acast_dev()
480 struct inet6_dev *idev; member
491 state->idev = NULL; in ac6_get_first()
493 struct inet6_dev *idev; in ac6_get_first() local
494 idev = __in6_dev_get(state->dev); in ac6_get_first()
495 if (!idev) in ac6_get_first()
497 read_lock_bh(&idev->lock); in ac6_get_first()
498 im = idev->ac_list; in ac6_get_first()
500 state->idev = idev; in ac6_get_first()
503 read_unlock_bh(&idev->lock); in ac6_get_first()
514 if (likely(state->idev != NULL)) in ac6_get_next()
515 read_unlock_bh(&state->idev->lock); in ac6_get_next()
519 state->idev = NULL; in ac6_get_next()
522 state->idev = __in6_dev_get(state->dev); in ac6_get_next()
523 if (!state->idev) in ac6_get_next()
525 read_lock_bh(&state->idev->lock); in ac6_get_next()
526 im = state->idev->ac_list; in ac6_get_next()
560 if (likely(state->idev != NULL)) { in ac6_seq_stop()
561 read_unlock_bh(&state->idev->lock); in ac6_seq_stop()
562 state->idev = NULL; in ac6_seq_stop()