Home
last modified time | relevance | path

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

/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.c171 int (*hwtstamp_get)(struct mlxsw_sp_port *mlxsw_sp_port,
173 int (*hwtstamp_set)(struct mlxsw_sp_port *mlxsw_sp_port,
180 void (*get_stats)(struct mlxsw_sp_port *mlxsw_sp_port,
553 int mlxsw_sp_port_vid_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, in mlxsw_sp_port_vid_stp_set() argument
557 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_vid_stp_set()
564 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_vid_stp_set()
584 static int mlxsw_sp_port_sample_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_sample_set() argument
587 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_sample_set()
590 mlxsw_reg_mpsc_pack(mpsc_pl, mlxsw_sp_port->local_port, enable, rate); in mlxsw_sp_port_sample_set()
594 static int mlxsw_sp_port_admin_status_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_admin_status_set() argument
[all …]
Dspectrum_switchdev.c82 struct mlxsw_sp_port *mlxsw_sp_port,
86 struct mlxsw_sp_port *mlxsw_sp_port);
106 mlxsw_sp_bridge_port_mdb_flush(struct mlxsw_sp_port *mlxsw_sp_port,
110 mlxsw_sp_bridge_mdb_mc_enable_sync(struct mlxsw_sp_port *mlxsw_sp_port,
115 mlxsw_sp_port_mrouter_update_mdb(struct mlxsw_sp_port *mlxsw_sp_port,
261 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_bridge_port_create() local
267 mlxsw_sp_port = mlxsw_sp_port_dev_lower_find(brport_dev); in mlxsw_sp_bridge_port_create()
268 bridge_port->lagged = mlxsw_sp_port->lagged; in mlxsw_sp_bridge_port_create()
270 bridge_port->lag_id = mlxsw_sp_port->lag_id; in mlxsw_sp_bridge_port_create()
272 bridge_port->system_port = mlxsw_sp_port->local_port; in mlxsw_sp_bridge_port_create()
[all …]
Dspectrum.h60 struct mlxsw_sp_port;
143 struct mlxsw_sp_port **ports;
211 struct mlxsw_sp_port *mlxsw_sp_port; member
238 struct mlxsw_sp_port { struct
352 mlxsw_sp_port_is_pause_en(const struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_is_pause_en() argument
354 return mlxsw_sp_port->link.tx_pause || mlxsw_sp_port->link.rx_pause; in mlxsw_sp_port_is_pause_en()
357 static inline struct mlxsw_sp_port *
360 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_port_lagged_get() local
365 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_lagged_get()
366 return mlxsw_sp_port && mlxsw_sp_port->lagged ? mlxsw_sp_port : NULL; in mlxsw_sp_port_lagged_get()
[all …]
Dspectrum_ptp.h11 struct mlxsw_sp_port;
51 int mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port,
54 int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
64 void mlxsw_sp1_get_stats(struct mlxsw_sp_port *mlxsw_sp_port,
110 mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp1_ptp_hwtstamp_get() argument
117 mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp1_ptp_hwtstamp_set() argument
142 static inline void mlxsw_sp1_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp1_get_stats() argument
181 mlxsw_sp2_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp2_ptp_hwtstamp_get() argument
188 mlxsw_sp2_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp2_ptp_hwtstamp_set() argument
213 static inline void mlxsw_sp2_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp2_get_stats() argument
Dspectrum_ptp.c431 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp1_ptp_packet_finish() local
437 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp1_ptp_packet_finish()
438 if (!(mlxsw_sp_port && (!skb->dev || skb->dev == mlxsw_sp_port->dev))) { in mlxsw_sp1_ptp_packet_finish()
548 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp1_ptp_got_packet() local
553 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp1_ptp_got_packet()
554 if (!mlxsw_sp_port) in mlxsw_sp1_ptp_got_packet()
557 types = ingress ? mlxsw_sp_port->ptp.ing_types : in mlxsw_sp1_ptp_got_packet()
558 mlxsw_sp_port->ptp.egr_types; in mlxsw_sp1_ptp_got_packet()
589 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp1_ptp_got_timestamp() local
593 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp1_ptp_got_timestamp()
[all …]
Dspectrum_fid.c80 struct mlxsw_sp_port *port, u16 vid);
82 struct mlxsw_sp_port *port, u16 vid);
349 struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) in mlxsw_sp_fid_port_vid_map() argument
353 return fid->fid_family->ops->port_vid_map(fid, mlxsw_sp_port, vid); in mlxsw_sp_fid_port_vid_map()
357 struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) in mlxsw_sp_fid_port_vid_unmap() argument
359 fid->fid_family->ops->port_vid_unmap(fid, mlxsw_sp_port, vid); in mlxsw_sp_fid_port_vid_unmap()
521 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_fid_8021q_port_vid_map() argument
524 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_fid_8021q_port_vid_map()
525 u8 local_port = mlxsw_sp_port->local_port; in mlxsw_sp_fid_8021q_port_vid_map()
539 struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) in mlxsw_sp_fid_8021q_port_vid_unmap() argument
[all …]
Dspectrum_buffers.c297 static int mlxsw_sp_port_pb_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_pb_init() argument
300 [0] = MLXSW_SP_PB_HEADROOM * mlxsw_sp_port->mapping.width, in mlxsw_sp_port_pb_init()
303 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_pb_init()
307 mlxsw_reg_pbmc_pack(pbmc_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_pb_init()
321 static int mlxsw_sp_port_pb_prio_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_pb_prio_init() argument
326 mlxsw_reg_pptb_pack(pptb_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_pb_prio_init()
329 return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pptb), in mlxsw_sp_port_pb_prio_init()
333 static int mlxsw_sp_port_headroom_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_headroom_init() argument
337 err = mlxsw_sp_port_pb_init(mlxsw_sp_port); in mlxsw_sp_port_headroom_init()
340 return mlxsw_sp_port_pb_prio_init(mlxsw_sp_port); in mlxsw_sp_port_headroom_init()
[all …]
Dspectrum_trap.c61 struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_rx_listener() argument
65 if (unlikely(!mlxsw_sp_port)) { in mlxsw_sp_rx_listener()
72 skb->dev = mlxsw_sp_port->dev; in mlxsw_sp_rx_listener()
74 pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); in mlxsw_sp_rx_listener()
89 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_rx_drop_listener() local
94 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_rx_drop_listener()
96 if (mlxsw_sp_rx_listener(mlxsw_sp, skb, local_port, mlxsw_sp_port)) in mlxsw_sp_rx_drop_listener()
Dspectrum_acl.c46 struct mlxsw_sp_port *mlxsw_sp_port; member
151 binding->mlxsw_sp_port, binding->ingress); in mlxsw_sp_acl_ruleset_bind()
163 binding->mlxsw_sp_port, binding->ingress); in mlxsw_sp_acl_ruleset_unbind()
230 struct mlxsw_sp_port *mlxsw_sp_port, bool ingress) in mlxsw_sp_acl_block_lookup() argument
235 if (binding->mlxsw_sp_port == mlxsw_sp_port && in mlxsw_sp_acl_block_lookup()
243 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_block_bind() argument
250 if (WARN_ON(mlxsw_sp_acl_block_lookup(block, mlxsw_sp_port, ingress))) in mlxsw_sp_acl_block_bind()
261 binding->mlxsw_sp_port = mlxsw_sp_port; in mlxsw_sp_acl_block_bind()
280 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_block_unbind() argument
285 binding = mlxsw_sp_acl_block_lookup(block, mlxsw_sp_port, ingress); in mlxsw_sp_acl_block_unbind()
[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_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()
361 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_gretap4_configure()
462 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_gretap6_configure()
525 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_vlan_configure()
712 static bool mlxsw_sp_span_is_egress_mirror(struct mlxsw_sp_port *port) in mlxsw_sp_span_is_egress_mirror()
736 int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port *port, u16 mtu) in mlxsw_sp_span_port_mtu_update()
762 struct mlxsw_sp_port *port, in mlxsw_sp_span_entry_bound_port_find()
776 mlxsw_sp_span_inspected_port_bind(struct mlxsw_sp_port *port, in mlxsw_sp_span_inspected_port_bind()
[all …]
Dspectrum_acl_tcam.c361 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_group_bind() argument
368 MLXSW_REG_PXBT_OP_BIND, mlxsw_sp_port->local_port, in mlxsw_sp_acl_tcam_group_bind()
376 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_group_unbind() argument
383 MLXSW_REG_PXBT_OP_UNBIND, mlxsw_sp_port->local_port, in mlxsw_sp_acl_tcam_group_unbind()
1599 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_flower_ruleset_bind() argument
1605 mlxsw_sp_port, ingress); in mlxsw_sp_acl_tcam_flower_ruleset_bind()
1611 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_flower_ruleset_unbind() argument
1617 mlxsw_sp_port, ingress); in mlxsw_sp_acl_tcam_flower_ruleset_unbind()
1737 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_mr_ruleset_bind() argument
1747 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_mr_ruleset_unbind() argument
Dspectrum_acl_tcam.h48 struct mlxsw_sp_port *mlxsw_sp_port,
51 struct mlxsw_sp_port *mlxsw_sp_port,
Dspectrum_flower.c144 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_flower_parse_meta() local
169 mlxsw_sp_port = netdev_priv(ingress_dev); in mlxsw_sp_flower_parse_meta()
170 if (mlxsw_sp_port->mlxsw_sp != block->mlxsw_sp) { in mlxsw_sp_flower_parse_meta()
177 mlxsw_sp_port->local_port, in mlxsw_sp_flower_parse_meta()
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_nve.c887 int mlxsw_sp_port_nve_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_nve_init() argument
889 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_nve_init()
892 mlxsw_reg_tnqdr_pack(tnqdr_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_nve_init()
896 void mlxsw_sp_port_nve_fini(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_nve_fini() argument
Dspectrum_router.c2555 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_router_netevent_event() local
2573 mlxsw_sp_port = mlxsw_sp_port_lower_dev_hold(p->dev); in mlxsw_sp_router_netevent_event()
2574 if (!mlxsw_sp_port) in mlxsw_sp_router_netevent_event()
2577 mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_router_netevent_event()
2581 mlxsw_sp_port_dev_put(mlxsw_sp_port); in mlxsw_sp_router_netevent_event()
2589 mlxsw_sp_port = mlxsw_sp_port_lower_dev_hold(n->dev); in mlxsw_sp_router_netevent_event()
2590 if (!mlxsw_sp_port) in mlxsw_sp_router_netevent_event()
2595 mlxsw_sp_port_dev_put(mlxsw_sp_port); in mlxsw_sp_router_netevent_event()
2600 net_work->mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_router_netevent_event()
2609 mlxsw_sp_port_dev_put(mlxsw_sp_port); in mlxsw_sp_router_netevent_event()
[all …]