fib_node 397 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 1162 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 1188 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_lookup(fib, addrp, addr_len, fib_node 1190 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!fib_node || list_empty(&fib_node->entry_list)) fib_node 1193 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry = list_first_entry(&fib_node->entry_list, fib_node 1206 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static struct mlxsw_sp_fib_node *fib_node; fib_node 1241 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_lookup(ul_fib, saddrp, saddr_len, fib_node 1243 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!fib_node || list_empty(&fib_node->entry_list)) fib_node 1246 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry = list_first_entry(&fib_node->entry_list, fib_node 3078 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (fib == fib_entry->fib_node->fib) fib_node 3080 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib = fib_entry->fib_node->fib; fib_node 3194 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_entry_is_first(const struct mlxsw_sp_fib_node *fib_node, fib_node 3205 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node, fib_node 3226 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node, fib_node 3983 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c switch (fib_entry->fib_node->fib->proto) { fib_node 4112 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c switch (fib_entry->fib_node->fib->proto) { fib_node 4125 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c switch (fib_entry->fib_node->fib->proto) { fib_node 4160 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib *fib = fib_entry->fib_node->fib; fib_node 4168 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c p_dip = (u32 *) fib_entry->fib_node->key.addr; fib_node 4170 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry->fib_node->key.prefix_len, fib_node 4175 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry->fib_node->key.prefix_len, fib_node 4176 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry->fib_node->key.addr); fib_node 4391 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node, fib_node 4416 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry->fib_node = fib_node; fib_node 4438 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 4447 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_lookup(fib, &fen_info->dst, fib_node 4450 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!fib_node) fib_node 4453 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(fib4_entry, &fib_node->entry_list, common.list) { fib_node 4474 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 4476 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return rhashtable_insert_fast(&fib->ht, &fib_node->ht_node, fib_node 4481 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 4483 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c rhashtable_remove_fast(&fib->ht, &fib_node->ht_node, fib_node 4503 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 4505 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = kzalloc(sizeof(*fib_node), GFP_KERNEL); fib_node 4506 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!fib_node) fib_node 4509 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c INIT_LIST_HEAD(&fib_node->entry_list); fib_node 4510 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_add(&fib_node->list, &fib->node_list); fib_node 4511 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c memcpy(fib_node->key.addr, addr, addr_len); fib_node 4512 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node->key.prefix_len = prefix_len; fib_node 4514 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return fib_node; fib_node 4517 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c static void mlxsw_sp_fib_node_destroy(struct mlxsw_sp_fib_node *fib_node) fib_node 4519 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_del(&fib_node->list); fib_node 4520 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c WARN_ON(!list_empty(&fib_node->entry_list)); fib_node 4521 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c kfree(fib_node); fib_node 4525 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_entry_is_first(const struct mlxsw_sp_fib_node *fib_node, fib_node 4528 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return list_first_entry(&fib_node->entry_list, fib_node 4533 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 4536 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib *fib = fib_node->fib; fib_node 4541 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (lpm_tree->prefix_ref_count[fib_node->key.prefix_len] != 0) fib_node 4545 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_prefix_usage_set(&req_prefix_usage, fib_node->key.prefix_len); fib_node 4556 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c lpm_tree->prefix_ref_count[fib_node->key.prefix_len]++; fib_node 4565 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 4567 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_lpm_tree *lpm_tree = fib_node->fib->lpm_tree; fib_node 4569 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib *fib = fib_node->fib; fib_node 4572 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (--lpm_tree->prefix_ref_count[fib_node->key.prefix_len] != 0) fib_node 4579 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node->key.prefix_len); fib_node 4596 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node, fib_node 4601 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fib_node_insert(fib, fib_node); fib_node 4604 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node->fib = fib; fib_node 4606 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fib_lpm_tree_link(mlxsw_sp, fib_node); fib_node 4613 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node->fib = NULL; fib_node 4614 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_remove(fib, fib_node); fib_node 4619 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 4621 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib *fib = fib_node->fib; fib_node 4623 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_lpm_tree_unlink(mlxsw_sp, fib_node); fib_node 4624 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node->fib = NULL; fib_node 4625 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_remove(fib, fib_node); fib_node 4633 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 4643 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_lookup(fib, addr, addr_len, prefix_len); fib_node 4644 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (fib_node) fib_node 4645 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return fib_node; fib_node 4647 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_create(fib, addr, addr_len, prefix_len); fib_node 4648 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!fib_node) { fib_node 4653 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fib_node_init(mlxsw_sp, fib_node, fib); fib_node 4657 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return fib_node; fib_node 4660 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_destroy(fib_node); fib_node 4667 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 4669 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_vr *vr = fib_node->fib->vr; fib_node 4671 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!list_empty(&fib_node->entry_list)) fib_node 4673 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_fini(mlxsw_sp, fib_node); fib_node 4674 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_destroy(fib_node); fib_node 4679 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib4_node_entry_find(const struct mlxsw_sp_fib_node *fib_node, fib_node 4684 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(fib4_entry, &fib_node->entry_list, common.list) { fib_node 4703 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 4708 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = fib4_entry->common.fib_node; fib_node 4709 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry_from(fib4_entry, &fib_node->entry_list, fib_node 4725 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node = new4_entry->common.fib_node; fib_node 4728 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib4_entry = mlxsw_sp_fib4_node_entry_find(fib_node, new4_entry); fib_node 4744 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(last, &fib_node->entry_list, common.list) { fib_node 4755 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c &fib_node->entry_list); fib_node 4770 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node = fib_entry->fib_node; fib_node 4772 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_fib_node_entry_is_first(fib_node, fib_entry)) fib_node 4778 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!list_is_singular(&fib_node->entry_list)) { fib_node 4791 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node = fib_entry->fib_node; fib_node 4793 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_fib_node_entry_is_first(fib_node, fib_entry)) fib_node 4797 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!list_is_singular(&fib_node->entry_list)) { fib_node 4845 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node = fib4_entry->common.fib_node; fib_node 4856 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 4865 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 4871 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_get(mlxsw_sp, fen_info->tb_id, fib_node 4875 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (IS_ERR(fib_node)) { fib_node 4877 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return PTR_ERR(fib_node); fib_node 4880 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib4_entry = mlxsw_sp_fib4_entry_create(mlxsw_sp, fib_node, fen_info); fib_node 4901 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 4909 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 4917 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = fib4_entry->common.fib_node; fib_node 4921 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 4996 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib6_node_mp_entry_find(const struct mlxsw_sp_fib_node *fib_node, fib_node 5004 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(fib6_entry, &fib_node->entry_list, common.list) { fib_node 5358 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node, fib_node 5389 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_entry->fib_node = fib_node; fib_node 5417 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib6_node_entry_find(const struct mlxsw_sp_fib_node *fib_node, fib_node 5422 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(fib6_entry, &fib_node->entry_list, common.list) { fib_node 5447 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node = new6_entry->common.fib_node; fib_node 5451 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib6_entry = mlxsw_sp_fib6_node_entry_find(fib_node, nrt, *p_replace); fib_node 5462 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(last, &fib_node->entry_list, common.list) { fib_node 5475 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c &fib_node->entry_list); fib_node 5521 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 5530 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_lookup(fib, &rt->fib6_dst.addr, fib_node 5533 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!fib_node) fib_node 5536 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry(fib6_entry, &fib_node->entry_list, common.list) { fib_node 5552 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node = fib6_entry->common.fib_node; fib_node 5562 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 5570 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 5583 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = mlxsw_sp_fib_node_get(mlxsw_sp, rt->fib6_table->tb6_id, fib_node 5588 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (IS_ERR(fib_node)) fib_node 5589 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c return PTR_ERR(fib_node); fib_node 5594 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib6_entry = mlxsw_sp_fib6_node_mp_entry_find(fib_node, rt, replace); fib_node 5603 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib6_entry = mlxsw_sp_fib6_entry_create(mlxsw_sp, fib_node, rt_arr, fib_node 5622 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 5631 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node; fib_node 5658 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c fib_node = fib6_entry->common.fib_node; fib_node 5662 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 5812 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 5816 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry_safe(fib4_entry, tmp, &fib_node->entry_list, fib_node 5818 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c bool do_break = &tmp->common.list == &fib_node->entry_list; fib_node 5822 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 5833 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 5837 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry_safe(fib6_entry, tmp, &fib_node->entry_list, fib_node 5839 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c bool do_break = &tmp->common.list == &fib_node->entry_list; fib_node 5843 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_put(mlxsw_sp, fib_node); fib_node 5850 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node) fib_node 5852 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c switch (fib_node->fib->proto) { fib_node 5854 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib4_node_flush(mlxsw_sp, fib_node); fib_node 5857 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib6_node_flush(mlxsw_sp, fib_node); fib_node 5867 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_fib_node *fib_node, *tmp; fib_node 5869 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c list_for_each_entry_safe(fib_node, tmp, &fib->node_list, list) { fib_node 5872 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fib_node_flush(mlxsw_sp, fib_node);