/Linux-v5.10/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum.h | 142 struct mlxsw_sp { struct 188 (*clock_init)(struct mlxsw_sp *mlxsw_sp, struct device *dev); argument 191 struct mlxsw_sp_ptp_state *(*init)(struct mlxsw_sp *mlxsw_sp); 197 void (*receive)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb, 203 void (*transmitted)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb, 211 int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp, 220 mlxsw_sp_lag_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id) in mlxsw_sp_lag_get() argument 222 return &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_get() 276 struct mlxsw_sp *mlxsw_sp; member 326 void (*from_ptys_supported_port)(struct mlxsw_sp *mlxsw_sp, [all …]
|
D | spectrum_router.c | 62 struct mlxsw_sp *mlxsw_sp; member 117 mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp, 121 static void mlxsw_sp_lpm_tree_put(struct mlxsw_sp *mlxsw_sp, 123 static int mlxsw_sp_vr_lpm_tree_bind(struct mlxsw_sp *mlxsw_sp, 126 static int mlxsw_sp_vr_lpm_tree_unbind(struct mlxsw_sp *mlxsw_sp, 170 static int mlxsw_sp_rif_counter_edit(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_counter_edit() argument 181 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl); in mlxsw_sp_rif_counter_edit() 187 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl); in mlxsw_sp_rif_counter_edit() 190 int mlxsw_sp_rif_counter_value_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_rif_counter_value_get() argument 208 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(ricnt), ricnt_pl); in mlxsw_sp_rif_counter_value_get() [all …]
|
D | spectrum_nve_vxlan.c | 106 static int __mlxsw_sp_nve_parsing_set(struct mlxsw_sp *mlxsw_sp, in __mlxsw_sp_nve_parsing_set() argument 113 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(mprs), mprs_pl); in __mlxsw_sp_nve_parsing_set() 116 static int mlxsw_sp_nve_parsing_set(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_parsing_set() argument 119 int parsing_depth = mlxsw_sp->nve->inc_parsing_depth_refs ? in mlxsw_sp_nve_parsing_set() 123 return __mlxsw_sp_nve_parsing_set(mlxsw_sp, parsing_depth, udp_dport); in mlxsw_sp_nve_parsing_set() 127 __mlxsw_sp_nve_inc_parsing_depth_get(struct mlxsw_sp *mlxsw_sp, in __mlxsw_sp_nve_inc_parsing_depth_get() argument 132 mlxsw_sp->nve->inc_parsing_depth_refs++; in __mlxsw_sp_nve_inc_parsing_depth_get() 134 err = mlxsw_sp_nve_parsing_set(mlxsw_sp, udp_dport); in __mlxsw_sp_nve_inc_parsing_depth_get() 140 mlxsw_sp->nve->inc_parsing_depth_refs--; in __mlxsw_sp_nve_inc_parsing_depth_get() 145 __mlxsw_sp_nve_inc_parsing_depth_put(struct mlxsw_sp *mlxsw_sp, in __mlxsw_sp_nve_inc_parsing_depth_put() argument [all …]
|
D | spectrum_acl_tcam.h | 27 size_t mlxsw_sp_acl_tcam_priv_size(struct mlxsw_sp *mlxsw_sp); 28 int mlxsw_sp_acl_tcam_init(struct mlxsw_sp *mlxsw_sp, 30 void mlxsw_sp_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp, 32 u32 mlxsw_sp_acl_tcam_vregion_rehash_intrvl_get(struct mlxsw_sp *mlxsw_sp, 34 int mlxsw_sp_acl_tcam_vregion_rehash_intrvl_set(struct mlxsw_sp *mlxsw_sp, 37 int mlxsw_sp_acl_tcam_priority_get(struct mlxsw_sp *mlxsw_sp, 43 int (*ruleset_add)(struct mlxsw_sp *mlxsw_sp, 47 void (*ruleset_del)(struct mlxsw_sp *mlxsw_sp, void *ruleset_priv); 48 int (*ruleset_bind)(struct mlxsw_sp *mlxsw_sp, void *ruleset_priv, 51 void (*ruleset_unbind)(struct mlxsw_sp *mlxsw_sp, void *ruleset_priv, [all …]
|
D | spectrum.c | 172 int mlxsw_sp_flow_counter_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_get() argument 181 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(mgpc), mgpc_pl); in mlxsw_sp_flow_counter_get() 191 static int mlxsw_sp_flow_counter_clear(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_clear() argument 198 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(mgpc), mgpc_pl); in mlxsw_sp_flow_counter_clear() 201 int mlxsw_sp_flow_counter_alloc(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_alloc() argument 206 err = mlxsw_sp_counter_alloc(mlxsw_sp, MLXSW_SP_COUNTER_SUB_POOL_FLOW, in mlxsw_sp_flow_counter_alloc() 210 err = mlxsw_sp_flow_counter_clear(mlxsw_sp, *p_counter_index); in mlxsw_sp_flow_counter_alloc() 216 mlxsw_sp_counter_free(mlxsw_sp, MLXSW_SP_COUNTER_SUB_POOL_FLOW, in mlxsw_sp_flow_counter_alloc() 221 void mlxsw_sp_flow_counter_free(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_free() argument 224 mlxsw_sp_counter_free(mlxsw_sp, MLXSW_SP_COUNTER_SUB_POOL_FLOW, in mlxsw_sp_flow_counter_free() [all …]
|
D | spectrum_acl_flex_actions.c | 11 struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp_act_kvdl_set_add() local 22 err = mlxsw_sp_kvdl_alloc(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET, in mlxsw_sp_act_kvdl_set_add() 27 err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pefa), pefa_pl); in mlxsw_sp_act_kvdl_set_add() 34 mlxsw_sp_kvdl_free(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET, in mlxsw_sp_act_kvdl_set_add() 56 struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp_act_kvdl_set_del() local 60 mlxsw_sp_kvdl_free(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET, in mlxsw_sp_act_kvdl_set_del() 73 struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp2_act_kvdl_set_activity_get() local 78 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(pefa), pefa_pl); in mlxsw_sp2_act_kvdl_set_activity_get() 88 struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp_act_kvdl_fwd_entry_add() local 93 err = mlxsw_sp_kvdl_alloc(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_PBS, in mlxsw_sp_act_kvdl_fwd_entry_add() [all …]
|
D | spectrum_acl_tcam.c | 21 size_t mlxsw_sp_acl_tcam_priv_size(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_acl_tcam_priv_size() argument 23 const struct mlxsw_sp_acl_tcam_ops *ops = mlxsw_sp->acl_tcam_ops; in mlxsw_sp_acl_tcam_priv_size() 32 int mlxsw_sp_acl_tcam_init(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_init() argument 35 const struct mlxsw_sp_acl_tcam_ops *ops = mlxsw_sp->acl_tcam_ops; in mlxsw_sp_acl_tcam_init() 47 max_tcam_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_acl_tcam_init() 49 max_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_REGIONS); in mlxsw_sp_acl_tcam_init() 61 max_groups = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_GROUPS); in mlxsw_sp_acl_tcam_init() 69 tcam->max_group_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_acl_tcam_init() 72 err = ops->init(mlxsw_sp, tcam->priv, tcam); in mlxsw_sp_acl_tcam_init() 85 void mlxsw_sp_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_fini() argument [all …]
|
D | spectrum_buffers.c | 128 u32 mlxsw_sp_cells_bytes(const struct mlxsw_sp *mlxsw_sp, u32 cells) in mlxsw_sp_cells_bytes() argument 130 return mlxsw_sp->sb->cell_size * cells; in mlxsw_sp_cells_bytes() 133 u32 mlxsw_sp_bytes_cells(const struct mlxsw_sp *mlxsw_sp, u32 bytes) in mlxsw_sp_bytes_cells() argument 135 return DIV_ROUND_UP(bytes, mlxsw_sp->sb->cell_size); in mlxsw_sp_bytes_cells() 148 static struct mlxsw_sp_sb_pr *mlxsw_sp_sb_pr_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_sb_pr_get() argument 151 return &mlxsw_sp->sb->prs[pool_index]; in mlxsw_sp_sb_pr_get() 162 static struct mlxsw_sp_sb_cm *mlxsw_sp_sb_cm_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_sb_cm_get() argument 166 struct mlxsw_sp_sb_port *sb_port = &mlxsw_sp->sb->ports[local_port]; in mlxsw_sp_sb_cm_get() 175 static struct mlxsw_sp_sb_pm *mlxsw_sp_sb_pm_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_sb_pm_get() argument 178 return &mlxsw_sp->sb->ports[local_port].pms[pool_index]; in mlxsw_sp_sb_pm_get() [all …]
|
D | spectrum_ptp.h | 10 struct mlxsw_sp; 32 mlxsw_sp1_ptp_clock_init(struct mlxsw_sp *mlxsw_sp, struct device *dev); 36 struct mlxsw_sp_ptp_state *mlxsw_sp1_ptp_init(struct mlxsw_sp *mlxsw_sp); 40 void mlxsw_sp1_ptp_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb, 43 void mlxsw_sp1_ptp_transmitted(struct mlxsw_sp *mlxsw_sp, 46 void mlxsw_sp1_ptp_got_timestamp(struct mlxsw_sp *mlxsw_sp, bool ingress, 59 int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp, 70 mlxsw_sp1_ptp_clock_init(struct mlxsw_sp *mlxsw_sp, struct device *dev) in mlxsw_sp1_ptp_clock_init() argument 80 mlxsw_sp1_ptp_init(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp1_ptp_init() argument 89 static inline void mlxsw_sp1_ptp_receive(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_ptp_receive() argument [all …]
|
D | spectrum_nve.c | 66 struct mlxsw_sp *mlxsw_sp; member 177 int mlxsw_sp_nve_learned_ip_resolve(struct mlxsw_sp *mlxsw_sp, u32 uip, in mlxsw_sp_nve_learned_ip_resolve() argument 192 mlxsw_sp_nve_mc_list_find(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_find() argument 195 struct mlxsw_sp_nve *nve = mlxsw_sp->nve; in mlxsw_sp_nve_mc_list_find() 202 mlxsw_sp_nve_mc_list_create(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_create() argument 205 struct mlxsw_sp_nve *nve = mlxsw_sp->nve; in mlxsw_sp_nve_mc_list_create() 228 static void mlxsw_sp_nve_mc_list_destroy(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_destroy() argument 231 struct mlxsw_sp_nve *nve = mlxsw_sp->nve; in mlxsw_sp_nve_mc_list_destroy() 240 mlxsw_sp_nve_mc_list_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_get() argument 245 mc_list = mlxsw_sp_nve_mc_list_find(mlxsw_sp, key); in mlxsw_sp_nve_mc_list_get() [all …]
|
D | spectrum_mr_tcam.c | 33 mlxsw_sp_mr_erif_sublist_full(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_mr_erif_sublist_full() argument 36 int erif_list_entries = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_mr_erif_sublist_full() 49 mlxsw_sp_mr_erif_sublist_create(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_mr_erif_sublist_create() argument 58 err = mlxsw_sp_kvdl_alloc(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_MCRIGR, in mlxsw_sp_mr_erif_sublist_create() 70 mlxsw_sp_mr_erif_sublist_destroy(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_mr_erif_sublist_destroy() argument 74 mlxsw_sp_kvdl_free(mlxsw_sp, MLXSW_SP_KVDL_ENTRY_TYPE_MCRIGR, in mlxsw_sp_mr_erif_sublist_destroy() 80 mlxsw_sp_mr_erif_list_add(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_mr_erif_list_add() argument 90 sublist = mlxsw_sp_mr_erif_sublist_create(mlxsw_sp, erif_list); in mlxsw_sp_mr_erif_list_add() 99 if (mlxsw_sp_mr_erif_sublist_full(mlxsw_sp, sublist)) { in mlxsw_sp_mr_erif_list_add() 100 sublist = mlxsw_sp_mr_erif_sublist_create(mlxsw_sp, in mlxsw_sp_mr_erif_list_add() [all …]
|
D | spectrum_mr.h | 44 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv); 45 int (*route_create)(struct mlxsw_sp *mlxsw_sp, void *priv, 48 int (*route_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 50 int (*route_stats)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 52 int (*route_action_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 54 int (*route_min_mtu_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 56 int (*route_irif_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 58 int (*route_erif_add)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 60 int (*route_erif_del)(struct mlxsw_sp *mlxsw_sp, void *route_priv, 62 void (*route_destroy)(struct mlxsw_sp *mlxsw_sp, void *priv, [all …]
|
D | spectrum_acl.c | 24 struct mlxsw_sp *mlxsw_sp; member 88 struct mlxsw_sp_fid *mlxsw_sp_acl_dummy_fid(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_acl_dummy_fid() argument 90 return mlxsw_sp->acl->dummy_fid; in mlxsw_sp_acl_dummy_fid() 100 int mlxsw_sp_acl_ruleset_bind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ruleset_bind() argument 107 return ops->ruleset_bind(mlxsw_sp, ruleset->priv, in mlxsw_sp_acl_ruleset_bind() 111 void mlxsw_sp_acl_ruleset_unbind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ruleset_unbind() argument 118 ops->ruleset_unbind(mlxsw_sp, ruleset->priv, in mlxsw_sp_acl_ruleset_unbind() 123 mlxsw_sp_acl_ruleset_block_bind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ruleset_block_bind() argument 132 err = mlxsw_sp_acl_ruleset_bind(mlxsw_sp, block, binding); in mlxsw_sp_acl_ruleset_block_bind() 141 mlxsw_sp_acl_ruleset_unbind(mlxsw_sp, block, binding); in mlxsw_sp_acl_ruleset_block_bind() [all …]
|
D | spectrum_span.h | 13 struct mlxsw_sp; 49 int (*init)(struct mlxsw_sp *mlxsw_sp); 50 int (*policer_id_base_set)(struct mlxsw_sp *mlxsw_sp, 64 int (*parms_set)(struct mlxsw_sp *mlxsw_sp, 72 int mlxsw_sp_span_init(struct mlxsw_sp *mlxsw_sp); 73 void mlxsw_sp_span_fini(struct mlxsw_sp *mlxsw_sp); 74 void mlxsw_sp_span_respin(struct mlxsw_sp *mlxsw_sp); 77 mlxsw_sp_span_entry_find_by_port(struct mlxsw_sp *mlxsw_sp, 80 void mlxsw_sp_span_entry_invalidate(struct mlxsw_sp *mlxsw_sp, 86 int mlxsw_sp_span_agent_get(struct mlxsw_sp *mlxsw_sp, int *p_span_id, [all …]
|
D | spectrum_fid.c | 104 struct mlxsw_sp *mlxsw_sp; member 130 bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index) in mlxsw_sp_fid_is_dummy() argument 135 fid_family = mlxsw_sp->fid_core->fid_family_arr[fid_type]; in mlxsw_sp_fid_is_dummy() 145 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_fid_lookup_by_index() argument 150 fid = rhashtable_lookup_fast(&mlxsw_sp->fid_core->fid_ht, &fid_index, in mlxsw_sp_fid_lookup_by_index() 179 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_vni(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_fid_lookup_by_vni() argument 184 fid = rhashtable_lookup_fast(&mlxsw_sp->fid_core->vni_ht, &vni, in mlxsw_sp_fid_lookup_by_vni() 244 struct mlxsw_sp *mlxsw_sp = fid_family->mlxsw_sp; in mlxsw_sp_fid_vni_set() local 253 err = rhashtable_lookup_insert_fast(&mlxsw_sp->fid_core->vni_ht, in mlxsw_sp_fid_vni_set() 268 rhashtable_remove_fast(&mlxsw_sp->fid_core->vni_ht, &fid->vni_ht_node, in mlxsw_sp_fid_vni_set() [all …]
|
D | spectrum_span.c | 23 struct mlxsw_sp *mlxsw_sp; member 75 const struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp_span_occ_get() local 77 return atomic_read(&mlxsw_sp->span->active_entries_count); in mlxsw_sp_span_occ_get() 80 int mlxsw_sp_span_init(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_span_init() argument 82 struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp_span_init() 86 if (!MLXSW_CORE_RES_VALID(mlxsw_sp->core, MAX_SPAN)) in mlxsw_sp_span_init() 89 entries_count = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_SPAN); in mlxsw_sp_span_init() 99 span->mlxsw_sp = mlxsw_sp; in mlxsw_sp_span_init() 100 mlxsw_sp->span = span; in mlxsw_sp_span_init() 102 for (i = 0; i < mlxsw_sp->span->entries_count; i++) in mlxsw_sp_span_init() [all …]
|
D | spectrum_dpipe.c | 154 static int mlxsw_sp_erif_entry_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_erif_entry_get() argument 181 err = mlxsw_sp_rif_counter_value_get(mlxsw_sp, rif, in mlxsw_sp_erif_entry_get() 199 struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp_dpipe_table_erif_entries_dump() local 213 rif_count = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); in mlxsw_sp_dpipe_table_erif_entries_dump() 214 mutex_lock(&mlxsw_sp->router->lock); in mlxsw_sp_dpipe_table_erif_entries_dump() 222 struct mlxsw_sp_rif *rif = mlxsw_sp_rif_by_index(mlxsw_sp, i); in mlxsw_sp_dpipe_table_erif_entries_dump() 226 err = mlxsw_sp_erif_entry_get(mlxsw_sp, &entry, rif, in mlxsw_sp_dpipe_table_erif_entries_dump() 245 mutex_unlock(&mlxsw_sp->router->lock); in mlxsw_sp_dpipe_table_erif_entries_dump() 252 mutex_unlock(&mlxsw_sp->router->lock); in mlxsw_sp_dpipe_table_erif_entries_dump() 259 struct mlxsw_sp *mlxsw_sp = priv; in mlxsw_sp_dpipe_table_erif_counters_update() local [all …]
|
D | spectrum_router.h | 19 struct mlxsw_sp *mlxsw_sp; member 70 struct mlxsw_sp_rif *mlxsw_sp_rif_by_index(const struct mlxsw_sp *mlxsw_sp, 79 int mlxsw_sp_rif_counter_value_get(struct mlxsw_sp *mlxsw_sp, 83 void mlxsw_sp_rif_counter_free(struct mlxsw_sp *mlxsw_sp, 86 int mlxsw_sp_rif_counter_alloc(struct mlxsw_sp *mlxsw_sp, 102 int mlxsw_sp_neigh_counter_get(struct mlxsw_sp *mlxsw_sp, 106 mlxsw_sp_neigh_entry_counter_update(struct mlxsw_sp *mlxsw_sp, 110 int __mlxsw_sp_ipip_entry_update_tunnel(struct mlxsw_sp *mlxsw_sp, 116 void mlxsw_sp_ipip_entry_demote_tunnel(struct mlxsw_sp *mlxsw_sp, 119 mlxsw_sp_ipip_demote_tunnel_by_saddr(struct mlxsw_sp *mlxsw_sp, [all …]
|
D | spectrum_kvdl.c | 17 int mlxsw_sp_kvdl_init(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_kvdl_init() argument 19 const struct mlxsw_sp_kvdl_ops *kvdl_ops = mlxsw_sp->kvdl_ops; in mlxsw_sp_kvdl_init() 23 kvdl = kzalloc(sizeof(*mlxsw_sp->kvdl) + kvdl_ops->priv_size, in mlxsw_sp_kvdl_init() 29 mlxsw_sp->kvdl = kvdl; in mlxsw_sp_kvdl_init() 31 err = kvdl_ops->init(mlxsw_sp, kvdl->priv); in mlxsw_sp_kvdl_init() 42 void mlxsw_sp_kvdl_fini(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_kvdl_fini() argument 44 struct mlxsw_sp_kvdl *kvdl = mlxsw_sp->kvdl; in mlxsw_sp_kvdl_fini() 46 kvdl->kvdl_ops->fini(mlxsw_sp, kvdl->priv); in mlxsw_sp_kvdl_fini() 51 int mlxsw_sp_kvdl_alloc(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_kvdl_alloc() argument 55 struct mlxsw_sp_kvdl *kvdl = mlxsw_sp->kvdl; in mlxsw_sp_kvdl_alloc() [all …]
|
D | spectrum_acl_ctcam.c | 14 mlxsw_sp_acl_ctcam_region_resize(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ctcam_region_resize() argument 23 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptar), ptar_pl); in mlxsw_sp_acl_ctcam_region_resize() 27 mlxsw_sp_acl_ctcam_region_move(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ctcam_region_move() argument 36 mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(prcr), prcr_pl); in mlxsw_sp_acl_ctcam_region_move() 40 mlxsw_sp_acl_ctcam_region_entry_insert(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ctcam_region_entry_insert() argument 47 struct mlxsw_afk *afk = mlxsw_sp_acl_afk(mlxsw_sp->acl); in mlxsw_sp_acl_ctcam_region_entry_insert() 55 err = mlxsw_sp_acl_tcam_priority_get(mlxsw_sp, rulei, &priority, in mlxsw_sp_acl_ctcam_region_entry_insert() 75 err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptce2), ptce2_pl); in mlxsw_sp_acl_ctcam_region_entry_insert() 87 mlxsw_sp_acl_ctcam_region_entry_remove(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ctcam_region_entry_remove() argument 96 mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptce2), ptce2_pl); in mlxsw_sp_acl_ctcam_region_entry_remove() [all …]
|
D | spectrum_trap.c | 56 static int mlxsw_sp_rx_listener(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb, in mlxsw_sp_rx_listener() argument 63 dev_warn_ratelimited(mlxsw_sp->bus_info->dev, "Port %d: skb received for non-existent port\n", in mlxsw_sp_rx_listener() 87 struct mlxsw_sp *mlxsw_sp; in mlxsw_sp_rx_drop_listener() local 91 mlxsw_sp = devlink_trap_ctx_priv(trap_ctx); in mlxsw_sp_rx_drop_listener() 92 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_rx_drop_listener() 94 err = mlxsw_sp_rx_listener(mlxsw_sp, skb, local_port, mlxsw_sp_port); in mlxsw_sp_rx_drop_listener() 98 devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp_rx_drop_listener() 99 in_devlink_port = mlxsw_core_port_devlink_port_get(mlxsw_sp->core, in mlxsw_sp_rx_drop_listener() 113 struct mlxsw_sp *mlxsw_sp; in mlxsw_sp_rx_acl_drop_listener() local 117 mlxsw_sp = devlink_trap_ctx_priv(trap_ctx); in mlxsw_sp_rx_acl_drop_listener() [all …]
|
D | spectrum1_acl_tcam.c | 50 static int mlxsw_sp1_acl_tcam_init(struct mlxsw_sp *mlxsw_sp, void *priv, in mlxsw_sp1_acl_tcam_init() argument 56 static void mlxsw_sp1_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp, void *priv) in mlxsw_sp1_acl_tcam_fini() argument 61 mlxsw_sp1_acl_ctcam_region_catchall_add(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_acl_ctcam_region_catchall_add() argument 70 rulei = mlxsw_sp_acl_rulei_create(mlxsw_sp->acl, NULL); in mlxsw_sp1_acl_ctcam_region_catchall_add() 81 err = mlxsw_sp_acl_ctcam_entry_add(mlxsw_sp, ®ion->cregion, in mlxsw_sp1_acl_ctcam_region_catchall_add() 100 mlxsw_sp1_acl_ctcam_region_catchall_del(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_acl_ctcam_region_catchall_del() argument 105 mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, ®ion->cregion, in mlxsw_sp1_acl_ctcam_region_catchall_del() 113 mlxsw_sp1_acl_tcam_region_init(struct mlxsw_sp *mlxsw_sp, void *region_priv, in mlxsw_sp1_acl_tcam_region_init() argument 121 err = mlxsw_sp_acl_ctcam_region_init(mlxsw_sp, ®ion->cregion, in mlxsw_sp1_acl_tcam_region_init() 126 err = mlxsw_sp1_acl_ctcam_region_catchall_add(mlxsw_sp, region); in mlxsw_sp1_acl_tcam_region_init() [all …]
|
D | spectrum_switchdev.c | 29 struct mlxsw_sp *mlxsw_sp; member 101 mlxsw_sp_bridge_port_fdb_flush(struct mlxsw_sp *mlxsw_sp, 132 bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_bridge_device_is_offloaded() argument 135 return !!mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev); in mlxsw_sp_bridge_device_is_offloaded() 141 struct mlxsw_sp *mlxsw_sp = priv->data; in mlxsw_sp_bridge_device_upper_rif_destroy() local 143 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev); in mlxsw_sp_bridge_device_upper_rif_destroy() 147 static void mlxsw_sp_bridge_device_rifs_destroy(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_bridge_device_rifs_destroy() argument 151 .data = (void *)mlxsw_sp, in mlxsw_sp_bridge_device_rifs_destroy() 154 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev); in mlxsw_sp_bridge_device_rifs_destroy() 170 err = mlxsw_sp_bridge_vxlan_join(bridge->mlxsw_sp, in mlxsw_sp_bridge_device_vxlan_init() [all …]
|
D | spectrum1_mr_tcam.c | 13 struct mlxsw_sp *mlxsw_sp; member 28 static int mlxsw_sp1_mr_tcam_route_replace(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_mr_tcam_route_replace() argument 57 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rmft2), rmft2_pl); in mlxsw_sp1_mr_tcam_route_replace() 60 static int mlxsw_sp1_mr_tcam_route_remove(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_mr_tcam_route_remove() argument 79 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rmft2), rmft2_pl); in mlxsw_sp1_mr_tcam_route_remove() 122 mlxsw_sp1_mr_tcam_route_create(struct mlxsw_sp *mlxsw_sp, void *priv, in mlxsw_sp1_mr_tcam_route_create() argument 137 err = mlxsw_sp1_mr_tcam_route_replace(mlxsw_sp, &route->parman_item, in mlxsw_sp1_mr_tcam_route_create() 149 mlxsw_sp1_mr_tcam_route_destroy(struct mlxsw_sp *mlxsw_sp, void *priv, in mlxsw_sp1_mr_tcam_route_destroy() argument 156 mlxsw_sp1_mr_tcam_route_remove(mlxsw_sp, &route->parman_item, key); in mlxsw_sp1_mr_tcam_route_destroy() 161 mlxsw_sp1_mr_tcam_route_update(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_mr_tcam_route_update() argument [all …]
|
/Linux-v5.10/include/trace/events/ |
D | mlxsw.h | 12 struct mlxsw_sp; 17 TP_PROTO(const struct mlxsw_sp *mlxsw_sp, 20 TP_ARGS(mlxsw_sp, aregion), 23 __field(const void *, mlxsw_sp) 28 __entry->mlxsw_sp = mlxsw_sp; 33 __entry->mlxsw_sp, __entry->aregion) 37 TP_PROTO(const struct mlxsw_sp *mlxsw_sp, 40 TP_ARGS(mlxsw_sp, vregion), 43 __field(const void *, mlxsw_sp) 48 __entry->mlxsw_sp = mlxsw_sp; [all …]
|