Home
last modified time | relevance | path

Searched refs:mlxsw_sp_port (Results 1 – 14 of 14) sorted by relevance

/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_dcb.c26 struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); in mlxsw_sp_dcbnl_ieee_getets() local
28 memcpy(ets, mlxsw_sp_port->dcb.ets, sizeof(*ets)); in mlxsw_sp_dcbnl_ieee_getets()
33 static int mlxsw_sp_port_ets_validate(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_ets_validate() argument
36 struct net_device *dev = mlxsw_sp_port->dev; in mlxsw_sp_port_ets_validate()
67 static int mlxsw_sp_port_pg_prio_map(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_pg_prio_map() argument
73 mlxsw_reg_pptb_pack(pptb_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_pg_prio_map()
77 return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pptb), in mlxsw_sp_port_pg_prio_map()
91 static int mlxsw_sp_port_pg_destroy(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_pg_destroy() argument
94 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_pg_destroy()
98 mlxsw_reg_pbmc_pack(pbmc_pl, mlxsw_sp_port->local_port, 0, 0); in mlxsw_sp_port_pg_destroy()
[all …]
Dspectrum_qdisc.c25 int (*check_params)(struct mlxsw_sp_port *mlxsw_sp_port,
28 int (*replace)(struct mlxsw_sp_port *mlxsw_sp_port,
30 int (*destroy)(struct mlxsw_sp_port *mlxsw_sp_port,
32 int (*get_stats)(struct mlxsw_sp_port *mlxsw_sp_port,
35 int (*get_xstats)(struct mlxsw_sp_port *mlxsw_sp_port,
38 void (*clean_stats)(struct mlxsw_sp_port *mlxsw_sp_port,
43 void (*unoffload)(struct mlxsw_sp_port *mlxsw_sp_port,
75 mlxsw_sp_qdisc_find(struct mlxsw_sp_port *mlxsw_sp_port, u32 parent, in mlxsw_sp_qdisc_find() argument
81 return mlxsw_sp_port->root_qdisc; in mlxsw_sp_qdisc_find()
83 if (root_only || !mlxsw_sp_port->root_qdisc || in mlxsw_sp_qdisc_find()
[all …]
Dspectrum.c452 int mlxsw_sp_port_vid_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, in mlxsw_sp_port_vid_stp_set() argument
456 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_vid_stp_set()
463 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_vid_stp_set()
483 static int mlxsw_sp_port_sample_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_sample_set() argument
486 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_sample_set()
489 mlxsw_reg_mpsc_pack(mpsc_pl, mlxsw_sp_port->local_port, enable, rate); in mlxsw_sp_port_sample_set()
493 static int mlxsw_sp_port_admin_status_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_admin_status_set() argument
496 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_admin_status_set()
499 mlxsw_reg_paos_pack(paos_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_admin_status_set()
505 static int mlxsw_sp_port_dev_addr_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_dev_addr_set() argument
[all …]
Dspectrum_switchdev.c82 struct mlxsw_sp_port *mlxsw_sp_port,
86 struct mlxsw_sp_port *mlxsw_sp_port);
98 mlxsw_sp_bridge_port_mdb_flush(struct mlxsw_sp_port *mlxsw_sp_port,
102 mlxsw_sp_bridge_mdb_mc_enable_sync(struct mlxsw_sp_port *mlxsw_sp_port,
107 mlxsw_sp_port_mrouter_update_mdb(struct mlxsw_sp_port *mlxsw_sp_port,
253 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_bridge_port_create() local
259 mlxsw_sp_port = mlxsw_sp_port_dev_lower_find(brport_dev); in mlxsw_sp_bridge_port_create()
260 bridge_port->lagged = mlxsw_sp_port->lagged; in mlxsw_sp_bridge_port_create()
262 bridge_port->lag_id = mlxsw_sp_port->lag_id; in mlxsw_sp_bridge_port_create()
264 bridge_port->system_port = mlxsw_sp_port->local_port; in mlxsw_sp_bridge_port_create()
[all …]
Dspectrum.h55 struct mlxsw_sp_port;
121 struct mlxsw_sp_port **ports;
178 struct mlxsw_sp_port *mlxsw_sp_port; member
196 struct mlxsw_sp_port { struct
239 mlxsw_sp_port_is_pause_en(const struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_is_pause_en() argument
241 return mlxsw_sp_port->link.tx_pause || mlxsw_sp_port->link.rx_pause; in mlxsw_sp_port_is_pause_en()
244 static inline struct mlxsw_sp_port *
247 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_port_lagged_get() local
252 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_lagged_get()
253 return mlxsw_sp_port && mlxsw_sp_port->lagged ? mlxsw_sp_port : NULL; in mlxsw_sp_port_lagged_get()
[all …]
Dspectrum_fid.c56 struct mlxsw_sp_port *port, u16 vid);
58 struct mlxsw_sp_port *port, u16 vid);
144 struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) in mlxsw_sp_fid_port_vid_map() argument
148 return fid->fid_family->ops->port_vid_map(fid, mlxsw_sp_port, vid); in mlxsw_sp_fid_port_vid_map()
152 struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) in mlxsw_sp_fid_port_vid_unmap() argument
154 fid->fid_family->ops->port_vid_unmap(fid, mlxsw_sp_port, vid); in mlxsw_sp_fid_port_vid_unmap()
301 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_fid_8021q_port_vid_map() argument
304 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_fid_8021q_port_vid_map()
305 u8 local_port = mlxsw_sp_port->local_port; in mlxsw_sp_fid_8021q_port_vid_map()
319 struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) in mlxsw_sp_fid_8021q_port_vid_unmap() argument
[all …]
Dspectrum_buffers.c188 static int mlxsw_sp_port_pb_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_pb_init() argument
190 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_pb_init()
194 mlxsw_reg_pbmc_pack(pbmc_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_pb_init()
208 static int mlxsw_sp_port_pb_prio_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_pb_prio_init() argument
213 mlxsw_reg_pptb_pack(pptb_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_pb_prio_init()
216 return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pptb), in mlxsw_sp_port_pb_prio_init()
220 static int mlxsw_sp_port_headroom_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_headroom_init() argument
224 err = mlxsw_sp_port_pb_init(mlxsw_sp_port); in mlxsw_sp_port_headroom_init()
227 return mlxsw_sp_port_pb_prio_init(mlxsw_sp_port); in mlxsw_sp_port_headroom_init()
420 static int mlxsw_sp_port_sb_cms_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_sb_cms_init() argument
[all …]
Dspectrum_span.h13 struct mlxsw_sp_port;
30 struct mlxsw_sp_port *dest_port; /* NULL for unoffloaded SPAN. */
63 int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from,
67 void mlxsw_sp_span_mirror_del(struct mlxsw_sp_port *from, int span_id,
76 int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port *port, u16 mtu);
Dspectrum_acl.c44 struct mlxsw_sp_port *mlxsw_sp_port; member
157 binding->mlxsw_sp_port, binding->ingress); in mlxsw_sp_acl_ruleset_bind()
169 binding->mlxsw_sp_port, binding->ingress); in mlxsw_sp_acl_ruleset_unbind()
235 struct mlxsw_sp_port *mlxsw_sp_port, bool ingress) in mlxsw_sp_acl_block_lookup() argument
240 if (binding->mlxsw_sp_port == mlxsw_sp_port && in mlxsw_sp_acl_block_lookup()
248 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_block_bind() argument
254 if (WARN_ON(mlxsw_sp_acl_block_lookup(block, mlxsw_sp_port, ingress))) in mlxsw_sp_acl_block_bind()
260 binding->mlxsw_sp_port = mlxsw_sp_port; in mlxsw_sp_acl_block_bind()
279 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_block_unbind() argument
284 binding = mlxsw_sp_acl_block_lookup(block, mlxsw_sp_port, ingress); in mlxsw_sp_acl_block_unbind()
[all …]
Dspectrum_span.c66 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_phys_configure()
83 struct mlxsw_sp_port *dest_port = span_entry->parms.dest_port; in mlxsw_sp_span_entry_deconfigure_common()
186 struct mlxsw_sp_port *port; in mlxsw_sp_span_entry_bridge()
357 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_gretap4_configure()
458 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_gretap6_configure()
521 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_vlan_configure()
708 static bool mlxsw_sp_span_is_egress_mirror(struct mlxsw_sp_port *port) in mlxsw_sp_span_is_egress_mirror()
732 int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port *port, u16 mtu) in mlxsw_sp_span_port_mtu_update()
758 struct mlxsw_sp_port *port, in mlxsw_sp_span_entry_bound_port_find()
772 mlxsw_sp_span_inspected_port_bind(struct mlxsw_sp_port *port, in mlxsw_sp_span_inspected_port_bind()
[all …]
Dspectrum_acl_tcam.h40 struct mlxsw_sp_port *mlxsw_sp_port,
43 struct mlxsw_sp_port *mlxsw_sp_port,
Dspectrum_acl_tcam.c251 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_group_bind() argument
258 MLXSW_REG_PXBT_OP_BIND, mlxsw_sp_port->local_port, in mlxsw_sp_acl_tcam_group_bind()
266 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_group_unbind() argument
273 MLXSW_REG_PXBT_OP_UNBIND, mlxsw_sp_port->local_port, in mlxsw_sp_acl_tcam_group_unbind()
877 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_flower_ruleset_bind() argument
883 mlxsw_sp_port, ingress); in mlxsw_sp_acl_tcam_flower_ruleset_bind()
889 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_flower_ruleset_unbind() argument
895 mlxsw_sp_port, ingress); in mlxsw_sp_acl_tcam_flower_ruleset_unbind()
Dspectrum_acl_flex_actions.c139 struct mlxsw_sp_port *in_port; in mlxsw_sp_act_mirror_add()
154 struct mlxsw_sp_port *in_port; in mlxsw_sp_act_mirror_del()
Dspectrum_router.c2442 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_router_netevent_event() local
2460 mlxsw_sp_port = mlxsw_sp_port_lower_dev_hold(p->dev); in mlxsw_sp_router_netevent_event()
2461 if (!mlxsw_sp_port) in mlxsw_sp_router_netevent_event()
2464 mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_router_netevent_event()
2468 mlxsw_sp_port_dev_put(mlxsw_sp_port); in mlxsw_sp_router_netevent_event()
2476 mlxsw_sp_port = mlxsw_sp_port_lower_dev_hold(n->dev); in mlxsw_sp_router_netevent_event()
2477 if (!mlxsw_sp_port) in mlxsw_sp_router_netevent_event()
2482 mlxsw_sp_port_dev_put(mlxsw_sp_port); in mlxsw_sp_router_netevent_event()
2487 net_work->mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_router_netevent_event()
2496 mlxsw_sp_port_dev_put(mlxsw_sp_port); in mlxsw_sp_router_netevent_event()
[all …]