Lines Matching full:mesh

16 #include "mesh.h"
79 * mesh_path_assign_nexthop - update mesh path next hop
81 * @mpath: mesh path to update
118 /* size of the fixed part of the mesh header */ in prepare_for_gate()
127 /* we preserve the previous mesh header and only add in prepare_for_gate()
230 * mesh_path_lookup - look up a path in the mesh path table
234 * Returns: pointer to the mesh path structure, or NULL if not found
241 return mpath_lookup(sdata->u.mesh.mesh_paths, dst, sdata); in mesh_path_lookup()
247 return mpath_lookup(sdata->u.mesh.mpp_paths, dst, sdata); in mpp_path_lookup()
273 * mesh_path_lookup_by_idx - look up a path in the mesh path table by its index
277 * Returns: pointer to the mesh path structure, or NULL if not found.
284 return __mesh_path_lookup_by_idx(sdata->u.mesh.mesh_paths, idx); in mesh_path_lookup_by_idx()
299 return __mesh_path_lookup_by_idx(sdata->u.mesh.mpp_paths, idx); in mpp_path_lookup_by_idx()
303 * mesh_path_add_gate - add the given mpath to a mesh gate to our path table
312 tbl = mpath->sdata->u.mesh.mesh_paths; in mesh_path_add_gate()
321 mpath->sdata->u.mesh.num_gates++; in mesh_path_add_gate()
330 "Mesh path: Recorded new gate: %pM. %d known gates\n", in mesh_path_add_gate()
331 mpath->dst, mpath->sdata->u.mesh.num_gates); in mesh_path_add_gate()
339 * mesh_gate_del - remove a mesh gate from the list of known gates
352 mpath->sdata->u.mesh.num_gates--; in mesh_gate_del()
356 "Mesh path: Deleted gate: %pM. %d known gates\n", in mesh_gate_del()
357 mpath->dst, mpath->sdata->u.mesh.num_gates); in mesh_gate_del()
366 return sdata->u.mesh.num_gates; in mesh_gate_num()
393 * mesh_path_add - allocate and add a new path to the mesh path table
414 if (atomic_add_unless(&sdata->u.mesh.mpaths, 1, MESH_MAX_MPATHS) == 0) in mesh_path_add()
421 tbl = sdata->u.mesh.mesh_paths; in mesh_path_add()
439 sdata->u.mesh.mesh_paths_generation++; in mesh_path_add()
463 tbl = sdata->u.mesh.mpp_paths; in mpp_path_add()
476 sdata->u.mesh.mpp_paths_generation++; in mpp_path_add()
492 struct mesh_table *tbl = sdata->u.mesh.mesh_paths; in mesh_plink_broken()
506 sdata->u.mesh.mshcfg.element_ttl, in mesh_plink_broken()
524 atomic_dec(&sdata->u.mesh.mpaths); in mesh_path_free_rcu()
538 * mesh_path_flush_by_nexthop - Deletes mesh paths if their next hop matches
540 * @sta: mesh peer to match
542 * RCU notes: this function is called when a mesh plink transitions from
551 struct mesh_table *tbl = sdata->u.mesh.mesh_paths; in mesh_path_flush_by_nexthop()
566 struct mesh_table *tbl = sdata->u.mesh.mpp_paths; in mpp_flush_by_proxy()
591 * mesh_path_flush_by_iface - Deletes all mesh paths associated with a given iface
593 * This function deletes both mesh paths as well as mesh portal paths.
600 table_flush_by_iface(sdata->u.mesh.mesh_paths); in mesh_path_flush_by_iface()
601 table_flush_by_iface(sdata->u.mesh.mpp_paths); in mesh_path_flush_by_iface()
605 * table_path_del - delete a path from the mesh or mpp table
607 * @tbl: mesh or mpp path table
633 * mesh_path_del - delete a mesh path from the table
647 err = table_path_del(sdata->u.mesh.mesh_paths, sdata, addr); in mesh_path_del()
648 sdata->u.mesh.mesh_paths_generation++; in mesh_path_del()
653 * mesh_path_tx_pending - sends pending frames in a mesh path queue
655 * @mpath: mesh path to activate
668 * mesh_path_send_to_gates - sends pending frames to all known mesh gates
670 * @mpath: mesh path whose queue will be emptied
685 tbl = sdata->u.mesh.mesh_paths; in mesh_path_send_to_gates()
722 sdata->u.mesh.mshstats.dropped_frames_no_route++; in mesh_path_discard_frame()
726 * mesh_path_flush_pending - free the pending queue of a mesh path
728 * @mpath: mesh path whose queue has to be freed
741 * mesh_path_fix_nexthop - force a specific next hop for a mesh path
743 * @mpath: the mesh path to modify
759 ewma_mesh_fail_avg_init(&next_hop->mesh->fail_avg); in mesh_path_fix_nexthop()
761 ewma_mesh_fail_avg_add(&next_hop->mesh->fail_avg, 1); in mesh_path_fix_nexthop()
780 sdata->u.mesh.mesh_paths = tbl_path; in mesh_pathtbl_init()
781 sdata->u.mesh.mpp_paths = tbl_mpp; in mesh_pathtbl_init()
809 mesh_path_tbl_expire(sdata, sdata->u.mesh.mesh_paths); in mesh_path_expire()
810 mesh_path_tbl_expire(sdata, sdata->u.mesh.mpp_paths); in mesh_path_expire()
815 mesh_table_free(sdata->u.mesh.mesh_paths); in mesh_pathtbl_unregister()
816 mesh_table_free(sdata->u.mesh.mpp_paths); in mesh_pathtbl_unregister()