/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
D | dr_domain.c | 8 #define DR_DOMAIN_SW_STEERING_SUPPORTED(dmn, dmn_type) \ argument 9 ((dmn)->info.caps.dmn_type##_sw_owner || \ 10 ((dmn)->info.caps.dmn_type##_sw_owner_v2 && \ 11 (dmn)->info.caps.sw_format_ver <= MLX5_STEERING_FORMAT_CONNECTX_7)) 13 bool mlx5dr_domain_is_support_ptrn_arg(struct mlx5dr_domain *dmn) in mlx5dr_domain_is_support_ptrn_arg() argument 15 return dmn->info.caps.sw_format_ver >= MLX5_STEERING_FORMAT_CONNECTX_6DX && in mlx5dr_domain_is_support_ptrn_arg() 16 dmn->info.caps.support_modify_argument; in mlx5dr_domain_is_support_ptrn_arg() 19 static int dr_domain_init_modify_header_resources(struct mlx5dr_domain *dmn) in dr_domain_init_modify_header_resources() argument 21 if (!mlx5dr_domain_is_support_ptrn_arg(dmn)) in dr_domain_init_modify_header_resources() 24 dmn->ptrn_mgr = mlx5dr_ptrn_mgr_create(dmn); in dr_domain_init_modify_header_resources() [all …]
|
D | dr_fw.c | 8 mlx5dr_fw_create_recalc_cs_ft(struct mlx5dr_domain *dmn, u16 vport_num) in mlx5dr_fw_create_recalc_cs_ft() argument 21 ft_attr.level = dmn->info.caps.max_ft_level - 1; in mlx5dr_fw_create_recalc_cs_ft() 24 ret = mlx5dr_cmd_create_flow_table(dmn->mdev, in mlx5dr_fw_create_recalc_cs_ft() 29 mlx5dr_err(dmn, "Failed creating TTL W/A FW flow table %d\n", ret); in mlx5dr_fw_create_recalc_cs_ft() 33 ret = mlx5dr_cmd_create_empty_flow_group(dmn->mdev, in mlx5dr_fw_create_recalc_cs_ft() 37 mlx5dr_err(dmn, "Failed creating TTL W/A FW flow group %d\n", ret); in mlx5dr_fw_create_recalc_cs_ft() 46 ret = mlx5dr_cmd_alloc_modify_header(dmn->mdev, MLX5_FLOW_TABLE_TYPE_FDB, 1, in mlx5dr_fw_create_recalc_cs_ft() 50 mlx5dr_err(dmn, "Failed modify header TTL %d\n", ret); in mlx5dr_fw_create_recalc_cs_ft() 54 ret = mlx5dr_cmd_set_fte_modify_and_vport(dmn->mdev, in mlx5dr_fw_create_recalc_cs_ft() 59 mlx5dr_err(dmn, "Failed setting TTL W/A flow table entry %d\n", ret); in mlx5dr_fw_create_recalc_cs_ft() [all …]
|
D | dr_action.c | 531 static void dr_actions_apply(struct mlx5dr_domain *dmn, in dr_actions_apply() argument 538 struct mlx5dr_ste_ctx *ste_ctx = dmn->ste_ctx; in dr_actions_apply() 542 mlx5dr_ste_set_actions_rx(ste_ctx, dmn, action_type_set, in dr_actions_apply() 545 mlx5dr_ste_set_actions_tx(ste_ctx, dmn, action_type_set, in dr_actions_apply() 586 static int dr_action_handle_cs_recalc(struct mlx5dr_domain *dmn, in dr_action_handle_cs_recalc() argument 601 mlx5dr_dbg(dmn, in dr_action_handle_cs_recalc() 611 ret = mlx5dr_domain_get_recalc_cs_ft_addr(dest_action->vport->dmn, in dr_action_handle_cs_recalc() 615 mlx5dr_err(dmn, "Failed to get FW cs recalc flow table\n"); in dr_action_handle_cs_recalc() 627 static void dr_action_modify_ttl_adjust(struct mlx5dr_domain *dmn, in dr_action_modify_ttl_adjust() argument 635 if (mlx5dr_ste_supp_ttl_cs_recalc(&dmn->info.caps)) in dr_action_modify_ttl_adjust() [all …]
|
D | dr_table.c | 6 static int dr_table_set_miss_action_nic(struct mlx5dr_domain *dmn, in dr_table_set_miss_action_nic() argument 38 ret = mlx5dr_ste_htbl_init_and_postsend(dmn, nic_tbl->nic_dmn, in dr_table_set_miss_action_nic() 41 mlx5dr_dbg(dmn, "Failed to set NIC RX/TX miss action, ret %d\n", ret); in dr_table_set_miss_action_nic() 54 mlx5dr_domain_lock(tbl->dmn); in mlx5dr_table_set_miss_action() 56 if (tbl->dmn->type == MLX5DR_DOMAIN_TYPE_NIC_RX || in mlx5dr_table_set_miss_action() 57 tbl->dmn->type == MLX5DR_DOMAIN_TYPE_FDB) { in mlx5dr_table_set_miss_action() 58 ret = dr_table_set_miss_action_nic(tbl->dmn, &tbl->rx, action); in mlx5dr_table_set_miss_action() 63 if (tbl->dmn->type == MLX5DR_DOMAIN_TYPE_NIC_TX || in mlx5dr_table_set_miss_action() 64 tbl->dmn->type == MLX5DR_DOMAIN_TYPE_FDB) { in mlx5dr_table_set_miss_action() 65 ret = dr_table_set_miss_action_nic(tbl->dmn, &tbl->tx, action); in mlx5dr_table_set_miss_action() [all …]
|
D | dr_matcher.c | 117 struct mlx5dr_domain *dmn) in dr_mask_is_tnl_vxlan_gpe() argument 120 dr_matcher_supp_vxlan_gpe(&dmn->info.caps); in dr_mask_is_tnl_vxlan_gpe() 143 struct mlx5dr_domain *dmn) in dr_mask_is_tnl_geneve_tlv_opt_exist_set() argument 145 return dr_matcher_supp_flex_parser_ok(&dmn->info.caps) && in dr_mask_is_tnl_geneve_tlv_opt_exist_set() 158 struct mlx5dr_domain *dmn) in dr_mask_is_tnl_geneve() argument 161 dr_matcher_supp_tnl_geneve(&dmn->info.caps); in dr_mask_is_tnl_geneve() 175 struct mlx5dr_domain *dmn) in dr_mask_is_tnl_gtpu() argument 178 dr_matcher_supp_tnl_gtpu(&dmn->info.caps); in dr_mask_is_tnl_gtpu() 187 struct mlx5dr_domain *dmn) in dr_mask_is_tnl_gtpu_dw_0() argument 190 dr_matcher_supp_tnl_gtpu_dw_0(&dmn->info.caps); in dr_mask_is_tnl_gtpu_dw_0() [all …]
|
D | dr_send.c | 106 void mlx5dr_send_info_pool_destroy(struct mlx5dr_domain *dmn) in mlx5dr_send_info_pool_destroy() argument 108 dr_send_info_pool_destroy(dmn->send_info_pool_tx); in mlx5dr_send_info_pool_destroy() 109 dr_send_info_pool_destroy(dmn->send_info_pool_rx); in mlx5dr_send_info_pool_destroy() 132 int mlx5dr_send_info_pool_create(struct mlx5dr_domain *dmn) in mlx5dr_send_info_pool_create() argument 134 dmn->send_info_pool_rx = dr_send_info_pool_create(); in mlx5dr_send_info_pool_create() 135 if (!dmn->send_info_pool_rx) in mlx5dr_send_info_pool_create() 138 dmn->send_info_pool_tx = dr_send_info_pool_create(); in mlx5dr_send_info_pool_create() 139 if (!dmn->send_info_pool_tx) { in mlx5dr_send_info_pool_create() 140 dr_send_info_pool_destroy(dmn->send_info_pool_rx); in mlx5dr_send_info_pool_create() 148 *mlx5dr_send_info_alloc(struct mlx5dr_domain *dmn, in mlx5dr_send_info_alloc() argument [all …]
|
D | dr_rule.c | 14 static int dr_rule_append_to_miss_list(struct mlx5dr_domain *dmn, in dr_rule_append_to_miss_list() argument 20 struct mlx5dr_ste_ctx *ste_ctx = dmn->ste_ctx; in dr_rule_append_to_miss_list() 28 ste_info_last = mlx5dr_send_info_alloc(dmn, nic_type); in dr_rule_append_to_miss_list() 47 struct mlx5dr_ste_ctx *ste_ctx = matcher->tbl->dmn->ste_ctx; in dr_rule_set_last_ste_miss_addr() 62 struct mlx5dr_domain *dmn = matcher->tbl->dmn; in dr_rule_create_collision_htbl() local 67 new_htbl = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, in dr_rule_create_collision_htbl() 72 mlx5dr_dbg(dmn, "Failed allocating collision table\n"); in dr_rule_create_collision_htbl() 94 mlx5dr_dbg(matcher->tbl->dmn, "Failed creating collision entry\n"); in dr_rule_create_collision_entry() 107 mlx5dr_dbg(matcher->tbl->dmn, "Failed allocating table\n"); in dr_rule_create_collision_entry() 120 struct mlx5dr_domain *dmn) in dr_rule_handle_one_ste_in_update_list() argument [all …]
|
D | dr_definer.c | 40 dr_definer_find_obj(struct mlx5dr_domain *dmn, u16 format_id, in dr_definer_find_obj() argument 46 xa_for_each(&dmn->definers_xa, id, definer_obj) { in dr_definer_find_obj() 57 dr_definer_create_obj(struct mlx5dr_domain *dmn, u16 format_id, in dr_definer_create_obj() argument 67 ret = mlx5dr_cmd_create_definer(dmn->mdev, in dr_definer_create_obj() 80 mlx5dr_err(dmn, "Unsupported definer ID (%d)\n", definer_obj->id); in dr_definer_create_obj() 91 ret = xa_insert(&dmn->definers_xa, definer_obj->id, definer_obj, GFP_KERNEL); in dr_definer_create_obj() 93 mlx5dr_dbg(dmn, "Couldn't insert new definer into xarray (%d)\n", ret); in dr_definer_create_obj() 100 mlx5dr_cmd_destroy_definer(dmn->mdev, definer_obj->id); in dr_definer_create_obj() 107 static void dr_definer_destroy_obj(struct mlx5dr_domain *dmn, in dr_definer_destroy_obj() argument 110 mlx5dr_cmd_destroy_definer(dmn->mdev, definer_obj->id); in dr_definer_destroy_obj() [all …]
|
D | dr_arg.c | 21 struct mlx5dr_domain *dmn; member 27 struct mlx5dr_domain *dmn; member 43 pool->dmn->info.caps.log_header_modify_argument_granularity; in dr_arg_pool_alloc_objs() 46 max_t(u32, pool->dmn->info.caps.log_header_modify_argument_granularity, in dr_arg_pool_alloc_objs() 49 min_t(u32, pool->dmn->info.caps.log_header_modify_argument_max_alloc, in dr_arg_pool_alloc_objs() 53 mlx5dr_err(pool->dmn, "Required chunk size (%d) is not supported\n", in dr_arg_pool_alloc_objs() 60 ret = mlx5dr_cmd_create_modify_header_arg(pool->dmn->mdev, in dr_arg_pool_alloc_objs() 62 pool->dmn->pdn, in dr_arg_pool_alloc_objs() 65 mlx5dr_err(pool->dmn, "failed allocating object with range: %d:\n", in dr_arg_pool_alloc_objs() 89 mlx5dr_cmd_destroy_modify_header_arg(pool->dmn->mdev, obj_id); in dr_arg_pool_alloc_objs() [all …]
|
D | dr_dbg.c | 59 mutex_lock(&tbl->dmn->dump_info.dbg_mutex); in mlx5dr_dbg_tbl_add() 60 list_add_tail(&tbl->dbg_node, &tbl->dmn->dbg_tbl_list); in mlx5dr_dbg_tbl_add() 61 mutex_unlock(&tbl->dmn->dump_info.dbg_mutex); in mlx5dr_dbg_tbl_add() 66 mutex_lock(&tbl->dmn->dump_info.dbg_mutex); in mlx5dr_dbg_tbl_del() 68 mutex_unlock(&tbl->dmn->dump_info.dbg_mutex); in mlx5dr_dbg_tbl_del() 73 struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; in mlx5dr_dbg_rule_add() local 75 mutex_lock(&dmn->dump_info.dbg_mutex); in mlx5dr_dbg_rule_add() 77 mutex_unlock(&dmn->dump_info.dbg_mutex); in mlx5dr_dbg_rule_add() 82 struct mlx5dr_domain *dmn = rule->matcher->tbl->dmn; in mlx5dr_dbg_rule_del() local 84 mutex_lock(&dmn->dump_info.dbg_mutex); in mlx5dr_dbg_rule_del() [all …]
|
D | dr_icm_pool.c | 20 struct mlx5dr_domain *dmn; member 48 struct mlx5dr_domain *dmn; member 113 struct mlx5_core_dev *mdev = pool->dmn->mdev; in dr_icm_pool_mr_create() 123 icm_mr->dmn = pool->dmn; in dr_icm_pool_mr_create() 153 mlx5dr_err(pool->dmn, "Failed to allocate SW ICM memory, err (%d)\n", err); in dr_icm_pool_mr_create() 158 err = dr_icm_create_dm_mkey(mdev, pool->dmn->pdn, in dr_icm_pool_mr_create() 164 mlx5dr_err(pool->dmn, "Failed to create SW ICM MKEY, err (%d)\n", err); in dr_icm_pool_mr_create() 171 mlx5dr_err(pool->dmn, "Failed to get Aligned ICM mem (asked: %zu)\n", in dr_icm_pool_mr_create() 190 struct mlx5_core_dev *mdev = icm_mr->dmn->mdev; in dr_icm_pool_mr_destroy() 291 pool->dmn->num_buddies[pool->icm_type]++; in dr_icm_buddy_create() [all …]
|
D | dr_types.h | 26 #define mlx5dr_err(dmn, arg...) mlx5_core_err((dmn)->mdev, ##arg) argument 27 #define mlx5dr_info(dmn, arg...) mlx5_core_info((dmn)->mdev, ##arg) argument 28 #define mlx5dr_dbg(dmn, arg...) mlx5_core_dbg((dmn)->mdev, ##arg) argument 218 struct mlx5dr_domain *dmn; member 308 struct mlx5dr_domain *dmn, 314 struct mlx5dr_domain *dmn, 383 int mlx5dr_ste_build_pre_check(struct mlx5dr_domain *dmn, 509 struct mlx5dr_domain *dmn, 971 struct mlx5dr_domain *dmn; member 1037 struct mlx5dr_domain *dmn; member [all …]
|
D | mlx5dr.h | 50 void mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn, 86 mlx5dr_action_create_dest_table_num(struct mlx5dr_domain *dmn, u32 table_num); 101 mlx5dr_action_create_mult_dest_tbl(struct mlx5dr_domain *dmn, 112 mlx5dr_action_create_flow_sampler(struct mlx5dr_domain *dmn, u32 sampler_id); 118 mlx5dr_action_create_packet_reformat(struct mlx5dr_domain *dmn, 137 mlx5dr_action_create_aso(struct mlx5dr_domain *dmn, 145 mlx5dr_action_create_dest_match_range(struct mlx5dr_domain *dmn, 156 int mlx5dr_definer_get(struct mlx5dr_domain *dmn, u16 format_id, 159 void mlx5dr_definer_put(struct mlx5dr_domain *dmn, u32 definer_id);
|
D | dr_ptrn.c | 16 struct mlx5dr_domain *dmn; member 94 mgr->dmn->info.caps.hdr_modify_pattern_icm_addr) / in dr_ptrn_alloc_pattern() 165 if (mlx5dr_send_postsend_pattern(mgr->dmn, pattern->chunk, in mlx5dr_ptrn_cache_get_pattern() 197 struct mlx5dr_ptrn_mgr *mlx5dr_ptrn_mgr_create(struct mlx5dr_domain *dmn) in mlx5dr_ptrn_mgr_create() argument 201 if (!mlx5dr_domain_is_support_ptrn_arg(dmn)) in mlx5dr_ptrn_mgr_create() 208 mgr->dmn = dmn; in mlx5dr_ptrn_mgr_create() 209 mgr->ptrn_icm_pool = mlx5dr_icm_pool_create(dmn, DR_ICM_TYPE_MODIFY_HDR_PTRN); in mlx5dr_ptrn_mgr_create() 211 mlx5dr_err(dmn, "Couldn't get modify-header-pattern memory\n"); in mlx5dr_ptrn_mgr_create()
|
D | dr_ste.c | 313 struct mlx5dr_domain *dmn = matcher->tbl->dmn; in mlx5dr_ste_free() local 314 struct mlx5dr_ste_ctx *ste_ctx = dmn->ste_ctx; in mlx5dr_ste_free() 365 mlx5dr_send_postsend_ste(dmn, cur_ste_info->ste, in mlx5dr_ste_free() 427 int mlx5dr_ste_htbl_init_and_postsend(struct mlx5dr_domain *dmn, in mlx5dr_ste_htbl_init_and_postsend() argument 435 mlx5dr_ste_set_formatted_ste(dmn->ste_ctx, in mlx5dr_ste_htbl_init_and_postsend() 436 dmn->info.caps.gvmi, in mlx5dr_ste_htbl_init_and_postsend() 442 return mlx5dr_send_postsend_formatted_htbl(dmn, htbl, formatted_ste, update_hw_ste); in mlx5dr_ste_htbl_init_and_postsend() 452 struct mlx5dr_domain *dmn = matcher->tbl->dmn; in mlx5dr_ste_create_next_htbl() local 453 struct mlx5dr_ste_ctx *ste_ctx = dmn->ste_ctx; in mlx5dr_ste_create_next_htbl() 464 next_htbl = mlx5dr_ste_htbl_alloc(dmn->ste_icm_pool, in mlx5dr_ste_create_next_htbl() [all …]
|
D | dr_dbg.h | 10 void mlx5dr_dbg_init_dump(struct mlx5dr_domain *dmn); 11 void mlx5dr_dbg_uninit_dump(struct mlx5dr_domain *dmn);
|
D | dr_ste_v1.h | 20 void dr_ste_v1_set_actions_tx(struct mlx5dr_domain *dmn, u8 *action_type_set, 23 void dr_ste_v1_set_actions_rx(struct mlx5dr_domain *dmn, u8 *action_type_set,
|
D | dr_ste_v1.c | 623 void dr_ste_v1_set_actions_tx(struct mlx5dr_domain *dmn, in dr_ste_v1_set_actions_tx() argument 779 void dr_ste_v1_set_actions_rx(struct mlx5dr_domain *dmn, in dr_ste_v1_set_actions_rx() argument 1984 struct mlx5dr_domain *dmn = sb->dmn; in dr_ste_v1_build_src_gvmi_qpn_tag() local 1992 peer = xa_load(&dmn->peer_dmn_xa, id); in dr_ste_v1_build_src_gvmi_qpn_tag() 1994 if (id == dmn->info.caps.gvmi) in dr_ste_v1_build_src_gvmi_qpn_tag() 1995 vport_dmn = dmn; in dr_ste_v1_build_src_gvmi_qpn_tag() 2003 vport_dmn = dmn; in dr_ste_v1_build_src_gvmi_qpn_tag() 2011 mlx5dr_err(dmn, "Vport 0x%x is disabled or invalid\n", in dr_ste_v1_build_src_gvmi_qpn_tag() 2237 ptrn_mgr = action->rewrite->dmn->ptrn_mgr; in dr_ste_v1_alloc_modify_hdr_ptrn_arg() 2241 action->rewrite->arg = mlx5dr_arg_get_obj(action->rewrite->dmn->arg_mgr, in dr_ste_v1_alloc_modify_hdr_ptrn_arg() [all …]
|
D | dr_ste.h | 163 void (*set_actions_rx)(struct mlx5dr_domain *dmn, 169 void (*set_actions_tx)(struct mlx5dr_domain *dmn,
|
D | dr_ste_v0.c | 409 dr_ste_v0_set_actions_tx(struct mlx5dr_domain *dmn, in dr_ste_v0_set_actions_tx() argument 467 if (MLX5_CAP_GEN(dmn->mdev, prio_tag_required)) in dr_ste_v0_set_actions_tx() 479 dr_ste_v0_set_actions_rx(struct mlx5dr_domain *dmn, in dr_ste_v0_set_actions_rx() argument 1652 struct mlx5dr_domain *dmn = sb->dmn; in dr_ste_v0_build_src_gvmi_qpn_tag() local 1661 peer = xa_load(&dmn->peer_dmn_xa, id); in dr_ste_v0_build_src_gvmi_qpn_tag() 1663 if (id == dmn->info.caps.gvmi) in dr_ste_v0_build_src_gvmi_qpn_tag() 1664 vport_dmn = dmn; in dr_ste_v0_build_src_gvmi_qpn_tag() 1672 vport_dmn = dmn; in dr_ste_v0_build_src_gvmi_qpn_tag() 1680 mlx5dr_err(dmn, "Vport 0x%x is disabled or invalid\n", in dr_ste_v0_build_src_gvmi_qpn_tag()
|
/linux-6.6.21/drivers/powercap/ |
D | intel_rapl_common.c | 1285 int dmn, prim; in rapl_update_domain_data() local 1288 for (dmn = 0; dmn < rp->nr_domains; dmn++) { in rapl_update_domain_data() 1290 rp->domains[dmn].name); in rapl_update_domain_data() 1295 if (!rapl_read_data_raw(&rp->domains[dmn], prim, in rapl_update_domain_data() 1297 rp->domains[dmn].rdd.primitives[prim] = val; in rapl_update_domain_data()
|