Lines Matching refs:nc

67  * batadv_nc_start_timer() - initialise the nc periodic worker
72 queue_delayed_work(batadv_event_workqueue, &bat_priv->nc.work,
111 * batadv_nc_tvlv_ogm_handler_v1() - process incoming nc tvlv container
137 bat_priv->nc.timestamp_fwd_flush = jiffies;
138 bat_priv->nc.timestamp_sniffed_purge = jiffies;
140 if (bat_priv->nc.coding_hash || bat_priv->nc.decoding_hash)
143 bat_priv->nc.coding_hash = batadv_hash_new(128);
144 if (!bat_priv->nc.coding_hash)
147 batadv_hash_set_lock_class(bat_priv->nc.coding_hash,
150 bat_priv->nc.decoding_hash = batadv_hash_new(128);
151 if (!bat_priv->nc.decoding_hash) {
152 batadv_hash_destroy(bat_priv->nc.coding_hash);
156 batadv_hash_set_lock_class(bat_priv->nc.decoding_hash,
159 INIT_DELAYED_WORK(&bat_priv->nc.work, batadv_nc_worker);
173 * batadv_nc_init_bat_priv() - initialise the nc specific bat_priv variables
179 bat_priv->nc.min_tq = 200;
180 bat_priv->nc.max_fwd_delay = 10;
181 bat_priv->nc.max_buffer_time = 200;
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);
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);
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;
609 /* purge nc packet */
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;
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);
720 batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash,
722 batadv_nc_purge_paths(bat_priv, bat_priv->nc.decoding_hash,
725 timeout = bat_priv->nc.max_fwd_delay;
727 if (batadv_has_timed_out(bat_priv->nc.timestamp_fwd_flush, timeout)) {
728 batadv_nc_process_nc_paths(bat_priv, bat_priv->nc.coding_hash,
730 bat_priv->nc.timestamp_fwd_flush = jiffies;
733 if (batadv_has_timed_out(bat_priv->nc.timestamp_sniffed_purge,
734 bat_priv->nc.max_buffer_time)) {
735 batadv_nc_process_nc_paths(bat_priv, bat_priv->nc.decoding_hash,
737 bat_priv->nc.timestamp_sniffed_purge = jiffies;
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)
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;
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,
1571 bat_priv->nc.decoding_hash,
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;
1867 cancel_delayed_work_sync(&bat_priv->nc.work);
1869 batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, NULL);
1870 batadv_hash_destroy(bat_priv->nc.coding_hash);
1871 batadv_nc_purge_paths(bat_priv, bat_priv->nc.decoding_hash, NULL);
1872 batadv_hash_destroy(bat_priv->nc.decoding_hash);