Lines Matching refs:mlxsw_sp
161 struct mlxsw_sp { struct
219 (*clock_init)(struct mlxsw_sp *mlxsw_sp, struct device *dev); argument
222 struct mlxsw_sp_ptp_state *(*init)(struct mlxsw_sp *mlxsw_sp);
228 void (*receive)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
234 void (*transmitted)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
242 int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp,
255 mlxsw_sp_lag_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id) in mlxsw_sp_lag_get() argument
257 return &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_get()
323 struct mlxsw_sp *mlxsw_sp; member
372 void (*from_ptys_supported_port)(struct mlxsw_sp *mlxsw_sp,
375 void (*from_ptys_link)(struct mlxsw_sp *mlxsw_sp, u32 ptys_eth_proto,
377 u32 (*from_ptys_speed)(struct mlxsw_sp *mlxsw_sp, u32 ptys_eth_proto);
378 void (*from_ptys_link_mode)(struct mlxsw_sp *mlxsw_sp,
382 u32 (*to_ptys_advert_link)(struct mlxsw_sp *mlxsw_sp,
384 u32 (*to_ptys_speed_lanes)(struct mlxsw_sp *mlxsw_sp, u8 width,
386 void (*reg_ptys_eth_pack)(struct mlxsw_sp *mlxsw_sp, char *payload,
388 void (*reg_ptys_eth_unpack)(struct mlxsw_sp *mlxsw_sp, char *payload,
401 mlxsw_sp_port_bitmap_init(struct mlxsw_sp *mlxsw_sp, in mlxsw_sp_port_bitmap_init() argument
404 unsigned int nbits = mlxsw_core_max_ports(mlxsw_sp->core); in mlxsw_sp_port_bitmap_init()
480 mlxsw_sp_port_lagged_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id, u8 port_index) in mlxsw_sp_port_lagged_get() argument
485 local_port = mlxsw_core_lag_mapping_get(mlxsw_sp->core, in mlxsw_sp_port_lagged_get()
487 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_lagged_get()
521 mlxsw_sp_local_port_is_valid(struct mlxsw_sp *mlxsw_sp, u16 local_port) in mlxsw_sp_local_port_is_valid() argument
523 unsigned int max_ports = mlxsw_core_max_ports(mlxsw_sp->core); in mlxsw_sp_local_port_is_valid()
580 int mlxsw_sp_buffers_init(struct mlxsw_sp *mlxsw_sp);
581 void mlxsw_sp_buffers_fini(struct mlxsw_sp *mlxsw_sp);
617 u32 mlxsw_sp_cells_bytes(const struct mlxsw_sp *mlxsw_sp, u32 cells);
618 u32 mlxsw_sp_bytes_cells(const struct mlxsw_sp *mlxsw_sp, u32 bytes);
626 mlxsw_sp_sample_trigger_params_lookup(struct mlxsw_sp *mlxsw_sp,
629 mlxsw_sp_sample_trigger_params_set(struct mlxsw_sp *mlxsw_sp,
634 mlxsw_sp_sample_trigger_params_unset(struct mlxsw_sp *mlxsw_sp,
636 int mlxsw_sp_ipv6_addr_kvdl_index_get(struct mlxsw_sp *mlxsw_sp,
640 mlxsw_sp_ipv6_addr_put(struct mlxsw_sp *mlxsw_sp, const struct in6_addr *addr6);
650 int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp);
651 void mlxsw_sp_switchdev_fini(struct mlxsw_sp *mlxsw_sp);
652 int mlxsw_sp_rif_fdb_op(struct mlxsw_sp *mlxsw_sp, const char *mac, u16 fid,
663 bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp,
665 int mlxsw_sp_bridge_vxlan_join(struct mlxsw_sp *mlxsw_sp,
669 void mlxsw_sp_bridge_vxlan_leave(struct mlxsw_sp *mlxsw_sp,
676 void mlxsw_sp_ptp_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
707 int mlxsw_sp_flow_counter_get(struct mlxsw_sp *mlxsw_sp,
710 int mlxsw_sp_flow_counter_alloc(struct mlxsw_sp *mlxsw_sp,
712 void mlxsw_sp_flow_counter_free(struct mlxsw_sp *mlxsw_sp,
721 struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev);
724 int mlxsw_sp_parsing_depth_inc(struct mlxsw_sp *mlxsw_sp);
725 void mlxsw_sp_parsing_depth_dec(struct mlxsw_sp *mlxsw_sp);
726 int mlxsw_sp_parsing_vxlan_udp_dport_set(struct mlxsw_sp *mlxsw_sp,
755 int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,
757 void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp);
758 void mlxsw_sp_rif_macvlan_del(struct mlxsw_sp *mlxsw_sp,
762 void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
764 bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
766 u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev);
767 u16 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp);
768 int mlxsw_sp_router_nve_promote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
772 void mlxsw_sp_router_nve_demote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
775 int mlxsw_sp_router_tb_id_vr_id(struct mlxsw_sp *mlxsw_sp, u32 tb_id,
777 int mlxsw_sp_router_ul_rif_get(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
779 void mlxsw_sp_router_ul_rif_put(struct mlxsw_sp *mlxsw_sp, u16 ul_rif_index);
808 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv);
809 void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv);
810 int (*alloc)(struct mlxsw_sp *mlxsw_sp, void *priv,
813 void (*free)(struct mlxsw_sp *mlxsw_sp, void *priv,
816 int (*alloc_size_query)(struct mlxsw_sp *mlxsw_sp, void *priv,
820 int (*resources_register)(struct mlxsw_sp *mlxsw_sp, void *priv);
823 int mlxsw_sp_kvdl_init(struct mlxsw_sp *mlxsw_sp);
824 void mlxsw_sp_kvdl_fini(struct mlxsw_sp *mlxsw_sp);
825 int mlxsw_sp_kvdl_alloc(struct mlxsw_sp *mlxsw_sp,
828 void mlxsw_sp_kvdl_free(struct mlxsw_sp *mlxsw_sp,
831 int mlxsw_sp_kvdl_alloc_count_query(struct mlxsw_sp *mlxsw_sp,
892 struct mlxsw_sp *mlxsw_sp; member
908 static inline struct mlxsw_sp *
911 return block->mlxsw_sp; in mlxsw_sp_flow_block_mlxsw_sp()
958 struct mlxsw_sp_flow_block *mlxsw_sp_flow_block_create(struct mlxsw_sp *mlxsw_sp,
976 int mlxsw_sp_acl_ruleset_bind(struct mlxsw_sp *mlxsw_sp,
979 void mlxsw_sp_acl_ruleset_unbind(struct mlxsw_sp *mlxsw_sp,
983 mlxsw_sp_acl_ruleset_lookup(struct mlxsw_sp *mlxsw_sp,
987 mlxsw_sp_acl_ruleset_get(struct mlxsw_sp *mlxsw_sp,
991 void mlxsw_sp_acl_ruleset_put(struct mlxsw_sp *mlxsw_sp,
1001 void mlxsw_sp_acl_rulei_destroy(struct mlxsw_sp *mlxsw_sp,
1022 int mlxsw_sp_acl_rulei_act_mirror(struct mlxsw_sp *mlxsw_sp,
1027 int mlxsw_sp_acl_rulei_act_fwd(struct mlxsw_sp *mlxsw_sp,
1031 int mlxsw_sp_acl_rulei_act_vlan(struct mlxsw_sp *mlxsw_sp,
1035 int mlxsw_sp_acl_rulei_act_priority(struct mlxsw_sp *mlxsw_sp,
1038 int mlxsw_sp_acl_rulei_act_mangle(struct mlxsw_sp *mlxsw_sp,
1043 int mlxsw_sp_acl_rulei_act_police(struct mlxsw_sp *mlxsw_sp,
1047 int mlxsw_sp_acl_rulei_act_count(struct mlxsw_sp *mlxsw_sp,
1050 int mlxsw_sp_acl_rulei_act_fid_set(struct mlxsw_sp *mlxsw_sp,
1053 int mlxsw_sp_acl_rulei_act_ignore(struct mlxsw_sp *mlxsw_sp,
1056 int mlxsw_sp_acl_rulei_act_sample(struct mlxsw_sp *mlxsw_sp,
1066 mlxsw_sp_acl_rule_create(struct mlxsw_sp *mlxsw_sp,
1071 void mlxsw_sp_acl_rule_destroy(struct mlxsw_sp *mlxsw_sp,
1073 int mlxsw_sp_acl_rule_add(struct mlxsw_sp *mlxsw_sp,
1075 void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp,
1077 int mlxsw_sp_acl_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
1081 mlxsw_sp_acl_rule_lookup(struct mlxsw_sp *mlxsw_sp,
1086 int mlxsw_sp_acl_rule_get_stats(struct mlxsw_sp *mlxsw_sp,
1092 struct mlxsw_sp_fid *mlxsw_sp_acl_dummy_fid(struct mlxsw_sp *mlxsw_sp);
1095 mlxsw_sp_acl_act_cookie_lookup(struct mlxsw_sp *mlxsw_sp, u32 cookie_index) in mlxsw_sp_acl_act_cookie_lookup() argument
1097 return mlxsw_afa_cookie_lookup(mlxsw_sp->afa, cookie_index); in mlxsw_sp_acl_act_cookie_lookup()
1100 int mlxsw_sp_acl_init(struct mlxsw_sp *mlxsw_sp);
1101 void mlxsw_sp_acl_fini(struct mlxsw_sp *mlxsw_sp);
1106 int (*act_mangle_field)(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_acl_rule_info *rulei,
1121 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv,
1123 void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv);
1125 int (*region_init)(struct mlxsw_sp *mlxsw_sp, void *region_priv,
1129 void (*region_fini)(struct mlxsw_sp *mlxsw_sp, void *region_priv);
1130 int (*region_associate)(struct mlxsw_sp *mlxsw_sp,
1139 int (*entry_add)(struct mlxsw_sp *mlxsw_sp,
1143 void (*entry_del)(struct mlxsw_sp *mlxsw_sp,
1146 int (*entry_action_replace)(struct mlxsw_sp *mlxsw_sp,
1149 int (*entry_activity_get)(struct mlxsw_sp *mlxsw_sp,
1175 int (*sample_add)(struct mlxsw_sp *mlxsw_sp,
1179 void (*sample_del)(struct mlxsw_sp *mlxsw_sp,
1221 int mlxsw_sp_mall_replace(struct mlxsw_sp *mlxsw_sp,
1235 int mlxsw_sp_flower_replace(struct mlxsw_sp *mlxsw_sp,
1238 void mlxsw_sp_flower_destroy(struct mlxsw_sp *mlxsw_sp,
1241 int mlxsw_sp_flower_stats(struct mlxsw_sp *mlxsw_sp,
1244 int mlxsw_sp_flower_tmplt_create(struct mlxsw_sp *mlxsw_sp,
1247 void mlxsw_sp_flower_tmplt_destroy(struct mlxsw_sp *mlxsw_sp,
1250 int mlxsw_sp_flower_prio_get(struct mlxsw_sp *mlxsw_sp,
1274 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp,
1279 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_vni(struct mlxsw_sp *mlxsw_sp,
1305 mlxsw_sp_fid_type_rif_type(const struct mlxsw_sp *mlxsw_sp,
1308 struct mlxsw_sp_fid *mlxsw_sp_fid_8021q_get(struct mlxsw_sp *mlxsw_sp, u16 vid);
1309 struct mlxsw_sp_fid *mlxsw_sp_fid_8021d_get(struct mlxsw_sp *mlxsw_sp,
1311 struct mlxsw_sp_fid *mlxsw_sp_fid_8021q_lookup(struct mlxsw_sp *mlxsw_sp,
1313 struct mlxsw_sp_fid *mlxsw_sp_fid_8021d_lookup(struct mlxsw_sp *mlxsw_sp,
1315 struct mlxsw_sp_fid *mlxsw_sp_fid_rfid_get(struct mlxsw_sp *mlxsw_sp,
1317 struct mlxsw_sp_fid *mlxsw_sp_fid_dummy_get(struct mlxsw_sp *mlxsw_sp);
1321 int mlxsw_sp_fids_init(struct mlxsw_sp *mlxsw_sp);
1322 void mlxsw_sp_fids_fini(struct mlxsw_sp *mlxsw_sp);
1341 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv);
1344 int (*route_create)(struct mlxsw_sp *mlxsw_sp, void *priv,
1349 void (*route_destroy)(struct mlxsw_sp *mlxsw_sp, void *priv,
1352 int (*route_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv,
1374 int mlxsw_sp_nve_learned_ip_resolve(struct mlxsw_sp *mlxsw_sp, u32 uip,
1377 int mlxsw_sp_nve_flood_ip_add(struct mlxsw_sp *mlxsw_sp,
1381 void mlxsw_sp_nve_flood_ip_del(struct mlxsw_sp *mlxsw_sp,
1385 int mlxsw_sp_nve_ipv6_addr_kvdl_set(struct mlxsw_sp *mlxsw_sp,
1388 void mlxsw_sp_nve_ipv6_addr_kvdl_unset(struct mlxsw_sp *mlxsw_sp,
1391 mlxsw_sp_nve_ipv6_addr_map_replace(struct mlxsw_sp *mlxsw_sp, const char *mac,
1394 void mlxsw_sp_nve_ipv6_addr_map_del(struct mlxsw_sp *mlxsw_sp, const char *mac,
1396 int mlxsw_sp_nve_fid_enable(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_fid *fid,
1399 void mlxsw_sp_nve_fid_disable(struct mlxsw_sp *mlxsw_sp,
1403 int mlxsw_sp_nve_init(struct mlxsw_sp *mlxsw_sp);
1404 void mlxsw_sp_nve_fini(struct mlxsw_sp *mlxsw_sp);
1407 int mlxsw_sp_devlink_traps_init(struct mlxsw_sp *mlxsw_sp);
1408 void mlxsw_sp_devlink_traps_fini(struct mlxsw_sp *mlxsw_sp);
1436 int mlxsw_sp_trap_group_policer_hw_id_get(struct mlxsw_sp *mlxsw_sp, u16 id,
1439 static inline struct net *mlxsw_sp_net(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_net() argument
1441 return mlxsw_core_net(mlxsw_sp->core); in mlxsw_sp_net()
1466 int mlxsw_sp_policer_add(struct mlxsw_sp *mlxsw_sp,
1470 void mlxsw_sp_policer_del(struct mlxsw_sp *mlxsw_sp,
1473 int mlxsw_sp_policer_drops_counter_get(struct mlxsw_sp *mlxsw_sp,
1476 int mlxsw_sp_policers_init(struct mlxsw_sp *mlxsw_sp);
1477 void mlxsw_sp_policers_fini(struct mlxsw_sp *mlxsw_sp);
1481 int mlxsw_sp_pgt_mid_alloc(struct mlxsw_sp *mlxsw_sp, u16 *p_mid);
1482 void mlxsw_sp_pgt_mid_free(struct mlxsw_sp *mlxsw_sp, u16 mid_base);
1483 int mlxsw_sp_pgt_mid_alloc_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base,
1485 void mlxsw_sp_pgt_mid_free_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base,
1487 int mlxsw_sp_pgt_entry_port_set(struct mlxsw_sp *mlxsw_sp, u16 mid,
1489 int mlxsw_sp_pgt_init(struct mlxsw_sp *mlxsw_sp);
1490 void mlxsw_sp_pgt_fini(struct mlxsw_sp *mlxsw_sp);
1499 int mlxsw_sp_port_range_reg_get(struct mlxsw_sp *mlxsw_sp,
1503 void mlxsw_sp_port_range_reg_put(struct mlxsw_sp *mlxsw_sp, u8 prr_index);
1504 int mlxsw_sp_port_range_init(struct mlxsw_sp *mlxsw_sp);
1505 void mlxsw_sp_port_range_fini(struct mlxsw_sp *mlxsw_sp);