mlxsw_sp_port 171 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int (*hwtstamp_get)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 173 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int (*hwtstamp_set)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 180 drivers/net/ethernet/mellanox/mlxsw/spectrum.c void (*get_stats)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 553 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_vid_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, mlxsw_sp_port 557 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 564 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 584 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_sample_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 587 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 590 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_mpsc_pack(mpsc_pl, mlxsw_sp_port->local_port, enable, rate); mlxsw_sp_port 594 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_admin_status_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 597 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 600 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_paos_pack(paos_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 606 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_dev_addr_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 609 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 612 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_ppad_pack(ppad_pl, true, mlxsw_sp_port->local_port); mlxsw_sp_port 617 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_dev_addr_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 619 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 620 drivers/net/ethernet/mellanox/mlxsw/spectrum.c unsigned char *addr = mlxsw_sp_port->dev->dev_addr; mlxsw_sp_port 623 drivers/net/ethernet/mellanox/mlxsw/spectrum.c addr[ETH_ALEN - 1] += mlxsw_sp_port->local_port; mlxsw_sp_port 624 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_dev_addr_set(mlxsw_sp_port, addr); mlxsw_sp_port 627 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_mtu_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 mtu) mlxsw_sp_port 629 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 635 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, 0); mlxsw_sp_port 644 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pmtu_pack(pmtu_pl, mlxsw_sp_port->local_port, mtu); mlxsw_sp_port 648 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_swid_set(struct mlxsw_sp_port *mlxsw_sp_port, u8 swid) mlxsw_sp_port 650 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 653 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pspa_pack(pspa_pl, swid, mlxsw_sp_port->local_port); mlxsw_sp_port 657 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_vp_mode_set(struct mlxsw_sp_port *mlxsw_sp_port, bool enable) mlxsw_sp_port 659 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 662 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_svpe_pack(svpe_pl, mlxsw_sp_port->local_port, enable); mlxsw_sp_port 666 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_vid_learning_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, mlxsw_sp_port 669 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 676 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_spvmlr_pack(spvmlr_pl, mlxsw_sp_port->local_port, vid, vid, mlxsw_sp_port 683 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int __mlxsw_sp_port_pvid_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 686 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 689 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_spvid_pack(spvid_pl, mlxsw_sp_port->local_port, vid); mlxsw_sp_port 693 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_allow_untagged_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 696 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 699 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_spaft_pack(spaft_pl, mlxsw_sp_port->local_port, allow); mlxsw_sp_port 703 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_pvid_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 708 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_allow_untagged_set(mlxsw_sp_port, false); mlxsw_sp_port 712 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = __mlxsw_sp_port_pvid_set(mlxsw_sp_port, vid); mlxsw_sp_port 715 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_allow_untagged_set(mlxsw_sp_port, true); mlxsw_sp_port 720 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->pvid = vid; mlxsw_sp_port 724 drivers/net/ethernet/mellanox/mlxsw/spectrum.c __mlxsw_sp_port_pvid_set(mlxsw_sp_port, mlxsw_sp_port->pvid); mlxsw_sp_port 729 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_system_port_mapping_set(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 731 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 734 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_sspr_pack(sspr_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 755 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_module_map(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 758 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 762 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pmlp_pack(pmlp_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 772 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_module_unmap(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 774 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 777 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pmlp_pack(pmlp_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 784 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 787 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_admin_status_set(mlxsw_sp_port, true); mlxsw_sp_port 796 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 799 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false); mlxsw_sp_port 805 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 806 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 809 drivers/net/ethernet/mellanox/mlxsw/spectrum.c .local_port = mlxsw_sp_port->local_port, mlxsw_sp_port 816 drivers/net/ethernet/mellanox/mlxsw/spectrum.c this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped); mlxsw_sp_port 827 drivers/net/ethernet/mellanox/mlxsw/spectrum.c this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped); mlxsw_sp_port 843 drivers/net/ethernet/mellanox/mlxsw/spectrum.c pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port 849 drivers/net/ethernet/mellanox/mlxsw/spectrum.c this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped); mlxsw_sp_port 861 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 868 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_dev_addr_set(mlxsw_sp_port, addr->sa_data); mlxsw_sp_port 918 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int __mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, int mtu, mlxsw_sp_port 922 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 932 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pbmc_pack(pbmc_pl, mlxsw_sp_port->local_port, 0, 0); mlxsw_sp_port 973 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 977 drivers/net/ethernet/mellanox/mlxsw/spectrum.c bool dcb_en = !!mlxsw_sp_port->dcb.ets; mlxsw_sp_port 981 drivers/net/ethernet/mellanox/mlxsw/spectrum.c prio_tc = dcb_en ? mlxsw_sp_port->dcb.ets->prio_tc : def_prio_tc; mlxsw_sp_port 982 drivers/net/ethernet/mellanox/mlxsw/spectrum.c my_pfc = dcb_en ? mlxsw_sp_port->dcb.pfc : NULL; mlxsw_sp_port 984 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return __mlxsw_sp_port_headroom_set(mlxsw_sp_port, mtu, prio_tc, mlxsw_sp_port 990 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 991 drivers/net/ethernet/mellanox/mlxsw/spectrum.c bool pause_en = mlxsw_sp_port_is_pause_en(mlxsw_sp_port); mlxsw_sp_port 994 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_headroom_set(mlxsw_sp_port, mtu, pause_en); mlxsw_sp_port 997 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_span_port_mtu_update(mlxsw_sp_port, mtu); mlxsw_sp_port 1000 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_mtu_set(mlxsw_sp_port, mtu); mlxsw_sp_port 1007 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_span_port_mtu_update(mlxsw_sp_port, dev->mtu); mlxsw_sp_port 1009 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_headroom_set(mlxsw_sp_port, dev->mtu, pause_en); mlxsw_sp_port 1017 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1025 drivers/net/ethernet/mellanox/mlxsw/spectrum.c p = per_cpu_ptr(mlxsw_sp_port->pcpu_stats, i); mlxsw_sp_port 1069 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1070 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1072 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_ppcnt_pack(ppcnt_pl, mlxsw_sp_port->local_port, grp, prio); mlxsw_sp_port 1159 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1160 drivers/net/ethernet/mellanox/mlxsw/spectrum.c container_of(work, struct mlxsw_sp_port, mlxsw_sp_port 1163 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!netif_carrier_ok(mlxsw_sp_port->dev)) mlxsw_sp_port 1169 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_get_hw_stats(mlxsw_sp_port->dev, mlxsw_sp_port 1170 drivers/net/ethernet/mellanox/mlxsw/spectrum.c &mlxsw_sp_port->periodic_hw_stats.stats); mlxsw_sp_port 1171 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_get_hw_xstats(mlxsw_sp_port->dev, mlxsw_sp_port 1172 drivers/net/ethernet/mellanox/mlxsw/spectrum.c &mlxsw_sp_port->periodic_hw_stats.xstats); mlxsw_sp_port 1175 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_core_schedule_dw(&mlxsw_sp_port->periodic_hw_stats.update_dw, mlxsw_sp_port 1186 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1188 drivers/net/ethernet/mellanox/mlxsw/spectrum.c memcpy(stats, &mlxsw_sp_port->periodic_hw_stats.stats, sizeof(*stats)); mlxsw_sp_port 1191 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int __mlxsw_sp_port_vlan_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1195 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1203 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_spvm_pack(spvm_pl, mlxsw_sp_port->local_port, vid_begin, mlxsw_sp_port 1210 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_vlan_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid_begin, mlxsw_sp_port 1221 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = __mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid_e, mlxsw_sp_port 1230 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static void mlxsw_sp_port_vlan_flush(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1236 drivers/net/ethernet/mellanox/mlxsw/spectrum.c &mlxsw_sp_port->vlans_list, list) { mlxsw_sp_port 1254 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_create(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 1260 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 1264 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid, true, untagged); mlxsw_sp_port 1274 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan->mlxsw_sp_port = mlxsw_sp_port; mlxsw_sp_port 1276 drivers/net/ethernet/mellanox/mlxsw/spectrum.c list_add(&mlxsw_sp_port_vlan->list, &mlxsw_sp_port->vlans_list); mlxsw_sp_port 1281 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid, false, false); mlxsw_sp_port 1287 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 1293 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid, false, false); mlxsw_sp_port 1299 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1307 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return PTR_ERR_OR_ZERO(mlxsw_sp_port_vlan_create(mlxsw_sp_port, vid)); mlxsw_sp_port 1313 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1322 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 1331 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_mall_tc_entry_find(struct mlxsw_sp_port *port, mlxsw_sp_port 1343 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_add_cls_matchall_mirror(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1351 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "Could not find requested device\n"); mlxsw_sp_port 1357 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_span_mirror_add(mlxsw_sp_port, act->dev, span_type, mlxsw_sp_port 1362 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_del_cls_matchall_mirror(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1369 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_span_mirror_del(mlxsw_sp_port, mirror->span_id, mlxsw_sp_port 1374 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_add_cls_matchall_sample(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1381 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port->sample) mlxsw_sp_port 1383 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (rtnl_dereference(mlxsw_sp_port->sample->psample_group)) { mlxsw_sp_port 1384 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "sample already active\n"); mlxsw_sp_port 1388 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "sample rate not supported\n"); mlxsw_sp_port 1392 drivers/net/ethernet/mellanox/mlxsw/spectrum.c rcu_assign_pointer(mlxsw_sp_port->sample->psample_group, mlxsw_sp_port 1394 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->sample->truncate = act->sample.truncate; mlxsw_sp_port 1395 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->sample->trunc_size = act->sample.trunc_size; mlxsw_sp_port 1396 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->sample->rate = act->sample.rate; mlxsw_sp_port 1398 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_sample_set(mlxsw_sp_port, true, act->sample.rate); mlxsw_sp_port 1404 drivers/net/ethernet/mellanox/mlxsw/spectrum.c RCU_INIT_POINTER(mlxsw_sp_port->sample->psample_group, NULL); mlxsw_sp_port 1409 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_del_cls_matchall_sample(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1411 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port->sample) mlxsw_sp_port 1414 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_sample_set(mlxsw_sp_port, false, 1); mlxsw_sp_port 1415 drivers/net/ethernet/mellanox/mlxsw/spectrum.c RCU_INIT_POINTER(mlxsw_sp_port->sample->psample_group, NULL); mlxsw_sp_port 1418 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1428 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "only singular actions are supported\n"); mlxsw_sp_port 1444 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_add_cls_matchall_mirror(mlxsw_sp_port, mlxsw_sp_port 1450 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_add_cls_matchall_sample(mlxsw_sp_port, f, mlxsw_sp_port 1459 drivers/net/ethernet/mellanox/mlxsw/spectrum.c list_add_tail(&mall_tc_entry->list, &mlxsw_sp_port->mall_tc_list); mlxsw_sp_port 1467 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static void mlxsw_sp_port_del_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1472 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mall_tc_entry = mlxsw_sp_port_mall_tc_entry_find(mlxsw_sp_port, mlxsw_sp_port 1475 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_dbg(mlxsw_sp_port->dev, "tc entry not found on port\n"); mlxsw_sp_port 1482 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_del_cls_matchall_mirror(mlxsw_sp_port, mlxsw_sp_port 1486 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_del_cls_matchall_sample(mlxsw_sp_port); mlxsw_sp_port 1495 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_setup_tc_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1501 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_add_cls_matchall(mlxsw_sp_port, f, mlxsw_sp_port 1504 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_del_cls_matchall(mlxsw_sp_port, f); mlxsw_sp_port 1539 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = cb_priv; mlxsw_sp_port 1543 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!tc_cls_can_offload_and_chain0(mlxsw_sp_port->dev, mlxsw_sp_port 1547 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_setup_tc_cls_matchall(mlxsw_sp_port, type_data, mlxsw_sp_port 1600 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_setup_tc_block_flower_bind(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1603 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1630 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port, ingress, f->extack); mlxsw_sp_port 1635 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->ing_acl_block = acl_block; mlxsw_sp_port 1637 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->eg_acl_block = acl_block; mlxsw_sp_port 1654 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_setup_tc_block_flower_unbind(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1657 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1669 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->ing_acl_block = NULL; mlxsw_sp_port 1671 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->eg_acl_block = NULL; mlxsw_sp_port 1675 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port, ingress); mlxsw_sp_port 1682 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_setup_tc_block(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1704 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (flow_block_cb_is_busy(cb, mlxsw_sp_port, mlxsw_sp_port 1708 drivers/net/ethernet/mellanox/mlxsw/spectrum.c block_cb = flow_block_cb_alloc(cb, mlxsw_sp_port, mlxsw_sp_port 1709 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port, NULL); mlxsw_sp_port 1712 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_setup_tc_block_flower_bind(mlxsw_sp_port, f, mlxsw_sp_port 1722 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_setup_tc_block_flower_unbind(mlxsw_sp_port, mlxsw_sp_port 1724 drivers/net/ethernet/mellanox/mlxsw/spectrum.c block_cb = flow_block_cb_lookup(f->block, cb, mlxsw_sp_port); mlxsw_sp_port 1739 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1743 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_setup_tc_block(mlxsw_sp_port, type_data); mlxsw_sp_port 1745 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_setup_tc_red(mlxsw_sp_port, type_data); mlxsw_sp_port 1747 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_setup_tc_prio(mlxsw_sp_port, type_data); mlxsw_sp_port 1756 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1759 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (mlxsw_sp_acl_block_rule_count(mlxsw_sp_port->ing_acl_block) || mlxsw_sp_port 1760 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_acl_block_rule_count(mlxsw_sp_port->eg_acl_block) || mlxsw_sp_port 1761 drivers/net/ethernet/mellanox/mlxsw/spectrum.c !list_empty(&mlxsw_sp_port->mall_tc_list)) { mlxsw_sp_port 1765 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_acl_block_disable_inc(mlxsw_sp_port->ing_acl_block); mlxsw_sp_port 1766 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_acl_block_disable_inc(mlxsw_sp_port->eg_acl_block); mlxsw_sp_port 1768 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_acl_block_disable_dec(mlxsw_sp_port->ing_acl_block); mlxsw_sp_port 1769 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_acl_block_disable_dec(mlxsw_sp_port->eg_acl_block); mlxsw_sp_port 1776 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1781 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false); mlxsw_sp_port 1783 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pplr_pack(pplr_pl, mlxsw_sp_port->local_port, enable); mlxsw_sp_port 1784 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pplr), mlxsw_sp_port 1788 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_admin_status_set(mlxsw_sp_port, true); mlxsw_sp_port 1843 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1844 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1847 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 1850 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1859 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port->mlxsw_sp->ptp_ops->hwtstamp_set(mlxsw_sp_port, mlxsw_sp_port 1870 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1876 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port->mlxsw_sp->ptp_ops->hwtstamp_get(mlxsw_sp_port, mlxsw_sp_port 1887 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static inline void mlxsw_sp_port_ptp_clear(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1891 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mlxsw_sp->ptp_ops->hwtstamp_set(mlxsw_sp_port, &config); mlxsw_sp_port 1897 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1901 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_hwtstamp_set(mlxsw_sp_port, ifr); mlxsw_sp_port 1903 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_hwtstamp_get(mlxsw_sp_port, ifr); mlxsw_sp_port 1930 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1931 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1949 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1951 drivers/net/ethernet/mellanox/mlxsw/spectrum.c pause->rx_pause = mlxsw_sp_port->link.rx_pause; mlxsw_sp_port 1952 drivers/net/ethernet/mellanox/mlxsw/spectrum.c pause->tx_pause = mlxsw_sp_port->link.tx_pause; mlxsw_sp_port 1955 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_pause_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1960 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_pfcc_pack(pfcc_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 1964 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pfcc), mlxsw_sp_port 1971 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1975 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (mlxsw_sp_port->dcb.pfc && mlxsw_sp_port->dcb.pfc->pfc_en) { mlxsw_sp_port 1985 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_headroom_set(mlxsw_sp_port, dev->mtu, pause_en); mlxsw_sp_port 1991 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_pause_set(mlxsw_sp_port, pause); mlxsw_sp_port 1997 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->link.rx_pause = pause->rx_pause; mlxsw_sp_port 1998 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->link.tx_pause = pause->tx_pause; mlxsw_sp_port 2003 drivers/net/ethernet/mellanox/mlxsw/spectrum.c pause_en = mlxsw_sp_port_is_pause_en(mlxsw_sp_port); mlxsw_sp_port 2004 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_headroom_set(mlxsw_sp_port, dev->mtu, pause_en); mlxsw_sp_port 2333 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 2375 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mlxsw_sp->ptp_ops->get_stats_strings(&p); mlxsw_sp_port 2383 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 2384 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 2399 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_mlcr_pack(mlcr_pl, mlxsw_sp_port->local_port, active); mlxsw_sp_port 2447 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 2448 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 2470 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 2513 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mlxsw_sp->ptp_ops->get_stats(mlxsw_sp_port, mlxsw_sp_port 2515 drivers/net/ethernet/mellanox/mlxsw/spectrum.c data_index += mlxsw_sp_port->mlxsw_sp->ptp_ops->get_stats_count(); mlxsw_sp_port 2520 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 2525 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mlxsw_sp->ptp_ops->get_stats_count(); mlxsw_sp_port 3295 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 3296 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3305 drivers/net/ethernet/mellanox/mlxsw/spectrum.c autoneg = mlxsw_sp_port->link.autoneg; mlxsw_sp_port 3306 drivers/net/ethernet/mellanox/mlxsw/spectrum.c ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 3315 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.width, cmd); mlxsw_sp_port 3318 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.width, cmd); mlxsw_sp_port 3333 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 3334 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3343 drivers/net/ethernet/mellanox/mlxsw/spectrum.c ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 3352 drivers/net/ethernet/mellanox/mlxsw/spectrum.c ops->to_ptys_advert_link(mlxsw_sp, mlxsw_sp_port->mapping.width, mlxsw_sp_port 3354 drivers/net/ethernet/mellanox/mlxsw/spectrum.c ops->to_ptys_speed(mlxsw_sp, mlxsw_sp_port->mapping.width, mlxsw_sp_port 3363 drivers/net/ethernet/mellanox/mlxsw/spectrum.c ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 3369 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->link.autoneg = autoneg; mlxsw_sp_port 3374 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false); mlxsw_sp_port 3375 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_admin_status_set(mlxsw_sp_port, true); mlxsw_sp_port 3383 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev); mlxsw_sp_port 3384 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3388 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.module, mlxsw_sp_port 3398 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev); mlxsw_sp_port 3399 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3403 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.module, ee, mlxsw_sp_port 3412 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev); mlxsw_sp_port 3413 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3435 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_speed_by_width_set(struct mlxsw_sp_port *mlxsw_sp_port, u8 width) mlxsw_sp_port 3437 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3447 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = ops->port_speed_base(mlxsw_sp, mlxsw_sp_port->local_port, mlxsw_sp_port 3454 drivers/net/ethernet/mellanox/mlxsw/spectrum.c ops->reg_ptys_eth_pack(mlxsw_sp, ptys_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 3455 drivers/net/ethernet/mellanox/mlxsw/spectrum.c eth_proto_admin, mlxsw_sp_port->link.autoneg); mlxsw_sp_port 3459 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_ets_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 3463 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3466 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, mlxsw_sp_port 3474 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_ets_maxrate_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 3478 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3481 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, mlxsw_sp_port 3488 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_min_bw_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 3492 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3495 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index, mlxsw_sp_port 3503 drivers/net/ethernet/mellanox/mlxsw/spectrum.c int mlxsw_sp_port_prio_tc_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 3506 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3509 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_qtct_pack(qtct_pl, mlxsw_sp_port->local_port, switch_prio, mlxsw_sp_port 3514 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 3521 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_set(mlxsw_sp_port, mlxsw_sp_port 3527 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_set(mlxsw_sp_port, mlxsw_sp_port 3534 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_set(mlxsw_sp_port, mlxsw_sp_port 3540 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_set(mlxsw_sp_port, mlxsw_sp_port 3552 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port 3558 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port 3566 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port 3573 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port 3583 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_min_bw_set(mlxsw_sp_port, mlxsw_sp_port 3593 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, i, 0); mlxsw_sp_port 3601 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_tc_mc_mode_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 3604 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 3607 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_qtctm_pack(qtctm_pl, mlxsw_sp_port->local_port, enable); mlxsw_sp_port 3615 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 3629 drivers/net/ethernet/mellanox/mlxsw/spectrum.c dev = alloc_etherdev(sizeof(struct mlxsw_sp_port)); mlxsw_sp_port 3635 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 3636 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->dev = dev; mlxsw_sp_port 3637 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mlxsw_sp = mlxsw_sp; mlxsw_sp_port 3638 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port = local_port; mlxsw_sp_port 3639 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->pvid = MLXSW_SP_DEFAULT_VID; mlxsw_sp_port 3640 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->split = split; mlxsw_sp_port 3641 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.module = module; mlxsw_sp_port 3642 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.width = width; mlxsw_sp_port 3643 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mapping.lane = lane; mlxsw_sp_port 3644 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->link.autoneg = 1; mlxsw_sp_port 3645 drivers/net/ethernet/mellanox/mlxsw/spectrum.c INIT_LIST_HEAD(&mlxsw_sp_port->vlans_list); mlxsw_sp_port 3646 drivers/net/ethernet/mellanox/mlxsw/spectrum.c INIT_LIST_HEAD(&mlxsw_sp_port->mall_tc_list); mlxsw_sp_port 3648 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->pcpu_stats = mlxsw_sp_port 3650 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port->pcpu_stats) { mlxsw_sp_port 3655 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->sample = kzalloc(sizeof(*mlxsw_sp_port->sample), mlxsw_sp_port 3657 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port->sample) { mlxsw_sp_port 3662 drivers/net/ethernet/mellanox/mlxsw/spectrum.c INIT_DELAYED_WORK(&mlxsw_sp_port->periodic_hw_stats.update_dw, mlxsw_sp_port 3668 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_module_map(mlxsw_sp_port, module, width, lane); mlxsw_sp_port 3671 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3675 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_swid_set(mlxsw_sp_port, 0); mlxsw_sp_port 3678 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3682 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_dev_addr_init(mlxsw_sp_port); mlxsw_sp_port 3685 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3703 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_system_port_mapping_set(mlxsw_sp_port); mlxsw_sp_port 3706 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3710 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_speed_by_width_set(mlxsw_sp_port, width); mlxsw_sp_port 3713 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3717 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_mtu_set(mlxsw_sp_port, ETH_DATA_LEN); mlxsw_sp_port 3720 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3724 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false); mlxsw_sp_port 3728 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_buffers_init(mlxsw_sp_port); mlxsw_sp_port 3731 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3735 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ets_init(mlxsw_sp_port); mlxsw_sp_port 3738 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3742 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, true); mlxsw_sp_port 3745 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3750 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_dcb_init(mlxsw_sp_port); mlxsw_sp_port 3753 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3757 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_fids_init(mlxsw_sp_port); mlxsw_sp_port 3760 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3764 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_tc_qdisc_init(mlxsw_sp_port); mlxsw_sp_port 3767 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3771 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, 0, VLAN_N_VID - 1, false, mlxsw_sp_port 3775 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3779 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_nve_init(mlxsw_sp_port); mlxsw_sp_port 3782 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3786 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_pvid_set(mlxsw_sp_port, MLXSW_SP_DEFAULT_VID); mlxsw_sp_port 3789 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3793 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_create(mlxsw_sp_port, mlxsw_sp_port 3797 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3801 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->default_vlan = mlxsw_sp_port_vlan; mlxsw_sp_port 3803 drivers/net/ethernet/mellanox/mlxsw/spectrum.c INIT_DELAYED_WORK(&mlxsw_sp_port->ptp.shaper_dw, mlxsw_sp_port 3806 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp->ports[local_port] = mlxsw_sp_port; mlxsw_sp_port 3810 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 3814 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_core_port_eth_set(mlxsw_sp->core, mlxsw_sp_port->local_port, mlxsw_sp_port 3815 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port, dev); mlxsw_sp_port 3816 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_core_schedule_dw(&mlxsw_sp_port->periodic_hw_stats.update_dw, 0); mlxsw_sp_port 3824 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_nve_fini(mlxsw_sp_port); mlxsw_sp_port 3827 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port); mlxsw_sp_port 3829 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_fids_fini(mlxsw_sp_port); mlxsw_sp_port 3831 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_dcb_fini(mlxsw_sp_port); mlxsw_sp_port 3833 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, false); mlxsw_sp_port 3842 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_swid_set(mlxsw_sp_port, MLXSW_PORT_SWID_DISABLED_PORT); mlxsw_sp_port 3844 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_module_unmap(mlxsw_sp_port); mlxsw_sp_port 3846 drivers/net/ethernet/mellanox/mlxsw/spectrum.c kfree(mlxsw_sp_port->sample); mlxsw_sp_port 3848 drivers/net/ethernet/mellanox/mlxsw/spectrum.c free_percpu(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port 3858 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 3860 drivers/net/ethernet/mellanox/mlxsw/spectrum.c cancel_delayed_work_sync(&mlxsw_sp_port->periodic_hw_stats.update_dw); mlxsw_sp_port 3861 drivers/net/ethernet/mellanox/mlxsw/spectrum.c cancel_delayed_work_sync(&mlxsw_sp_port->ptp.shaper_dw); mlxsw_sp_port 3862 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_ptp_clear(mlxsw_sp_port); mlxsw_sp_port 3864 drivers/net/ethernet/mellanox/mlxsw/spectrum.c unregister_netdev(mlxsw_sp_port->dev); /* This calls ndo_stop */ mlxsw_sp_port 3866 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_flush(mlxsw_sp_port, true); mlxsw_sp_port 3867 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_nve_fini(mlxsw_sp_port); mlxsw_sp_port 3868 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port); mlxsw_sp_port 3869 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_fids_fini(mlxsw_sp_port); mlxsw_sp_port 3870 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_dcb_fini(mlxsw_sp_port); mlxsw_sp_port 3871 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, false); mlxsw_sp_port 3872 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_swid_set(mlxsw_sp_port, MLXSW_PORT_SWID_DISABLED_PORT); mlxsw_sp_port 3873 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_module_unmap(mlxsw_sp_port); mlxsw_sp_port 3874 drivers/net/ethernet/mellanox/mlxsw/spectrum.c kfree(mlxsw_sp_port->sample); mlxsw_sp_port 3875 drivers/net/ethernet/mellanox/mlxsw/spectrum.c free_percpu(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port 3876 drivers/net/ethernet/mellanox/mlxsw/spectrum.c WARN_ON_ONCE(!list_empty(&mlxsw_sp_port->vlans_list)); mlxsw_sp_port 3877 drivers/net/ethernet/mellanox/mlxsw/spectrum.c free_netdev(mlxsw_sp_port->dev); mlxsw_sp_port 3883 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 3886 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = kzalloc(sizeof(*mlxsw_sp_port), GFP_KERNEL); mlxsw_sp_port 3887 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port) mlxsw_sp_port 3890 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->mlxsw_sp = mlxsw_sp; mlxsw_sp_port 3891 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port = MLXSW_PORT_CPU_PORT; mlxsw_sp_port 3894 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port, mlxsw_sp_port 3902 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp->ports[MLXSW_PORT_CPU_PORT] = mlxsw_sp_port; mlxsw_sp_port 3906 drivers/net/ethernet/mellanox/mlxsw/spectrum.c kfree(mlxsw_sp_port); mlxsw_sp_port 3912 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 3917 drivers/net/ethernet/mellanox/mlxsw/spectrum.c kfree(mlxsw_sp_port); mlxsw_sp_port 3946 drivers/net/ethernet/mellanox/mlxsw/spectrum.c alloc_size = sizeof(struct mlxsw_sp_port *) * max_ports; mlxsw_sp_port 4045 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static struct mlxsw_sp_port * mlxsw_sp_port 4059 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 4071 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port); mlxsw_sp_port 4072 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port) { mlxsw_sp_port 4079 drivers/net/ethernet/mellanox/mlxsw/spectrum.c module = mlxsw_sp_port->mapping.module; mlxsw_sp_port 4080 drivers/net/ethernet/mellanox/mlxsw/spectrum.c cur_width = mlxsw_sp_port->mapping.width; mlxsw_sp_port 4083 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "Port can only be split into 2 or 4 ports\n"); mlxsw_sp_port 4089 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "Port cannot be split further\n"); mlxsw_sp_port 4099 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "Invalid split configuration\n"); mlxsw_sp_port 4108 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "Invalid split configuration\n"); mlxsw_sp_port 4137 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 4149 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = mlxsw_sp_port_get_by_local_port(mlxsw_sp, local_port); mlxsw_sp_port 4150 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port) { mlxsw_sp_port 4157 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port->split) { mlxsw_sp_port 4158 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_err(mlxsw_sp_port->dev, "Port was not split\n"); mlxsw_sp_port 4163 drivers/net/ethernet/mellanox/mlxsw/spectrum.c cur_width = mlxsw_sp_port->mapping.width; mlxsw_sp_port 4187 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_down_wipe_counters(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 4192 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->periodic_hw_stats.xstats.backlog[i] = 0; mlxsw_sp_port 4199 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 4204 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 4205 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port) mlxsw_sp_port 4210 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_info(mlxsw_sp_port->dev, "link up\n"); mlxsw_sp_port 4211 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netif_carrier_on(mlxsw_sp_port->dev); mlxsw_sp_port 4212 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_core_schedule_dw(&mlxsw_sp_port->ptp.shaper_dw, 0); mlxsw_sp_port 4214 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_info(mlxsw_sp_port->dev, "link down\n"); mlxsw_sp_port 4215 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netif_carrier_off(mlxsw_sp_port->dev); mlxsw_sp_port 4216 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_down_wipe_counters(mlxsw_sp_port); mlxsw_sp_port 4264 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 4267 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (unlikely(!mlxsw_sp_port)) { mlxsw_sp_port 4273 drivers/net/ethernet/mellanox/mlxsw/spectrum.c skb->dev = mlxsw_sp_port->dev; mlxsw_sp_port 4275 drivers/net/ethernet/mellanox/mlxsw/spectrum.c pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port 4304 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 4308 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (unlikely(!mlxsw_sp_port)) { mlxsw_sp_port 4313 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (unlikely(!mlxsw_sp_port->sample)) { mlxsw_sp_port 4319 drivers/net/ethernet/mellanox/mlxsw/spectrum.c size = mlxsw_sp_port->sample->truncate ? mlxsw_sp_port 4320 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->sample->trunc_size : skb->len; mlxsw_sp_port 4323 drivers/net/ethernet/mellanox/mlxsw/spectrum.c psample_group = rcu_dereference(mlxsw_sp_port->sample->psample_group); mlxsw_sp_port 4327 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->dev->ifindex, 0, mlxsw_sp_port 4328 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->sample->rate); mlxsw_sp_port 5482 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port **p_mlxsw_sp_port = data; mlxsw_sp_port 5493 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find(struct net_device *dev) mlxsw_sp_port 5495 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 5500 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = NULL; mlxsw_sp_port 5501 drivers/net/ethernet/mellanox/mlxsw/spectrum.c netdev_walk_all_lower_dev(dev, mlxsw_sp_lower_dev_walk, &mlxsw_sp_port); mlxsw_sp_port 5503 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port; mlxsw_sp_port 5508 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 5510 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = mlxsw_sp_port_dev_lower_find(dev); mlxsw_sp_port 5511 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port ? mlxsw_sp_port->mlxsw_sp : NULL; mlxsw_sp_port 5514 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev) mlxsw_sp_port 5516 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 5521 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = NULL; mlxsw_sp_port 5523 drivers/net/ethernet/mellanox/mlxsw/spectrum.c &mlxsw_sp_port); mlxsw_sp_port 5525 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port; mlxsw_sp_port 5528 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev) mlxsw_sp_port 5530 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 5533 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = mlxsw_sp_port_dev_lower_find_rcu(dev); mlxsw_sp_port 5534 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (mlxsw_sp_port) mlxsw_sp_port 5535 drivers/net/ethernet/mellanox/mlxsw/spectrum.c dev_hold(mlxsw_sp_port->dev); mlxsw_sp_port 5537 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port; mlxsw_sp_port 5540 drivers/net/ethernet/mellanox/mlxsw/spectrum.c void mlxsw_sp_port_dev_put(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 5542 drivers/net/ethernet/mellanox/mlxsw/spectrum.c dev_put(mlxsw_sp_port->dev); mlxsw_sp_port 5546 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_lag_uppers_cleanup(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5554 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_bridge_leave(mlxsw_sp_port, lag_dev, br_dev); mlxsw_sp_port 5560 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_bridge_leave(mlxsw_sp_port, upper_dev, br_dev); mlxsw_sp_port 5580 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_lag_col_port_add(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5583 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5586 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_slcor_port_add_pack(slcor_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 5591 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_lag_col_port_remove(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5594 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5597 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_slcor_port_remove_pack(slcor_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 5602 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_lag_col_port_enable(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5605 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5608 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_slcor_col_enable_pack(slcor_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 5613 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_lag_col_port_disable(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5616 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5619 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_slcor_col_disable_pack(slcor_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 5687 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_lag_join(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5690 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5710 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_lag_col_port_add(mlxsw_sp_port, lag_id, port_index); mlxsw_sp_port 5715 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 5716 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->lag_id = lag_id; mlxsw_sp_port 5717 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->lagged = 1; mlxsw_sp_port 5721 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (mlxsw_sp_port->default_vlan->fid) mlxsw_sp_port 5722 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_router_leave(mlxsw_sp_port->default_vlan); mlxsw_sp_port 5732 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static void mlxsw_sp_port_lag_leave(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5735 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5736 drivers/net/ethernet/mellanox/mlxsw/spectrum.c u16 lag_id = mlxsw_sp_port->lag_id; mlxsw_sp_port 5739 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (!mlxsw_sp_port->lagged) mlxsw_sp_port 5744 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_lag_col_port_remove(mlxsw_sp_port, lag_id); mlxsw_sp_port 5747 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_flush(mlxsw_sp_port, false); mlxsw_sp_port 5748 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_cleanup(mlxsw_sp_port->default_vlan); mlxsw_sp_port 5752 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_lag_uppers_cleanup(mlxsw_sp_port, lag_dev); mlxsw_sp_port 5758 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 5759 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->lagged = 0; mlxsw_sp_port 5763 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_pvid_set(mlxsw_sp_port, MLXSW_SP_DEFAULT_VID); mlxsw_sp_port 5766 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_lag_dist_port_add(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5769 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5773 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 5777 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_lag_dist_port_remove(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5780 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5784 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->local_port); mlxsw_sp_port 5789 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_lag_col_dist_enable(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 5793 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_lag_col_port_enable(mlxsw_sp_port, mlxsw_sp_port 5794 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->lag_id); mlxsw_sp_port 5798 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_lag_dist_port_add(mlxsw_sp_port, mlxsw_sp_port->lag_id); mlxsw_sp_port 5805 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_lag_col_port_disable(mlxsw_sp_port, mlxsw_sp_port->lag_id); mlxsw_sp_port 5810 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_lag_col_dist_disable(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 5814 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_lag_dist_port_remove(mlxsw_sp_port, mlxsw_sp_port 5815 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->lag_id); mlxsw_sp_port 5819 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_lag_col_port_disable(mlxsw_sp_port, mlxsw_sp_port 5820 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port->lag_id); mlxsw_sp_port 5827 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_lag_dist_port_add(mlxsw_sp_port, mlxsw_sp_port->lag_id); mlxsw_sp_port 5831 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_lag_changed(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5835 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_lag_col_dist_enable(mlxsw_sp_port); mlxsw_sp_port 5837 drivers/net/ethernet/mellanox/mlxsw/spectrum.c return mlxsw_sp_port_lag_col_dist_disable(mlxsw_sp_port); mlxsw_sp_port 5840 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 5843 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 5855 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_reg_spms_pack(spms_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 5865 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static int mlxsw_sp_port_ovs_join(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 5870 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, true); mlxsw_sp_port 5873 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_stp_set(mlxsw_sp_port, true); mlxsw_sp_port 5876 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, 1, VLAN_N_VID - 2, mlxsw_sp_port 5882 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, mlxsw_sp_port 5892 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, true); mlxsw_sp_port 5894 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_stp_set(mlxsw_sp_port, false); mlxsw_sp_port 5896 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, false); mlxsw_sp_port 5900 drivers/net/ethernet/mellanox/mlxsw/spectrum.c static void mlxsw_sp_port_ovs_leave(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 5905 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, mlxsw_sp_port 5908 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vlan_set(mlxsw_sp_port, 1, VLAN_N_VID - 2, mlxsw_sp_port 5910 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_stp_set(mlxsw_sp_port, false); mlxsw_sp_port 5911 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, false); mlxsw_sp_port 5980 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 5986 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 5987 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 6047 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_bridge_join(mlxsw_sp_port, mlxsw_sp_port 6052 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_bridge_leave(mlxsw_sp_port, mlxsw_sp_port 6057 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_lag_join(mlxsw_sp_port, mlxsw_sp_port 6060 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_lag_col_dist_disable(mlxsw_sp_port); mlxsw_sp_port 6061 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_lag_leave(mlxsw_sp_port, mlxsw_sp_port 6066 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_ovs_join(mlxsw_sp_port); mlxsw_sp_port 6068 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_ovs_leave(mlxsw_sp_port); mlxsw_sp_port 6080 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_bridge_leave(mlxsw_sp_port, upper_dev, mlxsw_sp_port 6093 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 6096 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 6101 drivers/net/ethernet/mellanox/mlxsw/spectrum.c if (netif_is_lag_port(dev) && mlxsw_sp_port->lagged) { mlxsw_sp_port 6102 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_lag_changed(mlxsw_sp_port, mlxsw_sp_port 6154 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 6155 drivers/net/ethernet/mellanox/mlxsw/spectrum.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 6195 drivers/net/ethernet/mellanox/mlxsw/spectrum.c err = mlxsw_sp_port_bridge_join(mlxsw_sp_port, mlxsw_sp_port 6200 drivers/net/ethernet/mellanox/mlxsw/spectrum.c mlxsw_sp_port_bridge_leave(mlxsw_sp_port, mlxsw_sp_port 60 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port; mlxsw_sp_port 143 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port **ports; mlxsw_sp_port 211 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 352 drivers/net/ethernet/mellanox/mlxsw/spectrum.h mlxsw_sp_port_is_pause_en(const struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 354 drivers/net/ethernet/mellanox/mlxsw/spectrum.h return mlxsw_sp_port->link.tx_pause || mlxsw_sp_port->link.rx_pause; mlxsw_sp_port 357 drivers/net/ethernet/mellanox/mlxsw/spectrum.h static inline struct mlxsw_sp_port * mlxsw_sp_port 360 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 365 drivers/net/ethernet/mellanox/mlxsw/spectrum.h mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 366 drivers/net/ethernet/mellanox/mlxsw/spectrum.h return mlxsw_sp_port && mlxsw_sp_port->lagged ? mlxsw_sp_port : NULL; mlxsw_sp_port 370 drivers/net/ethernet/mellanox/mlxsw/spectrum.h mlxsw_sp_port_vlan_find_by_vid(const struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 375 drivers/net/ethernet/mellanox/mlxsw/spectrum.h list_for_each_entry(mlxsw_sp_port_vlan, &mlxsw_sp_port->vlans_list, mlxsw_sp_port 393 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_buffers_init(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 441 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_bridge_join(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 445 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_port_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 465 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_ets_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 468 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_prio_tc_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 470 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int __mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, int mtu, mlxsw_sp_port 473 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_ets_maxrate_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 477 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_vid_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, mlxsw_sp_port 479 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_vp_mode_set(struct mlxsw_sp_port *mlxsw_sp_port, bool enable); mlxsw_sp_port 480 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_vid_learning_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid, mlxsw_sp_port 482 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_pvid_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid); mlxsw_sp_port 484 drivers/net/ethernet/mellanox/mlxsw/spectrum.h mlxsw_sp_port_vlan_create(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid); mlxsw_sp_port 486 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_vlan_set(struct mlxsw_sp_port *mlxsw_sp_port, u16 vid_begin, mlxsw_sp_port 497 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find(struct net_device *dev); mlxsw_sp_port 498 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev); mlxsw_sp_port 499 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_port_dev_put(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 500 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev); mlxsw_sp_port 504 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_dcb_init(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 505 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_port_dcb_fini(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 507 drivers/net/ethernet/mellanox/mlxsw/spectrum.h static inline int mlxsw_sp_port_dcb_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 511 drivers/net/ethernet/mellanox/mlxsw/spectrum.h static inline void mlxsw_sp_port_dcb_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 672 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 677 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 839 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_tc_qdisc_init(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 840 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_tc_qdisc_fini(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 841 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_setup_tc_red(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 843 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_setup_tc_prio(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 871 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port, u16 vid); mlxsw_sp_port 873 drivers/net/ethernet/mellanox/mlxsw/spectrum.h struct mlxsw_sp_port *mlxsw_sp_port, u16 vid); mlxsw_sp_port 893 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_fids_init(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 894 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_port_fids_fini(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 963 drivers/net/ethernet/mellanox/mlxsw/spectrum.h int mlxsw_sp_port_nve_init(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 964 drivers/net/ethernet/mellanox/mlxsw/spectrum.h void mlxsw_sp_port_nve_fini(struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 46 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 151 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c binding->mlxsw_sp_port, binding->ingress); mlxsw_sp_port 163 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c binding->mlxsw_sp_port, binding->ingress); mlxsw_sp_port 230 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c struct mlxsw_sp_port *mlxsw_sp_port, bool ingress) mlxsw_sp_port 235 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c if (binding->mlxsw_sp_port == mlxsw_sp_port && mlxsw_sp_port 243 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 250 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c if (WARN_ON(mlxsw_sp_acl_block_lookup(block, mlxsw_sp_port, ingress))) mlxsw_sp_port 261 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c binding->mlxsw_sp_port = mlxsw_sp_port; mlxsw_sp_port 280 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 285 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c binding = mlxsw_sp_acl_block_lookup(block, mlxsw_sp_port, ingress); mlxsw_sp_port 534 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 543 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c mlxsw_sp_port = netdev_priv(out_dev); mlxsw_sp_port 544 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c if (mlxsw_sp_port->mlxsw_sp != mlxsw_sp) { mlxsw_sp_port 548 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 568 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c struct mlxsw_sp_port *in_port; mlxsw_sp_port 576 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c in_port = binding->mlxsw_sp_port; mlxsw_sp_port 139 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_actions.c struct mlxsw_sp_port *in_port; mlxsw_sp_port 154 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_actions.c struct mlxsw_sp_port *in_port; mlxsw_sp_port 361 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 368 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c MLXSW_REG_PXBT_OP_BIND, mlxsw_sp_port->local_port, mlxsw_sp_port 376 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 383 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c MLXSW_REG_PXBT_OP_UNBIND, mlxsw_sp_port->local_port, mlxsw_sp_port 1607 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1613 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c mlxsw_sp_port, ingress); mlxsw_sp_port 1619 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1625 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c mlxsw_sp_port, ingress); mlxsw_sp_port 1745 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1755 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 48 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 51 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 297 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c static int mlxsw_sp_port_pb_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 300 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c [0] = MLXSW_SP_PB_HEADROOM * mlxsw_sp_port->mapping.width, mlxsw_sp_port 303 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 307 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c mlxsw_reg_pbmc_pack(pbmc_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 321 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c static int mlxsw_sp_port_pb_prio_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 326 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c mlxsw_reg_pptb_pack(pptb_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 329 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pptb), mlxsw_sp_port 333 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c static int mlxsw_sp_port_headroom_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 337 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c err = mlxsw_sp_port_pb_init(mlxsw_sp_port); mlxsw_sp_port 340 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c return mlxsw_sp_port_pb_prio_init(mlxsw_sp_port); mlxsw_sp_port 679 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c static int mlxsw_sp_port_sb_cms_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 681 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 685 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c mlxsw_sp_port->local_port, mlxsw_sp_port 691 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c return __mlxsw_sp_sb_cms_init(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 692 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c mlxsw_sp_port->local_port, mlxsw_sp_port 784 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c static int mlxsw_sp_port_sb_pms_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 786 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 788 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c return mlxsw_sp_sb_pms_init(mlxsw_sp, mlxsw_sp_port->local_port, mlxsw_sp_port 971 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c int mlxsw_sp_port_buffers_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 975 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c err = mlxsw_sp_port_headroom_init(mlxsw_sp_port); mlxsw_sp_port 978 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c err = mlxsw_sp_port_sb_cms_init(mlxsw_sp_port); mlxsw_sp_port 981 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c err = mlxsw_sp_port_sb_pms_init(mlxsw_sp_port); mlxsw_sp_port 1073 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1075 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1076 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 1089 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1091 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1092 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 1115 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1117 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1118 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 1136 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1138 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1139 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 1372 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1374 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1375 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 1389 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port 1391 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1392 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 26 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 28 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c memcpy(ets, mlxsw_sp_port->dcb.ets, sizeof(*ets)); mlxsw_sp_port 33 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_ets_validate(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 36 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct net_device *dev = mlxsw_sp_port->dev; mlxsw_sp_port 67 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_pg_prio_map(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 73 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_pptb_pack(pptb_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 77 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pptb), mlxsw_sp_port 91 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_pg_destroy(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 94 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 98 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_pbmc_pack(pbmc_pl, mlxsw_sp_port->local_port, 0, 0); mlxsw_sp_port 113 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 116 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c bool pause_en = mlxsw_sp_port_is_pause_en(mlxsw_sp_port); mlxsw_sp_port 117 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct ieee_ets *my_ets = mlxsw_sp_port->dcb.ets; mlxsw_sp_port 118 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct net_device *dev = mlxsw_sp_port->dev; mlxsw_sp_port 124 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = __mlxsw_sp_port_headroom_set(mlxsw_sp_port, dev->mtu, mlxsw_sp_port 126 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.pfc); mlxsw_sp_port 132 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_pg_prio_map(mlxsw_sp_port, ets->prio_tc); mlxsw_sp_port 138 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_pg_destroy(mlxsw_sp_port, my_ets->prio_tc, mlxsw_sp_port 146 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_pg_destroy(mlxsw_sp_port, ets->prio_tc, my_ets->prio_tc); mlxsw_sp_port 150 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int __mlxsw_sp_dcbnl_ieee_setets(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 153 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct ieee_ets *my_ets = mlxsw_sp_port->dcb.ets; mlxsw_sp_port 154 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct net_device *dev = mlxsw_sp_port->dev; mlxsw_sp_port 162 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_ets_set(mlxsw_sp_port, mlxsw_sp_port 173 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, i, mlxsw_sp_port 183 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_headroom_set(mlxsw_sp_port, ets); mlxsw_sp_port 193 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, i, my_ets->prio_tc[i]); mlxsw_sp_port 200 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_ets_set(mlxsw_sp_port, mlxsw_sp_port 210 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 213 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_ets_validate(mlxsw_sp_port, ets); mlxsw_sp_port 217 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = __mlxsw_sp_dcbnl_ieee_setets(mlxsw_sp_port, ets); mlxsw_sp_port 221 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c memcpy(mlxsw_sp_port->dcb.ets, ets, sizeof(*ets)); mlxsw_sp_port 222 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.ets->ets_cap = IEEE_8021QAZ_MAX_TCS; mlxsw_sp_port 275 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_default_prio(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 279 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c prio_mask = dcb_ieee_getapp_default_prio_mask(mlxsw_sp_port->dev); mlxsw_sp_port 288 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_dscp_prio_map(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 294 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c dcb_ieee_getapp_dscp_prio_mask_map(mlxsw_sp_port->dev, map); mlxsw_sp_port 304 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_prio_dscp_map(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 310 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c dcb_ieee_getapp_prio_dscp_mask_map(mlxsw_sp_port->dev, map); mlxsw_sp_port 322 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_update_qpts(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 325 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 328 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_qpts_pack(qpts_pl, mlxsw_sp_port->local_port, ts); mlxsw_sp_port 333 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_update_qrwe(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 336 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 339 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_qrwe_pack(qrwe_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 345 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_toggle_trust(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 351 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c if (mlxsw_sp_port->dcb.trust_state == ts) mlxsw_sp_port 354 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_app_update_qpts(mlxsw_sp_port, ts); mlxsw_sp_port 358 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_app_update_qrwe(mlxsw_sp_port, rewrite_dscp); mlxsw_sp_port 362 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.trust_state = ts; mlxsw_sp_port 366 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_update_qpts(mlxsw_sp_port, mlxsw_sp_port 367 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.trust_state); mlxsw_sp_port 372 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_update_qpdpm(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 375 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 379 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_qpdpm_pack(qpdpm_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 386 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_update_qpdsm(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 389 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 393 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_qpdsm_pack(qpdsm_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 399 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_dcb_app_update(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 407 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c default_prio = mlxsw_sp_port_dcb_app_default_prio(mlxsw_sp_port); mlxsw_sp_port 408 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c have_dscp = mlxsw_sp_port_dcb_app_prio_dscp_map(mlxsw_sp_port, mlxsw_sp_port 411 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_dcb_app_dscp_prio_map(mlxsw_sp_port, default_prio, mlxsw_sp_port 413 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_app_update_qpdpm(mlxsw_sp_port, mlxsw_sp_port 416 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c netdev_err(mlxsw_sp_port->dev, "Couldn't configure priority map\n"); mlxsw_sp_port 420 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_app_update_qpdsm(mlxsw_sp_port, mlxsw_sp_port 423 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c netdev_err(mlxsw_sp_port->dev, "Couldn't configure DSCP rewrite map\n"); mlxsw_sp_port 428 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_toggle_trust(mlxsw_sp_port, mlxsw_sp_port 431 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c netdev_err(mlxsw_sp_port->dev, "Couldn't switch to trust L2\n"); mlxsw_sp_port 435 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_toggle_trust(mlxsw_sp_port, mlxsw_sp_port 443 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c netdev_err(mlxsw_sp_port->dev, "Couldn't switch to trust L3\n"); mlxsw_sp_port 453 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 464 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_app_update(mlxsw_sp_port); mlxsw_sp_port 478 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 485 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_dcb_app_update(mlxsw_sp_port); mlxsw_sp_port 494 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 496 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c memcpy(maxrate, mlxsw_sp_port->dcb.maxrate, sizeof(*maxrate)); mlxsw_sp_port 504 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 505 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct ieee_maxrate *my_maxrate = mlxsw_sp_port->dcb.maxrate; mlxsw_sp_port 509 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port 519 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c memcpy(mlxsw_sp_port->dcb.maxrate, maxrate, sizeof(*maxrate)); mlxsw_sp_port 525 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_ets_maxrate_set(mlxsw_sp_port, mlxsw_sp_port 531 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_pfc_cnt_get(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 534 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 535 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct ieee_pfc *my_pfc = mlxsw_sp_port->dcb.pfc; mlxsw_sp_port 539 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_ppcnt_pack(ppcnt_pl, mlxsw_sp_port->local_port, mlxsw_sp_port 554 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 558 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_pfc_cnt_get(mlxsw_sp_port, i); mlxsw_sp_port 566 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c memcpy(pfc, mlxsw_sp_port->dcb.pfc, sizeof(*pfc)); mlxsw_sp_port 571 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_pfc_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 576 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_pfcc_pack(pfcc_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 577 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_pfcc_pprx_set(pfcc_pl, mlxsw_sp_port->link.rx_pause); mlxsw_sp_port 578 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_reg_pfcc_pptx_set(pfcc_pl, mlxsw_sp_port->link.tx_pause); mlxsw_sp_port 581 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core, MLXSW_REG(pfcc), mlxsw_sp_port 588 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 589 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c bool pause_en = mlxsw_sp_port_is_pause_en(mlxsw_sp_port); mlxsw_sp_port 597 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = __mlxsw_sp_port_headroom_set(mlxsw_sp_port, dev->mtu, mlxsw_sp_port 598 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.ets->prio_tc, mlxsw_sp_port 605 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_pfc_set(mlxsw_sp_port, pfc); mlxsw_sp_port 611 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c memcpy(mlxsw_sp_port->dcb.pfc, pfc, sizeof(*pfc)); mlxsw_sp_port 612 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.pfc->pfc_cap = IEEE_8021QAZ_MAX_TCS; mlxsw_sp_port 617 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c __mlxsw_sp_port_headroom_set(mlxsw_sp_port, dev->mtu, mlxsw_sp_port 618 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.ets->prio_tc, pause_en, mlxsw_sp_port 619 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.pfc); mlxsw_sp_port 637 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 639 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.ets = kzalloc(sizeof(*mlxsw_sp_port->dcb.ets), mlxsw_sp_port 641 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c if (!mlxsw_sp_port->dcb.ets) mlxsw_sp_port 644 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.ets->ets_cap = IEEE_8021QAZ_MAX_TCS; mlxsw_sp_port 649 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static void mlxsw_sp_port_ets_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 651 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c kfree(mlxsw_sp_port->dcb.ets); mlxsw_sp_port 654 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_maxrate_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 658 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.maxrate = kmalloc(sizeof(*mlxsw_sp_port->dcb.maxrate), mlxsw_sp_port 660 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c if (!mlxsw_sp_port->dcb.maxrate) mlxsw_sp_port 664 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.maxrate->tc_maxrate[i] = MLXSW_REG_QEEC_MAS_DIS; mlxsw_sp_port 669 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static void mlxsw_sp_port_maxrate_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 671 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c kfree(mlxsw_sp_port->dcb.maxrate); mlxsw_sp_port 674 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static int mlxsw_sp_port_pfc_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 676 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.pfc = kzalloc(sizeof(*mlxsw_sp_port->dcb.pfc), mlxsw_sp_port 678 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c if (!mlxsw_sp_port->dcb.pfc) mlxsw_sp_port 681 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.pfc->pfc_cap = IEEE_8021QAZ_MAX_TCS; mlxsw_sp_port 686 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c static void mlxsw_sp_port_pfc_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 688 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c kfree(mlxsw_sp_port->dcb.pfc); mlxsw_sp_port 691 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c int mlxsw_sp_port_dcb_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 695 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_ets_init(mlxsw_sp_port); mlxsw_sp_port 698 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_maxrate_init(mlxsw_sp_port); mlxsw_sp_port 701 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c err = mlxsw_sp_port_pfc_init(mlxsw_sp_port); mlxsw_sp_port 705 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dcb.trust_state = MLXSW_REG_QPTS_TRUST_STATE_PCP; mlxsw_sp_port 706 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port->dev->dcbnl_ops = &mlxsw_sp_dcbnl_ops; mlxsw_sp_port 711 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_maxrate_fini(mlxsw_sp_port); mlxsw_sp_port 713 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_ets_fini(mlxsw_sp_port); mlxsw_sp_port 717 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c void mlxsw_sp_port_dcb_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 719 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_pfc_fini(mlxsw_sp_port); mlxsw_sp_port 720 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_maxrate_fini(mlxsw_sp_port); mlxsw_sp_port 721 drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c mlxsw_sp_port_ets_fini(mlxsw_sp_port); mlxsw_sp_port 80 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *port, u16 vid); mlxsw_sp_port 82 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *port, u16 vid); mlxsw_sp_port 349 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 353 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c return fid->fid_family->ops->port_vid_map(fid, mlxsw_sp_port, vid); mlxsw_sp_port 357 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 359 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c fid->fid_family->ops->port_vid_unmap(fid, mlxsw_sp_port, vid); mlxsw_sp_port 521 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 524 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 525 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 539 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 541 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 542 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 649 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c static int mlxsw_sp_port_vp_mode_trans(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 651 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 655 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c list_for_each_entry(mlxsw_sp_port_vlan, &mlxsw_sp_port->vlans_list, mlxsw_sp_port 664 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port->local_port, mlxsw_sp_port 670 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c err = mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, true); mlxsw_sp_port 679 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c &mlxsw_sp_port->vlans_list, list) { mlxsw_sp_port 687 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port->local_port, vid, mlxsw_sp_port 693 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c static void mlxsw_sp_port_vlan_mode_trans(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 695 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 698 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, false); mlxsw_sp_port 701 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c &mlxsw_sp_port->vlans_list, list) { mlxsw_sp_port 709 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port->local_port, vid, mlxsw_sp_port 715 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 718 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 719 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 723 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port->local_port, vid, true); mlxsw_sp_port 728 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c err = mlxsw_sp_port_vp_mode_trans(mlxsw_sp_port); mlxsw_sp_port 738 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port->local_port, vid, false); mlxsw_sp_port 744 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 746 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 747 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 750 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port_vlan_mode_trans(mlxsw_sp_port); mlxsw_sp_port 753 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port->local_port, vid, false); mlxsw_sp_port 918 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 921 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 922 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 929 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c err = mlxsw_sp_port_vp_mode_trans(mlxsw_sp_port); mlxsw_sp_port 943 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp_port *mlxsw_sp_port, u16 vid) mlxsw_sp_port 945 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 946 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 949 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp_port_vlan_mode_trans(mlxsw_sp_port); mlxsw_sp_port 1234 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c int mlxsw_sp_port_fids_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1236 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1242 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp->fid_core->port_fid_mappings[mlxsw_sp_port->local_port] = 0; mlxsw_sp_port 1244 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c return mlxsw_sp_port_vp_mode_set(mlxsw_sp_port, false); mlxsw_sp_port 1247 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c void mlxsw_sp_port_fids_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1249 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1251 drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c mlxsw_sp->fid_core->port_fid_mappings[mlxsw_sp_port->local_port] = 0; mlxsw_sp_port 147 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 172 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c mlxsw_sp_port = netdev_priv(ingress_dev); mlxsw_sp_port 173 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c if (mlxsw_sp_port->mlxsw_sp != block->mlxsw_sp) { mlxsw_sp_port 180 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c mlxsw_sp_port->local_port, mlxsw_sp_port 887 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c int mlxsw_sp_port_nve_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 889 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 892 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c mlxsw_reg_tnqdr_pack(tnqdr_pl, mlxsw_sp_port->local_port); mlxsw_sp_port 896 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c void mlxsw_sp_port_nve_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 431 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 437 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 438 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (!(mlxsw_sp_port && (!skb->dev || skb->dev == mlxsw_sp_port->dev))) { mlxsw_sp_port 548 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 553 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 554 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (!mlxsw_sp_port) mlxsw_sp_port 557 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c types = ingress ? mlxsw_sp_port->ptp.ing_types : mlxsw_sp_port 558 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port->ptp.egr_types; mlxsw_sp_port 589 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 593 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 594 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (!mlxsw_sp_port) mlxsw_sp_port 597 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c types = ingress ? mlxsw_sp_port->ptp.ing_types : mlxsw_sp_port 598 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port->ptp.egr_types; mlxsw_sp_port 634 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 655 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port = ptp_state->mlxsw_sp->ports[unmatched->key.local_port]; mlxsw_sp_port 656 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (mlxsw_sp_port) { mlxsw_sp_port 658 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c &mlxsw_sp_port->ptp.stats.rx_gcd : mlxsw_sp_port 659 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c &mlxsw_sp_port->ptp.stats.tx_gcd; mlxsw_sp_port 899 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c int mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 902 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c *config = mlxsw_sp_port->ptp.hwtstamp_config; mlxsw_sp_port 962 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c static int mlxsw_sp1_ptp_mtpppc_update(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 965 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 966 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp_port *tmp; mlxsw_sp_port 981 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (tmp && tmp != mlxsw_sp_port) { mlxsw_sp_port 990 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c netdev_err(mlxsw_sp_port->dev, "Failed to increase parsing depth"); mlxsw_sp_port 997 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c return mlxsw_sp1_ptp_mtpppc_set(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 1001 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c static bool mlxsw_sp1_ptp_hwtstamp_enabled(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1003 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c return mlxsw_sp_port->ptp.ing_types || mlxsw_sp_port->ptp.egr_types; mlxsw_sp_port 1007 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp1_ptp_port_shaper_set(struct mlxsw_sp_port *mlxsw_sp_port, bool enable) mlxsw_sp_port 1009 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1012 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_reg_qeec_ptps_pack(qeec_pl, mlxsw_sp_port->local_port, enable); mlxsw_sp_port 1016 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c static int mlxsw_sp1_ptp_port_shaper_check(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1019 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1025 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (!mlxsw_sp1_ptp_hwtstamp_enabled(mlxsw_sp_port)) mlxsw_sp_port 1026 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c return mlxsw_sp1_ptp_port_shaper_set(mlxsw_sp_port, false); mlxsw_sp_port 1030 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port->local_port, 0, mlxsw_sp_port 1046 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c return mlxsw_sp1_ptp_port_shaper_set(mlxsw_sp_port, ptps); mlxsw_sp_port 1052 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 1055 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port = container_of(dwork, struct mlxsw_sp_port, mlxsw_sp_port 1058 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c if (!mlxsw_sp1_ptp_hwtstamp_enabled(mlxsw_sp_port)) mlxsw_sp_port 1061 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c err = mlxsw_sp1_ptp_port_shaper_check(mlxsw_sp_port); mlxsw_sp_port 1063 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c netdev_err(mlxsw_sp_port->dev, "Failed to set up PTP shaper\n"); mlxsw_sp_port 1066 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1079 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c err = mlxsw_sp1_ptp_mtpppc_update(mlxsw_sp_port, ing_types, egr_types); mlxsw_sp_port 1083 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port->ptp.hwtstamp_config = *config; mlxsw_sp_port 1084 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port->ptp.ing_types = ing_types; mlxsw_sp_port 1085 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c mlxsw_sp_port->ptp.egr_types = egr_types; mlxsw_sp_port 1087 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c err = mlxsw_sp1_ptp_port_shaper_check(mlxsw_sp_port); mlxsw_sp_port 1155 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c void mlxsw_sp1_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1158 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c void *stats = &mlxsw_sp_port->ptp.stats; mlxsw_sp_port 11 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h struct mlxsw_sp_port; mlxsw_sp_port 51 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h int mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 54 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 64 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h void mlxsw_sp1_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 110 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 117 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 142 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h static inline void mlxsw_sp1_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 181 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h mlxsw_sp2_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 188 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h mlxsw_sp2_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 213 drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h static inline void mlxsw_sp2_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 25 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int (*check_params)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 28 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int (*replace)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 30 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int (*destroy)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 32 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int (*get_stats)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 35 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int (*get_xstats)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 38 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c void (*clean_stats)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 43 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c void (*unoffload)(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 75 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_find(struct mlxsw_sp_port *mlxsw_sp_port, u32 parent, mlxsw_sp_port 81 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_port->root_qdisc; mlxsw_sp_port 83 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c if (root_only || !mlxsw_sp_port->root_qdisc || mlxsw_sp_port 84 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c !mlxsw_sp_port->root_qdisc->ops || mlxsw_sp_port 85 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c TC_H_MAJ(parent) != mlxsw_sp_port->root_qdisc->handle || mlxsw_sp_port 91 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return &mlxsw_sp_port->tclass_qdiscs[tclass]; mlxsw_sp_port 95 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_find_by_handle(struct mlxsw_sp_port *mlxsw_sp_port, u32 handle) mlxsw_sp_port 99 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c if (mlxsw_sp_port->root_qdisc->handle == handle) mlxsw_sp_port 100 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_port->root_qdisc; mlxsw_sp_port 102 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c if (mlxsw_sp_port->root_qdisc->handle == TC_H_UNSPEC) mlxsw_sp_port 106 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c if (mlxsw_sp_port->tclass_qdiscs[i].handle == handle) mlxsw_sp_port 107 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return &mlxsw_sp_port->tclass_qdiscs[i]; mlxsw_sp_port 113 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 122 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c err = mlxsw_sp_qdisc->ops->destroy(mlxsw_sp_port, mlxsw_sp_port 131 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_replace(struct mlxsw_sp_port *mlxsw_sp_port, u32 handle, mlxsw_sp_port 143 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_qdisc); mlxsw_sp_port 144 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c err = ops->check_params(mlxsw_sp_port, mlxsw_sp_qdisc, params); mlxsw_sp_port 148 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c err = ops->replace(mlxsw_sp_port, mlxsw_sp_qdisc, params); mlxsw_sp_port 155 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c ops->clean_stats(mlxsw_sp_port, mlxsw_sp_qdisc); mlxsw_sp_port 164 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c ops->unoffload(mlxsw_sp_port, mlxsw_sp_qdisc, params); mlxsw_sp_port 166 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_qdisc); mlxsw_sp_port 171 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_get_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 177 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc->ops->get_stats(mlxsw_sp_port, mlxsw_sp_port 185 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_get_xstats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 191 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc->ops->get_xstats(mlxsw_sp_port, mlxsw_sp_port 230 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_tclass_congestion_enable(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 236 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 239 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_reg_cwtp_pack(cwtp_cmd, mlxsw_sp_port->local_port, tclass_num); mlxsw_sp_port 249 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_reg_cwtpm_pack(cwtpm_cmd, mlxsw_sp_port->local_port, tclass_num, mlxsw_sp_port 256 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_tclass_congestion_disable(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 259 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 262 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_reg_cwtpm_pack(cwtpm_cmd, mlxsw_sp_port->local_port, tclass_num, mlxsw_sp_port 268 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_setup_tc_qdisc_red_clean_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 276 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c xstats = &mlxsw_sp_port->periodic_hw_stats.xstats; mlxsw_sp_port 295 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_red_destroy(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 298 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c struct mlxsw_sp_qdisc *root_qdisc = mlxsw_sp_port->root_qdisc; mlxsw_sp_port 304 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_tclass_congestion_disable(mlxsw_sp_port, mlxsw_sp_port 309 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_red_check_params(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 313 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 336 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_red_replace(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 340 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 353 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_tclass_congestion_enable(mlxsw_sp_port, tclass_num, min, mlxsw_sp_port 358 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_red_unoffload(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 365 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c backlog = mlxsw_sp_cells_bytes(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 372 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_get_red_xstats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 382 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c xstats = &mlxsw_sp_port->periodic_hw_stats.xstats; mlxsw_sp_port 400 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_get_red_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 409 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c xstats = &mlxsw_sp_port->periodic_hw_stats.xstats; mlxsw_sp_port 429 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_cells_bytes(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 431 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_cells_bytes(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 455 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int mlxsw_sp_setup_tc_red(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 460 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc = mlxsw_sp_qdisc_find(mlxsw_sp_port, p->parent, false); mlxsw_sp_port 465 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_replace(mlxsw_sp_port, p->handle, mlxsw_sp_port 476 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_qdisc); mlxsw_sp_port 478 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_get_xstats(mlxsw_sp_port, mlxsw_sp_qdisc, mlxsw_sp_port 481 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_get_stats(mlxsw_sp_port, mlxsw_sp_qdisc, mlxsw_sp_port 489 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_prio_destroy(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 495 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, i, mlxsw_sp_port 497 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_port 498 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c &mlxsw_sp_port->tclass_qdiscs[i]); mlxsw_sp_port 499 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->tclass_qdiscs[i].prio_bitmap = 0; mlxsw_sp_port 506 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_prio_check_params(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 519 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_prio_replace(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 531 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c child_qdisc = &mlxsw_sp_port->tclass_qdiscs[tclass]; mlxsw_sp_port 539 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c err = mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, mlxsw_sp_port 548 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c child_qdisc->ops->clean_stats(mlxsw_sp_port, mlxsw_sp_port 555 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c child_qdisc = &mlxsw_sp_port->tclass_qdiscs[tclass]; mlxsw_sp_port 557 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(mlxsw_sp_port, child_qdisc); mlxsw_sp_port 563 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_prio_unoffload(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 570 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c backlog = mlxsw_sp_cells_bytes(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 576 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_get_prio_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 586 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c xstats = &mlxsw_sp_port->periodic_hw_stats.xstats; mlxsw_sp_port 587 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c stats = &mlxsw_sp_port->periodic_hw_stats.stats; mlxsw_sp_port 603 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_cells_bytes(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 605 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_cells_bytes(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 615 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_setup_tc_qdisc_prio_clean_stats(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 623 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c xstats = &mlxsw_sp_port->periodic_hw_stats.xstats; mlxsw_sp_port 624 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c stats = &mlxsw_sp_port->periodic_hw_stats.stats; mlxsw_sp_port 655 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_prio_graft(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 666 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->tclass_qdiscs[tclass_num].handle == p->child_handle) mlxsw_sp_port 679 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c old_qdisc = mlxsw_sp_qdisc_find_by_handle(mlxsw_sp_port, mlxsw_sp_port 682 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(mlxsw_sp_port, old_qdisc); mlxsw_sp_port 684 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_port 685 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c &mlxsw_sp_port->tclass_qdiscs[tclass_num]); mlxsw_sp_port 689 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int mlxsw_sp_setup_tc_prio(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 694 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_qdisc = mlxsw_sp_qdisc_find(mlxsw_sp_port, p->parent, true); mlxsw_sp_port 699 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_replace(mlxsw_sp_port, p->handle, mlxsw_sp_port 710 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_destroy(mlxsw_sp_port, mlxsw_sp_qdisc); mlxsw_sp_port 712 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_get_stats(mlxsw_sp_port, mlxsw_sp_qdisc, mlxsw_sp_port 715 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c return mlxsw_sp_qdisc_prio_graft(mlxsw_sp_port, mlxsw_sp_qdisc, mlxsw_sp_port 722 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c int mlxsw_sp_tc_qdisc_init(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 731 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->root_qdisc = mlxsw_sp_qdisc; mlxsw_sp_port 732 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->root_qdisc->prio_bitmap = 0xff; mlxsw_sp_port 733 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->root_qdisc->tclass_num = MLXSW_SP_PORT_DEFAULT_TCLASS; mlxsw_sp_port 741 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->tclass_qdiscs = mlxsw_sp_qdisc; mlxsw_sp_port 743 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c mlxsw_sp_port->tclass_qdiscs[i].tclass_num = i; mlxsw_sp_port 748 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c kfree(mlxsw_sp_port->root_qdisc); mlxsw_sp_port 753 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c void mlxsw_sp_tc_qdisc_fini(struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 755 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c kfree(mlxsw_sp_port->tclass_qdiscs); mlxsw_sp_port 756 drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c kfree(mlxsw_sp_port->root_qdisc); mlxsw_sp_port 2555 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 2573 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port = mlxsw_sp_port_lower_dev_hold(p->dev); mlxsw_sp_port 2574 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_port) mlxsw_sp_port 2577 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 2581 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_dev_put(mlxsw_sp_port); mlxsw_sp_port 2589 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port = mlxsw_sp_port_lower_dev_hold(n->dev); mlxsw_sp_port 2590 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c if (!mlxsw_sp_port) mlxsw_sp_port 2595 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_dev_put(mlxsw_sp_port); mlxsw_sp_port 2600 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c net_work->mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 2609 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_dev_put(mlxsw_sp_port); mlxsw_sp_port 6628 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 6631 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c params->lag = mlxsw_sp_port->lagged; mlxsw_sp_port 6633 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c params->lag_id = mlxsw_sp_port->lag_id; mlxsw_sp_port 6635 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c params->system_port = mlxsw_sp_port->local_port; mlxsw_sp_port 6677 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 6678 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 6694 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_fid_port_vid_map(fid, mlxsw_sp_port, vid); mlxsw_sp_port 6698 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, false); mlxsw_sp_port 6702 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c err = mlxsw_sp_port_vid_stp_set(mlxsw_sp_port, vid, mlxsw_sp_port 6712 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, true); mlxsw_sp_port 6714 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_port_vid_unmap(fid, mlxsw_sp_port, vid); mlxsw_sp_port 6724 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 6733 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_vid_stp_set(mlxsw_sp_port, vid, BR_STATE_BLOCKING); mlxsw_sp_port 6734 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, true); mlxsw_sp_port 6735 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_fid_port_vid_unmap(fid, mlxsw_sp_port, vid); mlxsw_sp_port 6745 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(port_dev); mlxsw_sp_port 6748 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 66 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *dest_port = sparms.dest_port; mlxsw_sp_port 83 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *dest_port = span_entry->parms.dest_port; mlxsw_sp_port 186 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *port; mlxsw_sp_port 361 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *dest_port = sparms.dest_port; mlxsw_sp_port 462 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *dest_port = sparms.dest_port; mlxsw_sp_port 525 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *dest_port = sparms.dest_port; mlxsw_sp_port 712 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c static bool mlxsw_sp_span_is_egress_mirror(struct mlxsw_sp_port *port) mlxsw_sp_port 736 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port *port, u16 mtu) mlxsw_sp_port 762 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c struct mlxsw_sp_port *port, mlxsw_sp_port 776 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c mlxsw_sp_span_inspected_port_bind(struct mlxsw_sp_port *port, mlxsw_sp_port 792 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c mlxsw_sp_span_inspected_port_add(struct mlxsw_sp_port *port, mlxsw_sp_port 861 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c mlxsw_sp_span_inspected_port_del(struct mlxsw_sp_port *port, mlxsw_sp_port 903 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from, mlxsw_sp_port 943 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c void mlxsw_sp_span_mirror_del(struct mlxsw_sp_port *from, int span_id, mlxsw_sp_port 13 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h struct mlxsw_sp_port; mlxsw_sp_port 30 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h struct mlxsw_sp_port *dest_port; /* NULL for unoffloaded SPAN. */ mlxsw_sp_port 63 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from, mlxsw_sp_port 67 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h void mlxsw_sp_span_mirror_del(struct mlxsw_sp_port *from, int span_id, mlxsw_sp_port 76 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port *port, u16 mtu); mlxsw_sp_port 82 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 86 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port); mlxsw_sp_port 106 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_mdb_flush(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 110 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_mdb_mc_enable_sync(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 115 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_mrouter_update_mdb(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 261 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 267 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port = mlxsw_sp_port_dev_lower_find(brport_dev); mlxsw_sp_port 268 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c bridge_port->lagged = mlxsw_sp_port->lagged; mlxsw_sp_port 270 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c bridge_port->lag_id = mlxsw_sp_port->lag_id; mlxsw_sp_port 272 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c bridge_port->system_port = mlxsw_sp_port->local_port; mlxsw_sp_port 338 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan_find_by_bridge(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 345 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c list_for_each_entry(mlxsw_sp_port_vlan, &mlxsw_sp_port->vlans_list, mlxsw_sp_port 362 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan_find_by_fid(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 367 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c list_for_each_entry(mlxsw_sp_port_vlan, &mlxsw_sp_port->vlans_list, mlxsw_sp_port 435 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_bridge_vlan_stp_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 443 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port_vlan->mlxsw_sp_port != mlxsw_sp_port) mlxsw_sp_port 445 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c return mlxsw_sp_port_vid_stp_set(mlxsw_sp_port, mlxsw_sp_port 452 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_attr_stp_state_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 467 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge, mlxsw_sp_port 473 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_bridge_vlan_stp_set(mlxsw_sp_port, mlxsw_sp_port 486 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_bridge_vlan_stp_set(mlxsw_sp_port, bridge_vlan, mlxsw_sp_port 492 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_bridge_vlan_flood_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 501 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port_vlan->mlxsw_sp_port != mlxsw_sp_port) mlxsw_sp_port 505 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port->local_port, mlxsw_sp_port 513 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_flood_table_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 522 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_bridge_vlan_flood_set(mlxsw_sp_port, mlxsw_sp_port 535 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_bridge_vlan_flood_set(mlxsw_sp_port, bridge_vlan, mlxsw_sp_port 541 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_bridge_vlan_learning_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 550 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port_vlan->mlxsw_sp_port != mlxsw_sp_port) mlxsw_sp_port 552 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c return mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, set); mlxsw_sp_port 559 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_learning_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 567 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_bridge_vlan_learning_set(mlxsw_sp_port, mlxsw_sp_port 578 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_bridge_vlan_learning_set(mlxsw_sp_port, mlxsw_sp_port 583 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_attr_br_pre_flags_set(struct mlxsw_sp_port mlxsw_sp_port 584 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c *mlxsw_sp_port, mlxsw_sp_port 594 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_attr_br_flags_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 605 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge, mlxsw_sp_port 610 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_bridge_port_flood_table_set(mlxsw_sp_port, bridge_port, mlxsw_sp_port 616 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_bridge_port_learning_set(mlxsw_sp_port, bridge_port, mlxsw_sp_port 624 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_bridge_port_flood_table_set(mlxsw_sp_port, bridge_port, mlxsw_sp_port 649 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_attr_br_ageing_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 653 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 668 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_attr_br_vlan_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 673 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 690 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_attr_mrouter_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 701 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge, mlxsw_sp_port 709 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_bridge_port_flood_table_set(mlxsw_sp_port, bridge_port, mlxsw_sp_port 715 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_mrouter_update_mdb(mlxsw_sp_port, bridge_port, mlxsw_sp_port 731 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_mc_disabled_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 736 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 753 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_mdb_mc_enable_sync(mlxsw_sp_port, mlxsw_sp_port 761 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_bridge_port_flood_table_set(mlxsw_sp_port, mlxsw_sp_port 802 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_attr_br_mrouter_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 807 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 831 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 836 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_stp_state_set(mlxsw_sp_port, trans, mlxsw_sp_port 841 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_br_pre_flags_set(mlxsw_sp_port, mlxsw_sp_port 846 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_br_flags_set(mlxsw_sp_port, trans, mlxsw_sp_port 851 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_br_ageing_set(mlxsw_sp_port, trans, mlxsw_sp_port 855 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_br_vlan_set(mlxsw_sp_port, trans, mlxsw_sp_port 860 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_mrouter_set(mlxsw_sp_port, trans, mlxsw_sp_port 865 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_mc_disabled_set(mlxsw_sp_port, trans, mlxsw_sp_port 870 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_attr_br_mrouter_set(mlxsw_sp_port, trans, mlxsw_sp_port 880 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp); mlxsw_sp_port 890 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 892 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 917 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_fid_port_vid_map(fid, mlxsw_sp_port, vid); mlxsw_sp_port 939 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 941 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c u8 local_port = mlxsw_sp_port->local_port; mlxsw_sp_port 945 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_fid_port_vid_unmap(fid, mlxsw_sp_port, vid); mlxsw_sp_port 953 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_pvid_determine(const struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 958 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c else if (mlxsw_sp_port->pvid == vid) mlxsw_sp_port 961 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c return mlxsw_sp_port->pvid; mlxsw_sp_port 969 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 983 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, mlxsw_sp_port 988 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_vid_stp_set(mlxsw_sp_port, vid, mlxsw_sp_port 1002 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_get(mlxsw_sp_port->mlxsw_sp->bridge, mlxsw_sp_port 1009 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vid_stp_set(mlxsw_sp_port, vid, BR_STATE_DISABLED); mlxsw_sp_port 1011 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, false); mlxsw_sp_port 1020 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = mlxsw_sp_port_vlan->mlxsw_sp_port; mlxsw_sp_port 1038 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vid_stp_set(mlxsw_sp_port, vid, BR_STATE_DISABLED); mlxsw_sp_port 1039 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid, false); mlxsw_sp_port 1041 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_fdb_flush(mlxsw_sp_port->mlxsw_sp, mlxsw_sp_port 1045 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_mdb_flush(mlxsw_sp_port, bridge_port); mlxsw_sp_port 1049 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_put(mlxsw_sp_port->mlxsw_sp->bridge, bridge_port); mlxsw_sp_port 1054 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_vlan_add(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1059 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c u16 pvid = mlxsw_sp_port_pvid_determine(mlxsw_sp_port, vid, is_pvid); mlxsw_sp_port 1061 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c u16 old_pvid = mlxsw_sp_port->pvid; mlxsw_sp_port 1068 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 1074 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_create(mlxsw_sp_port, mlxsw_sp_port 1080 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid, true, mlxsw_sp_port 1085 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_pvid_set(mlxsw_sp_port, pvid); mlxsw_sp_port 1097 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_pvid_set(mlxsw_sp_port, old_pvid); mlxsw_sp_port 1099 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid, false, false); mlxsw_sp_port 1138 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1145 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1176 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_bridge_port_vlan_add(mlxsw_sp_port, bridge_port, mlxsw_sp_port 1341 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_fdb_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1344 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1356 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port, mlxsw_sp_port 1435 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_smid_set(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1438 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1446 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_reg_smid_pack(smid_pl, mid_idx, mlxsw_sp_port->local_port, add); mlxsw_sp_port 1471 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 1482 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port = mlxsw_sp_port_lagged_get(mlxsw_sp, mlxsw_sp_port 1484 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port) mlxsw_sp_port 1485 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c set_bit(mlxsw_sp_port->local_port, mlxsw_sp_port 1602 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_remove_from_mid(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1605 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1608 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c clear_bit(mlxsw_sp_port->local_port, mid->ports_in_mid); mlxsw_sp_port 1619 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_mdb_add(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1623 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1626 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct net_device *dev = mlxsw_sp_port->dev; mlxsw_sp_port 1641 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port, mlxsw_sp_port 1658 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c set_bit(mlxsw_sp_port->local_port, mid->ports_in_mid); mlxsw_sp_port 1666 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, true); mlxsw_sp_port 1675 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid); mlxsw_sp_port 1680 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_mdb_mc_enable_sync(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1684 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1700 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_mrouter_update_mdb(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1710 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (!test_bit(mlxsw_sp_port->local_port, mid->ports_in_mid)) mlxsw_sp_port 1711 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, add); mlxsw_sp_port 1750 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1757 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, trans, mlxsw_sp_port 1766 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_span_respin_schedule(mlxsw_sp_port->mlxsw_sp); mlxsw_sp_port 1770 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_mdb_add(mlxsw_sp_port, mlxsw_sp_port 1783 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_vlan_del(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1786 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c u16 pvid = mlxsw_sp_port->pvid == vid ? 0 : mlxsw_sp_port->pvid; mlxsw_sp_port 1789 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 1794 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_pvid_set(mlxsw_sp_port, pvid); mlxsw_sp_port 1795 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan_set(mlxsw_sp_port, vid, vid, false, false); mlxsw_sp_port 1799 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_vlans_del(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1802 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1818 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_vlan_del(mlxsw_sp_port, bridge_port, vid); mlxsw_sp_port 1824 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1828 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct net_device *dev = mlxsw_sp_port->dev; mlxsw_sp_port 1833 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false); mlxsw_sp_port 1838 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid); mlxsw_sp_port 1845 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static int mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1848 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 1852 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct net_device *dev = mlxsw_sp_port->dev; mlxsw_sp_port 1862 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port, mlxsw_sp_port 1876 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c return __mlxsw_sp_port_mdb_del(mlxsw_sp_port, bridge_port, mid); mlxsw_sp_port 1880 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_bridge_port_mdb_flush(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1889 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (test_bit(mlxsw_sp_port->local_port, mid->ports_in_mid)) { mlxsw_sp_port 1890 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c __mlxsw_sp_port_mdb_del(mlxsw_sp_port, bridge_port, mlxsw_sp_port 1894 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false); mlxsw_sp_port 1902 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); mlxsw_sp_port 1907 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_vlans_del(mlxsw_sp_port, mlxsw_sp_port 1911 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_mdb_del(mlxsw_sp_port, mlxsw_sp_port 1919 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_span_respin_schedule(mlxsw_sp_port->mlxsw_sp); mlxsw_sp_port 1924 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c static struct mlxsw_sp_port *mlxsw_sp_lag_rep_port(struct mlxsw_sp *mlxsw_sp, mlxsw_sp_port 1927 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 1934 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port = mlxsw_sp_port_lagged_get(mlxsw_sp, lag_id, i); mlxsw_sp_port 1935 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port) mlxsw_sp_port 1936 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c return mlxsw_sp_port; mlxsw_sp_port 1944 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 1953 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port->default_vlan->fid) mlxsw_sp_port 1954 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan_router_leave(mlxsw_sp_port->default_vlan); mlxsw_sp_port 1962 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 1965 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_pvid_set(mlxsw_sp_port, MLXSW_SP_DEFAULT_VID); mlxsw_sp_port 2111 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_is_br_member(const struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 2116 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c list_for_each_entry(mlxsw_sp_port_vlan, &mlxsw_sp_port->vlans_list, mlxsw_sp_port 2130 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 2138 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 2142 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (mlxsw_sp_port_is_br_member(mlxsw_sp_port, bridge_device->dev)) { mlxsw_sp_port 2158 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 2165 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid); mlxsw_sp_port 2280 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c int mlxsw_sp_port_bridge_join(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 2285 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 2296 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port, extack); mlxsw_sp_port 2307 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c void mlxsw_sp_port_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_port, mlxsw_sp_port 2311 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; mlxsw_sp_port 2323 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port); mlxsw_sp_port 2456 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 2465 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 2466 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (!mlxsw_sp_port) { mlxsw_sp_port 2474 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid); mlxsw_sp_port 2476 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n"); mlxsw_sp_port 2482 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c netdev_err(mlxsw_sp_port->dev, "{Port, VID} not associated with a bridge\n"); mlxsw_sp_port 2517 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 2527 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port = mlxsw_sp_lag_rep_port(mlxsw_sp, lag_id); mlxsw_sp_port 2528 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (!mlxsw_sp_port) { mlxsw_sp_port 2536 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid); mlxsw_sp_port 2538 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n"); mlxsw_sp_port 2544 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c netdev_err(mlxsw_sp_port->dev, "{Port, VID} not associated with a bridge\n"); mlxsw_sp_port 2877 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 2886 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port = mlxsw_sp_port_dev_lower_find(dev); mlxsw_sp_port 2887 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (!mlxsw_sp_port) mlxsw_sp_port 2895 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c err = mlxsw_sp_port_fdb_set(mlxsw_sp_port, fdb_info, true); mlxsw_sp_port 2904 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_port_fdb_set(mlxsw_sp_port, fdb_info, false); mlxsw_sp_port 2914 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp); mlxsw_sp_port 61 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c struct mlxsw_sp_port *mlxsw_sp_port) mlxsw_sp_port 65 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c if (unlikely(!mlxsw_sp_port)) { mlxsw_sp_port 72 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c skb->dev = mlxsw_sp_port->dev; mlxsw_sp_port 74 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port 89 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c struct mlxsw_sp_port *mlxsw_sp_port; mlxsw_sp_port 94 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c mlxsw_sp_port = mlxsw_sp->ports[local_port]; mlxsw_sp_port 96 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c if (mlxsw_sp_rx_listener(mlxsw_sp, skb, local_port, mlxsw_sp_port))