Lines Matching full:nc
67 * batadv_nc_start_timer() - initialise the nc periodic worker
72 queue_delayed_work(batadv_event_workqueue, &bat_priv->nc.work, in batadv_nc_start_timer()
111 * batadv_nc_tvlv_ogm_handler_v1() - process incoming nc tvlv container
137 bat_priv->nc.timestamp_fwd_flush = jiffies; in batadv_nc_mesh_init()
138 bat_priv->nc.timestamp_sniffed_purge = jiffies; in batadv_nc_mesh_init()
140 if (bat_priv->nc.coding_hash || bat_priv->nc.decoding_hash) in batadv_nc_mesh_init()
143 bat_priv->nc.coding_hash = batadv_hash_new(128); in batadv_nc_mesh_init()
144 if (!bat_priv->nc.coding_hash) in batadv_nc_mesh_init()
147 batadv_hash_set_lock_class(bat_priv->nc.coding_hash, in batadv_nc_mesh_init()
150 bat_priv->nc.decoding_hash = batadv_hash_new(128); in batadv_nc_mesh_init()
151 if (!bat_priv->nc.decoding_hash) { in batadv_nc_mesh_init()
152 batadv_hash_destroy(bat_priv->nc.coding_hash); in batadv_nc_mesh_init()
156 batadv_hash_set_lock_class(bat_priv->nc.decoding_hash, in batadv_nc_mesh_init()
159 INIT_DELAYED_WORK(&bat_priv->nc.work, batadv_nc_worker); in batadv_nc_mesh_init()
173 * batadv_nc_init_bat_priv() - initialise the nc specific bat_priv variables
179 bat_priv->nc.min_tq = 200; in batadv_nc_init_bat_priv()
180 bat_priv->nc.max_fwd_delay = 10; in batadv_nc_init_bat_priv()
181 bat_priv->nc.max_buffer_time = 200; in batadv_nc_init_bat_priv()
185 * batadv_nc_init_orig() - initialise the nc fields of an orig_node
252 * batadv_nc_packet_free() - frees nc packet
253 * @nc_packet: the nc packet to free
269 * batadv_nc_to_purge_nc_node() - checks whether an nc node has to be purged
271 * @nc_node: the nc node to check
285 * batadv_nc_to_purge_nc_path_coding() - checks whether an nc path has timed out
287 * @nc_path: the nc path to check
301 bat_priv->nc.max_fwd_delay * 10); in batadv_nc_to_purge_nc_path_coding()
305 * batadv_nc_to_purge_nc_path_decoding() - checks whether an nc path has timed
308 * @nc_path: the nc path to check
322 bat_priv->nc.max_buffer_time * 10); in batadv_nc_to_purge_nc_path_decoding()
326 * batadv_nc_purge_orig_nc_nodes() - go through list of nc nodes and purge stale
329 * @list: list of nc nodes
330 * @lock: nc node list lock
332 * not. This function takes the nc node as argument and has to return
364 * batadv_nc_purge_orig() - purges all nc node data attached of the given
367 * @orig_node: orig_node with the nc node entries to be purged
369 * not. This function takes the nc node as argument and has to return
391 * they have timed out nc nodes
417 * batadv_nc_purge_paths() - traverse all nc paths part of the hash and remove
420 * @hash: hash table containing the nc paths to check
422 * not. This function takes the nc node as argument and has to return
489 * batadv_nc_hash_choose() - compute the hash value for an nc path
533 * batadv_nc_hash_find() - search for an existing nc path and return it
534 * @hash: hash table containing the nc path
571 * @nc_packet: the nc packet to send
583 * @nc_path: the nc path the packet belongs to
584 * @nc_packet: the nc packet to be checked
597 unsigned long timeout = bat_priv->nc.max_buffer_time; in batadv_nc_sniffed_purge()
609 /* purge nc packet */ in batadv_nc_sniffed_purge()
620 * batadv_nc_fwd_flush() - Checks the timestamp of the given nc packet.
622 * @nc_path: the nc path the packet belongs to
623 * @nc_packet: the nc packet to be checked
625 * Checks whether the given nc packet has hit its forward timeout. If so, the
636 unsigned long timeout = bat_priv->nc.max_fwd_delay; in batadv_nc_fwd_flush()
658 * batadv_nc_process_nc_paths() - traverse given nc packet pool and free timed
659 * out nc packets
662 * @process_fn: Function called to process given nc packet. Should return true
717 bat_priv = container_of(priv_nc, struct batadv_priv, nc); in batadv_nc_worker()
720 batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, in batadv_nc_worker()
722 batadv_nc_purge_paths(bat_priv, bat_priv->nc.decoding_hash, in batadv_nc_worker()
725 timeout = bat_priv->nc.max_fwd_delay; in batadv_nc_worker()
727 if (batadv_has_timed_out(bat_priv->nc.timestamp_fwd_flush, timeout)) { in batadv_nc_worker()
728 batadv_nc_process_nc_paths(bat_priv, bat_priv->nc.coding_hash, in batadv_nc_worker()
730 bat_priv->nc.timestamp_fwd_flush = jiffies; in batadv_nc_worker()
733 if (batadv_has_timed_out(bat_priv->nc.timestamp_sniffed_purge, in batadv_nc_worker()
734 bat_priv->nc.max_buffer_time)) { in batadv_nc_worker()
735 batadv_nc_process_nc_paths(bat_priv, bat_priv->nc.decoding_hash, in batadv_nc_worker()
737 bat_priv->nc.timestamp_sniffed_purge = jiffies; in batadv_nc_worker()
748 * @orig_node: neighboring orig node which may be used as nc candidate
755 * 4) The TQ value of the OGM must be above bat_priv->nc.min_tq.
779 if (ogm_packet->tq < bat_priv->nc.min_tq) in batadv_can_nc_with_orig()
786 * batadv_nc_find_nc_node() - search for an existing nc node and return it
826 * batadv_nc_get_nc_node() - retrieves an nc node or creates the entry if it was
889 * batadv_nc_update_nc_node() - updates stored incoming and outgoing nc node
944 * @hash: hash table containing the nc path
945 * @src: ethernet source address - first half of the nc path search key
946 * @dst: ethernet destination address - second half of the nc path search key
1033 * batadv_nc_code_packets() - code a received unicast_packet with an nc packet
1249 * @in_nc_node: pointer to skb next hop's neighbor nc node
1250 * @out_nc_node: pointer to skb source's neighbor nc node
1266 struct batadv_hashtable *hash = bat_priv->nc.coding_hash; in batadv_nc_path_search()
1320 * @in_nc_node: pointer to skb next hop's neighbor nc node
1322 * Return: an nc packet if a suitable coding packet was found, NULL otherwise.
1522 bat_priv->nc.coding_hash, in batadv_nc_skb_forward()
1571 bat_priv->nc.decoding_hash, in batadv_nc_skb_store_for_decoding()
1726 * Return: pointer to nc packet if the needed data was found or NULL otherwise.
1733 struct batadv_hashtable *hash = bat_priv->nc.decoding_hash; in batadv_nc_find_decoding_packet()
1867 cancel_delayed_work_sync(&bat_priv->nc.work); in batadv_nc_mesh_free()
1869 batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, NULL); in batadv_nc_mesh_free()
1870 batadv_hash_destroy(bat_priv->nc.coding_hash); in batadv_nc_mesh_free()
1871 batadv_nc_purge_paths(bat_priv, bat_priv->nc.decoding_hash, NULL); in batadv_nc_mesh_free()
1872 batadv_hash_destroy(bat_priv->nc.decoding_hash); in batadv_nc_mesh_free()