Lines Matching refs:local_port

248 	mlxsw_tx_hdr_port_mid_set(txhdr, tx_info->local_port);
280 mlxsw_tx_hdr_fid_set(txhdr, max_fid + tx_info->local_port - 1);
355 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port);
381 mlxsw_reg_paos_pack(paos_pl, mlxsw_sp_port->local_port,
393 mlxsw_reg_ppad_pack(ppad_pl, true, mlxsw_sp_port->local_port);
403 mlxsw_sp_port->local_port);
414 mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, 0);
432 mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, mtu);
437 u16 local_port, u8 swid)
441 mlxsw_reg_pspa_pack(pspa_pl, swid, local_port);
450 mlxsw_reg_svpe_pack(svpe_pl, mlxsw_sp_port->local_port, enable);
464 mlxsw_reg_spvmlr_pack(spvmlr_pl, mlxsw_sp_port->local_port, vid, vid,
480 mlxsw_reg_spfsr_pack(spfsr_pl, mlxsw_sp_port->local_port, enable);
517 mlxsw_reg_spevet_pack(spevet_pl, mlxsw_sp_port->local_port, sver_type);
533 mlxsw_reg_spvid_pack(spvid_pl, mlxsw_sp_port->local_port, vid,
545 mlxsw_reg_spaft_pack(spaft_pl, mlxsw_sp_port->local_port, allow);
581 mlxsw_reg_sspr_pack(sspr_pl, mlxsw_sp_port->local_port);
587 u16 local_port, char *pmlp_pl,
605 local_port);
612 local_port);
617 local_port);
624 local_port);
629 local_port);
643 mlxsw_sp_port_module_info_get(struct mlxsw_sp *mlxsw_sp, u16 local_port,
649 mlxsw_reg_pmlp_pack(pmlp_pl, local_port);
653 return mlxsw_sp_port_module_info_parse(mlxsw_sp, local_port,
658 mlxsw_sp_port_module_map(struct mlxsw_sp *mlxsw_sp, u16 local_port,
667 mlxsw_reg_pmlp_pack(pmlp_pl, local_port);
687 static void mlxsw_sp_port_module_unmap(struct mlxsw_sp *mlxsw_sp, u16 local_port,
692 mlxsw_reg_pmlp_pack(pmlp_pl, local_port);
742 .local_port = mlxsw_sp_port->local_port,
895 mlxsw_reg_ppcnt_pack(ppcnt_pl, mlxsw_sp_port->local_port, grp, prio);
1030 mlxsw_reg_spvm_pack(spvm_pl, mlxsw_sp_port->local_port, vid_begin,
1225 mlxsw_reg_pplr_pack(pplr_pl, mlxsw_sp_port->local_port, enable);
1373 ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port,
1382 ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port,
1398 mlxsw_sp_port->local_port, 0,
1416 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index,
1431 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index,
1446 mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index,
1460 mlxsw_reg_qtct_pack(qtct_pl, mlxsw_sp_port->local_port, switch_prio,
1557 mlxsw_reg_qtctm_pack(qtctm_pl, mlxsw_sp_port->local_port, enable);
1586 mlxsw_reg_spvc_pack(spvc_pl, mlxsw_sp_port->local_port,
1592 u16 local_port, u8 *port_number,
1599 mlxsw_reg_pllp_pack(pllp_pl, local_port);
1608 static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u16 local_port,
1622 err = mlxsw_sp_port_module_map(mlxsw_sp, local_port, port_mapping);
1625 local_port);
1629 err = mlxsw_sp_port_swid_set(mlxsw_sp, local_port, 0);
1632 local_port);
1636 err = mlxsw_sp_port_label_info_get(mlxsw_sp, local_port, &port_number,
1640 local_port);
1645 err = mlxsw_core_port_init(mlxsw_sp->core, local_port, slot_index,
1651 local_port);
1663 mlxsw_core_port_netdev_link(mlxsw_sp->core, local_port,
1667 mlxsw_sp_port->local_port = local_port;
1690 mlxsw_sp_port->local_port);
1711 mlxsw_sp_port->local_port);
1718 mlxsw_sp_port->local_port);
1726 mlxsw_sp_port->local_port);
1733 mlxsw_sp_port->local_port);
1740 mlxsw_sp_port->local_port);
1751 mlxsw_sp_port->local_port);
1758 mlxsw_sp_port->local_port);
1765 mlxsw_sp_port->local_port);
1773 mlxsw_sp_port->local_port);
1780 mlxsw_sp_port->local_port);
1787 mlxsw_sp_port->local_port);
1795 mlxsw_sp_port->local_port);
1802 mlxsw_sp_port->local_port);
1810 mlxsw_sp_port->local_port);
1818 mlxsw_sp_port->local_port);
1830 local_port);
1837 mlxsw_sp->ports[local_port] = mlxsw_sp_port;
1842 mlxsw_sp_port->local_port);
1849 mlxsw_sp_port->local_port);
1860 mlxsw_sp->ports[local_port] = NULL;
1889 mlxsw_core_port_fini(mlxsw_sp->core, local_port);
1892 mlxsw_sp_port_swid_set(mlxsw_sp, local_port,
1895 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port,
1901 static void mlxsw_sp_port_remove(struct mlxsw_sp *mlxsw_sp, u16 local_port)
1903 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port];
1912 mlxsw_sp->ports[local_port] = NULL;
1923 mlxsw_core_port_fini(mlxsw_sp->core, local_port);
1924 mlxsw_sp_port_swid_set(mlxsw_sp, local_port,
1926 mlxsw_sp_port_module_unmap(mlxsw_sp, local_port, slot_index, module);
1939 mlxsw_sp_port->local_port = MLXSW_PORT_CPU_PORT;
1968 static bool mlxsw_sp_local_port_valid(u16 local_port)
1970 return local_port != MLXSW_PORT_CPU_PORT;
1973 static bool mlxsw_sp_port_created(struct mlxsw_sp *mlxsw_sp, u16 local_port)
1975 if (!mlxsw_sp_local_port_valid(local_port))
1977 return mlxsw_sp->ports[local_port] != NULL;
1981 u16 local_port, bool enable)
1985 mlxsw_reg_pmecr_pack(pmecr_pl, local_port,
2004 u16 local_port;
2016 local_port = mlxsw_reg_pmlp_local_port_get(event->pmlp_pl);
2017 err = mlxsw_sp_port_module_info_parse(mlxsw_sp, local_port,
2027 if (!mlxsw_sp_port_created(mlxsw_sp, local_port))
2028 mlxsw_sp_port_create(mlxsw_sp, local_port,
2035 mlxsw_sp->port_mapping[local_port] = port_mapping;
2049 u16 local_port;
2051 local_port = mlxsw_reg_pmlp_local_port_get(pmlp_pl);
2052 if (WARN_ON_ONCE(!mlxsw_sp_local_port_is_valid(mlxsw_sp, local_port)))
2102 bool (*selector)(void *priv, u16 local_port),
2245 u16 local_port = mlxsw_reg_pmtdb_port_num_get(pmtdb_pl, i);
2247 port_mapping = &mlxsw_sp->port_mapping[local_port];
2248 if (!port_mapping->width || !mlxsw_sp_local_port_valid(local_port))
2250 mlxsw_sp_port_create(mlxsw_sp, local_port,
2256 mlxsw_sp_port_get_by_local_port(struct mlxsw_sp *mlxsw_sp, u16 local_port)
2258 if (mlxsw_sp->ports && mlxsw_sp->ports[local_port])
2259 return mlxsw_sp->ports[local_port];
2263 static int mlxsw_sp_port_split(struct mlxsw_core *mlxsw_core, u16 local_port,
2275 mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port);
2278 local_port);
2328 static int mlxsw_sp_port_unsplit(struct mlxsw_core *mlxsw_core, u16 local_port,
2338 mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port);
2341 local_port);
2391 u16 local_port;
2393 local_port = mlxsw_reg_pude_local_port_get(pude_pl);
2395 if (WARN_ON_ONCE(!mlxsw_sp_local_port_is_valid(mlxsw_sp, local_port)))
2397 mlxsw_sp_port = mlxsw_sp->ports[local_port];
2416 u16 local_port;
2420 local_port = mlxsw_reg_mtpptr_local_port_get(mtpptr_pl);
2431 mlxsw_sp1_ptp_got_timestamp(mlxsw_sp, ingress, local_port,
2454 u16 local_port, void *priv)
2457 struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port];
2462 local_port);
2478 static void mlxsw_sp_rx_listener_mark_func(struct sk_buff *skb, u16 local_port,
2482 return mlxsw_sp_rx_listener_no_mark_func(skb, local_port, priv);
2486 u16 local_port, void *priv)
2490 return mlxsw_sp_rx_listener_no_mark_func(skb, local_port, priv);
2494 u16 local_port)
2496 mlxsw_sp->ptp_ops->receive(mlxsw_sp, skb, local_port);
2874 key->local_port = trigger->local_port;
2953 if (trigger_node->trigger.local_port) {
3976 struct sk_buff *skb, u16 local_port)
3981 mlxsw_sp->ptp_ops->transmitted(mlxsw_sp, skb, local_port);
4318 mlxsw_reg_slcor_port_add_pack(slcor_pl, mlxsw_sp_port->local_port,
4329 mlxsw_reg_slcor_port_remove_pack(slcor_pl, mlxsw_sp_port->local_port,
4340 mlxsw_reg_slcor_col_enable_pack(slcor_pl, mlxsw_sp_port->local_port,
4351 mlxsw_reg_slcor_col_disable_pack(slcor_pl, mlxsw_sp_port->local_port,
4537 mlxsw_sp_port->local_port);
4568 mlxsw_sp_port->local_port);
4603 mlxsw_sp_port->local_port);
4618 mlxsw_sp_port->local_port);
4629 mlxsw_sp_port->local_port);
4700 mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port);