Lines Matching refs:local_port
248 mlxsw_tx_hdr_port_mid_set(txhdr, tx_info->local_port); in mlxsw_sp_txhdr_construct()
280 mlxsw_tx_hdr_fid_set(txhdr, max_fid + tx_info->local_port - 1); in mlxsw_sp_txhdr_ptp_data_construct()
355 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_vid_stp_set()
381 mlxsw_reg_paos_pack(paos_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_admin_status_set()
393 mlxsw_reg_ppad_pack(ppad_pl, true, mlxsw_sp_port->local_port); in mlxsw_sp_port_dev_addr_set()
403 mlxsw_sp_port->local_port); in mlxsw_sp_port_dev_addr_init()
415 mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, mtu); in mlxsw_sp_port_mtu_set()
420 u16 local_port, u8 swid) in mlxsw_sp_port_swid_set() argument
424 mlxsw_reg_pspa_pack(pspa_pl, swid, local_port); in mlxsw_sp_port_swid_set()
433 mlxsw_reg_svpe_pack(svpe_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_port_vp_mode_set()
447 mlxsw_reg_spvmlr_pack(spvmlr_pl, mlxsw_sp_port->local_port, vid, vid, in mlxsw_sp_port_vid_learning_set()
463 mlxsw_reg_spfsr_pack(spfsr_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_port_security_set()
500 mlxsw_reg_spevet_pack(spevet_pl, mlxsw_sp_port->local_port, sver_type); in mlxsw_sp_port_egress_ethtype_set()
516 mlxsw_reg_spvid_pack(spvid_pl, mlxsw_sp_port->local_port, vid, in __mlxsw_sp_port_pvid_set()
528 mlxsw_reg_spaft_pack(spaft_pl, mlxsw_sp_port->local_port, allow); in mlxsw_sp_port_allow_untagged_set()
564 mlxsw_reg_sspr_pack(sspr_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_system_port_mapping_set()
570 u16 local_port, char *pmlp_pl, in mlxsw_sp_port_module_info_parse() argument
588 local_port); in mlxsw_sp_port_module_info_parse()
595 local_port); in mlxsw_sp_port_module_info_parse()
600 local_port); in mlxsw_sp_port_module_info_parse()
607 local_port); in mlxsw_sp_port_module_info_parse()
612 local_port); in mlxsw_sp_port_module_info_parse()
626 mlxsw_sp_port_module_info_get(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_module_info_get() argument
632 mlxsw_reg_pmlp_pack(pmlp_pl, local_port); in mlxsw_sp_port_module_info_get()
636 return mlxsw_sp_port_module_info_parse(mlxsw_sp, local_port, in mlxsw_sp_port_module_info_get()
641 mlxsw_sp_port_module_map(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_module_map() argument
650 mlxsw_reg_pmlp_pack(pmlp_pl, local_port); in mlxsw_sp_port_module_map()
670 static void mlxsw_sp_port_module_unmap(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_module_unmap() argument
675 mlxsw_reg_pmlp_pack(pmlp_pl, local_port); in mlxsw_sp_port_module_unmap()
725 .local_port = mlxsw_sp_port->local_port, in mlxsw_sp_port_xmit()
878 mlxsw_reg_ppcnt_pack(ppcnt_pl, mlxsw_sp_port->local_port, grp, prio); in mlxsw_sp_port_get_stats_raw()
1013 mlxsw_reg_spvm_pack(spvm_pl, mlxsw_sp_port->local_port, vid_begin, in __mlxsw_sp_port_vlan_set()
1208 mlxsw_reg_pplr_pack(pplr_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_feature_loopback()
1356 ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_speed_by_width_set()
1365 ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_speed_by_width_set()
1381 mlxsw_sp_port->local_port, 0, in mlxsw_sp_port_speed_get()
1399 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, in mlxsw_sp_port_ets_set()
1414 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, in mlxsw_sp_port_ets_maxrate_set()
1429 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, in mlxsw_sp_port_min_bw_set()
1443 mlxsw_reg_qtct_pack(qtct_pl, mlxsw_sp_port->local_port, switch_prio, in mlxsw_sp_port_prio_tc_set()
1540 mlxsw_reg_qtctm_pack(qtctm_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_port_tc_mc_mode_set()
1569 mlxsw_reg_spvc_pack(spvc_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_vlan_classification_set()
1575 u16 local_port, u8 *port_number, in mlxsw_sp_port_label_info_get() argument
1582 mlxsw_reg_pllp_pack(pllp_pl, local_port); in mlxsw_sp_port_label_info_get()
1591 static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_create() argument
1605 err = mlxsw_sp_port_module_map(mlxsw_sp, local_port, port_mapping); in mlxsw_sp_port_create()
1608 local_port); in mlxsw_sp_port_create()
1612 err = mlxsw_sp_port_swid_set(mlxsw_sp, local_port, 0); in mlxsw_sp_port_create()
1615 local_port); in mlxsw_sp_port_create()
1619 err = mlxsw_sp_port_label_info_get(mlxsw_sp, local_port, &port_number, in mlxsw_sp_port_create()
1623 local_port); in mlxsw_sp_port_create()
1628 err = mlxsw_core_port_init(mlxsw_sp->core, local_port, slot_index, in mlxsw_sp_port_create()
1634 local_port); in mlxsw_sp_port_create()
1646 mlxsw_core_port_netdev_link(mlxsw_sp->core, local_port, in mlxsw_sp_port_create()
1650 mlxsw_sp_port->local_port = local_port; in mlxsw_sp_port_create()
1673 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1696 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1703 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1711 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1718 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1729 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1736 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1743 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1751 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1758 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1765 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1773 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1780 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1788 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1796 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1808 local_port); in mlxsw_sp_port_create()
1815 mlxsw_sp->ports[local_port] = mlxsw_sp_port; in mlxsw_sp_port_create()
1820 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1827 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1838 mlxsw_sp->ports[local_port] = NULL; in mlxsw_sp_port_create()
1866 mlxsw_core_port_fini(mlxsw_sp->core, local_port); in mlxsw_sp_port_create()
1869 mlxsw_sp_port_swid_set(mlxsw_sp, local_port, in mlxsw_sp_port_create()
1872 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port, in mlxsw_sp_port_create()
1878 static void mlxsw_sp_port_remove(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_port_remove() argument
1880 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_remove()
1889 mlxsw_sp->ports[local_port] = NULL; in mlxsw_sp_port_remove()
1900 mlxsw_core_port_fini(mlxsw_sp->core, local_port); in mlxsw_sp_port_remove()
1901 mlxsw_sp_port_swid_set(mlxsw_sp, local_port, in mlxsw_sp_port_remove()
1903 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port, slot_index, module); in mlxsw_sp_port_remove()
1916 mlxsw_sp_port->local_port = MLXSW_PORT_CPU_PORT; in mlxsw_sp_cpu_port_create()
1945 static bool mlxsw_sp_local_port_valid(u16 local_port) in mlxsw_sp_local_port_valid() argument
1947 return local_port != MLXSW_PORT_CPU_PORT; in mlxsw_sp_local_port_valid()
1950 static bool mlxsw_sp_port_created(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_port_created() argument
1952 if (!mlxsw_sp_local_port_valid(local_port)) in mlxsw_sp_port_created()
1954 return mlxsw_sp->ports[local_port] != NULL; in mlxsw_sp_port_created()
1958 u16 local_port, bool enable) in mlxsw_sp_port_mapping_event_set() argument
1962 mlxsw_reg_pmecr_pack(pmecr_pl, local_port, in mlxsw_sp_port_mapping_event_set()
1981 u16 local_port; in mlxsw_sp_port_mapping_events_work() local
1993 local_port = mlxsw_reg_pmlp_local_port_get(event->pmlp_pl); in mlxsw_sp_port_mapping_events_work()
1994 err = mlxsw_sp_port_module_info_parse(mlxsw_sp, local_port, in mlxsw_sp_port_mapping_events_work()
2004 if (!mlxsw_sp_port_created(mlxsw_sp, local_port)) in mlxsw_sp_port_mapping_events_work()
2005 mlxsw_sp_port_create(mlxsw_sp, local_port, in mlxsw_sp_port_mapping_events_work()
2012 mlxsw_sp->port_mapping[local_port] = port_mapping; in mlxsw_sp_port_mapping_events_work()
2026 u16 local_port; in mlxsw_sp_port_mapping_listener_func() local
2028 local_port = mlxsw_reg_pmlp_local_port_get(pmlp_pl); in mlxsw_sp_port_mapping_listener_func()
2029 if (WARN_ON_ONCE(!mlxsw_sp_local_port_is_valid(mlxsw_sp, local_port))) in mlxsw_sp_port_mapping_listener_func()
2079 bool (*selector)(void *priv, u16 local_port), in mlxsw_sp_ports_remove_selected() argument
2222 u16 local_port = mlxsw_reg_pmtdb_port_num_get(pmtdb_pl, i); in mlxsw_sp_port_unsplit_create() local
2224 port_mapping = &mlxsw_sp->port_mapping[local_port]; in mlxsw_sp_port_unsplit_create()
2225 if (!port_mapping->width || !mlxsw_sp_local_port_valid(local_port)) in mlxsw_sp_port_unsplit_create()
2227 mlxsw_sp_port_create(mlxsw_sp, local_port, in mlxsw_sp_port_unsplit_create()
2233 mlxsw_sp_port_get_by_local_port(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_port_get_by_local_port() argument
2235 if (mlxsw_sp->ports && mlxsw_sp->ports[local_port]) in mlxsw_sp_port_get_by_local_port()
2236 return mlxsw_sp->ports[local_port]; in mlxsw_sp_port_get_by_local_port()
2240 static int mlxsw_sp_port_split(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_split() argument
2252 mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port); in mlxsw_sp_port_split()
2255 local_port); in mlxsw_sp_port_split()
2305 static int mlxsw_sp_port_unsplit(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_unsplit() argument
2315 mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port); in mlxsw_sp_port_unsplit()
2318 local_port); in mlxsw_sp_port_unsplit()
2368 u16 local_port; in mlxsw_sp_pude_event_func() local
2370 local_port = mlxsw_reg_pude_local_port_get(pude_pl); in mlxsw_sp_pude_event_func()
2372 if (WARN_ON_ONCE(!mlxsw_sp_local_port_is_valid(mlxsw_sp, local_port))) in mlxsw_sp_pude_event_func()
2374 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_pude_event_func()
2393 u16 local_port; in mlxsw_sp1_ptp_fifo_event_func() local
2397 local_port = mlxsw_reg_mtpptr_local_port_get(mtpptr_pl); in mlxsw_sp1_ptp_fifo_event_func()
2408 mlxsw_sp1_ptp_got_timestamp(mlxsw_sp, ingress, local_port, in mlxsw_sp1_ptp_fifo_event_func()
2431 u16 local_port, void *priv) in mlxsw_sp_rx_listener_no_mark_func() argument
2434 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_rx_listener_no_mark_func()
2439 local_port); in mlxsw_sp_rx_listener_no_mark_func()
2455 static void mlxsw_sp_rx_listener_mark_func(struct sk_buff *skb, u16 local_port, in mlxsw_sp_rx_listener_mark_func() argument
2459 return mlxsw_sp_rx_listener_no_mark_func(skb, local_port, priv); in mlxsw_sp_rx_listener_mark_func()
2463 u16 local_port, void *priv) in mlxsw_sp_rx_listener_l3_mark_func() argument
2467 return mlxsw_sp_rx_listener_no_mark_func(skb, local_port, priv); in mlxsw_sp_rx_listener_l3_mark_func()
2471 u16 local_port) in mlxsw_sp_ptp_receive() argument
2473 mlxsw_sp->ptp_ops->receive(mlxsw_sp, skb, local_port); in mlxsw_sp_ptp_receive()
2857 key->local_port = trigger->local_port; in mlxsw_sp_sample_trigger_key_init()
2936 if (trigger_node->trigger.local_port) { in mlxsw_sp_sample_trigger_params_set()
3959 struct sk_buff *skb, u16 local_port) in mlxsw_sp_ptp_transmitted() argument
3964 mlxsw_sp->ptp_ops->transmitted(mlxsw_sp, skb, local_port); in mlxsw_sp_ptp_transmitted()
4301 mlxsw_reg_slcor_port_add_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_add()
4312 mlxsw_reg_slcor_port_remove_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_remove()
4323 mlxsw_reg_slcor_col_enable_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_enable()
4334 mlxsw_reg_slcor_col_disable_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_disable()
4520 mlxsw_sp_port->local_port); in mlxsw_sp_port_lag_join()
4551 mlxsw_sp_port->local_port); in mlxsw_sp_port_lag_join()
4586 mlxsw_sp_port->local_port); in mlxsw_sp_port_lag_leave()
4601 mlxsw_sp_port->local_port); in mlxsw_sp_lag_dist_port_add()
4612 mlxsw_sp_port->local_port); in mlxsw_sp_lag_dist_port_remove()
4683 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_stp_set()