| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum_dcb.c | 26 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_headroom_ets_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_headroom_ets_set() argument 70 struct net_device *dev = mlxsw_sp_port->dev; in mlxsw_sp_port_headroom_ets_set() 75 hdroom = *mlxsw_sp_port->hdroom; in mlxsw_sp_port_headroom_ets_set() 80 mlxsw_sp_hdroom_bufs_reset_sizes(mlxsw_sp_port, &hdroom); in mlxsw_sp_port_headroom_ets_set() 82 err = mlxsw_sp_hdroom_configure(mlxsw_sp_port, &hdroom); in mlxsw_sp_port_headroom_ets_set() 91 static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port, in __mlxsw_sp_dcbnl_ieee_setets() argument [all …]
|
| H A D | spectrum_qdisc.c | 31 int (*check_params)(struct mlxsw_sp_port *mlxsw_sp_port, 33 int (*replace)(struct mlxsw_sp_port *mlxsw_sp_port, u32 handle, 35 int (*destroy)(struct mlxsw_sp_port *mlxsw_sp_port, 37 int (*get_stats)(struct mlxsw_sp_port *mlxsw_sp_port, 40 int (*get_xstats)(struct mlxsw_sp_port *mlxsw_sp_port, 43 void (*clean_stats)(struct mlxsw_sp_port *mlxsw_sp_port, 48 void (*unoffload)(struct mlxsw_sp_port *mlxsw_sp_port, 160 mlxsw_sp_qdisc_find(struct mlxsw_sp_port *mlxsw_sp_port, u32 parent) in mlxsw_sp_qdisc_find() argument 162 struct mlxsw_sp_qdisc_state *qdisc_state = mlxsw_sp_port->qdisc; in mlxsw_sp_qdisc_find() 183 mlxsw_sp_qdisc_find_by_handle(struct mlxsw_sp_port *mlxsw_sp_port, u32 handle) in mlxsw_sp_qdisc_find_by_handle() argument [all …]
|
| H A D | spectrum.c | 240 int mlxsw_sp_port_vid_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, in mlxsw_sp_port_vid_stp_set() argument 244 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_vid_stp_set() 251 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_vid_stp_set() 271 int mlxsw_sp_port_admin_status_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_admin_status_set() argument 274 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_admin_status_set() 277 mlxsw_reg_paos_pack(paos_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_admin_status_set() 283 static int mlxsw_sp_port_dev_addr_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_dev_addr_set() argument 286 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_dev_addr_set() 289 mlxsw_reg_ppad_pack(ppad_pl, true, mlxsw_sp_port->local_port); in mlxsw_sp_port_dev_addr_set() 294 static int mlxsw_sp_port_dev_addr_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_dev_addr_init() argument [all …]
|
| H A D | spectrum_matchall.c | 26 mlxsw_sp_mall_port_mirror_add(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_mall_port_mirror_add() argument 30 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_mall_port_mirror_add() 49 err = mlxsw_sp_span_analyzed_port_get(mlxsw_sp_port, in mlxsw_sp_mall_port_mirror_add() 60 err = mlxsw_sp_span_agent_bind(mlxsw_sp, trigger, mlxsw_sp_port, in mlxsw_sp_mall_port_mirror_add() 70 mlxsw_sp_span_analyzed_port_put(mlxsw_sp_port, mall_entry->ingress); in mlxsw_sp_mall_port_mirror_add() 77 mlxsw_sp_mall_port_mirror_del(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_mall_port_mirror_del() argument 80 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_mall_port_mirror_del() 87 mlxsw_sp_span_agent_unbind(mlxsw_sp, trigger, mlxsw_sp_port, &parms); in mlxsw_sp_mall_port_mirror_del() 88 mlxsw_sp_span_analyzed_port_put(mlxsw_sp_port, mall_entry->ingress); in mlxsw_sp_mall_port_mirror_del() 92 static int mlxsw_sp_mall_port_sample_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_mall_port_sample_set() argument [all …]
|
| H A D | spectrum_flow.c | 35 struct mlxsw_sp_port *mlxsw_sp_port, bool ingress) in mlxsw_sp_flow_block_lookup() argument 40 if (binding->mlxsw_sp_port == mlxsw_sp_port && in mlxsw_sp_flow_block_lookup() 54 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_flow_block_bind() argument 61 if (WARN_ON(mlxsw_sp_flow_block_lookup(block, mlxsw_sp_port, ingress))) in mlxsw_sp_flow_block_bind() 74 err = mlxsw_sp_mall_port_bind(block, mlxsw_sp_port, extack); in mlxsw_sp_flow_block_bind() 83 binding->mlxsw_sp_port = mlxsw_sp_port; in mlxsw_sp_flow_block_bind() 102 mlxsw_sp_mall_port_unbind(block, mlxsw_sp_port); in mlxsw_sp_flow_block_bind() 109 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_flow_block_unbind() argument 114 binding = mlxsw_sp_flow_block_lookup(block, mlxsw_sp_port, ingress); in mlxsw_sp_flow_block_unbind() 130 mlxsw_sp_mall_port_unbind(block, mlxsw_sp_port); in mlxsw_sp_flow_block_unbind() [all …]
|
| H A D | spectrum_switchdev.c | 84 struct mlxsw_sp_port *mlxsw_sp_port, 88 struct mlxsw_sp_port *mlxsw_sp_port); 139 mlxsw_sp_bridge_port_mdb_flush(struct mlxsw_sp_port *mlxsw_sp_port, 149 mlxsw_sp_port_mrouter_update_mdb(struct mlxsw_sp_port *mlxsw_sp_port, 395 struct mlxsw_sp_port *mlxsw_sp_port; member 430 err = mlxsw_sp_port_kill_vid(rso->mlxsw_sp_port->dev, 0, vid); in mlxsw_sp_bridge_port_replay_switchdev_objs() 436 err = mlxsw_sp_port_obj_add(rso->mlxsw_sp_port->dev, NULL, in mlxsw_sp_bridge_port_replay_switchdev_objs() 463 mlxsw_sp_port_obj_del(rso->mlxsw_sp_port->dev, NULL, in mlxsw_sp_bridge_port_unreplay_switchdev_objs() 478 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_bridge_port_create() local 485 mlxsw_sp_port = mlxsw_sp_port_dev_lower_find(brport_dev); in mlxsw_sp_bridge_port_create() [all …]
|
| H A D | spectrum_ethtool.c | 14 struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); in mlxsw_sp_port_get_drvinfo() local 15 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_get_drvinfo() 146 struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); in mlxsw_sp_port_get_link_ext_state() local 154 mlxsw_reg_pddr_pack(pddr_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_get_link_ext_state() 160 err = mlxsw_reg_query(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pddr), in mlxsw_sp_port_get_link_ext_state() 184 struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); in mlxsw_sp_port_get_pauseparam() local 186 pause->rx_pause = mlxsw_sp_port->link.rx_pause; in mlxsw_sp_port_get_pauseparam() 187 pause->tx_pause = mlxsw_sp_port->link.tx_pause; in mlxsw_sp_port_get_pauseparam() 190 static int mlxsw_sp_port_pause_set(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_pause_set() argument 195 mlxsw_reg_pfcc_pack(pfcc_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_pause_set() [all …]
|
| H A D | spectrum_span.h | 14 struct mlxsw_sp_port; 30 struct mlxsw_sp_port *dest_port; /* NULL for unoffloaded SPAN. */ 101 int mlxsw_sp_span_analyzed_port_get(struct mlxsw_sp_port *mlxsw_sp_port, 103 void mlxsw_sp_span_analyzed_port_put(struct mlxsw_sp_port *mlxsw_sp_port, 107 struct mlxsw_sp_port *mlxsw_sp_port, 112 struct mlxsw_sp_port *mlxsw_sp_port, 114 int mlxsw_sp_span_trigger_enable(struct mlxsw_sp_port *mlxsw_sp_port, 116 void mlxsw_sp_span_trigger_disable(struct mlxsw_sp_port *mlxsw_sp_port,
|
| H A D | spectrum_ptp.c | 590 static void mlxsw_sp1_ptp_rx_finish(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp1_ptp_rx_finish() argument 595 skb->dev = mlxsw_sp_port->dev; in mlxsw_sp1_ptp_rx_finish() 597 pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); in mlxsw_sp1_ptp_rx_finish() 620 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp1_ptp_packet_finish() local 626 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp1_ptp_packet_finish() 627 if (!(mlxsw_sp_port && (!skb->dev || skb->dev == mlxsw_sp_port->dev))) { in mlxsw_sp1_ptp_packet_finish() 635 mlxsw_sp1_ptp_rx_finish(mlxsw_sp_port, skb); in mlxsw_sp1_ptp_packet_finish() 742 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp1_ptp_got_packet() local 747 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp1_ptp_got_packet() 748 if (!mlxsw_sp_port) in mlxsw_sp1_ptp_got_packet() [all …]
|
| H A D | spectrum_span.c | 64 struct mlxsw_sp_port *mlxsw_sp_port); 66 struct mlxsw_sp_port *mlxsw_sp_port, u8 tc); 68 struct mlxsw_sp_port *mlxsw_sp_port, u8 tc); 180 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_phys_configure() 200 struct mlxsw_sp_port *dest_port = span_entry->parms.dest_port; in mlxsw_sp_span_entry_deconfigure_common() 304 struct mlxsw_sp_port *port; in mlxsw_sp_span_entry_bridge() 481 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_gretap4_configure() 586 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_gretap6_configure() 652 struct mlxsw_sp_port *dest_port = sparms.dest_port; in mlxsw_sp_span_entry_vlan_configure() 978 static int mlxsw_sp_span_port_buffer_update(struct mlxsw_sp_port *mlxsw_sp_port, bool enable) in mlxsw_sp_span_port_buffer_update() argument [all …]
|
| H A D | spectrum_buffers.c | 138 static u32 mlxsw_sp_port_headroom_8x_adjust(const struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_port_headroom_8x_adjust() argument 145 return mlxsw_sp_port->mapping.width == 8 ? 2 * size_cells : size_cells; in mlxsw_sp_port_headroom_8x_adjust() 398 void mlxsw_sp_hdroom_bufs_reset_sizes(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_hdroom_bufs_reset_sizes() argument 401 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_hdroom_bufs_reset_sizes() 402 unsigned int max_mtu = mlxsw_sp_port->dev->max_mtu; in mlxsw_sp_hdroom_bufs_reset_sizes() 409 mlxsw_sp_port->max_speed); in mlxsw_sp_hdroom_bufs_reset_sizes() 410 reserve_cells = mlxsw_sp_port_headroom_8x_adjust(mlxsw_sp_port, reserve_cells); in mlxsw_sp_hdroom_bufs_reset_sizes() 435 thres_cells = mlxsw_sp_port_headroom_8x_adjust(mlxsw_sp_port, thres_cells); in mlxsw_sp_hdroom_bufs_reset_sizes() 436 delay_cells = mlxsw_sp_port_headroom_8x_adjust(mlxsw_sp_port, delay_cells); in mlxsw_sp_hdroom_bufs_reset_sizes() 452 static int mlxsw_sp_hdroom_configure_buffers(struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_hdroom_configure_buffers() argument [all …]
|
| H A D | spectrum_acl_flex_actions.c | 140 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_act_mirror_add() local 149 mlxsw_sp_port = mlxsw_sp->ports[local_in_port]; in mlxsw_sp_act_mirror_add() 150 err = mlxsw_sp_span_analyzed_port_get(mlxsw_sp_port, ingress); in mlxsw_sp_act_mirror_add() 164 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_act_mirror_del() local 167 mlxsw_sp_port = mlxsw_sp->ports[local_in_port]; in mlxsw_sp_act_mirror_del() 168 mlxsw_sp_span_analyzed_port_put(mlxsw_sp_port, ingress); in mlxsw_sp_act_mirror_del() 240 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp2_act_sampler_add() local 259 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp2_act_sampler_add() 260 err = mlxsw_sp_span_analyzed_port_get(mlxsw_sp_port, ingress); in mlxsw_sp2_act_sampler_add() 281 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp2_act_sampler_del() local [all …]
|
| H A D | spectrum_trap.c | 64 struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_rx_listener() argument 68 if (unlikely(!mlxsw_sp_port)) { in mlxsw_sp_rx_listener() 75 skb->dev = mlxsw_sp_port->dev; in mlxsw_sp_rx_listener() 77 pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); in mlxsw_sp_rx_listener() 92 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_rx_drop_listener() local 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() 118 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_rx_acl_drop_listener() local 124 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_rx_acl_drop_listener() 126 err = mlxsw_sp_rx_listener(mlxsw_sp, skb, local_port, mlxsw_sp_port); in mlxsw_sp_rx_acl_drop_listener() [all …]
|
| H A D | spectrum_acl.c | 114 binding->mlxsw_sp_port, binding->ingress); in mlxsw_sp_acl_ruleset_bind() 125 binding->mlxsw_sp_port, binding->ingress); in mlxsw_sp_acl_ruleset_unbind() 421 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_acl_rulei_act_fwd() local 430 mlxsw_sp_port = netdev_priv(out_dev); in mlxsw_sp_acl_rulei_act_fwd() 431 if (mlxsw_sp_port->mlxsw_sp != mlxsw_sp) { in mlxsw_sp_acl_rulei_act_fwd() 435 local_port = mlxsw_sp_port->local_port; in mlxsw_sp_acl_rulei_act_fwd() 455 struct mlxsw_sp_port *in_port; in mlxsw_sp_acl_rulei_act_mirror() 463 in_port = binding->mlxsw_sp_port; in mlxsw_sp_acl_rulei_act_mirror() 796 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_acl_rulei_act_sample() local 804 mlxsw_sp_port = binding->mlxsw_sp_port; in mlxsw_sp_acl_rulei_act_sample() [all …]
|
| H A D | spectrum_router.h | 177 int mlxsw_sp_router_port_join_lag(struct mlxsw_sp_port *mlxsw_sp_port, 180 void mlxsw_sp_router_port_leave_lag(struct mlxsw_sp_port *mlxsw_sp_port,
|
| H A D | spectrum_acl_tcam.h | 45 struct mlxsw_sp_port *mlxsw_sp_port, 48 struct mlxsw_sp_port *mlxsw_sp_port,
|
| H A D | spectrum_acl_tcam.c | 309 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_group_bind() argument 316 MLXSW_REG_PXBT_OP_BIND, mlxsw_sp_port->local_port, in mlxsw_sp_acl_tcam_group_bind() 324 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_group_unbind() argument 331 MLXSW_REG_PXBT_OP_UNBIND, mlxsw_sp_port->local_port, in mlxsw_sp_acl_tcam_group_unbind() 1717 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_flower_ruleset_bind() argument 1723 mlxsw_sp_port, ingress); in mlxsw_sp_acl_tcam_flower_ruleset_bind() 1729 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_flower_ruleset_unbind() argument 1735 mlxsw_sp_port, ingress); in mlxsw_sp_acl_tcam_flower_ruleset_unbind() 1858 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_mr_ruleset_bind() argument 1868 struct mlxsw_sp_port *mlxsw_sp_port, in mlxsw_sp_acl_tcam_mr_ruleset_unbind() argument
|
| H A D | spectrum_nve.c | 1014 int mlxsw_sp_port_nve_init(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_nve_init() argument 1016 struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; in mlxsw_sp_port_nve_init() 1019 mlxsw_reg_tnqdr_pack(tnqdr_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_nve_init() 1023 void mlxsw_sp_port_nve_fini(struct mlxsw_sp_port *mlxsw_sp_port) in mlxsw_sp_port_nve_fini() argument
|
| H A D | spectrum_flower.c | 310 struct mlxsw_sp_port *mlxsw_sp_port; in mlxsw_sp_flower_parse_meta_iif() local 333 mlxsw_sp_port = netdev_priv(ingress_dev); in mlxsw_sp_flower_parse_meta_iif() 334 if (mlxsw_sp_port->mlxsw_sp != block->mlxsw_sp) { in mlxsw_sp_flower_parse_meta_iif() 341 mlxsw_sp_port->local_port, in mlxsw_sp_flower_parse_meta_iif()
|