Lines Matching refs:tc_info

949 	struct bnxt_tc_info *tc_info = bp->tc_info;  in bnxt_tc_put_l2_node()  local
955 rc = rhashtable_remove_fast(&tc_info->l2_table, &l2_node->node, in bnxt_tc_put_l2_node()
956 tc_info->l2_ht_params); in bnxt_tc_put_l2_node()
1005 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_ref_flow_handle() local
1009 l2_node = bnxt_tc_get_l2_node(bp, &tc_info->l2_table, in bnxt_tc_get_ref_flow_handle()
1010 tc_info->l2_ht_params, in bnxt_tc_get_ref_flow_handle()
1155 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_ref_decap_handle() local
1159 decap_l2_node = bnxt_tc_get_l2_node(bp, &tc_info->decap_l2_table, in bnxt_tc_get_ref_decap_handle()
1160 tc_info->decap_l2_ht_params, in bnxt_tc_get_ref_decap_handle()
1193 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_decap_l2_node() local
1199 rc = rhashtable_remove_fast(&tc_info->decap_l2_table, in bnxt_tc_put_decap_l2_node()
1201 tc_info->decap_l2_ht_params); in bnxt_tc_put_decap_l2_node()
1212 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_decap_handle() local
1218 rc = bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_put_decap_handle()
1219 &tc_info->decap_ht_params, in bnxt_tc_put_decap_handle()
1305 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_decap_handle() local
1319 decap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_get_decap_handle()
1320 &tc_info->decap_ht_params, in bnxt_tc_get_decap_handle()
1374 bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_get_decap_handle()
1375 &tc_info->decap_ht_params, in bnxt_tc_get_decap_handle()
1384 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_encap_handle() local
1387 rc = bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_put_encap_handle()
1388 &tc_info->encap_ht_params, encap_node); in bnxt_tc_put_encap_handle()
1403 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_encap_handle() local
1411 encap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_get_encap_handle()
1412 &tc_info->encap_ht_params, in bnxt_tc_get_encap_handle()
1437 bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_get_encap_handle()
1438 &tc_info->encap_ht_params, encap_node); in bnxt_tc_get_encap_handle()
1469 struct bnxt_tc_info *tc_info = bp->tc_info; in __bnxt_tc_del_flow() local
1475 mutex_lock(&tc_info->lock); in __bnxt_tc_del_flow()
1483 mutex_unlock(&tc_info->lock); in __bnxt_tc_del_flow()
1485 rc = rhashtable_remove_fast(&tc_info->flow_table, &flow_node->node, in __bnxt_tc_del_flow()
1486 tc_info->flow_ht_params); in __bnxt_tc_del_flow()
1527 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_add_flow() local
1556 old_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_add_flow()
1558 tc_info->flow_ht_params); in bnxt_tc_add_flow()
1565 mutex_lock(&tc_info->lock); in bnxt_tc_add_flow()
1584 rc = rhashtable_insert_fast(&tc_info->flow_table, &new_node->node, in bnxt_tc_add_flow()
1585 tc_info->flow_ht_params); in bnxt_tc_add_flow()
1589 mutex_unlock(&tc_info->lock); in bnxt_tc_add_flow()
1599 mutex_unlock(&tc_info->lock); in bnxt_tc_add_flow()
1611 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_del_flow() local
1614 flow_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_del_flow()
1616 tc_info->flow_ht_params); in bnxt_tc_del_flow()
1627 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_flow_stats() local
1632 flow_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_get_flow_stats()
1634 tc_info->flow_ht_params); in bnxt_tc_get_flow_stats()
1747 static void bnxt_flow_stats_accum(struct bnxt_tc_info *tc_info, in bnxt_flow_stats_accum() argument
1751 accumulate_val(&acc_stats->bytes, hw_stats->bytes, tc_info->bytes_mask); in bnxt_flow_stats_accum()
1753 tc_info->packets_mask); in bnxt_flow_stats_accum()
1760 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_batch_update() local
1772 bnxt_flow_stats_accum(tc_info, &flow->stats, in bnxt_tc_flow_stats_batch_update()
1787 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_batch_prep() local
1788 struct rhashtable_iter *iter = &tc_info->iter; in bnxt_tc_flow_stats_batch_prep()
1821 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_work() local
1824 num_flows = atomic_read(&tc_info->flow_table.nelems); in bnxt_tc_flow_stats_work()
1828 rhashtable_walk_enter(&tc_info->flow_table, &tc_info->iter); in bnxt_tc_flow_stats_work()
1831 rc = bnxt_tc_flow_stats_batch_prep(bp, tc_info->stats_batch, in bnxt_tc_flow_stats_work()
1843 tc_info->stats_batch); in bnxt_tc_flow_stats_work()
1846 rhashtable_walk_exit(&tc_info->iter); in bnxt_tc_flow_stats_work()
2011 struct bnxt_tc_info *tc_info; in bnxt_init_tc() local
2017 tc_info = kzalloc(sizeof(*tc_info), GFP_KERNEL); in bnxt_init_tc()
2018 if (!tc_info) in bnxt_init_tc()
2020 mutex_init(&tc_info->lock); in bnxt_init_tc()
2023 tc_info->bytes_mask = mask(36); in bnxt_init_tc()
2024 tc_info->packets_mask = mask(28); in bnxt_init_tc()
2026 tc_info->flow_ht_params = bnxt_tc_flow_ht_params; in bnxt_init_tc()
2027 rc = rhashtable_init(&tc_info->flow_table, &tc_info->flow_ht_params); in bnxt_init_tc()
2031 tc_info->l2_ht_params = bnxt_tc_l2_ht_params; in bnxt_init_tc()
2032 rc = rhashtable_init(&tc_info->l2_table, &tc_info->l2_ht_params); in bnxt_init_tc()
2036 tc_info->decap_l2_ht_params = bnxt_tc_decap_l2_ht_params; in bnxt_init_tc()
2037 rc = rhashtable_init(&tc_info->decap_l2_table, in bnxt_init_tc()
2038 &tc_info->decap_l2_ht_params); in bnxt_init_tc()
2042 tc_info->decap_ht_params = bnxt_tc_tunnel_ht_params; in bnxt_init_tc()
2043 rc = rhashtable_init(&tc_info->decap_table, in bnxt_init_tc()
2044 &tc_info->decap_ht_params); in bnxt_init_tc()
2048 tc_info->encap_ht_params = bnxt_tc_tunnel_ht_params; in bnxt_init_tc()
2049 rc = rhashtable_init(&tc_info->encap_table, in bnxt_init_tc()
2050 &tc_info->encap_ht_params); in bnxt_init_tc()
2054 tc_info->enabled = true; in bnxt_init_tc()
2057 bp->tc_info = tc_info; in bnxt_init_tc()
2066 rhashtable_destroy(&tc_info->encap_table); in bnxt_init_tc()
2069 rhashtable_destroy(&tc_info->decap_table); in bnxt_init_tc()
2071 rhashtable_destroy(&tc_info->decap_l2_table); in bnxt_init_tc()
2073 rhashtable_destroy(&tc_info->l2_table); in bnxt_init_tc()
2075 rhashtable_destroy(&tc_info->flow_table); in bnxt_init_tc()
2077 kfree(tc_info); in bnxt_init_tc()
2083 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_shutdown_tc() local
2090 rhashtable_destroy(&tc_info->flow_table); in bnxt_shutdown_tc()
2091 rhashtable_destroy(&tc_info->l2_table); in bnxt_shutdown_tc()
2092 rhashtable_destroy(&tc_info->decap_l2_table); in bnxt_shutdown_tc()
2093 rhashtable_destroy(&tc_info->decap_table); in bnxt_shutdown_tc()
2094 rhashtable_destroy(&tc_info->encap_table); in bnxt_shutdown_tc()
2095 kfree(tc_info); in bnxt_shutdown_tc()
2096 bp->tc_info = NULL; in bnxt_shutdown_tc()