Home
last modified time | relevance | path

Searched refs:mlxsw_sp (Results 1 – 25 of 50) sorted by relevance

12

/linux-6.1.9/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum.h160 struct mlxsw_sp { struct
217 (*clock_init)(struct mlxsw_sp *mlxsw_sp, struct device *dev); argument
220 struct mlxsw_sp_ptp_state *(*init)(struct mlxsw_sp *mlxsw_sp);
226 void (*receive)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
232 void (*transmitted)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
240 int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp,
253 mlxsw_sp_lag_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id) in mlxsw_sp_lag_get() argument
255 return &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_get()
321 struct mlxsw_sp *mlxsw_sp; member
369 void (*from_ptys_supported_port)(struct mlxsw_sp *mlxsw_sp,
[all …]
Dspectrum_router.c64 struct mlxsw_sp *mlxsw_sp; member
126 int (*init)(struct mlxsw_sp *mlxsw_sp);
127 int (*ipips_init)(struct mlxsw_sp *mlxsw_sp);
131 mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
135 static void mlxsw_sp_lpm_tree_put(struct mlxsw_sp *mlxsw_sp,
137 static int mlxsw_sp_vr_lpm_tree_bind(struct mlxsw_sp *mlxsw_sp,
140 static int mlxsw_sp_vr_lpm_tree_unbind(struct mlxsw_sp *mlxsw_sp,
184 static int mlxsw_sp_rif_counter_edit(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_counter_edit() argument
195 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl); in mlxsw_sp_rif_counter_edit()
201 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl); in mlxsw_sp_rif_counter_edit()
[all …]
Dspectrum_acl_tcam.h27 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 …]
Dspectrum.c178 int mlxsw_sp_flow_counter_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_get() argument
187 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(mgpc), mgpc_pl); in mlxsw_sp_flow_counter_get()
197 static int mlxsw_sp_flow_counter_clear(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_clear() argument
204 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(mgpc), mgpc_pl); in mlxsw_sp_flow_counter_clear()
207 int mlxsw_sp_flow_counter_alloc(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_alloc() argument
212 err = mlxsw_sp_counter_alloc(mlxsw_sp, MLXSW_SP_COUNTER_SUB_POOL_FLOW, in mlxsw_sp_flow_counter_alloc()
216 err = mlxsw_sp_flow_counter_clear(mlxsw_sp, *p_counter_index); in mlxsw_sp_flow_counter_alloc()
222 mlxsw_sp_counter_free(mlxsw_sp, MLXSW_SP_COUNTER_SUB_POOL_FLOW, in mlxsw_sp_flow_counter_alloc()
227 void mlxsw_sp_flow_counter_free(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_flow_counter_free() argument
230 mlxsw_sp_counter_free(mlxsw_sp, MLXSW_SP_COUNTER_SUB_POOL_FLOW, in mlxsw_sp_flow_counter_free()
[all …]
Dspectrum_acl_flex_actions.c11 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 …]
Dspectrum_nve.c66 struct mlxsw_sp *mlxsw_sp; member
136 err = mlxsw_sp_ipv6_addr_kvdl_index_get(mc_record->mlxsw_sp, in mlxsw_sp_nve_mc_record_ipv6_entry_add()
150 mlxsw_sp_ipv6_addr_put(mc_record->mlxsw_sp, in mlxsw_sp_nve_mc_record_ipv6_entry_del()
187 int mlxsw_sp_nve_learned_ip_resolve(struct mlxsw_sp *mlxsw_sp, u32 uip, in mlxsw_sp_nve_learned_ip_resolve() argument
202 mlxsw_sp_nve_mc_list_find(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_find() argument
205 struct mlxsw_sp_nve *nve = mlxsw_sp->nve; in mlxsw_sp_nve_mc_list_find()
212 mlxsw_sp_nve_mc_list_create(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_create() argument
215 struct mlxsw_sp_nve *nve = mlxsw_sp->nve; in mlxsw_sp_nve_mc_list_create()
238 static void mlxsw_sp_nve_mc_list_destroy(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_nve_mc_list_destroy() argument
241 struct mlxsw_sp_nve *nve = mlxsw_sp->nve; in mlxsw_sp_nve_mc_list_destroy()
[all …]
Dspectrum_acl_tcam.c21 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()
46 max_tcam_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_acl_tcam_init()
48 max_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_REGIONS); in mlxsw_sp_acl_tcam_init()
59 max_groups = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_GROUPS); in mlxsw_sp_acl_tcam_init()
66 tcam->max_group_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_acl_tcam_init()
69 err = ops->init(mlxsw_sp, tcam->priv, tcam); in mlxsw_sp_acl_tcam_init()
82 void mlxsw_sp_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_fini() argument
[all …]
Dspectrum_pgt.c28 int mlxsw_sp_pgt_mid_alloc(struct mlxsw_sp *mlxsw_sp, u16 *p_mid) in mlxsw_sp_pgt_mid_alloc() argument
32 mutex_lock(&mlxsw_sp->pgt->lock); in mlxsw_sp_pgt_mid_alloc()
33 index = idr_alloc(&mlxsw_sp->pgt->pgt_idr, NULL, 0, in mlxsw_sp_pgt_mid_alloc()
34 mlxsw_sp->pgt->end_index, GFP_KERNEL); in mlxsw_sp_pgt_mid_alloc()
42 mutex_unlock(&mlxsw_sp->pgt->lock); in mlxsw_sp_pgt_mid_alloc()
46 mutex_unlock(&mlxsw_sp->pgt->lock); in mlxsw_sp_pgt_mid_alloc()
50 void mlxsw_sp_pgt_mid_free(struct mlxsw_sp *mlxsw_sp, u16 mid_base) in mlxsw_sp_pgt_mid_free() argument
52 mutex_lock(&mlxsw_sp->pgt->lock); in mlxsw_sp_pgt_mid_free()
53 WARN_ON(idr_remove(&mlxsw_sp->pgt->pgt_idr, mid_base)); in mlxsw_sp_pgt_mid_free()
54 mutex_unlock(&mlxsw_sp->pgt->lock); in mlxsw_sp_pgt_mid_free()
[all …]
Dspectrum_ptp.h10 struct mlxsw_sp;
25 mlxsw_sp1_ptp_clock_init(struct mlxsw_sp *mlxsw_sp, struct device *dev);
29 struct mlxsw_sp_ptp_state *mlxsw_sp1_ptp_init(struct mlxsw_sp *mlxsw_sp);
33 void mlxsw_sp1_ptp_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
36 void mlxsw_sp1_ptp_transmitted(struct mlxsw_sp *mlxsw_sp,
39 void mlxsw_sp1_ptp_got_timestamp(struct mlxsw_sp *mlxsw_sp, bool ingress,
52 int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp,
66 mlxsw_sp2_ptp_clock_init(struct mlxsw_sp *mlxsw_sp, struct device *dev);
70 struct mlxsw_sp_ptp_state *mlxsw_sp2_ptp_init(struct mlxsw_sp *mlxsw_sp);
74 void mlxsw_sp2_ptp_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
[all …]
Dspectrum_buffers.c128 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 …]
Dspectrum_nve_vxlan.c192 mlxsw_sp1_nve_vxlan_config_set(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_nve_vxlan_config_set() argument
199 err = mlxsw_sp_router_tb_id_vr_id(mlxsw_sp, config->ul_tb_id, in mlxsw_sp1_nve_vxlan_config_set()
208 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(tngcr), tngcr_pl); in mlxsw_sp1_nve_vxlan_config_set()
211 static void mlxsw_sp1_nve_vxlan_config_clear(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp1_nve_vxlan_config_clear() argument
217 mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(tngcr), tngcr_pl); in mlxsw_sp1_nve_vxlan_config_clear()
220 static int mlxsw_sp1_nve_vxlan_rtdp_set(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_nve_vxlan_rtdp_set() argument
227 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rtdp), rtdp_pl); in mlxsw_sp1_nve_vxlan_rtdp_set()
233 struct mlxsw_sp *mlxsw_sp = nve->mlxsw_sp; in mlxsw_sp1_nve_vxlan_init() local
236 err = mlxsw_sp_parsing_vxlan_udp_dport_set(mlxsw_sp, config->udp_dport); in mlxsw_sp1_nve_vxlan_init()
240 err = mlxsw_sp_parsing_depth_inc(mlxsw_sp); in mlxsw_sp1_nve_vxlan_init()
[all …]
Dspectrum_mr_tcam.c33 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 …]
Dspectrum_mr.h44 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 …]
Dspectrum_span.c23 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 …]
Dspectrum_acl.c24 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 …]
Dspectrum_dpipe.c154 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 …]
Dspectrum_switchdev.c29 struct mlxsw_sp *mlxsw_sp; member
103 void (*init)(struct mlxsw_sp *mlxsw_sp);
134 mlxsw_sp_bridge_port_fdb_flush(struct mlxsw_sp *mlxsw_sp,
144 mlxsw_sp_bridge_mdb_mc_enable_sync(struct mlxsw_sp *mlxsw_sp,
166 bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_bridge_device_is_offloaded() argument
169 return !!mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev); in mlxsw_sp_bridge_device_is_offloaded()
175 struct mlxsw_sp *mlxsw_sp = priv->data; in mlxsw_sp_bridge_device_upper_rif_destroy() local
177 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev); in mlxsw_sp_bridge_device_upper_rif_destroy()
181 static void mlxsw_sp_bridge_device_rifs_destroy(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_bridge_device_rifs_destroy() argument
185 .data = (void *)mlxsw_sp, in mlxsw_sp_bridge_device_rifs_destroy()
[all …]
Dspectrum_span.h13 struct mlxsw_sp;
65 int (*init)(struct mlxsw_sp *mlxsw_sp);
66 int (*policer_id_base_set)(struct mlxsw_sp *mlxsw_sp,
81 int (*parms_set)(struct mlxsw_sp *mlxsw_sp,
89 int mlxsw_sp_span_init(struct mlxsw_sp *mlxsw_sp);
90 void mlxsw_sp_span_fini(struct mlxsw_sp *mlxsw_sp);
91 void mlxsw_sp_span_respin(struct mlxsw_sp *mlxsw_sp);
94 mlxsw_sp_span_entry_find_by_port(struct mlxsw_sp *mlxsw_sp,
97 void mlxsw_sp_span_entry_invalidate(struct mlxsw_sp *mlxsw_sp,
103 int mlxsw_sp_span_agent_get(struct mlxsw_sp *mlxsw_sp, int *p_span_id,
[all …]
Dspectrum_trap.c62 static int mlxsw_sp_rx_listener(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb, in mlxsw_sp_rx_listener() argument
69 dev_warn_ratelimited(mlxsw_sp->bus_info->dev, "Port %d: skb received for non-existent port\n", in mlxsw_sp_rx_listener()
93 struct mlxsw_sp *mlxsw_sp; in mlxsw_sp_rx_drop_listener() local
97 mlxsw_sp = devlink_trap_ctx_priv(trap_ctx); in mlxsw_sp_rx_drop_listener()
98 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_rx_drop_listener()
100 err = mlxsw_sp_rx_listener(mlxsw_sp, skb, local_port, mlxsw_sp_port); in mlxsw_sp_rx_drop_listener()
104 devlink = priv_to_devlink(mlxsw_sp->core); in mlxsw_sp_rx_drop_listener()
105 in_devlink_port = mlxsw_core_port_devlink_port_get(mlxsw_sp->core, in mlxsw_sp_rx_drop_listener()
119 struct mlxsw_sp *mlxsw_sp; in mlxsw_sp_rx_acl_drop_listener() local
123 mlxsw_sp = devlink_trap_ctx_priv(trap_ctx); in mlxsw_sp_rx_acl_drop_listener()
[all …]
Dspectrum_acl_ctcam.c14 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 …]
Dspectrum_kvdl.c17 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 …]
Dspectrum1_acl_tcam.c50 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, &region->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, &region->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, &region->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 …]
Dspectrum_ipip.c166 mlxsw_sp_ipip_nexthop_update_gre4(struct mlxsw_sp *mlxsw_sp, u32 adj_index, in mlxsw_sp_ipip_nexthop_update_gre4() argument
180 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ratr), ratr_pl); in mlxsw_sp_ipip_nexthop_update_gre4()
184 mlxsw_sp_ipip_decap_config_gre4(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_ipip_decap_config_gre4() argument
219 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rtdp), rtdp_pl); in mlxsw_sp_ipip_decap_config_gre4()
237 static bool mlxsw_sp_ipip_can_offload_gre4(const struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_ipip_can_offload_gre4() argument
252 mlxsw_sp_ipip_ol_loopback_config_gre4(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_ipip_ol_loopback_config_gre4() argument
271 mlxsw_sp_ipip_ol_netdev_change_gre(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_ipip_ol_netdev_change_gre() argument
288 if (mlxsw_sp_ipip_demote_tunnel_by_saddr(mlxsw_sp, in mlxsw_sp_ipip_ol_netdev_change_gre()
293 mlxsw_sp_ipip_entry_demote_tunnel(mlxsw_sp, ipip_entry); in mlxsw_sp_ipip_ol_netdev_change_gre()
308 err = __mlxsw_sp_ipip_entry_update_tunnel(mlxsw_sp, ipip_entry, in mlxsw_sp_ipip_ol_netdev_change_gre()
[all …]
Dspectrum1_mr_tcam.c13 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-6.1.9/include/trace/events/
Dmlxsw.h12 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 …]

12