dmn 407 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c static void dr_actions_apply_tx(struct mlx5dr_domain *dmn, dmn 464 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (MLX5_CAP_GEN(dmn->mdev, prio_tag_required)) dmn 536 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c static void dr_actions_apply(struct mlx5dr_domain *dmn, dmn 548 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dr_actions_apply_tx(dmn, action_type_set, last_ste, attr, &added_stes); dmn 592 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c static int dr_action_handle_cs_recalc(struct mlx5dr_domain *dmn, dmn 607 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, dmn 617 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = mlx5dr_domain_cache_get_recalc_cs_ft_addr(dest_action->vport.dmn, dmn 621 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_err(dmn, "Failed to get FW cs recalc flow table\n"); dmn 644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 654 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c attr.gvmi = dmn->info.caps.gvmi; dmn 655 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c attr.hit_gvmi = dmn->info.caps.gvmi; dmn 657 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c action_domain = dr_action_get_action_domain(dmn->type, nic_dmn->ste_type); dmn 674 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (action->dest_tbl.tbl->dmn != dmn) { dmn 675 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, dmn 680 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, dmn 703 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, dmn 715 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_info(dmn, "Domain doesn't support QP\n"); dmn 772 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Action type %d supports only max %d time(s)\n", dmn 781 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Invalid action sequence provided\n"); dmn 793 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (dmn->type == MLX5DR_DOMAIN_TYPE_FDB && dmn 795 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_action_handle_cs_recalc(dmn, dest_action, &attr.final_icm_addr); dmn 797 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, dmn 804 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dr_actions_apply(dmn, dmn 823 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c static int dr_actions_l2_rewrite(struct mlx5dr_domain *dmn, dmn 934 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = mlx5dr_send_postsend_action(dmn, action); dmn 936 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Writing encapsulation action to ICM failed\n"); dmn 1029 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c struct mlx5dr_domain *dmn, dmn 1035 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Invalid reformat parameter!\n"); dmn 1039 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (dmn->type == MLX5DR_DOMAIN_TYPE_FDB) dmn 1042 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (dmn->type == MLX5DR_DOMAIN_TYPE_NIC_RX) { dmn 1045 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Action reformat type not support on RX domain\n"); dmn 1048 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c } else if (dmn->type == MLX5DR_DOMAIN_TYPE_NIC_TX) { dmn 1051 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Action reformat type not support on TX domain\n"); dmn 1065 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dr_action_create_reformat_action(struct mlx5dr_domain *dmn, dmn 1083 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = mlx5dr_cmd_create_reformat_ctx(dmn->mdev, rt, data_sz, data, dmn 1102 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c action->rewrite.chunk = mlx5dr_icm_alloc_chunk(dmn->action_icm_pool, dmn 1108 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dmn->info.caps.hdr_modify_icm_addr) / dmn 1111 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_actions_l2_rewrite(dmn, action, data, data_sz); dmn 1119 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_info(dmn, "Reformat type is not supported %d\n", action->action_type); dmn 1129 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c struct mlx5dr_action *mlx5dr_action_create_push_vlan(struct mlx5dr_domain *dmn, dmn 1137 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Invalid vlan ethertype\n"); dmn 1150 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_action_create_packet_reformat(struct mlx5dr_domain *dmn, dmn 1159 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_inc(&dmn->refcount); dmn 1164 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Invalid reformat_type provided\n"); dmn 1168 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_action_verify_reformat_params(action_type, dmn, data_sz, data); dmn 1176 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c action->reformat.dmn = dmn; dmn 1178 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_action_create_reformat_action(dmn, dmn 1183 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Failed creating reformat action %d\n", ret); dmn 1192 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_dec(&dmn->refcount); dmn 1215 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dr_action_modify_sw_to_hw(struct mlx5dr_domain *dmn, dmn 1236 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Modify action invalid field given\n"); dmn 1250 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Modify action length + offset exceeds limit\n"); dmn 1262 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_info(dmn, "Unsupported action_type for modify action\n"); dmn 1285 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dr_action_modify_check_field_limitation(struct mlx5dr_domain *dmn, dmn 1297 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (dmn->type != MLX5DR_DOMAIN_TYPE_NIC_TX) { dmn 1298 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Unsupported field %d for RX/FDB set action\n", dmn 1305 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c if (dmn->type != MLX5DR_DOMAIN_TYPE_NIC_RX) { dmn 1306 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Unsupported field %d for TX/FDB set action\n", dmn 1316 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Unsupported field %d for add action\n", sw_field); dmn 1320 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_info(dmn, "Unsupported action %d modify action\n", action); dmn 1335 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c static int dr_actions_convert_modify_header(struct mlx5dr_domain *dmn, dmn 1356 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_action_modify_check_field_limitation(dmn, sw_action); dmn 1364 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_action_modify_sw_to_hw(dmn, dmn 1374 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Action list can't support two different L3 types\n"); dmn 1383 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Action list can't support two different L4 types\n"); dmn 1398 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Modify header action number exceeds HW limit\n"); dmn 1413 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c static int dr_action_create_modify_action(struct mlx5dr_domain *dmn, dmn 1430 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Max number of actions %d exceeds limit %d\n", dmn 1435 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c chunk = mlx5dr_icm_alloc_chunk(dmn->action_icm_pool, DR_CHUNK_SIZE_16); dmn 1445 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_actions_convert_modify_header(dmn, dmn 1460 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c dmn->info.caps.hdr_modify_icm_addr) / dmn 1463 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = mlx5dr_send_postsend_action(dmn, action); dmn 1477 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_action_create_modify_header(struct mlx5dr_domain *dmn, dmn 1485 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_inc(&dmn->refcount); dmn 1488 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Invalid modify actions size provided\n"); dmn 1496 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c action->rewrite.dmn = dmn; dmn 1498 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c ret = dr_action_create_modify_action(dmn, dmn 1503 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Failed creating modify header action %d\n", ret); dmn 1512 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_dec(&dmn->refcount); dmn 1517 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_action_create_dest_vport(struct mlx5dr_domain *dmn, dmn 1526 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c peer_vport = vhca_id_valid && (vhca_id != dmn->info.caps.gvmi); dmn 1527 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c vport_dmn = peer_vport ? dmn->peer_dmn : dmn; dmn 1529 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "No peer vport domain for given vhca_id\n"); dmn 1534 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Domain doesn't support vport actions\n"); dmn 1540 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_dbg(dmn, "Failed to get vport %d caps\n", vport); dmn 1548 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c action->vport.dmn = vport_dmn; dmn 1565 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_dec(&action->reformat.dmn->refcount); dmn 1569 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_dec(&action->reformat.dmn->refcount); dmn 1573 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c mlx5dr_cmd_destroy_reformat_ctx((action->reformat.dmn)->mdev, dmn 1575 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_dec(&action->reformat.dmn->refcount); dmn 1580 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c refcount_dec(&action->rewrite.dmn->refcount); dmn 7 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static int dr_domain_init_cache(struct mlx5dr_domain *dmn) dmn 12 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->cache.recalc_cs_ft = kcalloc(dmn->info.caps.num_vports, dmn 13 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c sizeof(dmn->cache.recalc_cs_ft[0]), dmn 15 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->cache.recalc_cs_ft) dmn 21 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static void dr_domain_uninit_cache(struct mlx5dr_domain *dmn) dmn 25 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c for (i = 0; i < dmn->info.caps.num_vports; i++) { dmn 26 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->cache.recalc_cs_ft[i]) dmn 29 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_fw_destroy_recalc_cs_ft(dmn, dmn->cache.recalc_cs_ft[i]); dmn 32 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c kfree(dmn->cache.recalc_cs_ft); dmn 35 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c int mlx5dr_domain_cache_get_recalc_cs_ft_addr(struct mlx5dr_domain *dmn, dmn 41 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c recalc_cs_ft = dmn->cache.recalc_cs_ft[vport_num]; dmn 44 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c recalc_cs_ft = mlx5dr_fw_create_recalc_cs_ft(dmn, vport_num); dmn 48 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->cache.recalc_cs_ft[vport_num] = recalc_cs_ft; dmn 56 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static int dr_domain_init_resources(struct mlx5dr_domain *dmn) dmn 60 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn); dmn 62 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_dbg(dmn, "Couldn't allocate PD\n"); dmn 66 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->uar = mlx5_get_uars_page(dmn->mdev); dmn 67 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->uar) { dmn 68 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "Couldn't allocate UAR\n"); dmn 73 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->ste_icm_pool = mlx5dr_icm_pool_create(dmn, DR_ICM_TYPE_STE); dmn 74 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->ste_icm_pool) { dmn 75 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "Couldn't get icm memory\n"); dmn 80 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->action_icm_pool = mlx5dr_icm_pool_create(dmn, DR_ICM_TYPE_MODIFY_ACTION); dmn 81 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->action_icm_pool) { dmn 82 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "Couldn't get action icm memory\n"); dmn 87 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_send_ring_alloc(dmn); dmn 89 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "Couldn't create send-ring\n"); dmn 96 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_icm_pool_destroy(dmn->action_icm_pool); dmn 98 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_icm_pool_destroy(dmn->ste_icm_pool); dmn 100 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5_put_uars_page(dmn->mdev, dmn->uar); dmn 102 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5_core_dealloc_pd(dmn->mdev, dmn->pdn); dmn 107 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static void dr_domain_uninit_resources(struct mlx5dr_domain *dmn) dmn 109 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_send_ring_free(dmn, dmn->send_ring); dmn 110 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_icm_pool_destroy(dmn->action_icm_pool); dmn 111 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_icm_pool_destroy(dmn->ste_icm_pool); dmn 112 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5_put_uars_page(dmn->mdev, dmn->uar); dmn 113 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5_core_dealloc_pd(dmn->mdev, dmn->pdn); dmn 116 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static int dr_domain_query_vport(struct mlx5dr_domain *dmn, dmn 123 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c vport_caps = &dmn->info.caps.vports_caps[vport_number]; dmn 125 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_cmd_query_esw_vport_context(dmn->mdev, dmn 133 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_cmd_query_gvmi(dmn->mdev, dmn 141 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c vport_caps->vhca_gvmi = dmn->info.caps.gvmi; dmn 146 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static int dr_domain_query_vports(struct mlx5dr_domain *dmn) dmn 148 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c struct mlx5dr_esw_caps *esw_caps = &dmn->info.caps.esw_caps; dmn 154 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c for (vport = 0; vport < dmn->info.caps.num_esw_ports - 1; vport++) { dmn 155 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = dr_domain_query_vport(dmn, !!vport, vport); dmn 161 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c wire_vport = &dmn->info.caps.vports_caps[vport]; dmn 166 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c wire_vport->vhca_gvmi = dmn->info.caps.gvmi; dmn 172 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c struct mlx5dr_domain *dmn) dmn 176 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.caps.eswitch_manager) dmn 179 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_cmd_query_esw_caps(mdev, &dmn->info.caps.esw_caps); dmn 183 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.fdb_sw_owner = dmn->info.caps.esw_caps.sw_owner; dmn 184 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.esw_rx_drop_address = dmn->info.caps.esw_caps.drop_icm_address_rx; dmn 185 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.esw_tx_drop_address = dmn->info.caps.esw_caps.drop_icm_address_tx; dmn 187 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.vports_caps = kcalloc(dmn->info.caps.num_esw_ports, dmn 188 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c sizeof(dmn->info.caps.vports_caps[0]), dmn 190 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.caps.vports_caps) dmn 193 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = dr_domain_query_vports(dmn); dmn 195 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_dbg(dmn, "Failed to query vports caps\n"); dmn 199 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.num_vports = dmn->info.caps.num_esw_ports - 1; dmn 204 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c kfree(dmn->info.caps.vports_caps); dmn 205 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.vports_caps = NULL; dmn 210 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c struct mlx5dr_domain *dmn) dmn 216 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_dbg(dmn, "Failed to allocate domain, bad link type\n"); dmn 220 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.num_esw_ports = mlx5_eswitch_get_total_vports(mdev); dmn 222 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_cmd_query_device(mdev, &dmn->info.caps); dmn 226 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = dr_domain_query_fdb_caps(mdev, dmn); dmn 230 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c switch (dmn->type) { dmn 232 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.caps.rx_sw_owner) dmn 235 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.supp_sw_steering = true; dmn 236 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.rx.ste_type = MLX5DR_STE_TYPE_RX; dmn 237 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.rx.default_icm_addr = dmn->info.caps.nic_rx_drop_address; dmn 238 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.rx.drop_icm_addr = dmn->info.caps.nic_rx_drop_address; dmn 241 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.caps.tx_sw_owner) dmn 244 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.supp_sw_steering = true; dmn 245 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.tx.ste_type = MLX5DR_STE_TYPE_TX; dmn 246 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.tx.default_icm_addr = dmn->info.caps.nic_tx_allow_address; dmn 247 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.tx.drop_icm_addr = dmn->info.caps.nic_tx_drop_address; dmn 250 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.caps.eswitch_manager) dmn 253 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.caps.fdb_sw_owner) dmn 256 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.rx.ste_type = MLX5DR_STE_TYPE_RX; dmn 257 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.tx.ste_type = MLX5DR_STE_TYPE_TX; dmn 258 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c vport_cap = mlx5dr_get_vport_cap(&dmn->info.caps, 0); dmn 260 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_dbg(dmn, "Failed to get esw manager vport\n"); dmn 264 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.supp_sw_steering = true; dmn 265 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.tx.default_icm_addr = vport_cap->icm_address_tx; dmn 266 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.rx.default_icm_addr = vport_cap->icm_address_rx; dmn 267 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.rx.drop_icm_addr = dmn->info.caps.esw_rx_drop_address; dmn 268 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.tx.drop_icm_addr = dmn->info.caps.esw_tx_drop_address; dmn 271 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_dbg(dmn, "Invalid domain\n"); dmn 279 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c static void dr_domain_caps_uninit(struct mlx5dr_domain *dmn) dmn 281 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c kfree(dmn->info.caps.vports_caps); dmn 287 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c struct mlx5dr_domain *dmn; dmn 293 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn = kzalloc(sizeof(*dmn), GFP_KERNEL); dmn 294 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn) dmn 297 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->mdev = mdev; dmn 298 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->type = type; dmn 299 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c refcount_set(&dmn->refcount, 1); dmn 300 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mutex_init(&dmn->mutex); dmn 302 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (dr_domain_caps_init(mdev, dmn)) { dmn 303 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_dbg(dmn, "Failed init domain, no caps\n"); dmn 307 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.max_log_action_icm_sz = DR_CHUNK_SIZE_4K; dmn 308 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.max_log_sw_icm_sz = min_t(u32, DR_CHUNK_SIZE_1024K, dmn 309 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->info.caps.log_icm_size); dmn 311 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (!dmn->info.supp_sw_steering) { dmn 312 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "SW steering is not supported\n"); dmn 317 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = dr_domain_init_resources(dmn); dmn 319 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "Failed init domain resources\n"); dmn 323 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = dr_domain_init_cache(dmn); dmn 325 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_err(dmn, "Failed initialize domain cache\n"); dmn 332 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c return dmn; dmn 335 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dr_domain_uninit_resources(dmn); dmn 337 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dr_domain_caps_uninit(dmn); dmn 339 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c kfree(dmn); dmn 346 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c int mlx5dr_domain_sync(struct mlx5dr_domain *dmn, u32 flags) dmn 351 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mutex_lock(&dmn->mutex); dmn 352 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_send_ring_force_drain(dmn); dmn 353 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mutex_unlock(&dmn->mutex); dmn 359 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c ret = mlx5dr_cmd_sync_steering(dmn->mdev); dmn 364 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c int mlx5dr_domain_destroy(struct mlx5dr_domain *dmn) dmn 366 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (refcount_read(&dmn->refcount) > 1) dmn 370 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mlx5dr_cmd_sync_steering(dmn->mdev); dmn 371 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dr_domain_uninit_cache(dmn); dmn 372 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dr_domain_uninit_resources(dmn); dmn 373 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dr_domain_caps_uninit(dmn); dmn 374 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mutex_destroy(&dmn->mutex); dmn 375 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c kfree(dmn); dmn 379 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c void mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn, dmn 382 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mutex_lock(&dmn->mutex); dmn 384 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (dmn->peer_dmn) dmn 385 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c refcount_dec(&dmn->peer_dmn->refcount); dmn 387 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c dmn->peer_dmn = peer_dmn; dmn 389 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c if (dmn->peer_dmn) dmn 390 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c refcount_inc(&dmn->peer_dmn->refcount); dmn 392 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c mutex_unlock(&dmn->mutex); dmn 8 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_fw_create_recalc_cs_ft(struct mlx5dr_domain *dmn, u32 vport_num) dmn 19 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c ret = mlx5dr_cmd_create_flow_table(dmn->mdev, MLX5_FLOW_TABLE_TYPE_FDB, dmn 20 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c 0, 0, dmn->info.caps.max_ft_level - 1, dmn 23 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_err(dmn, "Failed creating TTL W/A FW flow table %d\n", ret); dmn 27 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c ret = mlx5dr_cmd_create_empty_flow_group(dmn->mdev, dmn 31 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_err(dmn, "Failed creating TTL W/A FW flow group %d\n", ret); dmn 40 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c ret = mlx5dr_cmd_alloc_modify_header(dmn->mdev, MLX5_FLOW_TABLE_TYPE_FDB, 1, dmn 44 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_err(dmn, "Failed modify header TTL %d\n", ret); dmn 48 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c ret = mlx5dr_cmd_set_fte_modify_and_vport(dmn->mdev, dmn 53 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_err(dmn, "Failed setting TTL W/A flow table entry %d\n", ret); dmn 65 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_dealloc_modify_header(dmn->mdev, modify_hdr_id); dmn 67 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_destroy_flow_group(dmn->mdev, dmn 71 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_destroy_flow_table(dmn->mdev, table_id, MLX5_FLOW_TABLE_TYPE_FDB); dmn 77 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c void mlx5dr_fw_destroy_recalc_cs_ft(struct mlx5dr_domain *dmn, dmn 80 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_del_flow_table_entry(dmn->mdev, dmn 83 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_dealloc_modify_header(dmn->mdev, recalc_cs_ft->modify_hdr_id); dmn 84 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_destroy_flow_group(dmn->mdev, dmn 88 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c mlx5dr_cmd_destroy_flow_table(dmn->mdev, dmn 50 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c struct mlx5dr_domain *dmn; dmn 102 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c struct mlx5_core_dev *mdev = pool->dmn->mdev; dmn 123 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c mlx5dr_err(pool->dmn, "Failed to allocate SW ICM memory, err (%d)\n", err); dmn 128 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c err = dr_icm_create_dm_mkey(mdev, pool->dmn->pdn, dmn 134 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c mlx5dr_err(pool->dmn, "Failed to create SW ICM MKEY, err (%d)\n", err); dmn 159 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c struct mlx5_core_dev *mdev = icm_mr->pool->dmn->mdev; dmn 468 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c err = mlx5dr_cmd_sync_steering(pool->dmn->mdev); dmn 471 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c mlx5dr_dbg(pool->dmn, "Sync_steering failed\n"); dmn 516 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c struct mlx5dr_icm_pool *mlx5dr_icm_pool_create(struct mlx5dr_domain *dmn, dmn 524 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c max_log_chunk_sz = dmn->info.max_log_sw_icm_sz; dmn 526 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c max_log_chunk_sz = dmn->info.max_log_action_icm_sz; dmn 538 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c pool->dmn = dmn; dmn 141 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dr_matcher_supp_flex_parser_vxlan_gpe(struct mlx5dr_domain *dmn) dmn 143 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c return dmn->info.caps.flex_protocols & dmn 160 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_dbg(matcher->tbl->dmn, dmn 173 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 208 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = mlx5dr_ste_build_pre_check(dmn, matcher->match_criteria, dmn 230 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c (dmn->type == MLX5DR_DOMAIN_TYPE_FDB || dmn 231 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dmn->type == MLX5DR_DOMAIN_TYPE_NIC_RX)) { dmn 233 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dmn, inner, rx); dmn 275 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dr_matcher_supp_flex_parser_vxlan_gpe(dmn)) dmn 291 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_matcher_supp_flex_parser_icmp_v4(&dmn->info.caps)) || dmn 293 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_matcher_supp_flex_parser_icmp_v6(&dmn->info.caps))) { dmn 295 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c &mask, &dmn->info.caps, dmn 364 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_dbg(dmn, "Cannot generate any valid rules from mask\n"); dmn 371 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_info(dmn, "Mask contains unsupported parameters\n"); dmn 381 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c static int dr_matcher_connect(struct mlx5dr_domain *dmn, dmn 400 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = mlx5dr_ste_htbl_init_and_postsend(dmn, nic_dmn, dmn 409 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = mlx5dr_ste_htbl_init_and_postsend(dmn, nic_dmn, dmn 423 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = mlx5dr_ste_htbl_init_and_postsend(dmn, nic_dmn, prev_htbl, dmn 444 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c struct mlx5dr_domain *dmn = tbl->dmn; dmn 466 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c if (dmn->type == MLX5DR_DOMAIN_TYPE_FDB || dmn 467 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dmn->type == MLX5DR_DOMAIN_TYPE_NIC_RX) { dmn 468 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = dr_matcher_connect(dmn, &matcher->rx, dmn 475 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c if (dmn->type == MLX5DR_DOMAIN_TYPE_FDB || dmn 476 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dmn->type == MLX5DR_DOMAIN_TYPE_NIC_TX) { dmn 477 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = dr_matcher_connect(dmn, &matcher->tx, dmn 509 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 511 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c switch (dmn->type) { dmn 530 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 537 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_dbg(dmn, "Cannot generate IPv4 or IPv6 rules with given mask\n"); dmn 546 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c nic_matcher->e_anchor = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, dmn 553 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c nic_matcher->s_htbl = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, dmn 596 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c struct mlx5dr_domain *dmn = tbl->dmn; dmn 600 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_info(dmn, "Invalid match criteria attribute\n"); dmn 606 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mlx5dr_info(dmn, "Invalid match size attribute\n"); dmn 613 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c switch (dmn->type) { dmn 656 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mutex_lock(&tbl->dmn->mutex); dmn 666 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mutex_unlock(&tbl->dmn->mutex); dmn 673 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mutex_unlock(&tbl->dmn->mutex); dmn 680 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c static int dr_matcher_disconnect(struct mlx5dr_domain *dmn, dmn 706 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c return mlx5dr_ste_htbl_init_and_postsend(dmn, nic_dmn, prev_anchor, dmn 714 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c struct mlx5dr_domain *dmn = tbl->dmn; dmn 727 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c if (dmn->type == MLX5DR_DOMAIN_TYPE_FDB || dmn 728 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dmn->type == MLX5DR_DOMAIN_TYPE_NIC_RX) { dmn 729 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = dr_matcher_disconnect(dmn, &tbl->rx, dmn 736 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c if (dmn->type == MLX5DR_DOMAIN_TYPE_FDB || dmn 737 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c dmn->type == MLX5DR_DOMAIN_TYPE_NIC_TX) { dmn 738 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c ret = dr_matcher_disconnect(dmn, &tbl->tx, dmn 757 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mutex_lock(&tbl->dmn->mutex); dmn 763 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c mutex_unlock(&tbl->dmn->mutex); dmn 44 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 49 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c new_htbl = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, dmn 54 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(dmn, "Failed allocating collision table\n"); dmn 76 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed creating collision entry\n"); dmn 88 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed allocating table\n"); dmn 101 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn) dmn 106 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c ret = mlx5dr_send_postsend_ste(dmn, ste_info->ste, ste_info->data, dmn 121 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn, dmn 131 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c dmn); dmn 139 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c dmn); dmn 187 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed update dup entry\n"); dmn 256 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed adding collision entry, index: %d\n", dmn 313 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_err(matcher->tbl->dmn, "Fatal error during resize\n"); dmn 332 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Invalid number of entries\n"); dmn 364 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 382 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c new_htbl = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, dmn 387 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_err(dmn, "Failed to allocate new hash table\n"); dmn 394 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_ste_set_formatted_ste(dmn->info.caps.gvmi, dmn 410 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c if (mlx5dr_send_postsend_htbl(dmn, new_htbl, formatted_ste, dmn 412 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_err(dmn, "Failed writing table to HW\n"); dmn 420 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c if (dr_rule_send_update_list(&rehash_table_send_list, dmn, false)) { dmn 421 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_err(dmn, "Failed updating table to HW\n"); dmn 468 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_info(dmn, "Failed creating rehash table\n"); dmn 478 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; dmn 482 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c new_size = min_t(u32, new_size, dmn->info.max_log_sw_icm_sz); dmn 511 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed to update prev miss_list\n"); dmn 611 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn, dmn 616 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c if (dmn->info.max_log_sw_icm_sz <= htbl->chunk_size) dmn 699 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed adding rule member\n"); dmn 747 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Failed allocating table\n"); dmn 777 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 812 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(dmn, "Duplicate rule inserted\n"); dmn 815 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c if (!skip_rehash && dr_rule_need_enlarge_hash(cur_htbl, dmn, nic_dmn)) { dmn 829 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_info(dmn, "failed creating rehash table, htbl-log_size: %d\n", dmn 844 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(dmn, "failed adding collision entry, index: %d\n", dmn 880 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Rule parameters length is incorrect\n"); dmn 891 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Rule outer parameters contains a value not specified by mask\n"); dmn 901 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Rule misc parameters contains a value not specified by mask\n"); dmn 911 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Rule inner parameters contains a value not specified by mask\n"); dmn 921 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Rule misc2 parameters contains a value not specified by mask\n"); dmn 931 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(matcher->tbl->dmn, "Rule misc3 parameters contains a value not specified by mask\n"); dmn 954 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; dmn 956 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c switch (dmn->type) { dmn 1023 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 1039 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c if (dr_rule_skip(dmn->type, nic_dmn->ste_type, &matcher->mask, param)) dmn 1084 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_err(dmn, "Failed creating next branch\n"); dmn 1094 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(dmn, "Failed adding rule member index %d\n", i); dmn 1105 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_dbg(dmn, "Failed apply actions\n"); dmn 1108 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c ret = dr_rule_send_update_list(&send_ste_list, dmn, true); dmn 1110 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_err(dmn, "Failed sending ste!\n"); dmn 1173 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 1192 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c switch (dmn->type) { dmn 1223 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mlx5dr_info(dmn, "Failed creating rule\n"); dmn 1234 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mutex_lock(&matcher->tbl->dmn->mutex); dmn 1241 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mutex_unlock(&matcher->tbl->dmn->mutex); dmn 1252 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mutex_lock(&tbl->dmn->mutex); dmn 1256 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c mutex_unlock(&tbl->dmn->mutex); dmn 309 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c static int dr_handle_pending_wc(struct mlx5dr_domain *dmn, dmn 320 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->signal_th * TH_NUMS_TO_DRAIN) dmn 354 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c static int dr_postsend_icm_data(struct mlx5dr_domain *dmn, dmn 357 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c struct mlx5dr_send_ring *send_ring = dmn->send_ring; dmn 361 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_handle_pending_wc(dmn, send_ring); dmn 365 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (send_info->write.length > dmn->info.max_inline_size) { dmn 367 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c (dmn->send_ring->signal_th - 1)) * dmn 384 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c static int dr_get_tbl_copy_details(struct mlx5dr_domain *dmn, dmn 393 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (htbl->chunk->byte_size > dmn->send_ring->max_post_send_size) { dmn 395 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->max_post_send_size; dmn 396 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c *byte_size = dmn->send_ring->max_post_send_size; dmn 426 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c int mlx5dr_send_postsend_ste(struct mlx5dr_domain *dmn, struct mlx5dr_ste *ste, dmn 437 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c return dr_postsend_icm_data(dmn, &send_info); dmn 440 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c int mlx5dr_send_postsend_htbl(struct mlx5dr_domain *dmn, dmn 452 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_get_tbl_copy_details(dmn, htbl, &data, &byte_size, dmn 490 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_postsend_icm_data(dmn, &send_info); dmn 501 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c int mlx5dr_send_postsend_formatted_htbl(struct mlx5dr_domain *dmn, dmn 513 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_get_tbl_copy_details(dmn, htbl, &data, &byte_size, dmn 544 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_postsend_icm_data(dmn, &send_info); dmn 554 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c int mlx5dr_send_postsend_action(struct mlx5dr_domain *dmn, dmn 567 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c mutex_lock(&dmn->mutex); dmn 568 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_postsend_icm_data(dmn, &send_info); dmn 569 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c mutex_unlock(&dmn->mutex); dmn 643 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c static int dr_prepare_qp_to_rts(struct mlx5dr_domain *dmn) dmn 645 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c struct mlx5dr_qp *dr_qp = dmn->send_ring->qp; dmn 654 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_modify_qp_rst2init(dmn->mdev, dr_qp, port); dmn 659 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = mlx5dr_cmd_query_gid(dmn->mdev, port, gid_index, &rtr_attr.dgid_attr); dmn 668 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c rtr_attr.udp_src_port = dmn->info.caps.roce_min_src_udp; dmn 670 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_cmd_modify_qp_init2rtr(dmn->mdev, dr_qp, &rtr_attr); dmn 679 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_cmd_modify_qp_rtr2rts(dmn->mdev, dr_qp, &rts_attr); dmn 863 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c int mlx5dr_send_ring_alloc(struct mlx5dr_domain *dmn) dmn 870 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring = kzalloc(sizeof(*dmn->send_ring), GFP_KERNEL); dmn 871 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (!dmn->send_ring) dmn 875 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->cq = dr_create_cq(dmn->mdev, dmn->uar, cq_size); dmn 876 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (!dmn->send_ring->cq) { dmn 881 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c init_attr.cqn = dmn->send_ring->cq->mcq.cqn; dmn 882 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c init_attr.pdn = dmn->pdn; dmn 883 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c init_attr.uar = dmn->uar; dmn 886 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->qp = dr_create_rc_qp(dmn->mdev, &init_attr); dmn 887 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (!dmn->send_ring->qp) { dmn 892 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->cq->qp = dmn->send_ring->qp; dmn 894 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->info.max_send_wr = QUEUE_SIZE; dmn 895 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->info.max_inline_size = min(dmn->send_ring->qp->max_inline_data, dmn 898 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->signal_th = dmn->info.max_send_wr / dmn 902 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_prepare_qp_to_rts(dmn); dmn 906 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->max_post_send_size = dmn 911 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c size = dmn->send_ring->signal_th * dmn->send_ring->max_post_send_size; dmn 912 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->buf = kzalloc(size, GFP_KERNEL); dmn 913 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (!dmn->send_ring->buf) { dmn 918 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->buf_size = size; dmn 920 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->mr = dr_reg_mr(dmn->mdev, dmn 921 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->pdn, dmn->send_ring->buf, size); dmn 922 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (!dmn->send_ring->mr) { dmn 927 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->send_ring->sync_mr = dr_reg_mr(dmn->mdev, dmn 928 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dmn->pdn, dmn->send_ring->sync_buff, dmn 930 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c if (!dmn->send_ring->sync_mr) { dmn 938 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_dereg_mr(dmn->mdev, dmn->send_ring->mr); dmn 940 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c kfree(dmn->send_ring->buf); dmn 942 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_destroy_qp(dmn->mdev, dmn->send_ring->qp); dmn 944 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_destroy_cq(dmn->mdev, dmn->send_ring->cq); dmn 946 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c kfree(dmn->send_ring); dmn 951 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c void mlx5dr_send_ring_free(struct mlx5dr_domain *dmn, dmn 954 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_destroy_qp(dmn->mdev, send_ring->qp); dmn 955 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_destroy_cq(dmn->mdev, send_ring->cq); dmn 956 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_dereg_mr(dmn->mdev, send_ring->sync_mr); dmn 957 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c dr_dereg_mr(dmn->mdev, send_ring->mr); dmn 962 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c int mlx5dr_send_ring_force_drain(struct mlx5dr_domain *dmn) dmn 964 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c struct mlx5dr_send_ring *send_ring = dmn->send_ring; dmn 983 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_postsend_icm_data(dmn, &send_info); dmn 988 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c ret = dr_handle_pending_wc(dmn, send_ring); dmn 454 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 501 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c mlx5dr_send_postsend_ste(dmn, cur_ste_info->ste, dmn 581 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c int mlx5dr_ste_htbl_init_and_postsend(struct mlx5dr_domain *dmn, dmn 589 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c mlx5dr_ste_set_formatted_ste(dmn->info.caps.gvmi, dmn 595 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c return mlx5dr_send_postsend_formatted_htbl(dmn, htbl, formatted_ste, update_hw_ste); dmn 606 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 617 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c next_htbl = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, dmn 622 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c mlx5dr_dbg(dmn, "Failed allocating table\n"); dmn 629 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c if (mlx5dr_ste_htbl_init_and_postsend(dmn, nic_dmn, next_htbl, dmn 631 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c mlx5dr_info(dmn, "Failed writing table to HW\n"); dmn 716 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c int mlx5dr_ste_build_pre_check(struct mlx5dr_domain *dmn, dmn 723 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c mlx5dr_dbg(dmn, "Partial mask source_port is not supported\n"); dmn 737 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c struct mlx5dr_domain *dmn = matcher->tbl->dmn; dmn 741 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c ret = mlx5dr_ste_build_pre_check(dmn, matcher->match_criteria, dmn 751 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c dmn->info.caps.gvmi); dmn 2258 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c struct mlx5dr_domain *dmn = sb->dmn; dmn 2268 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c if (misc->source_eswitch_owner_vhca_id == dmn->info.caps.gvmi) dmn 2269 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c caps = &dmn->info.caps; dmn 2270 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c else if (dmn->peer_dmn && (misc->source_eswitch_owner_vhca_id == dmn 2271 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c dmn->peer_dmn->info.caps.gvmi)) dmn 2272 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c caps = &dmn->peer_dmn->info.caps; dmn 2276 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c caps = &dmn->info.caps; dmn 2295 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c struct mlx5dr_domain *dmn, dmn 2308 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c sb->dmn = dmn; dmn 17 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mutex_lock(&tbl->dmn->mutex); dmn 24 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c if (tbl->dmn->type == MLX5DR_DOMAIN_TYPE_NIC_RX || dmn 25 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->dmn->type == MLX5DR_DOMAIN_TYPE_FDB) { dmn 38 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = mlx5dr_ste_htbl_init_and_postsend(tbl->dmn, dmn 43 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mlx5dr_dbg(tbl->dmn, "Failed to set RX miss action, ret %d\n", ret); dmn 48 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c if (tbl->dmn->type == MLX5DR_DOMAIN_TYPE_NIC_TX || dmn 49 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->dmn->type == MLX5DR_DOMAIN_TYPE_FDB) { dmn 62 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = mlx5dr_ste_htbl_init_and_postsend(tbl->dmn, dmn 66 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mlx5dr_dbg(tbl->dmn, "Failed to set TX miss action, ret %d\n", ret); dmn 81 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mutex_unlock(&tbl->dmn->mutex); dmn 98 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mutex_lock(&tbl->dmn->mutex); dmn 100 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c switch (tbl->dmn->type) { dmn 115 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mutex_unlock(&tbl->dmn->mutex); dmn 118 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c static int dr_table_init_nic(struct mlx5dr_domain *dmn, dmn 127 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c nic_tbl->s_anchor = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, dmn 136 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = mlx5dr_ste_htbl_init_and_postsend(dmn, nic_dmn, dmn 155 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = dr_table_init_nic(tbl->dmn, &tbl->rx); dmn 159 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = dr_table_init_nic(tbl->dmn, &tbl->tx); dmn 176 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mutex_lock(&tbl->dmn->mutex); dmn 178 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c switch (tbl->dmn->type) { dmn 181 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->rx.nic_dmn = &tbl->dmn->info.rx; dmn 182 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = dr_table_init_nic(tbl->dmn, &tbl->rx); dmn 186 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->tx.nic_dmn = &tbl->dmn->info.tx; dmn 187 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = dr_table_init_nic(tbl->dmn, &tbl->tx); dmn 191 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->rx.nic_dmn = &tbl->dmn->info.rx; dmn 192 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->tx.nic_dmn = &tbl->dmn->info.tx; dmn 200 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c mutex_unlock(&tbl->dmn->mutex); dmn 207 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c return mlx5dr_cmd_destroy_flow_table(tbl->dmn->mdev, dmn 224 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c ret = mlx5dr_cmd_create_flow_table(tbl->dmn->mdev, dmn 228 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->dmn->info.caps.max_ft_level - 1, dmn 235 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c struct mlx5dr_table *mlx5dr_table_create(struct mlx5dr_domain *dmn, u32 level) dmn 240 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c refcount_inc(&dmn->refcount); dmn 246 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c tbl->dmn = dmn; dmn 265 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c refcount_dec(&dmn->refcount); dmn 285 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c refcount_dec(&tbl->dmn->refcount); dmn 21 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h #define mlx5dr_err(dmn, arg...) mlx5_core_err((dmn)->mdev, ##arg) dmn 22 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h #define mlx5dr_info(dmn, arg...) mlx5_core_info((dmn)->mdev, ##arg) dmn 23 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h #define mlx5dr_dbg(dmn, arg...) mlx5_core_dbg((dmn)->mdev, ##arg) dmn 184 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_domain *dmn; dmn 273 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_ste_build_pre_check(struct mlx5dr_domain *dmn, dmn 338 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_domain *dmn, dmn 669 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_domain *dmn; dmn 718 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_domain *dmn; dmn 729 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_domain *dmn; dmn 750 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_domain *dmn; dmn 944 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h struct mlx5dr_icm_pool *mlx5dr_icm_pool_create(struct mlx5dr_domain *dmn, dmn 953 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_ste_htbl_init_and_postsend(struct mlx5dr_domain *dmn, dmn 1030 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_send_ring_alloc(struct mlx5dr_domain *dmn); dmn 1031 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h void mlx5dr_send_ring_free(struct mlx5dr_domain *dmn, dmn 1033 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_send_ring_force_drain(struct mlx5dr_domain *dmn); dmn 1034 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_send_postsend_ste(struct mlx5dr_domain *dmn, dmn 1039 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_send_postsend_htbl(struct mlx5dr_domain *dmn, dmn 1042 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_send_postsend_formatted_htbl(struct mlx5dr_domain *dmn, dmn 1046 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_send_postsend_action(struct mlx5dr_domain *dmn, dmn 1057 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h mlx5dr_fw_create_recalc_cs_ft(struct mlx5dr_domain *dmn, u32 vport_num); dmn 1058 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h void mlx5dr_fw_destroy_recalc_cs_ft(struct mlx5dr_domain *dmn, dmn 1060 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h int mlx5dr_domain_cache_get_recalc_cs_ft_addr(struct mlx5dr_domain *dmn, dmn 45 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h void mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn, dmn 94 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h mlx5dr_action_create_packet_reformat(struct mlx5dr_domain *dmn, dmn 130 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn, dmn 186 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h mlx5dr_action_create_packet_reformat(struct mlx5dr_domain *dmn, dmn 1001 drivers/powercap/intel_rapl_common.c int dmn, prim; dmn 1004 drivers/powercap/intel_rapl_common.c for (dmn = 0; dmn < rp->nr_domains; dmn++) { dmn 1006 drivers/powercap/intel_rapl_common.c rp->domains[dmn].name); dmn 1009 drivers/powercap/intel_rapl_common.c if (!rapl_read_data_raw(&rp->domains[dmn], prim, dmn 1011 drivers/powercap/intel_rapl_common.c rp->domains[dmn].rdd.primitives[prim] = val;