Searched refs:neigh_ifinfo (Results 1 - 3 of 3) sorted by relevance
/linux-4.1.27/net/batman-adv/ |
H A D | originator.c | 153 * batadv_neigh_ifinfo_release - release neigh_ifinfo from lists and queue for 155 * @neigh_ifinfo: the neigh_ifinfo object to release 158 batadv_neigh_ifinfo_release(struct batadv_neigh_ifinfo *neigh_ifinfo) batadv_neigh_ifinfo_release() argument 160 if (neigh_ifinfo->if_outgoing != BATADV_IF_DEFAULT) batadv_neigh_ifinfo_release() 161 batadv_hardif_free_ref(neigh_ifinfo->if_outgoing); batadv_neigh_ifinfo_release() 163 kfree_rcu(neigh_ifinfo, rcu); batadv_neigh_ifinfo_release() 168 * the neigh_ifinfo 169 * @neigh_ifinfo: the neigh_ifinfo object to release 171 void batadv_neigh_ifinfo_free_ref(struct batadv_neigh_ifinfo *neigh_ifinfo) batadv_neigh_ifinfo_free_ref() argument 173 if (atomic_dec_and_test(&neigh_ifinfo->refcount)) batadv_neigh_ifinfo_free_ref() 174 batadv_neigh_ifinfo_release(neigh_ifinfo); batadv_neigh_ifinfo_free_ref() 185 struct batadv_neigh_ifinfo *neigh_ifinfo; batadv_neigh_node_release() local 187 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, batadv_neigh_node_release() 189 batadv_neigh_ifinfo_free_ref(neigh_ifinfo); batadv_neigh_node_release() 327 * Returns the requested neigh_ifinfo or NULL if not found 333 struct batadv_neigh_ifinfo *neigh_ifinfo = NULL, batadv_neigh_ifinfo_get() local 345 neigh_ifinfo = tmp_neigh_ifinfo; batadv_neigh_ifinfo_get() 350 return neigh_ifinfo; batadv_neigh_ifinfo_get() 354 * batadv_neigh_ifinfo_new - search and possibly create an neigh_ifinfo object 358 * Returns NULL in case of failure or the neigh_ifinfo object for the 368 struct batadv_neigh_ifinfo *neigh_ifinfo; batadv_neigh_ifinfo_new() local 372 neigh_ifinfo = batadv_neigh_ifinfo_get(neigh, if_outgoing); batadv_neigh_ifinfo_new() 373 if (neigh_ifinfo) batadv_neigh_ifinfo_new() 376 neigh_ifinfo = kzalloc(sizeof(*neigh_ifinfo), GFP_ATOMIC); batadv_neigh_ifinfo_new() 377 if (!neigh_ifinfo) batadv_neigh_ifinfo_new() 381 kfree(neigh_ifinfo); batadv_neigh_ifinfo_new() 382 neigh_ifinfo = NULL; batadv_neigh_ifinfo_new() 386 INIT_HLIST_NODE(&neigh_ifinfo->list); batadv_neigh_ifinfo_new() 387 atomic_set(&neigh_ifinfo->refcount, 2); batadv_neigh_ifinfo_new() 388 neigh_ifinfo->if_outgoing = if_outgoing; batadv_neigh_ifinfo_new() 390 hlist_add_head_rcu(&neigh_ifinfo->list, &neigh->ifinfo_list); batadv_neigh_ifinfo_new() 395 return neigh_ifinfo; batadv_neigh_ifinfo_new() 684 struct batadv_neigh_ifinfo *neigh_ifinfo; batadv_purge_neigh_ifinfo() local 691 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, batadv_purge_neigh_ifinfo() 693 if_outgoing = neigh_ifinfo->if_outgoing; batadv_purge_neigh_ifinfo() 709 hlist_del_rcu(&neigh_ifinfo->list); batadv_purge_neigh_ifinfo() 710 batadv_neigh_ifinfo_free_ref(neigh_ifinfo); batadv_purge_neigh_ifinfo()
|
H A D | bat_iv_ogm.c | 977 struct batadv_neigh_ifinfo *neigh_ifinfo = NULL; batadv_iv_ogm_orig_update() local 1007 neigh_ifinfo = batadv_neigh_ifinfo_get(tmp_neigh_node, batadv_iv_ogm_orig_update() 1009 if (!neigh_ifinfo) batadv_iv_ogm_orig_update() 1013 batadv_ring_buffer_set(neigh_ifinfo->bat_iv.tq_recv, batadv_iv_ogm_orig_update() 1014 &neigh_ifinfo->bat_iv.tq_index, 0); batadv_iv_ogm_orig_update() 1015 tq_avg = batadv_ring_buffer_avg(neigh_ifinfo->bat_iv.tq_recv); batadv_iv_ogm_orig_update() 1016 neigh_ifinfo->bat_iv.tq_avg = tq_avg; batadv_iv_ogm_orig_update() 1019 batadv_neigh_ifinfo_free_ref(neigh_ifinfo); batadv_iv_ogm_orig_update() 1020 neigh_ifinfo = NULL; batadv_iv_ogm_orig_update() 1042 neigh_ifinfo = batadv_neigh_ifinfo_new(neigh_node, if_outgoing); batadv_iv_ogm_orig_update() 1043 if (!neigh_ifinfo) batadv_iv_ogm_orig_update() 1049 batadv_ring_buffer_set(neigh_ifinfo->bat_iv.tq_recv, batadv_iv_ogm_orig_update() 1050 &neigh_ifinfo->bat_iv.tq_index, batadv_iv_ogm_orig_update() 1052 tq_avg = batadv_ring_buffer_avg(neigh_ifinfo->bat_iv.tq_recv); batadv_iv_ogm_orig_update() 1053 neigh_ifinfo->bat_iv.tq_avg = tq_avg; batadv_iv_ogm_orig_update() 1058 neigh_ifinfo->last_ttl = batadv_ogm_packet->ttl; batadv_iv_ogm_orig_update() 1076 if (router_ifinfo->bat_iv.tq_avg > neigh_ifinfo->bat_iv.tq_avg) batadv_iv_ogm_orig_update() 1084 (neigh_ifinfo->bat_iv.tq_avg == router_ifinfo->bat_iv.tq_avg)) { batadv_iv_ogm_orig_update() 1111 if (neigh_ifinfo) batadv_iv_ogm_orig_update() 1112 batadv_neigh_ifinfo_free_ref(neigh_ifinfo); batadv_iv_ogm_orig_update() 1135 struct batadv_neigh_ifinfo *neigh_ifinfo; batadv_iv_ogm_calc_tq() local 1181 neigh_ifinfo = batadv_neigh_ifinfo_new(neigh_node, if_outgoing); batadv_iv_ogm_calc_tq() 1182 if (neigh_ifinfo) { batadv_iv_ogm_calc_tq() 1183 neigh_rq_count = neigh_ifinfo->bat_iv.real_packet_count; batadv_iv_ogm_calc_tq() 1184 batadv_neigh_ifinfo_free_ref(neigh_ifinfo); batadv_iv_ogm_calc_tq() 1281 struct batadv_neigh_ifinfo *neigh_ifinfo; batadv_iv_ogm_update_seqnos() local 1315 neigh_ifinfo = batadv_neigh_ifinfo_new(neigh_node, batadv_iv_ogm_update_seqnos() 1317 if (!neigh_ifinfo) batadv_iv_ogm_update_seqnos() 1321 is_dup = batadv_test_bit(neigh_ifinfo->bat_iv.real_bits, batadv_iv_ogm_update_seqnos() 1337 bitmap = neigh_ifinfo->bat_iv.real_bits; batadv_iv_ogm_update_seqnos() 1343 neigh_ifinfo->bat_iv.real_packet_count = packet_count; batadv_iv_ogm_update_seqnos() 1344 batadv_neigh_ifinfo_free_ref(neigh_ifinfo); batadv_iv_ogm_update_seqnos()
|
H A D | originator.h | 48 void batadv_neigh_ifinfo_free_ref(struct batadv_neigh_ifinfo *neigh_ifinfo);
|
Completed in 139 milliseconds