Lines Matching refs:local_port
246 mlxsw_tx_hdr_port_mid_set(txhdr, tx_info->local_port); in mlxsw_sp_txhdr_construct()
278 mlxsw_tx_hdr_fid_set(txhdr, max_fid + tx_info->local_port - 1); in mlxsw_sp_txhdr_ptp_data_construct()
353 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_vid_stp_set()
379 mlxsw_reg_paos_pack(paos_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_admin_status_set()
391 mlxsw_reg_ppad_pack(ppad_pl, true, mlxsw_sp_port->local_port); in mlxsw_sp_port_dev_addr_set()
401 mlxsw_sp_port->local_port); in mlxsw_sp_port_dev_addr_init()
412 mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, 0); in mlxsw_sp_port_max_mtu_get()
430 mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, mtu); in mlxsw_sp_port_mtu_set()
435 u16 local_port, u8 swid) in mlxsw_sp_port_swid_set() argument
439 mlxsw_reg_pspa_pack(pspa_pl, swid, local_port); in mlxsw_sp_port_swid_set()
448 mlxsw_reg_svpe_pack(svpe_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_port_vp_mode_set()
462 mlxsw_reg_spvmlr_pack(spvmlr_pl, mlxsw_sp_port->local_port, vid, vid, in mlxsw_sp_port_vid_learning_set()
497 mlxsw_reg_spevet_pack(spevet_pl, mlxsw_sp_port->local_port, sver_type); in mlxsw_sp_port_egress_ethtype_set()
513 mlxsw_reg_spvid_pack(spvid_pl, mlxsw_sp_port->local_port, vid, in __mlxsw_sp_port_pvid_set()
525 mlxsw_reg_spaft_pack(spaft_pl, mlxsw_sp_port->local_port, allow); in mlxsw_sp_port_allow_untagged_set()
561 mlxsw_reg_sspr_pack(sspr_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_system_port_mapping_set()
567 u16 local_port, char *pmlp_pl, in mlxsw_sp_port_module_info_parse() argument
585 local_port); in mlxsw_sp_port_module_info_parse()
592 local_port); in mlxsw_sp_port_module_info_parse()
597 local_port); in mlxsw_sp_port_module_info_parse()
604 local_port); in mlxsw_sp_port_module_info_parse()
609 local_port); in mlxsw_sp_port_module_info_parse()
623 mlxsw_sp_port_module_info_get(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_module_info_get() argument
629 mlxsw_reg_pmlp_pack(pmlp_pl, local_port); in mlxsw_sp_port_module_info_get()
633 return mlxsw_sp_port_module_info_parse(mlxsw_sp, local_port, in mlxsw_sp_port_module_info_get()
638 mlxsw_sp_port_module_map(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_module_map() argument
647 mlxsw_reg_pmlp_pack(pmlp_pl, local_port); in mlxsw_sp_port_module_map()
667 static void mlxsw_sp_port_module_unmap(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_module_unmap() argument
672 mlxsw_reg_pmlp_pack(pmlp_pl, local_port); in mlxsw_sp_port_module_unmap()
722 .local_port = mlxsw_sp_port->local_port, in mlxsw_sp_port_xmit()
875 mlxsw_reg_ppcnt_pack(ppcnt_pl, mlxsw_sp_port->local_port, grp, prio); in mlxsw_sp_port_get_stats_raw()
1010 mlxsw_reg_spvm_pack(spvm_pl, mlxsw_sp_port->local_port, vid_begin, in __mlxsw_sp_port_vlan_set()
1205 mlxsw_reg_pplr_pack(pplr_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_feature_loopback()
1269 mlxsw_sp_port->local_port); in mlxsw_sp_port_get_devlink_port()
1364 ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_speed_by_width_set()
1373 ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_speed_by_width_set()
1389 mlxsw_sp_port->local_port, 0, in mlxsw_sp_port_speed_get()
1407 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, in mlxsw_sp_port_ets_set()
1422 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, in mlxsw_sp_port_ets_maxrate_set()
1437 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, in mlxsw_sp_port_min_bw_set()
1451 mlxsw_reg_qtct_pack(qtct_pl, mlxsw_sp_port->local_port, switch_prio, in mlxsw_sp_port_prio_tc_set()
1548 mlxsw_reg_qtctm_pack(qtctm_pl, mlxsw_sp_port->local_port, enable); in mlxsw_sp_port_tc_mc_mode_set()
1577 mlxsw_reg_spvc_pack(spvc_pl, mlxsw_sp_port->local_port, in mlxsw_sp_port_vlan_classification_set()
1583 u16 local_port, u8 *port_number, in mlxsw_sp_port_label_info_get() argument
1590 mlxsw_reg_pllp_pack(pllp_pl, local_port); in mlxsw_sp_port_label_info_get()
1599 static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u16 local_port, in mlxsw_sp_port_create() argument
1613 err = mlxsw_sp_port_module_map(mlxsw_sp, local_port, port_mapping); in mlxsw_sp_port_create()
1616 local_port); in mlxsw_sp_port_create()
1620 err = mlxsw_sp_port_swid_set(mlxsw_sp, local_port, 0); in mlxsw_sp_port_create()
1623 local_port); in mlxsw_sp_port_create()
1627 err = mlxsw_sp_port_label_info_get(mlxsw_sp, local_port, &port_number, in mlxsw_sp_port_create()
1631 local_port); in mlxsw_sp_port_create()
1636 err = mlxsw_core_port_init(mlxsw_sp->core, local_port, slot_index, in mlxsw_sp_port_create()
1642 local_port); in mlxsw_sp_port_create()
1656 mlxsw_sp_port->local_port = local_port; in mlxsw_sp_port_create()
1679 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1700 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1707 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1715 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1722 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1729 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1740 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1747 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1754 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1762 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1769 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1776 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1784 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1791 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1799 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1807 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1819 local_port); in mlxsw_sp_port_create()
1826 mlxsw_sp->ports[local_port] = mlxsw_sp_port; in mlxsw_sp_port_create()
1831 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1838 mlxsw_sp_port->local_port); in mlxsw_sp_port_create()
1842 mlxsw_core_port_eth_set(mlxsw_sp->core, mlxsw_sp_port->local_port, in mlxsw_sp_port_create()
1851 mlxsw_sp->ports[local_port] = NULL; in mlxsw_sp_port_create()
1880 mlxsw_core_port_fini(mlxsw_sp->core, local_port); in mlxsw_sp_port_create()
1883 mlxsw_sp_port_swid_set(mlxsw_sp, local_port, in mlxsw_sp_port_create()
1886 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port, in mlxsw_sp_port_create()
1892 static void mlxsw_sp_port_remove(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_port_remove() argument
1894 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_remove()
1900 mlxsw_core_port_clear(mlxsw_sp->core, local_port, mlxsw_sp); in mlxsw_sp_port_remove()
1904 mlxsw_sp->ports[local_port] = NULL; in mlxsw_sp_port_remove()
1915 mlxsw_core_port_fini(mlxsw_sp->core, local_port); in mlxsw_sp_port_remove()
1916 mlxsw_sp_port_swid_set(mlxsw_sp, local_port, in mlxsw_sp_port_remove()
1918 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port, slot_index, module); in mlxsw_sp_port_remove()
1931 mlxsw_sp_port->local_port = MLXSW_PORT_CPU_PORT; in mlxsw_sp_cpu_port_create()
1960 static bool mlxsw_sp_local_port_valid(u16 local_port) in mlxsw_sp_local_port_valid() argument
1962 return local_port != MLXSW_PORT_CPU_PORT; in mlxsw_sp_local_port_valid()
1965 static bool mlxsw_sp_port_created(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_port_created() argument
1967 if (!mlxsw_sp_local_port_valid(local_port)) in mlxsw_sp_port_created()
1969 return mlxsw_sp->ports[local_port] != NULL; in mlxsw_sp_port_created()
1973 u16 local_port, bool enable) in mlxsw_sp_port_mapping_event_set() argument
1977 mlxsw_reg_pmecr_pack(pmecr_pl, local_port, in mlxsw_sp_port_mapping_event_set()
1996 u16 local_port; in mlxsw_sp_port_mapping_events_work() local
2008 local_port = mlxsw_reg_pmlp_local_port_get(event->pmlp_pl); in mlxsw_sp_port_mapping_events_work()
2009 err = mlxsw_sp_port_module_info_parse(mlxsw_sp, local_port, in mlxsw_sp_port_mapping_events_work()
2019 if (!mlxsw_sp_port_created(mlxsw_sp, local_port)) in mlxsw_sp_port_mapping_events_work()
2020 mlxsw_sp_port_create(mlxsw_sp, local_port, in mlxsw_sp_port_mapping_events_work()
2027 mlxsw_sp->port_mapping[local_port] = port_mapping; in mlxsw_sp_port_mapping_events_work()
2041 u16 local_port; in mlxsw_sp_port_mapping_listener_func() local
2043 local_port = mlxsw_reg_pmlp_local_port_get(pmlp_pl); in mlxsw_sp_port_mapping_listener_func()
2044 if (WARN_ON_ONCE(!mlxsw_sp_local_port_is_valid(mlxsw_sp, local_port))) in mlxsw_sp_port_mapping_listener_func()
2094 bool (*selector)(void *priv, u16 local_port), in mlxsw_sp_ports_remove_selected() argument
2237 u16 local_port = mlxsw_reg_pmtdb_port_num_get(pmtdb_pl, i); in mlxsw_sp_port_unsplit_create() local
2239 port_mapping = &mlxsw_sp->port_mapping[local_port]; in mlxsw_sp_port_unsplit_create()
2240 if (!port_mapping->width || !mlxsw_sp_local_port_valid(local_port)) in mlxsw_sp_port_unsplit_create()
2242 mlxsw_sp_port_create(mlxsw_sp, local_port, in mlxsw_sp_port_unsplit_create()
2248 mlxsw_sp_port_get_by_local_port(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_port_get_by_local_port() argument
2250 if (mlxsw_sp->ports && mlxsw_sp->ports[local_port]) in mlxsw_sp_port_get_by_local_port()
2251 return mlxsw_sp->ports[local_port]; in mlxsw_sp_port_get_by_local_port()
2255 static int mlxsw_sp_port_split(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_split() argument
2267 mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port); in mlxsw_sp_port_split()
2270 local_port); in mlxsw_sp_port_split()
2320 static int mlxsw_sp_port_unsplit(struct mlxsw_core *mlxsw_core, u16 local_port, in mlxsw_sp_port_unsplit() argument
2330 mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port); in mlxsw_sp_port_unsplit()
2333 local_port); in mlxsw_sp_port_unsplit()
2383 u16 local_port; in mlxsw_sp_pude_event_func() local
2385 local_port = mlxsw_reg_pude_local_port_get(pude_pl); in mlxsw_sp_pude_event_func()
2387 if (WARN_ON_ONCE(!mlxsw_sp_local_port_is_valid(mlxsw_sp, local_port))) in mlxsw_sp_pude_event_func()
2389 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_pude_event_func()
2408 u16 local_port; in mlxsw_sp1_ptp_fifo_event_func() local
2412 local_port = mlxsw_reg_mtpptr_local_port_get(mtpptr_pl); in mlxsw_sp1_ptp_fifo_event_func()
2423 mlxsw_sp1_ptp_got_timestamp(mlxsw_sp, ingress, local_port, in mlxsw_sp1_ptp_fifo_event_func()
2446 u16 local_port, void *priv) in mlxsw_sp_rx_listener_no_mark_func() argument
2449 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_rx_listener_no_mark_func()
2454 local_port); in mlxsw_sp_rx_listener_no_mark_func()
2470 static void mlxsw_sp_rx_listener_mark_func(struct sk_buff *skb, u16 local_port, in mlxsw_sp_rx_listener_mark_func() argument
2474 return mlxsw_sp_rx_listener_no_mark_func(skb, local_port, priv); in mlxsw_sp_rx_listener_mark_func()
2478 u16 local_port, void *priv) in mlxsw_sp_rx_listener_l3_mark_func() argument
2482 return mlxsw_sp_rx_listener_no_mark_func(skb, local_port, priv); in mlxsw_sp_rx_listener_l3_mark_func()
2486 u16 local_port) in mlxsw_sp_ptp_receive() argument
2488 mlxsw_sp->ptp_ops->receive(mlxsw_sp, skb, local_port); in mlxsw_sp_ptp_receive()
2805 key->local_port = trigger->local_port; in mlxsw_sp_sample_trigger_key_init()
2884 if (trigger_node->trigger.local_port) { in mlxsw_sp_sample_trigger_params_set()
3916 struct sk_buff *skb, u16 local_port) in mlxsw_sp_ptp_transmitted() argument
3921 mlxsw_sp->ptp_ops->transmitted(mlxsw_sp, skb, local_port); in mlxsw_sp_ptp_transmitted()
4252 mlxsw_reg_slcor_port_add_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_add()
4263 mlxsw_reg_slcor_port_remove_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_remove()
4274 mlxsw_reg_slcor_col_enable_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_enable()
4285 mlxsw_reg_slcor_col_disable_pack(slcor_pl, mlxsw_sp_port->local_port, in mlxsw_sp_lag_col_port_disable()
4385 mlxsw_sp_port->local_port); in mlxsw_sp_port_lag_join()
4406 mlxsw_sp_port->local_port); in mlxsw_sp_port_lag_join()
4440 mlxsw_sp_port->local_port); in mlxsw_sp_port_lag_leave()
4456 mlxsw_sp_port->local_port); in mlxsw_sp_lag_dist_port_add()
4467 mlxsw_sp_port->local_port); in mlxsw_sp_lag_dist_port_remove()
4538 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); in mlxsw_sp_port_stp_set()