Lines Matching refs:mlxsw_sp
160 struct mlxsw_sp { struct
217 (*clock_init)(struct mlxsw_sp *mlxsw_sp, struct device *dev); argument
220 struct mlxsw_sp_ptp_state *(*init)(struct mlxsw_sp *mlxsw_sp);
226 void (*receive)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
232 void (*transmitted)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
240 int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp,
253 mlxsw_sp_lag_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id) in mlxsw_sp_lag_get() argument
255 return &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_get()
321 struct mlxsw_sp *mlxsw_sp; member
369 void (*from_ptys_supported_port)(struct mlxsw_sp *mlxsw_sp,
372 void (*from_ptys_link)(struct mlxsw_sp *mlxsw_sp, u32 ptys_eth_proto,
374 u32 (*from_ptys_speed)(struct mlxsw_sp *mlxsw_sp, u32 ptys_eth_proto);
375 void (*from_ptys_link_mode)(struct mlxsw_sp *mlxsw_sp,
379 u32 (*to_ptys_advert_link)(struct mlxsw_sp *mlxsw_sp,
381 u32 (*to_ptys_speed_lanes)(struct mlxsw_sp *mlxsw_sp, u8 width,
383 void (*reg_ptys_eth_pack)(struct mlxsw_sp *mlxsw_sp, char *payload,
385 void (*reg_ptys_eth_unpack)(struct mlxsw_sp *mlxsw_sp, char *payload,
398 mlxsw_sp_port_bitmap_init(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_port_bitmap_init() argument
401 unsigned int nbits = mlxsw_core_max_ports(mlxsw_sp->core); in mlxsw_sp_port_bitmap_init()
477 mlxsw_sp_port_lagged_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id, u8 port_index) in mlxsw_sp_port_lagged_get() argument
482 local_port = mlxsw_core_lag_mapping_get(mlxsw_sp->core, in mlxsw_sp_port_lagged_get()
484 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_lagged_get()
518 mlxsw_sp_local_port_is_valid(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_local_port_is_valid() argument
520 unsigned int max_ports = mlxsw_core_max_ports(mlxsw_sp->core); in mlxsw_sp_local_port_is_valid()
577 int mlxsw_sp_buffers_init(struct mlxsw_sp *mlxsw_sp);
578 void mlxsw_sp_buffers_fini(struct mlxsw_sp *mlxsw_sp);
614 u32 mlxsw_sp_cells_bytes(const struct mlxsw_sp *mlxsw_sp, u32 cells);
615 u32 mlxsw_sp_bytes_cells(const struct mlxsw_sp *mlxsw_sp, u32 bytes);
623 mlxsw_sp_sample_trigger_params_lookup(struct mlxsw_sp *mlxsw_sp,
626 mlxsw_sp_sample_trigger_params_set(struct mlxsw_sp *mlxsw_sp,
631 mlxsw_sp_sample_trigger_params_unset(struct mlxsw_sp *mlxsw_sp,
633 int mlxsw_sp_ipv6_addr_kvdl_index_get(struct mlxsw_sp *mlxsw_sp,
637 mlxsw_sp_ipv6_addr_put(struct mlxsw_sp *mlxsw_sp, const struct in6_addr *addr6);
647 int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp);
648 void mlxsw_sp_switchdev_fini(struct mlxsw_sp *mlxsw_sp);
649 int mlxsw_sp_rif_fdb_op(struct mlxsw_sp *mlxsw_sp, const char *mac, u16 fid,
660 bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp,
662 int mlxsw_sp_bridge_vxlan_join(struct mlxsw_sp *mlxsw_sp,
666 void mlxsw_sp_bridge_vxlan_leave(struct mlxsw_sp *mlxsw_sp,
673 void mlxsw_sp_ptp_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
700 int mlxsw_sp_flow_counter_get(struct mlxsw_sp *mlxsw_sp,
703 int mlxsw_sp_flow_counter_alloc(struct mlxsw_sp *mlxsw_sp,
705 void mlxsw_sp_flow_counter_free(struct mlxsw_sp *mlxsw_sp,
714 struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev);
719 int mlxsw_sp_parsing_depth_inc(struct mlxsw_sp *mlxsw_sp);
720 void mlxsw_sp_parsing_depth_dec(struct mlxsw_sp *mlxsw_sp);
721 int mlxsw_sp_parsing_vxlan_udp_dport_set(struct mlxsw_sp *mlxsw_sp,
750 int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,
752 void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp);
753 void mlxsw_sp_rif_macvlan_del(struct mlxsw_sp *mlxsw_sp,
765 void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
767 bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
769 u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev);
770 u16 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp);
771 int mlxsw_sp_router_nve_promote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
775 void mlxsw_sp_router_nve_demote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
778 int mlxsw_sp_router_tb_id_vr_id(struct mlxsw_sp *mlxsw_sp, u32 tb_id,
780 int mlxsw_sp_router_ul_rif_get(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
782 void mlxsw_sp_router_ul_rif_put(struct mlxsw_sp *mlxsw_sp, u16 ul_rif_index);
811 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv);
812 void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv);
813 int (*alloc)(struct mlxsw_sp *mlxsw_sp, void *priv,
816 void (*free)(struct mlxsw_sp *mlxsw_sp, void *priv,
819 int (*alloc_size_query)(struct mlxsw_sp *mlxsw_sp, void *priv,
823 int (*resources_register)(struct mlxsw_sp *mlxsw_sp, void *priv);
826 int mlxsw_sp_kvdl_init(struct mlxsw_sp *mlxsw_sp);
827 void mlxsw_sp_kvdl_fini(struct mlxsw_sp *mlxsw_sp);
828 int mlxsw_sp_kvdl_alloc(struct mlxsw_sp *mlxsw_sp,
831 void mlxsw_sp_kvdl_free(struct mlxsw_sp *mlxsw_sp,
834 int mlxsw_sp_kvdl_alloc_count_query(struct mlxsw_sp *mlxsw_sp,
891 struct mlxsw_sp *mlxsw_sp; member
907 static inline struct mlxsw_sp *
910 return block->mlxsw_sp; in mlxsw_sp_flow_block_mlxsw_sp()
957 struct mlxsw_sp_flow_block *mlxsw_sp_flow_block_create(struct mlxsw_sp *mlxsw_sp,
974 int mlxsw_sp_acl_ruleset_bind(struct mlxsw_sp *mlxsw_sp,
977 void mlxsw_sp_acl_ruleset_unbind(struct mlxsw_sp *mlxsw_sp,
981 mlxsw_sp_acl_ruleset_lookup(struct mlxsw_sp *mlxsw_sp,
985 mlxsw_sp_acl_ruleset_get(struct mlxsw_sp *mlxsw_sp,
989 void mlxsw_sp_acl_ruleset_put(struct mlxsw_sp *mlxsw_sp,
1019 int mlxsw_sp_acl_rulei_act_mirror(struct mlxsw_sp *mlxsw_sp,
1024 int mlxsw_sp_acl_rulei_act_fwd(struct mlxsw_sp *mlxsw_sp,
1028 int mlxsw_sp_acl_rulei_act_vlan(struct mlxsw_sp *mlxsw_sp,
1032 int mlxsw_sp_acl_rulei_act_priority(struct mlxsw_sp *mlxsw_sp,
1035 int mlxsw_sp_acl_rulei_act_mangle(struct mlxsw_sp *mlxsw_sp,
1040 int mlxsw_sp_acl_rulei_act_police(struct mlxsw_sp *mlxsw_sp,
1044 int mlxsw_sp_acl_rulei_act_count(struct mlxsw_sp *mlxsw_sp,
1047 int mlxsw_sp_acl_rulei_act_fid_set(struct mlxsw_sp *mlxsw_sp,
1050 int mlxsw_sp_acl_rulei_act_sample(struct mlxsw_sp *mlxsw_sp,
1060 mlxsw_sp_acl_rule_create(struct mlxsw_sp *mlxsw_sp,
1065 void mlxsw_sp_acl_rule_destroy(struct mlxsw_sp *mlxsw_sp,
1067 int mlxsw_sp_acl_rule_add(struct mlxsw_sp *mlxsw_sp,
1069 void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp,
1071 int mlxsw_sp_acl_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
1075 mlxsw_sp_acl_rule_lookup(struct mlxsw_sp *mlxsw_sp,
1080 int mlxsw_sp_acl_rule_get_stats(struct mlxsw_sp *mlxsw_sp,
1086 struct mlxsw_sp_fid *mlxsw_sp_acl_dummy_fid(struct mlxsw_sp *mlxsw_sp);
1089 mlxsw_sp_acl_act_cookie_lookup(struct mlxsw_sp *mlxsw_sp, u32 cookie_index) in mlxsw_sp_acl_act_cookie_lookup() argument
1091 return mlxsw_afa_cookie_lookup(mlxsw_sp->afa, cookie_index); in mlxsw_sp_acl_act_cookie_lookup()
1094 int mlxsw_sp_acl_init(struct mlxsw_sp *mlxsw_sp);
1095 void mlxsw_sp_acl_fini(struct mlxsw_sp *mlxsw_sp);
1096 u32 mlxsw_sp_acl_region_rehash_intrvl_get(struct mlxsw_sp *mlxsw_sp);
1097 int mlxsw_sp_acl_region_rehash_intrvl_set(struct mlxsw_sp *mlxsw_sp, u32 val);
1102 int (*act_mangle_field)(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_acl_rule_info *rulei,
1117 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv,
1119 void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv);
1121 int (*region_init)(struct mlxsw_sp *mlxsw_sp, void *region_priv,
1125 void (*region_fini)(struct mlxsw_sp *mlxsw_sp, void *region_priv);
1126 int (*region_associate)(struct mlxsw_sp *mlxsw_sp,
1135 int (*entry_add)(struct mlxsw_sp *mlxsw_sp,
1139 void (*entry_del)(struct mlxsw_sp *mlxsw_sp,
1142 int (*entry_action_replace)(struct mlxsw_sp *mlxsw_sp,
1145 int (*entry_activity_get)(struct mlxsw_sp *mlxsw_sp,
1171 int (*sample_add)(struct mlxsw_sp *mlxsw_sp,
1175 void (*sample_del)(struct mlxsw_sp *mlxsw_sp,
1217 int mlxsw_sp_mall_replace(struct mlxsw_sp *mlxsw_sp,
1231 int mlxsw_sp_flower_replace(struct mlxsw_sp *mlxsw_sp,
1234 void mlxsw_sp_flower_destroy(struct mlxsw_sp *mlxsw_sp,
1237 int mlxsw_sp_flower_stats(struct mlxsw_sp *mlxsw_sp,
1240 int mlxsw_sp_flower_tmplt_create(struct mlxsw_sp *mlxsw_sp,
1243 void mlxsw_sp_flower_tmplt_destroy(struct mlxsw_sp *mlxsw_sp,
1246 int mlxsw_sp_flower_prio_get(struct mlxsw_sp *mlxsw_sp,
1270 bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index);
1271 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp,
1276 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_vni(struct mlxsw_sp *mlxsw_sp,
1302 mlxsw_sp_fid_type_rif_type(const struct mlxsw_sp *mlxsw_sp,
1305 struct mlxsw_sp_fid *mlxsw_sp_fid_8021q_get(struct mlxsw_sp *mlxsw_sp, u16 vid);
1306 struct mlxsw_sp_fid *mlxsw_sp_fid_8021d_get(struct mlxsw_sp *mlxsw_sp,
1308 struct mlxsw_sp_fid *mlxsw_sp_fid_8021q_lookup(struct mlxsw_sp *mlxsw_sp,
1310 struct mlxsw_sp_fid *mlxsw_sp_fid_8021d_lookup(struct mlxsw_sp *mlxsw_sp,
1312 struct mlxsw_sp_fid *mlxsw_sp_fid_rfid_get(struct mlxsw_sp *mlxsw_sp,
1314 struct mlxsw_sp_fid *mlxsw_sp_fid_dummy_get(struct mlxsw_sp *mlxsw_sp);
1318 int mlxsw_sp_fids_init(struct mlxsw_sp *mlxsw_sp);
1319 void mlxsw_sp_fids_fini(struct mlxsw_sp *mlxsw_sp);
1338 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv);
1341 int (*route_create)(struct mlxsw_sp *mlxsw_sp, void *priv,
1346 void (*route_destroy)(struct mlxsw_sp *mlxsw_sp, void *priv,
1349 int (*route_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv,
1371 int mlxsw_sp_nve_learned_ip_resolve(struct mlxsw_sp *mlxsw_sp, u32 uip,
1374 int mlxsw_sp_nve_flood_ip_add(struct mlxsw_sp *mlxsw_sp,
1378 void mlxsw_sp_nve_flood_ip_del(struct mlxsw_sp *mlxsw_sp,
1382 int mlxsw_sp_nve_ipv6_addr_kvdl_set(struct mlxsw_sp *mlxsw_sp,
1385 void mlxsw_sp_nve_ipv6_addr_kvdl_unset(struct mlxsw_sp *mlxsw_sp,
1388 mlxsw_sp_nve_ipv6_addr_map_replace(struct mlxsw_sp *mlxsw_sp, const char *mac,
1391 void mlxsw_sp_nve_ipv6_addr_map_del(struct mlxsw_sp *mlxsw_sp, const char *mac,
1393 int mlxsw_sp_nve_fid_enable(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_fid *fid,
1396 void mlxsw_sp_nve_fid_disable(struct mlxsw_sp *mlxsw_sp,
1400 int mlxsw_sp_nve_init(struct mlxsw_sp *mlxsw_sp);
1401 void mlxsw_sp_nve_fini(struct mlxsw_sp *mlxsw_sp);
1404 int mlxsw_sp_nve_inc_parsing_depth_get(struct mlxsw_sp *mlxsw_sp);
1405 void mlxsw_sp_nve_inc_parsing_depth_put(struct mlxsw_sp *mlxsw_sp);
1408 int mlxsw_sp_devlink_traps_init(struct mlxsw_sp *mlxsw_sp);
1409 void mlxsw_sp_devlink_traps_fini(struct mlxsw_sp *mlxsw_sp);
1437 int mlxsw_sp_trap_group_policer_hw_id_get(struct mlxsw_sp *mlxsw_sp, u16 id,
1440 static inline struct net *mlxsw_sp_net(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_net() argument
1442 return mlxsw_core_net(mlxsw_sp->core); in mlxsw_sp_net()
1467 int mlxsw_sp_policer_add(struct mlxsw_sp *mlxsw_sp,
1471 void mlxsw_sp_policer_del(struct mlxsw_sp *mlxsw_sp,
1474 int mlxsw_sp_policer_drops_counter_get(struct mlxsw_sp *mlxsw_sp,
1477 int mlxsw_sp_policers_init(struct mlxsw_sp *mlxsw_sp);
1478 void mlxsw_sp_policers_fini(struct mlxsw_sp *mlxsw_sp);
1482 int mlxsw_sp_pgt_mid_alloc(struct mlxsw_sp *mlxsw_sp, u16 *p_mid);
1483 void mlxsw_sp_pgt_mid_free(struct mlxsw_sp *mlxsw_sp, u16 mid_base);
1484 int mlxsw_sp_pgt_mid_alloc_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base,
1486 void mlxsw_sp_pgt_mid_free_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base,
1488 int mlxsw_sp_pgt_entry_port_set(struct mlxsw_sp *mlxsw_sp, u16 mid,
1490 int mlxsw_sp_pgt_init(struct mlxsw_sp *mlxsw_sp);
1491 void mlxsw_sp_pgt_fini(struct mlxsw_sp *mlxsw_sp);