Lines Matching refs:mlxsw_sp

142 struct mlxsw_sp {  struct
188 (*clock_init)(struct mlxsw_sp *mlxsw_sp, struct device *dev); argument
191 struct mlxsw_sp_ptp_state *(*init)(struct mlxsw_sp *mlxsw_sp);
197 void (*receive)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
203 void (*transmitted)(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
211 int (*get_ts_info)(struct mlxsw_sp *mlxsw_sp,
220 mlxsw_sp_lag_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id) in mlxsw_sp_lag_get() argument
222 return &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_get()
276 struct mlxsw_sp *mlxsw_sp; member
326 void (*from_ptys_supported_port)(struct mlxsw_sp *mlxsw_sp,
329 void (*from_ptys_link)(struct mlxsw_sp *mlxsw_sp, u32 ptys_eth_proto,
331 u32 (*from_ptys_speed)(struct mlxsw_sp *mlxsw_sp, u32 ptys_eth_proto);
332 void (*from_ptys_speed_duplex)(struct mlxsw_sp *mlxsw_sp,
336 u32 (*to_ptys_advert_link)(struct mlxsw_sp *mlxsw_sp, u8 width,
338 u32 (*to_ptys_speed)(struct mlxsw_sp *mlxsw_sp, u8 width, u32 speed);
339 void (*reg_ptys_eth_pack)(struct mlxsw_sp *mlxsw_sp, char *payload,
341 void (*reg_ptys_eth_unpack)(struct mlxsw_sp *mlxsw_sp, char *payload,
394 mlxsw_sp_port_lagged_get(struct mlxsw_sp *mlxsw_sp, u16 lag_id, u8 port_index) in mlxsw_sp_port_lagged_get() argument
399 local_port = mlxsw_core_lag_mapping_get(mlxsw_sp->core, in mlxsw_sp_port_lagged_get()
401 mlxsw_sp_port = mlxsw_sp->ports[local_port]; in mlxsw_sp_port_lagged_get()
483 int mlxsw_sp_buffers_init(struct mlxsw_sp *mlxsw_sp);
484 void mlxsw_sp_buffers_fini(struct mlxsw_sp *mlxsw_sp);
520 u32 mlxsw_sp_cells_bytes(const struct mlxsw_sp *mlxsw_sp, u32 cells);
521 u32 mlxsw_sp_bytes_cells(const struct mlxsw_sp *mlxsw_sp, u32 bytes);
537 int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp);
538 void mlxsw_sp_switchdev_fini(struct mlxsw_sp *mlxsw_sp);
539 int mlxsw_sp_rif_fdb_op(struct mlxsw_sp *mlxsw_sp, const char *mac, u16 fid,
550 bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp,
552 int mlxsw_sp_bridge_vxlan_join(struct mlxsw_sp *mlxsw_sp,
556 void mlxsw_sp_bridge_vxlan_leave(struct mlxsw_sp *mlxsw_sp,
563 void mlxsw_sp_ptp_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
565 void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
588 int mlxsw_sp_flow_counter_get(struct mlxsw_sp *mlxsw_sp,
591 int mlxsw_sp_flow_counter_alloc(struct mlxsw_sp *mlxsw_sp,
593 void mlxsw_sp_flow_counter_free(struct mlxsw_sp *mlxsw_sp,
596 struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev);
627 int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,
629 void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp);
632 void mlxsw_sp_rif_macvlan_del(struct mlxsw_sp *mlxsw_sp,
640 bool mlxsw_sp_netdev_is_ipip_ol(const struct mlxsw_sp *mlxsw_sp,
642 bool mlxsw_sp_netdev_is_ipip_ul(struct mlxsw_sp *mlxsw_sp,
644 int mlxsw_sp_netdevice_ipip_ol_event(struct mlxsw_sp *mlxsw_sp,
649 mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,
655 void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
657 bool mlxsw_sp_rif_exists(struct mlxsw_sp *mlxsw_sp,
659 u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev);
660 u8 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp);
661 int mlxsw_sp_router_nve_promote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
665 void mlxsw_sp_router_nve_demote_decap(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
668 int mlxsw_sp_router_tb_id_vr_id(struct mlxsw_sp *mlxsw_sp, u32 tb_id,
670 int mlxsw_sp_router_ul_rif_get(struct mlxsw_sp *mlxsw_sp, u32 ul_tb_id,
672 void mlxsw_sp_router_ul_rif_put(struct mlxsw_sp *mlxsw_sp, u16 ul_rif_index);
699 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv);
700 void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv);
701 int (*alloc)(struct mlxsw_sp *mlxsw_sp, void *priv,
704 void (*free)(struct mlxsw_sp *mlxsw_sp, void *priv,
707 int (*alloc_size_query)(struct mlxsw_sp *mlxsw_sp, void *priv,
711 int (*resources_register)(struct mlxsw_sp *mlxsw_sp, void *priv);
714 int mlxsw_sp_kvdl_init(struct mlxsw_sp *mlxsw_sp);
715 void mlxsw_sp_kvdl_fini(struct mlxsw_sp *mlxsw_sp);
716 int mlxsw_sp_kvdl_alloc(struct mlxsw_sp *mlxsw_sp,
719 void mlxsw_sp_kvdl_free(struct mlxsw_sp *mlxsw_sp,
722 int mlxsw_sp_kvdl_alloc_count_query(struct mlxsw_sp *mlxsw_sp,
756 struct mlxsw_sp *mlxsw_sp; member
772 static inline struct mlxsw_sp *
775 return block->mlxsw_sp; in mlxsw_sp_flow_block_mlxsw_sp()
822 struct mlxsw_sp_flow_block *mlxsw_sp_flow_block_create(struct mlxsw_sp *mlxsw_sp,
839 int mlxsw_sp_acl_ruleset_bind(struct mlxsw_sp *mlxsw_sp,
842 void mlxsw_sp_acl_ruleset_unbind(struct mlxsw_sp *mlxsw_sp,
846 mlxsw_sp_acl_ruleset_lookup(struct mlxsw_sp *mlxsw_sp,
850 mlxsw_sp_acl_ruleset_get(struct mlxsw_sp *mlxsw_sp,
854 void mlxsw_sp_acl_ruleset_put(struct mlxsw_sp *mlxsw_sp,
884 int mlxsw_sp_acl_rulei_act_mirror(struct mlxsw_sp *mlxsw_sp,
889 int mlxsw_sp_acl_rulei_act_fwd(struct mlxsw_sp *mlxsw_sp,
893 int mlxsw_sp_acl_rulei_act_vlan(struct mlxsw_sp *mlxsw_sp,
897 int mlxsw_sp_acl_rulei_act_priority(struct mlxsw_sp *mlxsw_sp,
900 int mlxsw_sp_acl_rulei_act_mangle(struct mlxsw_sp *mlxsw_sp,
905 int mlxsw_sp_acl_rulei_act_police(struct mlxsw_sp *mlxsw_sp,
909 int mlxsw_sp_acl_rulei_act_count(struct mlxsw_sp *mlxsw_sp,
912 int mlxsw_sp_acl_rulei_act_fid_set(struct mlxsw_sp *mlxsw_sp,
919 mlxsw_sp_acl_rule_create(struct mlxsw_sp *mlxsw_sp,
924 void mlxsw_sp_acl_rule_destroy(struct mlxsw_sp *mlxsw_sp,
926 int mlxsw_sp_acl_rule_add(struct mlxsw_sp *mlxsw_sp,
928 void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp,
930 int mlxsw_sp_acl_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
934 mlxsw_sp_acl_rule_lookup(struct mlxsw_sp *mlxsw_sp,
939 int mlxsw_sp_acl_rule_get_stats(struct mlxsw_sp *mlxsw_sp,
945 struct mlxsw_sp_fid *mlxsw_sp_acl_dummy_fid(struct mlxsw_sp *mlxsw_sp);
948 mlxsw_sp_acl_act_cookie_lookup(struct mlxsw_sp *mlxsw_sp, u32 cookie_index) in mlxsw_sp_acl_act_cookie_lookup() argument
950 return mlxsw_afa_cookie_lookup(mlxsw_sp->afa, cookie_index); in mlxsw_sp_acl_act_cookie_lookup()
953 int mlxsw_sp_acl_init(struct mlxsw_sp *mlxsw_sp);
954 void mlxsw_sp_acl_fini(struct mlxsw_sp *mlxsw_sp);
955 u32 mlxsw_sp_acl_region_rehash_intrvl_get(struct mlxsw_sp *mlxsw_sp);
956 int mlxsw_sp_acl_region_rehash_intrvl_set(struct mlxsw_sp *mlxsw_sp, u32 val);
961 int (*act_mangle_field)(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_acl_rule_info *rulei,
976 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv,
978 void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv);
980 int (*region_init)(struct mlxsw_sp *mlxsw_sp, void *region_priv,
984 void (*region_fini)(struct mlxsw_sp *mlxsw_sp, void *region_priv);
985 int (*region_associate)(struct mlxsw_sp *mlxsw_sp,
994 int (*entry_add)(struct mlxsw_sp *mlxsw_sp,
998 void (*entry_del)(struct mlxsw_sp *mlxsw_sp,
1001 int (*entry_action_replace)(struct mlxsw_sp *mlxsw_sp,
1004 int (*entry_activity_get)(struct mlxsw_sp *mlxsw_sp,
1053 int mlxsw_sp_mall_replace(struct mlxsw_sp *mlxsw_sp,
1066 int mlxsw_sp_flower_replace(struct mlxsw_sp *mlxsw_sp,
1069 void mlxsw_sp_flower_destroy(struct mlxsw_sp *mlxsw_sp,
1072 int mlxsw_sp_flower_stats(struct mlxsw_sp *mlxsw_sp,
1075 int mlxsw_sp_flower_tmplt_create(struct mlxsw_sp *mlxsw_sp,
1078 void mlxsw_sp_flower_tmplt_destroy(struct mlxsw_sp *mlxsw_sp,
1081 int mlxsw_sp_flower_prio_get(struct mlxsw_sp *mlxsw_sp,
1103 bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index);
1105 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp,
1110 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_vni(struct mlxsw_sp *mlxsw_sp,
1135 mlxsw_sp_fid_type_rif_type(const struct mlxsw_sp *mlxsw_sp,
1138 struct mlxsw_sp_fid *mlxsw_sp_fid_8021q_get(struct mlxsw_sp *mlxsw_sp, u16 vid);
1139 struct mlxsw_sp_fid *mlxsw_sp_fid_8021d_get(struct mlxsw_sp *mlxsw_sp,
1141 struct mlxsw_sp_fid *mlxsw_sp_fid_8021q_lookup(struct mlxsw_sp *mlxsw_sp,
1143 struct mlxsw_sp_fid *mlxsw_sp_fid_8021d_lookup(struct mlxsw_sp *mlxsw_sp,
1145 struct mlxsw_sp_fid *mlxsw_sp_fid_rfid_get(struct mlxsw_sp *mlxsw_sp,
1147 struct mlxsw_sp_fid *mlxsw_sp_fid_dummy_get(struct mlxsw_sp *mlxsw_sp);
1151 int mlxsw_sp_fids_init(struct mlxsw_sp *mlxsw_sp);
1152 void mlxsw_sp_fids_fini(struct mlxsw_sp *mlxsw_sp);
1168 int (*init)(struct mlxsw_sp *mlxsw_sp, void *priv);
1171 int (*route_create)(struct mlxsw_sp *mlxsw_sp, void *priv,
1176 void (*route_destroy)(struct mlxsw_sp *mlxsw_sp, void *priv,
1179 int (*route_update)(struct mlxsw_sp *mlxsw_sp, void *route_priv,
1200 int mlxsw_sp_nve_learned_ip_resolve(struct mlxsw_sp *mlxsw_sp, u32 uip,
1203 int mlxsw_sp_nve_flood_ip_add(struct mlxsw_sp *mlxsw_sp,
1207 void mlxsw_sp_nve_flood_ip_del(struct mlxsw_sp *mlxsw_sp,
1211 int mlxsw_sp_nve_fid_enable(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_fid *fid,
1214 void mlxsw_sp_nve_fid_disable(struct mlxsw_sp *mlxsw_sp,
1218 int mlxsw_sp_nve_init(struct mlxsw_sp *mlxsw_sp);
1219 void mlxsw_sp_nve_fini(struct mlxsw_sp *mlxsw_sp);
1222 int mlxsw_sp_nve_inc_parsing_depth_get(struct mlxsw_sp *mlxsw_sp);
1223 void mlxsw_sp_nve_inc_parsing_depth_put(struct mlxsw_sp *mlxsw_sp);
1226 int mlxsw_sp_devlink_traps_init(struct mlxsw_sp *mlxsw_sp);
1227 void mlxsw_sp_devlink_traps_fini(struct mlxsw_sp *mlxsw_sp);
1255 int mlxsw_sp_trap_group_policer_hw_id_get(struct mlxsw_sp *mlxsw_sp, u16 id,
1258 static inline struct net *mlxsw_sp_net(struct mlxsw_sp *mlxsw_sp) in mlxsw_sp_net() argument
1260 return mlxsw_core_net(mlxsw_sp->core); in mlxsw_sp_net()
1285 int mlxsw_sp_policer_add(struct mlxsw_sp *mlxsw_sp,
1289 void mlxsw_sp_policer_del(struct mlxsw_sp *mlxsw_sp,
1292 int mlxsw_sp_policer_drops_counter_get(struct mlxsw_sp *mlxsw_sp,
1295 int mlxsw_sp_policers_init(struct mlxsw_sp *mlxsw_sp);
1296 void mlxsw_sp_policers_fini(struct mlxsw_sp *mlxsw_sp);