Lines Matching refs:nc

74  * batadv_nc_start_timer() - initialise the nc periodic worker
79 queue_delayed_work(batadv_event_workqueue, &bat_priv->nc.work,
118 * batadv_nc_tvlv_ogm_handler_v1() - process incoming nc tvlv container
144 bat_priv->nc.timestamp_fwd_flush = jiffies;
145 bat_priv->nc.timestamp_sniffed_purge = jiffies;
147 if (bat_priv->nc.coding_hash || bat_priv->nc.decoding_hash)
150 bat_priv->nc.coding_hash = batadv_hash_new(128);
151 if (!bat_priv->nc.coding_hash)
154 batadv_hash_set_lock_class(bat_priv->nc.coding_hash,
157 bat_priv->nc.decoding_hash = batadv_hash_new(128);
158 if (!bat_priv->nc.decoding_hash) {
159 batadv_hash_destroy(bat_priv->nc.coding_hash);
163 batadv_hash_set_lock_class(bat_priv->nc.decoding_hash,
166 INIT_DELAYED_WORK(&bat_priv->nc.work, batadv_nc_worker);
180 * batadv_nc_init_bat_priv() - initialise the nc specific bat_priv variables
186 bat_priv->nc.min_tq = 200;
187 bat_priv->nc.max_fwd_delay = 10;
188 bat_priv->nc.max_buffer_time = 200;
192 * batadv_nc_init_orig() - initialise the nc fields of an orig_node
259 * batadv_nc_packet_free() - frees nc packet
260 * @nc_packet: the nc packet to free
276 * batadv_nc_to_purge_nc_node() - checks whether an nc node has to be purged
278 * @nc_node: the nc node to check
292 * batadv_nc_to_purge_nc_path_coding() - checks whether an nc path has timed out
294 * @nc_path: the nc path to check
308 bat_priv->nc.max_fwd_delay * 10);
312 * batadv_nc_to_purge_nc_path_decoding() - checks whether an nc path has timed
315 * @nc_path: the nc path to check
329 bat_priv->nc.max_buffer_time * 10);
333 * batadv_nc_purge_orig_nc_nodes() - go through list of nc nodes and purge stale
336 * @list: list of nc nodes
337 * @lock: nc node list lock
339 * not. This function takes the nc node as argument and has to return
371 * batadv_nc_purge_orig() - purges all nc node data attached of the given
374 * @orig_node: orig_node with the nc node entries to be purged
376 * not. This function takes the nc node as argument and has to return
398 * they have timed out nc nodes
424 * batadv_nc_purge_paths() - traverse all nc paths part of the hash and remove
427 * @hash: hash table containing the nc paths to check
429 * not. This function takes the nc node as argument and has to return
496 * batadv_nc_hash_choose() - compute the hash value for an nc path
540 * batadv_nc_hash_find() - search for an existing nc path and return it
541 * @hash: hash table containing the nc path
578 * @nc_packet: the nc packet to send
590 * @nc_path: the nc path the packet belongs to
591 * @nc_packet: the nc packet to be checked
604 unsigned long timeout = bat_priv->nc.max_buffer_time;
616 /* purge nc packet */
627 * batadv_nc_fwd_flush() - Checks the timestamp of the given nc packet.
629 * @nc_path: the nc path the packet belongs to
630 * @nc_packet: the nc packet to be checked
632 * Checks whether the given nc packet has hit its forward timeout. If so, the
643 unsigned long timeout = bat_priv->nc.max_fwd_delay;
665 * batadv_nc_process_nc_paths() - traverse given nc packet pool and free timed
666 * out nc packets
669 * @process_fn: Function called to process given nc packet. Should return true
724 bat_priv = container_of(priv_nc, struct batadv_priv, nc);
727 batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash,
729 batadv_nc_purge_paths(bat_priv, bat_priv->nc.decoding_hash,
732 timeout = bat_priv->nc.max_fwd_delay;
734 if (batadv_has_timed_out(bat_priv->nc.timestamp_fwd_flush, timeout)) {
735 batadv_nc_process_nc_paths(bat_priv, bat_priv->nc.coding_hash,
737 bat_priv->nc.timestamp_fwd_flush = jiffies;
740 if (batadv_has_timed_out(bat_priv->nc.timestamp_sniffed_purge,
741 bat_priv->nc.max_buffer_time)) {
742 batadv_nc_process_nc_paths(bat_priv, bat_priv->nc.decoding_hash,
744 bat_priv->nc.timestamp_sniffed_purge = jiffies;
755 * @orig_node: neighboring orig node which may be used as nc candidate
762 * 4) The TQ value of the OGM must be above bat_priv->nc.min_tq.
786 if (ogm_packet->tq < bat_priv->nc.min_tq)
793 * batadv_nc_find_nc_node() - search for an existing nc node and return it
833 * batadv_nc_get_nc_node() - retrieves an nc node or creates the entry if it was
896 * batadv_nc_update_nc_node() - updates stored incoming and outgoing nc node
953 * @hash: hash table containing the nc path
954 * @src: ethernet source address - first half of the nc path search key
955 * @dst: ethernet destination address - second half of the nc path search key
1042 * batadv_nc_code_packets() - code a received unicast_packet with an nc packet
1262 * @in_nc_node: pointer to skb next hop's neighbor nc node
1263 * @out_nc_node: pointer to skb source's neighbor nc node
1279 struct batadv_hashtable *hash = bat_priv->nc.coding_hash;
1333 * @in_nc_node: pointer to skb next hop's neighbor nc node
1335 * Return: an nc packet if a suitable coding packet was found, NULL otherwise.
1535 bat_priv->nc.coding_hash,
1584 bat_priv->nc.decoding_hash,
1739 * Return: pointer to nc packet if the needed data was found or NULL otherwise.
1746 struct batadv_hashtable *hash = bat_priv->nc.decoding_hash;
1880 cancel_delayed_work_sync(&bat_priv->nc.work);
1882 batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, NULL);
1883 batadv_hash_destroy(bat_priv->nc.coding_hash);
1884 batadv_nc_purge_paths(bat_priv, bat_priv->nc.decoding_hash, NULL);
1885 batadv_hash_destroy(bat_priv->nc.decoding_hash);
1890 * batadv_nc_nodes_seq_print_text() - print the nc node information
1953 * batadv_nc_init_debugfs() - create nc folder and related files in debugfs
1960 nc_dir = debugfs_create_dir("nc", bat_priv->debug_dir);
1962 debugfs_create_u8("min_tq", 0644, nc_dir, &bat_priv->nc.min_tq);
1965 &bat_priv->nc.max_fwd_delay);
1968 &bat_priv->nc.max_buffer_time);