Home
last modified time | relevance | path

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

12

/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum.h161 struct mlxsw_sp { struct
219 (*clock_init)(struct mlxsw_sp *mlxsw_sp, struct device *dev); argument
222 struct mlxsw_sp_ptp_state *(*init)(struct mlxsw_sp *mlxsw_sp);
228 void (*receive)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
234 void (*transmitted)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
242 int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp,
255 mlxsw_sp_lag_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id) in mlxsw_sp_lag_get() argument
257 return &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_get()
323 struct mlxsw_sp *mlxsw_sp; member
372 void (*from_ptys_supported_port)(struct mlxsw_sp *mlxsw_sp,
[all …]
Dspectrum_router.c84 struct mlxsw_sp *mlxsw_sp; member
155 int (*init)(struct mlxsw_sp *mlxsw_sp);
156 int (*ipips_init)(struct mlxsw_sp *mlxsw_sp);
160 mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
164 static void mlxsw_sp_lpm_tree_put(struct mlxsw_sp *mlxsw_sp,
166 static int mlxsw_sp_vr_lpm_tree_bind(struct mlxsw_sp *mlxsw_sp,
169 static int mlxsw_sp_vr_lpm_tree_unbind(struct mlxsw_sp *mlxsw_sp,
213 static int mlxsw_sp_rif_counter_edit(struct mlxsw_sp *mlxsw_sp, u16 rif_index, in mlxsw_sp_rif_counter_edit() argument
224 err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl); in mlxsw_sp_rif_counter_edit()
230 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl); in mlxsw_sp_rif_counter_edit()
[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_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.c24 size_t mlxsw_sp_acl_tcam_priv_size(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_acl_tcam_priv_size() argument
26 const struct mlxsw_sp_acl_tcam_ops *ops = mlxsw_sp->acl_tcam_ops; in mlxsw_sp_acl_tcam_priv_size()
35 int mlxsw_sp_acl_tcam_priority_get(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_priority_get() argument
46 if (!MLXSW_CORE_RES_VALID(mlxsw_sp->core, KVD_SIZE)) in mlxsw_sp_acl_tcam_priority_get()
50 max_priority = MLXSW_CORE_RES_GET(mlxsw_sp->core, KVD_SIZE) - 1; in mlxsw_sp_acl_tcam_priority_get()
161 struct mlxsw_sp *mlxsw_sp; member
207 static int mlxsw_sp_acl_tcam_group_update(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_group_update() argument
226 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pagt), pagt_pl); in mlxsw_sp_acl_tcam_group_update()
257 mlxsw_sp_acl_tcam_vgroup_add(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_vgroup_add() argument
307 mlxsw_sp_acl_tcam_group_bind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_tcam_group_bind() argument
[all …]
Dspectrum_acl_tcam.h28 size_t mlxsw_sp_acl_tcam_priv_size(struct mlxsw_sp *mlxsw_sp);
29 int mlxsw_sp_acl_tcam_init(struct mlxsw_sp *mlxsw_sp,
31 void mlxsw_sp_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp,
33 int mlxsw_sp_acl_tcam_priority_get(struct mlxsw_sp *mlxsw_sp,
39 int (*ruleset_add)(struct mlxsw_sp *mlxsw_sp,
43 void (*ruleset_del)(struct mlxsw_sp *mlxsw_sp, void *ruleset_priv);
44 int (*ruleset_bind)(struct mlxsw_sp *mlxsw_sp, void *ruleset_priv,
47 void (*ruleset_unbind)(struct mlxsw_sp *mlxsw_sp, void *ruleset_priv,
52 int (*rule_add)(struct mlxsw_sp *mlxsw_sp,
55 void (*rule_del)(struct mlxsw_sp *mlxsw_sp, void *rule_priv);
[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_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_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.c194 mlxsw_sp1_nve_vxlan_config_set(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_nve_vxlan_config_set() argument
201 err = mlxsw_sp_router_tb_id_vr_id(mlxsw_sp, config->ul_tb_id, in mlxsw_sp1_nve_vxlan_config_set()
210 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(tngcr), tngcr_pl); in mlxsw_sp1_nve_vxlan_config_set()
213 static void mlxsw_sp1_nve_vxlan_config_clear(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp1_nve_vxlan_config_clear() argument
219 mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(tngcr), tngcr_pl); in mlxsw_sp1_nve_vxlan_config_clear()
222 static int mlxsw_sp1_nve_vxlan_rtdp_set(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_nve_vxlan_rtdp_set() argument
229 return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rtdp), rtdp_pl); in mlxsw_sp1_nve_vxlan_rtdp_set()
235 struct mlxsw_sp *mlxsw_sp = nve->mlxsw_sp; in mlxsw_sp1_nve_vxlan_init() local
238 err = mlxsw_sp_parsing_vxlan_udp_dport_set(mlxsw_sp, config->udp_dport); in mlxsw_sp1_nve_vxlan_init()
242 err = mlxsw_sp_parsing_depth_inc(mlxsw_sp); in mlxsw_sp1_nve_vxlan_init()
[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_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_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_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_acl.c25 struct mlxsw_sp *mlxsw_sp; member
94 struct mlxsw_sp_fid *mlxsw_sp_acl_dummy_fid(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_acl_dummy_fid() argument
96 return mlxsw_sp->acl->dummy_fid; in mlxsw_sp_acl_dummy_fid()
106 int mlxsw_sp_acl_ruleset_bind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ruleset_bind() argument
113 return ops->ruleset_bind(mlxsw_sp, ruleset->priv, in mlxsw_sp_acl_ruleset_bind()
117 void mlxsw_sp_acl_ruleset_unbind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ruleset_unbind() argument
124 ops->ruleset_unbind(mlxsw_sp, ruleset->priv, in mlxsw_sp_acl_ruleset_unbind()
129 mlxsw_sp_acl_ruleset_block_bind(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_acl_ruleset_block_bind() argument
138 err = mlxsw_sp_acl_ruleset_bind(mlxsw_sp, block, binding); in mlxsw_sp_acl_ruleset_block_bind()
147 mlxsw_sp_acl_ruleset_unbind(mlxsw_sp, block, binding); in mlxsw_sp_acl_ruleset_block_bind()
[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_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_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 …]
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()
93 mlxsw_sp_acl_rulei_destroy(mlxsw_sp, rulei); 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()
108 mlxsw_sp_acl_rulei_destroy(mlxsw_sp, rulei); 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
[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,
96 void mlxsw_sp_span_entry_invalidate(struct mlxsw_sp *mlxsw_sp,
98 int mlxsw_sp_span_agent_get(struct mlxsw_sp *mlxsw_sp, int *p_span_id,
[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_fid.c111 struct mlxsw_sp *mlxsw_sp; member
140 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_fid_lookup_by_index() argument
145 fid = rhashtable_lookup_fast(&mlxsw_sp->fid_core->fid_ht, &fid_index, in mlxsw_sp_fid_lookup_by_index()
174 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_vni(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_fid_lookup_by_vni() argument
179 fid = rhashtable_lookup_fast(&mlxsw_sp->fid_core->vni_ht, &vni, in mlxsw_sp_fid_lookup_by_vni()
242 struct mlxsw_sp *mlxsw_sp = fid_family->mlxsw_sp; in mlxsw_sp_fid_vni_set() local
251 err = rhashtable_lookup_insert_fast(&mlxsw_sp->fid_core->vni_ht, in mlxsw_sp_fid_vni_set()
266 rhashtable_remove_fast(&mlxsw_sp->fid_core->vni_ht, &fid->vni_ht_node, in mlxsw_sp_fid_vni_set()
275 struct mlxsw_sp *mlxsw_sp = fid_family->mlxsw_sp; in mlxsw_sp_fid_vni_clear() local
282 rhashtable_remove_fast(&mlxsw_sp->fid_core->vni_ht, &fid->vni_ht_node, in mlxsw_sp_fid_vni_clear()
[all …]
Dspectrum_ptp.c32 struct mlxsw_sp *mlxsw_sp; member
92 mlxsw_sp1_ptp_state(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp1_ptp_state() argument
94 return container_of(mlxsw_sp->ptp_state, struct mlxsw_sp1_ptp_state, in mlxsw_sp1_ptp_state()
99 mlxsw_sp2_ptp_state(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp2_ptp_state() argument
101 return container_of(mlxsw_sp->ptp_state, struct mlxsw_sp2_ptp_state, in mlxsw_sp2_ptp_state()
273 mlxsw_sp1_ptp_clock_init(struct mlxsw_sp *mlxsw_sp, struct device *dev) in mlxsw_sp1_ptp_clock_init() argument
290 clock->common.core = mlxsw_sp->core; in mlxsw_sp1_ptp_clock_init()
443 mlxsw_sp2_ptp_clock_init(struct mlxsw_sp *mlxsw_sp, struct device *dev) in mlxsw_sp2_ptp_clock_init() argument
452 clock->core = mlxsw_sp->core; in mlxsw_sp2_ptp_clock_init()
516 mlxsw_sp1_ptp_unmatched_save(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp1_ptp_unmatched_save() argument
[all …]
Dspectrum_router.h22 struct mlxsw_sp *mlxsw_sp; member
90 struct mlxsw_sp_rif *mlxsw_sp_rif_by_index(const struct mlxsw_sp *mlxsw_sp,
100 int mlxsw_sp_rif_counter_value_get(struct mlxsw_sp *mlxsw_sp,
121 int mlxsw_sp_neigh_counter_get(struct mlxsw_sp *mlxsw_sp,
125 mlxsw_sp_neigh_entry_counter_update(struct mlxsw_sp *mlxsw_sp,
129 int __mlxsw_sp_ipip_entry_update_tunnel(struct mlxsw_sp *mlxsw_sp,
135 void mlxsw_sp_ipip_entry_demote_tunnel(struct mlxsw_sp *mlxsw_sp,
138 mlxsw_sp_ipip_demote_tunnel_by_saddr(struct mlxsw_sp *mlxsw_sp,
154 int mlxsw_sp_nexthop_counter_get(struct mlxsw_sp *mlxsw_sp,
156 int mlxsw_sp_nexthop_eth_update(struct mlxsw_sp *mlxsw_sp, u32 adj_index,
[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 …]

12