Lines Matching refs:ilan
27 static int alloc_ila_locks(struct ila_net *ilan) in alloc_ila_locks() argument
29 return alloc_bucket_spinlocks(&ilan->xlat.locks, &ilan->xlat.locks_mask, in alloc_ila_locks()
48 static inline spinlock_t *ila_get_lock(struct ila_net *ilan, in ila_get_lock() argument
51 return &ilan->xlat.locks[ila_locator_hash(loc) & ilan->xlat.locks_mask]; in ila_get_lock()
128 struct ila_net *ilan) in ila_lookup_wildcards() argument
132 ila = rhashtable_lookup_fast(&ilan->xlat.rhash_table, &iaddr->loc, in ila_lookup_wildcards()
145 struct ila_net *ilan) in ila_lookup_by_params() argument
149 ila = rhashtable_lookup_fast(&ilan->xlat.rhash_table, in ila_lookup_by_params()
205 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_add_mapping() local
207 spinlock_t *lock = ila_get_lock(ilan, xp->ip.locator_match); in ila_add_mapping()
210 if (!ilan->xlat.hooks_registered) { in ila_add_mapping()
219 ilan->xlat.hooks_registered = true; in ila_add_mapping()
234 head = rhashtable_lookup_fast(&ilan->xlat.rhash_table, in ila_add_mapping()
239 err = rhashtable_lookup_insert_fast(&ilan->xlat.rhash_table, in ila_add_mapping()
265 err = rhashtable_replace_fast(&ilan->xlat.rhash_table, in ila_add_mapping()
284 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_del_mapping() local
286 spinlock_t *lock = ila_get_lock(ilan, xp->ip.locator_match); in ila_del_mapping()
291 head = rhashtable_lookup_fast(&ilan->xlat.rhash_table, in ila_del_mapping()
321 &ilan->xlat.rhash_table, &ila->node, in ila_del_mapping()
328 &ilan->xlat.rhash_table, in ila_del_mapping()
372 static inline spinlock_t *lock_from_ila_map(struct ila_net *ilan, in lock_from_ila_map() argument
375 return ila_get_lock(ilan, ila->xp.ip.locator_match); in lock_from_ila_map()
381 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_nl_cmd_flush() local
387 rhashtable_walk_enter(&ilan->xlat.rhash_table, &iter); in ila_xlat_nl_cmd_flush()
402 lock = lock_from_ila_map(ilan, ila); in ila_xlat_nl_cmd_flush()
406 ret = rhashtable_remove_fast(&ilan->xlat.rhash_table, in ila_xlat_nl_cmd_flush()
463 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_nl_cmd_get_mapping() local
480 ila = ila_lookup_by_params(&xp, ilan); in ila_xlat_nl_cmd_get_mapping()
508 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_nl_dump_start() local
515 rhashtable_walk_enter(&ilan->xlat.rhash_table, &iter->rhiter); in ila_xlat_nl_dump_start()
606 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_init_net() local
609 err = alloc_ila_locks(ilan); in ila_xlat_init_net()
613 err = rhashtable_init(&ilan->xlat.rhash_table, &rht_params); in ila_xlat_init_net()
615 free_bucket_spinlocks(ilan->xlat.locks); in ila_xlat_init_net()
624 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_pre_exit_net() local
626 if (ilan->xlat.hooks_registered) in ila_xlat_pre_exit_net()
633 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_exit_net() local
635 rhashtable_free_and_destroy(&ilan->xlat.rhash_table, ila_free_cb, NULL); in ila_xlat_exit_net()
637 free_bucket_spinlocks(ilan->xlat.locks); in ila_xlat_exit_net()
645 struct ila_net *ilan = net_generic(net, ila_net_id); in ila_xlat_addr() local
657 ila = ila_lookup_wildcards(iaddr, skb->dev->ifindex, ilan); in ila_xlat_addr()