Searched refs:orig_ifinfo (Results 1 - 5 of 5) sorted by relevance

/linux-4.1.27/net/batman-adv/
H A Doriginator.c221 struct batadv_orig_ifinfo *orig_ifinfo; batadv_orig_router_get() local
225 hlist_for_each_entry_rcu(orig_ifinfo, &orig_node->ifinfo_list, list) { batadv_orig_router_get()
226 if (orig_ifinfo->if_outgoing != if_outgoing) batadv_orig_router_get()
229 router = rcu_dereference(orig_ifinfo->router); batadv_orig_router_get()
245 * Returns the requested orig_ifinfo or NULL if not found.
253 struct batadv_orig_ifinfo *tmp, *orig_ifinfo = NULL; batadv_orig_ifinfo_get() local
264 orig_ifinfo = tmp; batadv_orig_ifinfo_get()
269 return orig_ifinfo; batadv_orig_ifinfo_get()
273 * batadv_orig_ifinfo_new - search and possibly create an orig_ifinfo object
277 * Returns NULL in case of failure or the orig_ifinfo object for the if_outgoing
287 struct batadv_orig_ifinfo *orig_ifinfo = NULL; batadv_orig_ifinfo_new() local
292 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, if_outgoing); batadv_orig_ifinfo_new()
293 if (orig_ifinfo) batadv_orig_ifinfo_new()
296 orig_ifinfo = kzalloc(sizeof(*orig_ifinfo), GFP_ATOMIC); batadv_orig_ifinfo_new()
297 if (!orig_ifinfo) batadv_orig_ifinfo_new()
302 kfree(orig_ifinfo); batadv_orig_ifinfo_new()
303 orig_ifinfo = NULL; batadv_orig_ifinfo_new()
309 orig_ifinfo->batman_seqno_reset = reset_time; batadv_orig_ifinfo_new()
310 orig_ifinfo->if_outgoing = if_outgoing; batadv_orig_ifinfo_new()
311 INIT_HLIST_NODE(&orig_ifinfo->list); batadv_orig_ifinfo_new()
312 atomic_set(&orig_ifinfo->refcount, 2); batadv_orig_ifinfo_new()
313 hlist_add_head_rcu(&orig_ifinfo->list, batadv_orig_ifinfo_new()
317 return orig_ifinfo; batadv_orig_ifinfo_new()
470 * batadv_orig_ifinfo_release - release orig_ifinfo from lists and queue for
472 * @orig_ifinfo: the orig_ifinfo object to release
474 static void batadv_orig_ifinfo_release(struct batadv_orig_ifinfo *orig_ifinfo) batadv_orig_ifinfo_release() argument
478 if (orig_ifinfo->if_outgoing != BATADV_IF_DEFAULT) batadv_orig_ifinfo_release()
479 batadv_hardif_free_ref(orig_ifinfo->if_outgoing); batadv_orig_ifinfo_release()
482 router = rcu_dereference_protected(orig_ifinfo->router, true); batadv_orig_ifinfo_release()
486 kfree_rcu(orig_ifinfo, rcu); batadv_orig_ifinfo_release()
491 * the orig_ifinfo
492 * @orig_ifinfo: the orig_ifinfo object to release
494 void batadv_orig_ifinfo_free_ref(struct batadv_orig_ifinfo *orig_ifinfo) batadv_orig_ifinfo_free_ref() argument
496 if (atomic_dec_and_test(&orig_ifinfo->refcount)) batadv_orig_ifinfo_free_ref()
497 batadv_orig_ifinfo_release(orig_ifinfo); batadv_orig_ifinfo_free_ref()
530 struct batadv_orig_ifinfo *orig_ifinfo; batadv_orig_node_release() local
541 hlist_for_each_entry_safe(orig_ifinfo, node_tmp, batadv_orig_node_release()
543 hlist_del_rcu(&orig_ifinfo->list); batadv_orig_node_release()
544 batadv_orig_ifinfo_free_ref(orig_ifinfo); batadv_orig_node_release()
727 struct batadv_orig_ifinfo *orig_ifinfo; batadv_purge_orig_ifinfo() local
735 hlist_for_each_entry_safe(orig_ifinfo, node_tmp, batadv_purge_orig_ifinfo()
737 if_outgoing = orig_ifinfo->if_outgoing; batadv_purge_orig_ifinfo()
755 hlist_del_rcu(&orig_ifinfo->list); batadv_purge_orig_ifinfo()
756 batadv_orig_ifinfo_free_ref(orig_ifinfo); batadv_purge_orig_ifinfo()
757 if (orig_node->last_bonding_candidate == orig_ifinfo) { batadv_purge_orig_ifinfo()
759 batadv_orig_ifinfo_free_ref(orig_ifinfo); batadv_purge_orig_ifinfo()
H A Dbat_iv_ogm.c960 * @orig_ifinfo: ifinfo for the outgoing interface of the orig_node
970 struct batadv_orig_ifinfo *orig_ifinfo, batadv_iv_ogm_orig_update()
1057 orig_ifinfo->last_ttl = batadv_ogm_packet->ttl; batadv_iv_ogm_orig_update()
1279 struct batadv_orig_ifinfo *orig_ifinfo = NULL; batadv_iv_ogm_update_seqnos() local
1296 orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); batadv_iv_ogm_update_seqnos()
1297 if (WARN_ON(!orig_ifinfo)) { batadv_iv_ogm_update_seqnos()
1303 seq_diff = seqno - orig_ifinfo->last_real_seqno; batadv_iv_ogm_update_seqnos()
1308 &orig_ifinfo->batman_seqno_reset)) { batadv_iv_ogm_update_seqnos()
1322 orig_ifinfo->last_real_seqno, batadv_iv_ogm_update_seqnos()
1352 orig_ifinfo->last_real_seqno, seqno); batadv_iv_ogm_update_seqnos()
1353 orig_ifinfo->last_real_seqno = seqno; batadv_iv_ogm_update_seqnos()
1359 if (orig_ifinfo) batadv_iv_ogm_update_seqnos()
1360 batadv_orig_ifinfo_free_ref(orig_ifinfo); batadv_iv_ogm_update_seqnos()
1381 struct batadv_orig_ifinfo *orig_ifinfo; batadv_iv_ogm_process_per_outif() local
1483 orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); batadv_iv_ogm_process_per_outif()
1484 if (!orig_ifinfo) batadv_iv_ogm_process_per_outif()
1487 sameseq = orig_ifinfo->last_real_seqno == ntohl(ogm_packet->seqno); batadv_iv_ogm_process_per_outif()
1488 similar_ttl = (orig_ifinfo->last_ttl - 3) <= ogm_packet->ttl; batadv_iv_ogm_process_per_outif()
1493 orig_ifinfo, ethhdr, batadv_iv_ogm_process_per_outif()
1497 batadv_orig_ifinfo_free_ref(orig_ifinfo); batadv_iv_ogm_process_per_outif()
968 batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, struct batadv_orig_ifinfo *orig_ifinfo, const struct ethhdr *ethhdr, const struct batadv_ogm_packet *batadv_ogm_packet, struct batadv_hard_iface *if_incoming, struct batadv_hard_iface *if_outgoing, enum batadv_dup_status dup_status) batadv_iv_ogm_orig_update() argument
H A Doriginator.h56 void batadv_orig_ifinfo_free_ref(struct batadv_orig_ifinfo *orig_ifinfo);
H A Drouting.c50 struct batadv_orig_ifinfo *orig_ifinfo; _batadv_update_route() local
53 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, recv_if); _batadv_update_route()
54 if (!orig_ifinfo) _batadv_update_route()
58 curr_router = rcu_dereference(orig_ifinfo->router); _batadv_update_route()
91 rcu_assign_pointer(orig_ifinfo->router, neigh_node); _batadv_update_route()
93 batadv_orig_ifinfo_free_ref(orig_ifinfo); _batadv_update_route()
H A Dnetwork-coding.c720 struct batadv_orig_ifinfo *orig_ifinfo; batadv_can_nc_with_orig() local
724 orig_ifinfo = batadv_orig_ifinfo_get(orig_node, BATADV_IF_DEFAULT); batadv_can_nc_with_orig()
725 if (!orig_ifinfo) batadv_can_nc_with_orig()
728 last_ttl = orig_ifinfo->last_ttl; batadv_can_nc_with_orig()
729 last_real_seqno = orig_ifinfo->last_real_seqno; batadv_can_nc_with_orig()
730 batadv_orig_ifinfo_free_ref(orig_ifinfo); batadv_can_nc_with_orig()

Completed in 102 milliseconds