Lines Matching refs:tc_info

718 	struct bnxt_tc_info *tc_info = bp->tc_info;  in bnxt_tc_put_l2_node()  local
724 rc = rhashtable_remove_fast(&tc_info->l2_table, &l2_node->node, in bnxt_tc_put_l2_node()
725 tc_info->l2_ht_params); in bnxt_tc_put_l2_node()
774 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_ref_flow_handle() local
778 l2_node = bnxt_tc_get_l2_node(bp, &tc_info->l2_table, in bnxt_tc_get_ref_flow_handle()
779 tc_info->l2_ht_params, in bnxt_tc_get_ref_flow_handle()
924 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_ref_decap_handle() local
928 decap_l2_node = bnxt_tc_get_l2_node(bp, &tc_info->decap_l2_table, in bnxt_tc_get_ref_decap_handle()
929 tc_info->decap_l2_ht_params, in bnxt_tc_get_ref_decap_handle()
962 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_decap_l2_node() local
968 rc = rhashtable_remove_fast(&tc_info->decap_l2_table, in bnxt_tc_put_decap_l2_node()
970 tc_info->decap_l2_ht_params); in bnxt_tc_put_decap_l2_node()
981 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_decap_handle() local
987 rc = bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_put_decap_handle()
988 &tc_info->decap_ht_params, in bnxt_tc_put_decap_handle()
1074 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_decap_handle() local
1088 decap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_get_decap_handle()
1089 &tc_info->decap_ht_params, in bnxt_tc_get_decap_handle()
1143 bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, in bnxt_tc_get_decap_handle()
1144 &tc_info->decap_ht_params, in bnxt_tc_get_decap_handle()
1153 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_put_encap_handle() local
1156 rc = bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_put_encap_handle()
1157 &tc_info->encap_ht_params, encap_node); in bnxt_tc_put_encap_handle()
1172 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_encap_handle() local
1180 encap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_get_encap_handle()
1181 &tc_info->encap_ht_params, in bnxt_tc_get_encap_handle()
1206 bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, in bnxt_tc_get_encap_handle()
1207 &tc_info->encap_ht_params, encap_node); in bnxt_tc_get_encap_handle()
1238 struct bnxt_tc_info *tc_info = bp->tc_info; in __bnxt_tc_del_flow() local
1244 mutex_lock(&tc_info->lock); in __bnxt_tc_del_flow()
1252 mutex_unlock(&tc_info->lock); in __bnxt_tc_del_flow()
1254 rc = rhashtable_remove_fast(&tc_info->flow_table, &flow_node->node, in __bnxt_tc_del_flow()
1255 tc_info->flow_ht_params); in __bnxt_tc_del_flow()
1290 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_add_flow() local
1317 old_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_add_flow()
1319 tc_info->flow_ht_params); in bnxt_tc_add_flow()
1326 mutex_lock(&tc_info->lock); in bnxt_tc_add_flow()
1345 rc = rhashtable_insert_fast(&tc_info->flow_table, &new_node->node, in bnxt_tc_add_flow()
1346 tc_info->flow_ht_params); in bnxt_tc_add_flow()
1350 mutex_unlock(&tc_info->lock); in bnxt_tc_add_flow()
1360 mutex_unlock(&tc_info->lock); in bnxt_tc_add_flow()
1372 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_del_flow() local
1375 flow_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_del_flow()
1377 tc_info->flow_ht_params); in bnxt_tc_del_flow()
1388 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_get_flow_stats() local
1393 flow_node = rhashtable_lookup_fast(&tc_info->flow_table, in bnxt_tc_get_flow_stats()
1395 tc_info->flow_ht_params); in bnxt_tc_get_flow_stats()
1472 static void bnxt_flow_stats_accum(struct bnxt_tc_info *tc_info, in bnxt_flow_stats_accum() argument
1476 accumulate_val(&acc_stats->bytes, hw_stats->bytes, tc_info->bytes_mask); in bnxt_flow_stats_accum()
1478 tc_info->packets_mask); in bnxt_flow_stats_accum()
1485 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_batch_update() local
1497 bnxt_flow_stats_accum(tc_info, &flow->stats, in bnxt_tc_flow_stats_batch_update()
1512 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_batch_prep() local
1513 struct rhashtable_iter *iter = &tc_info->iter; in bnxt_tc_flow_stats_batch_prep()
1546 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_tc_flow_stats_work() local
1549 num_flows = atomic_read(&tc_info->flow_table.nelems); in bnxt_tc_flow_stats_work()
1553 rhashtable_walk_enter(&tc_info->flow_table, &tc_info->iter); in bnxt_tc_flow_stats_work()
1556 rc = bnxt_tc_flow_stats_batch_prep(bp, tc_info->stats_batch, in bnxt_tc_flow_stats_work()
1568 tc_info->stats_batch); in bnxt_tc_flow_stats_work()
1571 rhashtable_walk_exit(&tc_info->iter); in bnxt_tc_flow_stats_work()
1622 struct bnxt_tc_info *tc_info; in bnxt_init_tc() local
1631 tc_info = kzalloc(sizeof(*tc_info), GFP_KERNEL); in bnxt_init_tc()
1632 if (!tc_info) in bnxt_init_tc()
1634 mutex_init(&tc_info->lock); in bnxt_init_tc()
1637 tc_info->bytes_mask = mask(36); in bnxt_init_tc()
1638 tc_info->packets_mask = mask(28); in bnxt_init_tc()
1640 tc_info->flow_ht_params = bnxt_tc_flow_ht_params; in bnxt_init_tc()
1641 rc = rhashtable_init(&tc_info->flow_table, &tc_info->flow_ht_params); in bnxt_init_tc()
1645 tc_info->l2_ht_params = bnxt_tc_l2_ht_params; in bnxt_init_tc()
1646 rc = rhashtable_init(&tc_info->l2_table, &tc_info->l2_ht_params); in bnxt_init_tc()
1650 tc_info->decap_l2_ht_params = bnxt_tc_decap_l2_ht_params; in bnxt_init_tc()
1651 rc = rhashtable_init(&tc_info->decap_l2_table, in bnxt_init_tc()
1652 &tc_info->decap_l2_ht_params); in bnxt_init_tc()
1656 tc_info->decap_ht_params = bnxt_tc_tunnel_ht_params; in bnxt_init_tc()
1657 rc = rhashtable_init(&tc_info->decap_table, in bnxt_init_tc()
1658 &tc_info->decap_ht_params); in bnxt_init_tc()
1662 tc_info->encap_ht_params = bnxt_tc_tunnel_ht_params; in bnxt_init_tc()
1663 rc = rhashtable_init(&tc_info->encap_table, in bnxt_init_tc()
1664 &tc_info->encap_ht_params); in bnxt_init_tc()
1668 tc_info->enabled = true; in bnxt_init_tc()
1671 bp->tc_info = tc_info; in bnxt_init_tc()
1675 rhashtable_destroy(&tc_info->decap_table); in bnxt_init_tc()
1677 rhashtable_destroy(&tc_info->decap_l2_table); in bnxt_init_tc()
1679 rhashtable_destroy(&tc_info->l2_table); in bnxt_init_tc()
1681 rhashtable_destroy(&tc_info->flow_table); in bnxt_init_tc()
1683 kfree(tc_info); in bnxt_init_tc()
1689 struct bnxt_tc_info *tc_info = bp->tc_info; in bnxt_shutdown_tc() local
1694 rhashtable_destroy(&tc_info->flow_table); in bnxt_shutdown_tc()
1695 rhashtable_destroy(&tc_info->l2_table); in bnxt_shutdown_tc()
1696 rhashtable_destroy(&tc_info->decap_l2_table); in bnxt_shutdown_tc()
1697 rhashtable_destroy(&tc_info->decap_table); in bnxt_shutdown_tc()
1698 rhashtable_destroy(&tc_info->encap_table); in bnxt_shutdown_tc()
1699 kfree(tc_info); in bnxt_shutdown_tc()
1700 bp->tc_info = NULL; in bnxt_shutdown_tc()