Lines Matching refs:tc_info

953 	struct bnxt_tc_info *tc_info = bp->tc_info;  in bnxt_tc_put_l2_node()  local
959 rc = rhashtable_remove_fast(&tc_info->l2_table, &l2_node->node, in bnxt_tc_put_l2_node()
960 tc_info->l2_ht_params); in bnxt_tc_put_l2_node()
1009 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_ref_flow_handle() local
1013 l2_node = bnxt_tc_get_l2_node(bp, &tc_info->l2_table, in bnxt_tc_get_ref_flow_handle()
1014 tc_info->l2_ht_params, in bnxt_tc_get_ref_flow_handle()
1159 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_ref_decap_handle() local
1163 decap_l2_node = bnxt_tc_get_l2_node(bp, &tc_info->decap_l2_table, in bnxt_tc_get_ref_decap_handle()
1164 tc_info->decap_l2_ht_params, in bnxt_tc_get_ref_decap_handle()
1197 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_decap_l2_node() local
1203 rc = rhashtable_remove_fast(&tc_info->decap_l2_table, in bnxt_tc_put_decap_l2_node()
1205 tc_info->decap_l2_ht_params); in bnxt_tc_put_decap_l2_node()
1216 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_decap_handle() local
1222 rc = bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_put_decap_handle()
1223 &tc_info->decap_ht_params, in bnxt_tc_put_decap_handle()
1309 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_decap_handle() local
1323 decap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_get_decap_handle()
1324 &tc_info->decap_ht_params, in bnxt_tc_get_decap_handle()
1378 bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_get_decap_handle()
1379 &tc_info->decap_ht_params, in bnxt_tc_get_decap_handle()
1388 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_encap_handle() local
1391 rc = bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_put_encap_handle()
1392 &tc_info->encap_ht_params, encap_node); in bnxt_tc_put_encap_handle()
1407 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_encap_handle() local
1415 encap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_get_encap_handle()
1416 &tc_info->encap_ht_params, in bnxt_tc_get_encap_handle()
1441 bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_get_encap_handle()
1442 &tc_info->encap_ht_params, encap_node); in bnxt_tc_get_encap_handle()
1473 struct bnxt_tc_info *tc_info = bp->tc_info; in __bnxt_tc_del_flow() local
1479 mutex_lock(&tc_info->lock); in __bnxt_tc_del_flow()
1487 mutex_unlock(&tc_info->lock); in __bnxt_tc_del_flow()
1489 rc = rhashtable_remove_fast(&tc_info->flow_table, &flow_node->node, in __bnxt_tc_del_flow()
1490 tc_info->flow_ht_params); in __bnxt_tc_del_flow()
1531 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_add_flow() local
1560 old_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_add_flow()
1562 tc_info->flow_ht_params); in bnxt_tc_add_flow()
1569 mutex_lock(&tc_info->lock); in bnxt_tc_add_flow()
1588 rc = rhashtable_insert_fast(&tc_info->flow_table, &new_node->node, in bnxt_tc_add_flow()
1589 tc_info->flow_ht_params); in bnxt_tc_add_flow()
1593 mutex_unlock(&tc_info->lock); in bnxt_tc_add_flow()
1603 mutex_unlock(&tc_info->lock); in bnxt_tc_add_flow()
1615 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_del_flow() local
1618 flow_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_del_flow()
1620 tc_info->flow_ht_params); in bnxt_tc_del_flow()
1631 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_flow_stats() local
1636 flow_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_get_flow_stats()
1638 tc_info->flow_ht_params); in bnxt_tc_get_flow_stats()
1751 static void bnxt_flow_stats_accum(struct bnxt_tc_info *tc_info, in bnxt_flow_stats_accum() argument
1755 accumulate_val(&acc_stats->bytes, hw_stats->bytes, tc_info->bytes_mask); in bnxt_flow_stats_accum()
1757 tc_info->packets_mask); in bnxt_flow_stats_accum()
1764 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_batch_update() local
1776 bnxt_flow_stats_accum(tc_info, &flow->stats, in bnxt_tc_flow_stats_batch_update()
1791 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_batch_prep() local
1792 struct rhashtable_iter *iter = &tc_info->iter; in bnxt_tc_flow_stats_batch_prep()
1825 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_work() local
1828 num_flows = atomic_read(&tc_info->flow_table.nelems); in bnxt_tc_flow_stats_work()
1832 rhashtable_walk_enter(&tc_info->flow_table, &tc_info->iter); in bnxt_tc_flow_stats_work()
1835 rc = bnxt_tc_flow_stats_batch_prep(bp, tc_info->stats_batch, in bnxt_tc_flow_stats_work()
1847 tc_info->stats_batch); in bnxt_tc_flow_stats_work()
1850 rhashtable_walk_exit(&tc_info->iter); in bnxt_tc_flow_stats_work()
2015 struct bnxt_tc_info *tc_info; in bnxt_init_tc() local
2021 tc_info = kzalloc(sizeof(*tc_info), GFP_KERNEL); in bnxt_init_tc()
2022 if (!tc_info) in bnxt_init_tc()
2024 mutex_init(&tc_info->lock); in bnxt_init_tc()
2027 tc_info->bytes_mask = mask(36); in bnxt_init_tc()
2028 tc_info->packets_mask = mask(28); in bnxt_init_tc()
2030 tc_info->flow_ht_params = bnxt_tc_flow_ht_params; in bnxt_init_tc()
2031 rc = rhashtable_init(&tc_info->flow_table, &tc_info->flow_ht_params); in bnxt_init_tc()
2035 tc_info->l2_ht_params = bnxt_tc_l2_ht_params; in bnxt_init_tc()
2036 rc = rhashtable_init(&tc_info->l2_table, &tc_info->l2_ht_params); in bnxt_init_tc()
2040 tc_info->decap_l2_ht_params = bnxt_tc_decap_l2_ht_params; in bnxt_init_tc()
2041 rc = rhashtable_init(&tc_info->decap_l2_table, in bnxt_init_tc()
2042 &tc_info->decap_l2_ht_params); in bnxt_init_tc()
2046 tc_info->decap_ht_params = bnxt_tc_tunnel_ht_params; in bnxt_init_tc()
2047 rc = rhashtable_init(&tc_info->decap_table, in bnxt_init_tc()
2048 &tc_info->decap_ht_params); in bnxt_init_tc()
2052 tc_info->encap_ht_params = bnxt_tc_tunnel_ht_params; in bnxt_init_tc()
2053 rc = rhashtable_init(&tc_info->encap_table, in bnxt_init_tc()
2054 &tc_info->encap_ht_params); in bnxt_init_tc()
2058 tc_info->enabled = true; in bnxt_init_tc()
2061 bp->tc_info = tc_info; in bnxt_init_tc()
2070 rhashtable_destroy(&tc_info->encap_table); in bnxt_init_tc()
2073 rhashtable_destroy(&tc_info->decap_table); in bnxt_init_tc()
2075 rhashtable_destroy(&tc_info->decap_l2_table); in bnxt_init_tc()
2077 rhashtable_destroy(&tc_info->l2_table); in bnxt_init_tc()
2079 rhashtable_destroy(&tc_info->flow_table); in bnxt_init_tc()
2081 kfree(tc_info); in bnxt_init_tc()
2082 bp->tc_info = NULL; in bnxt_init_tc()
2088 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_shutdown_tc() local
2095 rhashtable_destroy(&tc_info->flow_table); in bnxt_shutdown_tc()
2096 rhashtable_destroy(&tc_info->l2_table); in bnxt_shutdown_tc()
2097 rhashtable_destroy(&tc_info->decap_l2_table); in bnxt_shutdown_tc()
2098 rhashtable_destroy(&tc_info->decap_table); in bnxt_shutdown_tc()
2099 rhashtable_destroy(&tc_info->encap_table); in bnxt_shutdown_tc()
2100 kfree(tc_info); in bnxt_shutdown_tc()
2101 bp->tc_info = NULL; in bnxt_shutdown_tc()