Home
last modified time | relevance | path

Searched refs:esw (Results 1 - 25 of 122) sorted by relevance

12345

/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/
H A Deswitch.c40 #include "esw/acl/lgcy.h"
41 #include "esw/legacy.h"
42 #include "esw/qos.h"
107 mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num) in mlx5_eswitch_get_vport() argument
111 if (!esw) in mlx5_eswitch_get_vport()
114 vport = xa_load(&esw->vports, vport_num); in mlx5_eswitch_get_vport()
116 esw_debug(esw->dev, "vport out of range: num(0x%x)\n", vport_num); in mlx5_eswitch_get_vport()
207 __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u16 vport, bool rx_rule, in __esw_fdb_set_vport_rule() argument
250 esw_debug(esw->dev, in __esw_fdb_set_vport_rule()
256 mlx5_add_flow_rules(esw in __esw_fdb_set_vport_rule()
270 esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u16 vport) esw_fdb_set_vport_rule() argument
279 esw_fdb_set_vport_allmulti_rule(struct mlx5_eswitch *esw, u16 vport) esw_fdb_set_vport_allmulti_rule() argument
292 esw_fdb_set_vport_promisc_rule(struct mlx5_eswitch *esw, u16 vport) esw_fdb_set_vport_promisc_rule() argument
306 esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_add_uc_addr() argument
339 esw_del_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_del_uc_addr() argument
366 update_allmulti_vports(struct mlx5_eswitch *esw, struct vport_addr *vaddr, struct esw_mc_addr *esw_mc) update_allmulti_vports() argument
415 esw_add_mc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_add_mc_addr() argument
455 esw_del_mc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_del_mc_addr() argument
498 esw_apply_vport_addr_list(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int list_type) esw_apply_vport_addr_list() argument
532 esw_update_vport_addr_list(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int list_type) esw_update_vport_addr_list() argument
619 esw_update_vport_mc_promisc(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_update_vport_mc_promisc() argument
654 esw_apply_vport_rx_mode(struct mlx5_eswitch *esw, struct mlx5_vport *vport, bool promisc, bool mc_promisc) esw_apply_vport_rx_mode() argument
697 esw_update_vport_rx_mode(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_update_vport_rx_mode() argument
728 struct mlx5_eswitch *esw = dev->priv.eswitch; esw_vport_change_handle_locked() local
765 struct mlx5_eswitch *esw = vport->dev->priv.eswitch; esw_vport_change_handler() local
784 esw_vport_setup_acl(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_setup_acl() argument
793 esw_vport_cleanup_acl(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_cleanup_acl() argument
802 mlx5_esw_vport_caps_get(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_vport_caps_get() argument
842 esw_vport_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_setup() argument
887 esw_vport_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_cleanup() argument
901 mlx5_esw_vport_enable(struct mlx5_eswitch *esw, struct mlx5_vport *vport, enum mlx5_eswitch_vport_event enabled_events) mlx5_esw_vport_enable() argument
957 mlx5_esw_vport_disable(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_vport_disable() argument
999 struct mlx5_eswitch *esw = mlx5_nb_cof(nb, struct mlx5_eswitch, nb); eswitch_vport_event() local
1041 mlx5_eswitch_event_handler_register(struct mlx5_eswitch *esw) mlx5_eswitch_event_handler_register() argument
1050 mlx5_eswitch_event_handler_unregister(struct mlx5_eswitch *esw) mlx5_eswitch_event_handler_unregister() argument
1058 mlx5_eswitch_clear_vf_vports_info(struct mlx5_eswitch *esw) mlx5_eswitch_clear_vf_vports_info() argument
1070 mlx5_eswitch_clear_ec_vf_vports_info(struct mlx5_eswitch *esw) mlx5_eswitch_clear_ec_vf_vports_info() argument
1082 mlx5_eswitch_load_vport(struct mlx5_eswitch *esw, struct mlx5_vport *vport, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_load_vport() argument
1102 mlx5_eswitch_unload_vport(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_eswitch_unload_vport() argument
1108 mlx5_eswitch_load_pf_vf_vport(struct mlx5_eswitch *esw, u16 vport_num, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_load_pf_vf_vport() argument
1132 mlx5_eswitch_unload_pf_vf_vport(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_unload_pf_vf_vport() argument
1144 mlx5_eswitch_load_sf_vport(struct mlx5_eswitch *esw, u16 vport_num, enum mlx5_eswitch_vport_event enabled_events, struct mlx5_devlink_port *dl_port, u32 controller, u32 sfnum) mlx5_eswitch_load_sf_vport() argument
1170 mlx5_eswitch_unload_sf_vport(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_unload_sf_vport() argument
1182 mlx5_eswitch_unload_vf_vports(struct mlx5_eswitch *esw, u16 num_vfs) mlx5_eswitch_unload_vf_vports() argument
1194 mlx5_eswitch_unload_ec_vf_vports(struct mlx5_eswitch *esw, u16 num_ec_vfs) mlx5_eswitch_unload_ec_vf_vports() argument
1207 mlx5_eswitch_load_vf_vports(struct mlx5_eswitch *esw, u16 num_vfs, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_load_vf_vports() argument
1227 mlx5_eswitch_load_ec_vf_vports(struct mlx5_eswitch *esw, u16 num_ec_vfs, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_load_ec_vf_vports() argument
1271 mlx5_eswitch_enable_pf_vf_vports(struct mlx5_eswitch *esw, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_enable_pf_vf_vports() argument
1330 mlx5_eswitch_disable_pf_vf_vports(struct mlx5_eswitch *esw) mlx5_eswitch_disable_pf_vf_vports() argument
1347 mlx5_eswitch_get_devlink_param(struct mlx5_eswitch *esw) mlx5_eswitch_get_devlink_param() argument
1367 mlx5_eswitch_update_num_of_vfs(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_update_num_of_vfs() argument
1391 mlx5_esw_mode_change_notify(struct mlx5_eswitch *esw, u16 mode) mlx5_esw_mode_change_notify() argument
1400 mlx5_esw_acls_ns_init(struct mlx5_eswitch *esw) mlx5_esw_acls_ns_init() argument
1435 mlx5_esw_acls_ns_cleanup(struct mlx5_eswitch *esw) mlx5_esw_acls_ns_cleanup() argument
1462 mlx5_eswitch_enable_locked(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_enable_locked() argument
1519 mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_enable() argument
1563 mlx5_eswitch_disable_sriov(struct mlx5_eswitch *esw, bool clear_vf) mlx5_eswitch_disable_sriov() argument
1607 mlx5_eswitch_disable_locked(struct mlx5_eswitch *esw) mlx5_eswitch_disable_locked() argument
1636 mlx5_eswitch_disable(struct mlx5_eswitch *esw) mlx5_eswitch_disable() argument
1690 mlx5_esw_vport_alloc(struct mlx5_eswitch *esw, int index, u16 vport_num) mlx5_esw_vport_alloc() argument
1717 mlx5_esw_vport_free(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_vport_free() argument
1723 mlx5_esw_vports_cleanup(struct mlx5_eswitch *esw) mlx5_esw_vports_cleanup() argument
1733 mlx5_esw_vports_init(struct mlx5_eswitch *esw) mlx5_esw_vports_init() argument
1841 struct mlx5_eswitch *esw; mlx5_eswitch_init() local
1922 mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) mlx5_eswitch_cleanup() argument
1949 mlx5_esw_set_vport_mac_locked(struct mlx5_eswitch *esw, struct mlx5_vport *evport, const u8 *mac) mlx5_esw_set_vport_mac_locked() argument
1987 mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw, u16 vport, const u8 *mac) mlx5_eswitch_set_vport_mac() argument
2002 mlx5_esw_check_port_type(struct mlx5_eswitch *esw, u16 vport_num, xa_mark_t mark) mlx5_esw_check_port_type() argument
2007 mlx5_eswitch_is_vf_vport(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_is_vf_vport() argument
2012 mlx5_eswitch_is_pf_vf_vport(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_is_pf_vf_vport() argument
2018 mlx5_esw_is_sf_vport(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_is_sf_vport() argument
2023 mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw, u16 vport, int link_state) mlx5_eswitch_set_vport_state() argument
2061 mlx5_eswitch_get_vport_config(struct mlx5_eswitch *esw, u16 vport, struct ifla_vf_info *ivi) mlx5_eswitch_get_vport_config() argument
2088 __mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw, u16 vport, u16 vlan, u8 qos, u8 set_flags) __mlx5_eswitch_set_vport_vlan() argument
2118 mlx5_eswitch_get_vport_stats(struct mlx5_eswitch *esw, u16 vport_num, struct ifla_vf_stats *vf_stats) mlx5_eswitch_get_vport_stats() argument
2198 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_mode() local
2207 struct mlx5_eswitch *esw; mlx5_eswitch_get_encap_mode() local
2222 mlx5_esw_event_notifier_register(struct mlx5_eswitch *esw, struct notifier_block *nb) mlx5_esw_event_notifier_register() argument
2227 mlx5_esw_event_notifier_unregister(struct mlx5_eswitch *esw, struct notifier_block *nb) mlx5_esw_event_notifier_unregister() argument
2242 struct mlx5_eswitch *esw = mdev->priv.eswitch; mlx5_esw_hold() local
2265 struct mlx5_eswitch *esw = mdev->priv.eswitch; mlx5_esw_release() local
2277 struct mlx5_eswitch *esw = mdev->priv.eswitch; mlx5_esw_get() local
2289 struct mlx5_eswitch *esw = mdev->priv.eswitch; mlx5_esw_put() local
2306 mlx5_esw_try_lock(struct mlx5_eswitch *esw) mlx5_esw_try_lock() argument
2320 mlx5_esw_lock(struct mlx5_eswitch *esw) mlx5_esw_lock() argument
2336 mlx5_esw_unlock(struct mlx5_eswitch *esw) mlx5_esw_unlock() argument
2350 struct mlx5_eswitch *esw; mlx5_eswitch_get_total_vports() local
2363 mlx5_eswitch_get_core_dev(struct mlx5_eswitch *esw) mlx5_eswitch_get_core_dev() argument
2371 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_block_ipsec() local
2389 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_unblock_ipsec() local
[all...]
H A Deswitch_offloads.c41 #include "esw/indir_table.h"
42 #include "esw/acl/ofld.h"
55 #define mlx5_esw_for_each_rep(esw, i, rep) \
56 xa_for_each(&((esw)->offloads.vport_reps), i, rep)
75 static struct mlx5_eswitch_rep *mlx5_eswitch_get_rep(struct mlx5_eswitch *esw, in mlx5_eswitch_get_rep() argument
78 return xa_load(&esw->offloads.vport_reps, vport_num); in mlx5_eswitch_get_rep()
82 mlx5_eswitch_set_rule_flow_source(struct mlx5_eswitch *esw, in mlx5_eswitch_set_rule_flow_source() argument
86 if (!MLX5_CAP_ESW_FLOWTABLE(esw->dev, flow_source) || !attr || !attr->in_rep) in mlx5_eswitch_set_rule_flow_source()
104 mlx5_eswitch_clear_rule_source_port(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec) in mlx5_eswitch_clear_rule_source_port() argument
106 if (mlx5_eswitch_vport_match_metadata_enabled(esw)) { in mlx5_eswitch_clear_rule_source_port()
121 mlx5_eswitch_set_rule_source_port(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_flow_attr *attr, struct mlx5_eswitch *src_esw, u16 vport) mlx5_eswitch_set_rule_source_port() argument
174 esw_setup_decap_indir(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) esw_setup_decap_indir() argument
188 esw_cleanup_decap_indir(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) esw_cleanup_decap_indir() argument
226 esw_setup_ft_dest(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr, int i) esw_setup_ft_dest() argument
252 esw_setup_slow_path_dest(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, int i) esw_setup_slow_path_dest() argument
280 esw_put_dest_tables_loop(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr, int from, int to) esw_put_dest_tables_loop() argument
296 esw_is_chain_src_port_rewrite(struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr) esw_is_chain_src_port_rewrite() argument
307 esw_setup_chain_src_port_rewrite(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_fs_chains *chains, struct mlx5_flow_attr *attr, int *i) esw_setup_chain_src_port_rewrite() argument
339 esw_cleanup_chain_src_port_rewrite(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) esw_cleanup_chain_src_port_rewrite() argument
348 esw_is_indir_table(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) esw_is_indir_table() argument
373 esw_setup_indir_table(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr, int *i) esw_setup_indir_table() argument
410 esw_cleanup_indir_table(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) esw_cleanup_indir_table() argument
429 esw_setup_uplink_fwd_ipsec_needed(struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr, int attr_idx) esw_setup_uplink_fwd_ipsec_needed() argument
445 esw_flow_dests_fwd_ipsec_check(struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr) esw_flow_dests_fwd_ipsec_check() argument
466 esw_setup_dest_fwd_vport(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr, int attr_idx, int dest_idx, bool pkt_reformat) esw_setup_dest_fwd_vport() argument
491 esw_setup_dest_fwd_ipsec(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr, int attr_idx, int dest_idx, bool pkt_reformat) esw_setup_dest_fwd_ipsec() argument
505 esw_setup_vport_dest(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr, int attr_idx, int dest_idx, bool pkt_reformat) esw_setup_vport_dest() argument
518 esw_setup_vport_dests(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr, int i) esw_setup_vport_dests() argument
530 esw_src_port_rewrite_supported(struct mlx5_eswitch *esw) esw_src_port_rewrite_supported() argument
565 esw_setup_dests(struct mlx5_flow_destination *dest, struct mlx5_flow_act *flow_act, struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr, struct mlx5_flow_spec *spec, int *i) esw_setup_dests() argument
617 esw_cleanup_dests(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) esw_cleanup_dests() argument
650 mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_flow_attr *attr) mlx5_eswitch_add_offloaded_rule() argument
787 mlx5_eswitch_add_fwd_rule(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_flow_attr *attr) mlx5_eswitch_add_fwd_rule() argument
869 __mlx5_eswitch_del_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_flow_attr *attr, bool fwd_rule) __mlx5_eswitch_del_rule() argument
912 mlx5_eswitch_del_offloaded_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_flow_attr *attr) mlx5_eswitch_del_offloaded_rule() argument
920 mlx5_eswitch_del_fwd_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_flow_attr *attr) mlx5_eswitch_del_fwd_rule() argument
1030 mlx5_eswitch_add_send_to_vport_meta_rule(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_add_send_to_vport_meta_rule() argument
1066 mlx5_eswitch_reg_c1_loopback_supported(struct mlx5_eswitch *esw) mlx5_eswitch_reg_c1_loopback_supported() argument
1072 esw_set_passing_vport_metadata(struct mlx5_eswitch *esw, bool enable) esw_set_passing_vport_metadata() argument
1117 peer_miss_rules_setup(struct mlx5_eswitch *esw, struct mlx5_core_dev *peer_dev, struct mlx5_flow_spec *spec, struct mlx5_flow_destination *dest) peer_miss_rules_setup() argument
1153 esw_set_peer_miss_rule_source_port(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw, struct mlx5_flow_spec *spec, u16 vport) esw_set_peer_miss_rule_source_port() argument
1173 esw_add_fdb_peer_miss_rules(struct mlx5_eswitch *esw, struct mlx5_core_dev *peer_dev) esw_add_fdb_peer_miss_rules() argument
1304 esw_del_fdb_peer_miss_rules(struct mlx5_eswitch *esw, struct mlx5_core_dev *peer_dev) esw_del_fdb_peer_miss_rules() argument
1344 esw_add_fdb_miss_rule(struct mlx5_eswitch *esw) esw_add_fdb_miss_rule() argument
1405 esw_add_restore_rule(struct mlx5_eswitch *esw, u32 tag) esw_add_restore_rule() argument
1455 mlx5_esw_set_flow_group_source_port(struct mlx5_eswitch *esw, u32 *flow_group_in, int match_params) mlx5_esw_set_flow_group_source_port() argument
1482 esw_vport_tbl_put(struct mlx5_eswitch *esw) esw_vport_tbl_put() argument
1497 esw_vport_tbl_get(struct mlx5_eswitch *esw) esw_vport_tbl_get() argument
1522 esw_init_chains_offload_flags(struct mlx5_eswitch *esw, u32 *flags) esw_init_chains_offload_flags() argument
1553 esw_chains_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *miss_fdb) esw_chains_create() argument
1615 esw_chains_destroy(struct mlx5_eswitch *esw, struct mlx5_fs_chains *chains) esw_chains_destroy() argument
1627 esw_chains_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *miss_fdb) esw_chains_create() argument
1631 esw_chains_destroy(struct mlx5_eswitch *esw, struct mlx5_fs_chains *chains) esw_chains_destroy() argument
1637 esw_create_send_to_vport_group(struct mlx5_eswitch *esw, struct mlx5_flow_table *fdb, u32 *flow_group_in, int *ix) esw_create_send_to_vport_group() argument
1681 esw_create_meta_send_to_vport_group(struct mlx5_eswitch *esw, struct mlx5_flow_table *fdb, u32 *flow_group_in, int *ix) esw_create_meta_send_to_vport_group() argument
1728 esw_create_peer_esw_miss_group(struct mlx5_eswitch *esw, struct mlx5_flow_table *fdb, u32 *flow_group_in, int *ix) esw_create_peer_esw_miss_group() argument
1776 esw_create_miss_group(struct mlx5_eswitch *esw, struct mlx5_flow_table *fdb, u32 *flow_group_in, int *ix) esw_create_miss_group() argument
1821 esw_create_offloads_fdb_tables(struct mlx5_eswitch *esw) esw_create_offloads_fdb_tables() argument
1945 esw_destroy_offloads_fdb_tables(struct mlx5_eswitch *esw) esw_destroy_offloads_fdb_tables() argument
1970 esw_get_nr_ft_offloads_steering_src_ports(struct mlx5_eswitch *esw) esw_get_nr_ft_offloads_steering_src_ports() argument
1981 esw_create_offloads_table(struct mlx5_eswitch *esw) esw_create_offloads_table() argument
2010 esw_destroy_offloads_table(struct mlx5_eswitch *esw) esw_destroy_offloads_table() argument
2017 esw_create_vport_rx_group(struct mlx5_eswitch *esw) esw_create_vport_rx_group() argument
2049 esw_destroy_vport_rx_group(struct mlx5_eswitch *esw) esw_destroy_vport_rx_group() argument
2054 esw_create_vport_rx_drop_rule_index(struct mlx5_eswitch *esw) esw_create_vport_rx_drop_rule_index() argument
2063 esw_create_vport_rx_drop_group(struct mlx5_eswitch *esw) esw_create_vport_rx_drop_group() argument
2094 esw_destroy_vport_rx_drop_group(struct mlx5_eswitch *esw) esw_destroy_vport_rx_drop_group() argument
2101 mlx5_esw_set_spec_source_port(struct mlx5_eswitch *esw, u16 vport, struct mlx5_flow_spec *spec) mlx5_esw_set_spec_source_port() argument
2129 mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, u16 vport, struct mlx5_flow_destination *dest) mlx5_eswitch_create_vport_rx_rule() argument
2157 esw_create_vport_rx_drop_rule(struct mlx5_eswitch *esw) esw_create_vport_rx_drop_rule() argument
2177 esw_destroy_vport_rx_drop_rule(struct mlx5_eswitch *esw) esw_destroy_vport_rx_drop_rule() argument
2183 mlx5_eswitch_inline_mode_get(struct mlx5_eswitch *esw, u8 *mode) mlx5_eswitch_inline_mode_get() argument
2221 esw_destroy_restore_table(struct mlx5_eswitch *esw) esw_destroy_restore_table() argument
2233 esw_create_restore_table(struct mlx5_eswitch *esw) esw_create_restore_table() argument
2324 esw_offloads_start(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_offloads_start() argument
2349 mlx5_esw_offloads_rep_init(struct mlx5_eswitch *esw, const struct mlx5_vport *vport) mlx5_esw_offloads_rep_init() argument
2375 mlx5_esw_offloads_rep_cleanup(struct mlx5_eswitch *esw, struct mlx5_eswitch_rep *rep) mlx5_esw_offloads_rep_cleanup() argument
2382 esw_offloads_cleanup_reps(struct mlx5_eswitch *esw) esw_offloads_cleanup_reps() argument
2392 esw_offloads_init_reps(struct mlx5_eswitch *esw) esw_offloads_init_reps() argument
2416 struct mlx5_eswitch *esw = dev->priv.eswitch; esw_port_metadata_set() local
2471 esw_offloads_init(struct mlx5_eswitch *esw) esw_offloads_init() argument
2492 esw_offloads_cleanup(struct mlx5_eswitch *esw) esw_offloads_cleanup() argument
2500 __esw_offloads_unload_rep(struct mlx5_eswitch *esw, struct mlx5_eswitch_rep *rep, u8 rep_type) __esw_offloads_unload_rep() argument
2508 __unload_reps_all_vport(struct mlx5_eswitch *esw, u8 rep_type) __unload_reps_all_vport() argument
2517 mlx5_esw_offloads_rep_load(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_rep_load() argument
2541 mlx5_esw_offloads_rep_unload(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_rep_unload() argument
2551 mlx5_esw_offloads_init_pf_vf_rep(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_init_pf_vf_rep() argument
2559 mlx5_esw_offloads_cleanup_pf_vf_rep(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_cleanup_pf_vf_rep() argument
2567 mlx5_esw_offloads_init_sf_rep(struct mlx5_eswitch *esw, struct mlx5_vport *vport, struct mlx5_devlink_port *dl_port, u32 controller, u32 sfnum) mlx5_esw_offloads_init_sf_rep() argument
2574 mlx5_esw_offloads_cleanup_sf_rep(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_cleanup_sf_rep() argument
2579 mlx5_esw_offloads_load_rep(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_load_rep() argument
2600 mlx5_esw_offloads_unload_rep(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_unload_rep() argument
2700 esw_master_egress_create_resources(struct mlx5_eswitch *esw, struct mlx5_flow_namespace *egress_ns, struct mlx5_vport *vport, size_t count) esw_master_egress_create_resources() argument
2779 struct mlx5_eswitch *esw = master->priv.eswitch; esw_set_master_egress_rule() local
2864 mlx5_esw_offloads_rep_event_unpair(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw) mlx5_esw_offloads_rep_event_unpair() argument
2883 mlx5_esw_offloads_unpair(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw) mlx5_esw_offloads_unpair() argument
2893 mlx5_esw_offloads_pair(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw) mlx5_esw_offloads_pair() argument
2925 mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw, bool pair) mlx5_esw_offloads_set_ns_peer() argument
2960 struct mlx5_eswitch *esw = my_data; mlx5_esw_offloads_devcom_event() local
3036 mlx5_esw_offloads_devcom_init(struct mlx5_eswitch *esw, u64 key) mlx5_esw_offloads_devcom_init() argument
3067 mlx5_esw_offloads_devcom_cleanup(struct mlx5_eswitch *esw) mlx5_esw_offloads_devcom_cleanup() argument
3082 mlx5_esw_offloads_devcom_is_ready(struct mlx5_eswitch *esw) mlx5_esw_offloads_devcom_is_ready() argument
3087 mlx5_esw_vport_match_metadata_supported(const struct mlx5_eswitch *esw) mlx5_esw_vport_match_metadata_supported() argument
3107 mlx5_esw_match_metadata_reserved(struct mlx5_eswitch *esw) mlx5_esw_match_metadata_reserved() argument
3112 mlx5_esw_match_metadata_alloc(struct mlx5_eswitch *esw) mlx5_esw_match_metadata_alloc() argument
3136 mlx5_esw_match_metadata_free(struct mlx5_eswitch *esw, u32 metadata) mlx5_esw_match_metadata_free() argument
3144 esw_offloads_vport_metadata_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_offloads_vport_metadata_setup() argument
3156 esw_offloads_vport_metadata_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_offloads_vport_metadata_cleanup() argument
3169 esw_offloads_metadata_uninit(struct mlx5_eswitch *esw) esw_offloads_metadata_uninit() argument
3181 esw_offloads_metadata_init(struct mlx5_eswitch *esw) esw_offloads_metadata_init() argument
3204 esw_vport_create_offloads_acl_tables(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_create_offloads_acl_tables() argument
3225 esw_vport_destroy_offloads_acl_tables(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_destroy_offloads_acl_tables() argument
3232 esw_create_offloads_acl_tables(struct mlx5_eswitch *esw) esw_create_offloads_acl_tables() argument
3262 esw_destroy_offloads_acl_tables(struct mlx5_eswitch *esw) esw_destroy_offloads_acl_tables() argument
3275 mlx5_eswitch_reload_reps(struct mlx5_eswitch *esw) mlx5_eswitch_reload_reps() argument
3300 esw_offloads_steering_init(struct mlx5_eswitch *esw) esw_offloads_steering_init() argument
3366 esw_offloads_steering_cleanup(struct mlx5_eswitch *esw) esw_offloads_steering_cleanup() argument
3380 esw_vfs_changed_event_handler(struct mlx5_eswitch *esw, const u32 *out) esw_vfs_changed_event_handler() argument
3416 struct mlx5_eswitch *esw; esw_functions_changed_event_handler() local
3436 struct mlx5_eswitch *esw; mlx5_esw_funcs_changed_handler() local
3453 mlx5_esw_host_number_init(struct mlx5_eswitch *esw) mlx5_esw_host_number_init() argument
3471 mlx5_esw_offloads_controller_valid(const struct mlx5_eswitch *esw, u32 controller) mlx5_esw_offloads_controller_valid() argument
3484 esw_offloads_enable(struct mlx5_eswitch *esw) esw_offloads_enable() argument
3558 esw_offloads_stop(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_offloads_stop() argument
3578 esw_offloads_disable(struct mlx5_eswitch *esw) esw_offloads_disable() argument
3668 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_block_mode() local
3686 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_unblock_mode() local
3700 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_mode_set() local
3760 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_mode_get() local
3769 mlx5_esw_vports_inline_set(struct mlx5_eswitch *esw, u8 mlx5_mode, struct netlink_ext_ack *extack) mlx5_esw_vports_inline_set() argument
3823 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_inline_mode_set() local
3879 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_inline_mode_get() local
3890 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_block_encap() local
3909 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_unblock_encap() local
3924 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_encap_mode_set() local
3994 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_encap_mode_get() local
4005 mlx5_eswitch_vport_has_rep(const struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_vport_has_rep() argument
4019 mlx5_eswitch_register_vport_reps(struct mlx5_eswitch *esw, const struct mlx5_eswitch_rep_ops *ops, u8 rep_type) mlx5_eswitch_register_vport_reps() argument
4038 mlx5_eswitch_unregister_vport_reps(struct mlx5_eswitch *esw, u8 rep_type) mlx5_eswitch_unregister_vport_reps() argument
4051 mlx5_eswitch_get_uplink_priv(struct mlx5_eswitch *esw, u8 rep_type) mlx5_eswitch_get_uplink_priv() argument
4059 mlx5_eswitch_get_proto_dev(struct mlx5_eswitch *esw, u16 vport, u8 rep_type) mlx5_eswitch_get_proto_dev() argument
4074 mlx5_eswitch_uplink_get_proto_dev(struct mlx5_eswitch *esw, u8 rep_type) mlx5_eswitch_uplink_get_proto_dev() argument
4080 mlx5_eswitch_vport_rep(struct mlx5_eswitch *esw, u16 vport) mlx5_eswitch_vport_rep() argument
4087 mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_reg_c1_loopback_enabled() argument
4093 mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_vport_match_metadata_enabled() argument
4099 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_get_vport_metadata_for_match() argument
4111 mlx5_esw_query_vport_vhca_id(struct mlx5_eswitch *esw, u16 vport_num, u16 *vhca_id) mlx5_esw_query_vport_vhca_id() argument
4136 mlx5_esw_vport_vhca_id_set(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_vport_vhca_id_set() argument
4162 mlx5_esw_vport_vhca_id_clear(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_vport_vhca_id_clear() argument
4176 mlx5_eswitch_vhca_id_to_vport(struct mlx5_eswitch *esw, u16 vhca_id, u16 *vport_num) mlx5_eswitch_vhca_id_to_vport() argument
4187 mlx5_eswitch_get_vport_metadata_for_set(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_get_vport_metadata_for_set() argument
4203 struct mlx5_eswitch *esw = mlx5_devlink_eswitch_nocheck_get(port->devlink); mlx5_devlink_port_fn_hw_addr_get() local
4217 struct mlx5_eswitch *esw = mlx5_devlink_eswitch_nocheck_get(port->devlink); mlx5_devlink_port_fn_hw_addr_set() local
4226 struct mlx5_eswitch *esw = mlx5_devlink_eswitch_nocheck_get(port->devlink); mlx5_devlink_port_fn_migratable_get() local
4248 struct mlx5_eswitch *esw = mlx5_devlink_eswitch_nocheck_get(port->devlink); mlx5_devlink_port_fn_migratable_set() local
4307 struct mlx5_eswitch *esw = mlx5_devlink_eswitch_nocheck_get(port->devlink); mlx5_devlink_port_fn_roce_get() local
4324 struct mlx5_eswitch *esw = mlx5_devlink_eswitch_nocheck_get(port->devlink); mlx5_devlink_port_fn_roce_set() local
4377 mlx5_eswitch_restore_ipsec_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_esw_flow_attr *esw_attr, int attr_idx) mlx5_eswitch_restore_ipsec_rule() argument
4396 struct mlx5_eswitch *esw; mlx5_devlink_port_fn_ipsec_crypto_get() local
4426 struct mlx5_eswitch *esw; mlx5_devlink_port_fn_ipsec_crypto_set() local
4479 struct mlx5_eswitch *esw; mlx5_devlink_port_fn_ipsec_packet_get() local
4510 struct mlx5_eswitch *esw; mlx5_devlink_port_fn_ipsec_packet_set() local
[all...]
H A Deswitch.h86 #define esw_chains(esw) \
87 ((esw)->fdb_table.offloads.esw_chains_priv)
313 struct mlx5_eswitch *esw; member
364 struct list_head groups; /* Protected by esw->state_lock */
366 /* Protected by esw->state_lock.
389 void esw_offloads_disable(struct mlx5_eswitch *esw);
390 int esw_offloads_enable(struct mlx5_eswitch *esw);
391 void esw_offloads_cleanup(struct mlx5_eswitch *esw);
392 int esw_offloads_init(struct mlx5_eswitch *esw);
395 mlx5_eswitch_add_send_to_vport_meta_rule(struct mlx5_eswitch *esw, u1
581 esw_vst_mode_is_steering(struct mlx5_eswitch *esw) esw_vst_mode_is_steering() argument
616 mlx5_esw_allowed(const struct mlx5_eswitch *esw) mlx5_esw_allowed() argument
629 mlx5_esw_is_manager_vport(const struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_is_manager_vport() argument
634 mlx5_esw_is_owner(struct mlx5_eswitch *esw, u16 vport_num, u16 esw_owner_vhca_id) mlx5_esw_is_owner() argument
665 mlx5_esw_is_fdb_created(struct mlx5_eswitch *esw) mlx5_esw_is_fdb_created() argument
851 mlx5_eswitch_num_vfs(struct mlx5_eswitch *esw) mlx5_eswitch_num_vfs() argument
859 mlx5_eswitch_get_npeers(struct mlx5_eswitch *esw) mlx5_eswitch_get_npeers() argument
867 mlx5_eswitch_get_slow_fdb(struct mlx5_eswitch *esw) mlx5_eswitch_get_slow_fdb() argument
893 mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) mlx5_eswitch_cleanup() argument
894 mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_enable() argument
895 mlx5_eswitch_disable_sriov(struct mlx5_eswitch *esw, bool clear_vf) mlx5_eswitch_disable_sriov() argument
896 mlx5_eswitch_disable(struct mlx5_eswitch *esw) mlx5_eswitch_disable() argument
897 mlx5_esw_offloads_devcom_init(struct mlx5_eswitch *esw, u64 key) mlx5_esw_offloads_devcom_init() argument
898 mlx5_esw_offloads_devcom_cleanup(struct mlx5_eswitch *esw) mlx5_esw_offloads_devcom_cleanup() argument
899 mlx5_esw_offloads_devcom_is_ready(struct mlx5_eswitch *esw) mlx5_esw_offloads_devcom_is_ready() argument
902 mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw, u16 vport, int link_state) mlx5_eswitch_set_vport_state() argument
909 esw_add_restore_rule(struct mlx5_eswitch *esw, u32 tag) esw_add_restore_rule() argument
932 mlx5_eswitch_get_npeers(struct mlx5_eswitch *esw) mlx5_eswitch_get_npeers() argument
935 mlx5_eswitch_reload_reps(struct mlx5_eswitch *esw) mlx5_eswitch_reload_reps() argument
[all...]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/
H A Deswitch_offloads.c41 #include "esw/acl/ofld.h"
86 esw_vport_tbl_create(struct mlx5_eswitch *esw, struct mlx5_flow_namespace *ns) in esw_vport_tbl_create() argument
96 esw_warn(esw->dev, "Failed to create per vport FDB Table err %ld\n", in esw_vport_tbl_create()
103 static u32 flow_attr_to_vport_key(struct mlx5_eswitch *esw, in flow_attr_to_vport_key() argument
110 key->vhca_id = MLX5_CAP_GEN(esw->dev, vhca_id); in flow_attr_to_vport_key()
116 esw_vport_tbl_lookup(struct mlx5_eswitch *esw, struct mlx5_vport_key *skey, u32 key) in esw_vport_tbl_lookup() argument
120 hash_for_each_possible(esw->fdb_table.offloads.vports.table, e, hlist, key) in esw_vport_tbl_lookup()
128 esw_vport_tbl_put(struct mlx5_eswitch *esw, struct mlx5_vport_tbl_attr *attr) in esw_vport_tbl_put() argument
134 mutex_lock(&esw->fdb_table.offloads.vports.lock); in esw_vport_tbl_put()
135 hkey = flow_attr_to_vport_key(esw, att in esw_vport_tbl_put()
148 esw_vport_tbl_get(struct mlx5_eswitch *esw, struct mlx5_vport_tbl_attr *attr) esw_vport_tbl_get() argument
197 mlx5_esw_vport_tbl_get(struct mlx5_eswitch *esw) mlx5_esw_vport_tbl_get() argument
219 mlx5_esw_vport_tbl_put(struct mlx5_eswitch *esw) mlx5_esw_vport_tbl_put() argument
235 mlx5_eswitch_get_rep(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_get_rep() argument
245 mlx5_eswitch_set_rule_flow_source(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_esw_flow_attr *attr) mlx5_eswitch_set_rule_flow_source() argument
258 mlx5_eswitch_set_rule_source_port(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_esw_flow_attr *attr) mlx5_eswitch_set_rule_source_port() argument
299 mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_flow_attr *attr) mlx5_eswitch_add_offloaded_rule() argument
444 mlx5_eswitch_add_fwd_rule(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_flow_attr *attr) mlx5_eswitch_add_fwd_rule() argument
513 __mlx5_eswitch_del_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_flow_attr *attr, bool fwd_rule) __mlx5_eswitch_del_rule() argument
556 mlx5_eswitch_del_offloaded_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_flow_attr *attr) mlx5_eswitch_del_offloaded_rule() argument
564 mlx5_eswitch_del_fwd_rule(struct mlx5_eswitch *esw, struct mlx5_flow_handle *rule, struct mlx5_flow_attr *attr) mlx5_eswitch_del_fwd_rule() argument
571 esw_set_global_vlan_pop(struct mlx5_eswitch *esw, u8 val) esw_set_global_vlan_pop() argument
642 mlx5_eswitch_add_vlan_action(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) mlx5_eswitch_add_vlan_action() argument
711 mlx5_eswitch_del_vlan_action(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr) mlx5_eswitch_del_vlan_action() argument
769 mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw, u16 vport, u32 sqn) mlx5_eswitch_add_send_to_vport_rule() argument
813 mlx5_eswitch_reg_c1_loopback_supported(struct mlx5_eswitch *esw) mlx5_eswitch_reg_c1_loopback_supported() argument
819 esw_set_passing_vport_metadata(struct mlx5_eswitch *esw, bool enable) esw_set_passing_vport_metadata() argument
864 peer_miss_rules_setup(struct mlx5_eswitch *esw, struct mlx5_core_dev *peer_dev, struct mlx5_flow_spec *spec, struct mlx5_flow_destination *dest) peer_miss_rules_setup() argument
900 esw_set_peer_miss_rule_source_port(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw, struct mlx5_flow_spec *spec, u16 vport) esw_set_peer_miss_rule_source_port() argument
920 esw_add_fdb_peer_miss_rules(struct mlx5_eswitch *esw, struct mlx5_core_dev *peer_dev) esw_add_fdb_peer_miss_rules() argument
1010 esw_del_fdb_peer_miss_rules(struct mlx5_eswitch *esw) esw_del_fdb_peer_miss_rules() argument
1030 esw_add_fdb_miss_rule(struct mlx5_eswitch *esw) esw_add_fdb_miss_rule() argument
1091 esw_add_restore_rule(struct mlx5_eswitch *esw, u32 tag) esw_add_restore_rule() argument
1138 esw_get_max_restore_tag(struct mlx5_eswitch *esw) esw_get_max_restore_tag() argument
1146 esw_set_flow_group_source_port(struct mlx5_eswitch *esw, u32 *flow_group_in) esw_set_flow_group_source_port() argument
1174 esw_init_chains_offload_flags(struct mlx5_eswitch *esw, u32 *flags) esw_init_chains_offload_flags() argument
1205 esw_chains_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *miss_fdb) esw_chains_create() argument
1270 esw_chains_destroy(struct mlx5_eswitch *esw, struct mlx5_fs_chains *chains) esw_chains_destroy() argument
1282 esw_chains_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *miss_fdb) esw_chains_create() argument
1286 esw_chains_destroy(struct mlx5_eswitch *esw, struct mlx5_fs_chains *chains) esw_chains_destroy() argument
1291 esw_create_offloads_fdb_tables(struct mlx5_eswitch *esw) esw_create_offloads_fdb_tables() argument
1453 esw_destroy_offloads_fdb_tables(struct mlx5_eswitch *esw) esw_destroy_offloads_fdb_tables() argument
1474 esw_create_offloads_table(struct mlx5_eswitch *esw) esw_create_offloads_table() argument
1502 esw_destroy_offloads_table(struct mlx5_eswitch *esw) esw_destroy_offloads_table() argument
1509 esw_create_vport_rx_group(struct mlx5_eswitch *esw) esw_create_vport_rx_group() argument
1542 esw_destroy_vport_rx_group(struct mlx5_eswitch *esw) esw_destroy_vport_rx_group() argument
1548 mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, u16 vport, struct mlx5_flow_destination *dest) mlx5_eswitch_create_vport_rx_rule() argument
1596 mlx5_eswitch_inline_mode_get(const struct mlx5_eswitch *esw, u8 *mode) mlx5_eswitch_inline_mode_get() argument
1633 esw_destroy_restore_table(struct mlx5_eswitch *esw) esw_destroy_restore_table() argument
1645 esw_create_restore_table(struct mlx5_eswitch *esw) esw_create_restore_table() argument
1737 esw_offloads_start(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_offloads_start() argument
1766 esw_offloads_cleanup_reps(struct mlx5_eswitch *esw) esw_offloads_cleanup_reps() argument
1771 esw_offloads_init_reps(struct mlx5_eswitch *esw) esw_offloads_init_reps() argument
1796 __esw_offloads_unload_rep(struct mlx5_eswitch *esw, struct mlx5_eswitch_rep *rep, u8 rep_type) __esw_offloads_unload_rep() argument
1804 __unload_reps_all_vport(struct mlx5_eswitch *esw, u8 rep_type) __unload_reps_all_vport() argument
1826 mlx5_esw_offloads_rep_load(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_rep_load() argument
1850 mlx5_esw_offloads_rep_unload(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_rep_unload() argument
1860 esw_offloads_load_rep(struct mlx5_eswitch *esw, u16 vport_num) esw_offloads_load_rep() argument
1881 esw_offloads_unload_rep(struct mlx5_eswitch *esw, u16 vport_num) esw_offloads_unload_rep() argument
1893 mlx5_esw_offloads_pair(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw) mlx5_esw_offloads_pair() argument
1905 mlx5_esw_offloads_unpair(struct mlx5_eswitch *esw) mlx5_esw_offloads_unpair() argument
1913 mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw, bool pair) mlx5_esw_offloads_set_ns_peer() argument
1946 struct mlx5_eswitch *esw = my_data; mlx5_esw_offloads_devcom_event() local
1994 esw_offloads_devcom_init(struct mlx5_eswitch *esw) esw_offloads_devcom_init() argument
2014 esw_offloads_devcom_cleanup(struct mlx5_eswitch *esw) esw_offloads_devcom_cleanup() argument
2028 esw_check_vport_match_metadata_supported(const struct mlx5_eswitch *esw) esw_check_vport_match_metadata_supported() argument
2043 mlx5_esw_match_metadata_alloc(struct mlx5_eswitch *esw) mlx5_esw_match_metadata_alloc() argument
2064 mlx5_esw_match_metadata_free(struct mlx5_eswitch *esw, u32 metadata) mlx5_esw_match_metadata_free() argument
2072 esw_offloads_vport_metadata_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_offloads_vport_metadata_setup() argument
2080 esw_offloads_vport_metadata_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_offloads_vport_metadata_cleanup() argument
2090 esw_offloads_metadata_uninit(struct mlx5_eswitch *esw) esw_offloads_metadata_uninit() argument
2102 esw_offloads_metadata_init(struct mlx5_eswitch *esw) esw_offloads_metadata_init() argument
2125 esw_vport_create_offloads_acl_tables(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_create_offloads_acl_tables() argument
2146 esw_vport_destroy_offloads_acl_tables(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_destroy_offloads_acl_tables() argument
2153 esw_create_uplink_offloads_acl_tables(struct mlx5_eswitch *esw) esw_create_uplink_offloads_acl_tables() argument
2161 esw_destroy_uplink_offloads_acl_tables(struct mlx5_eswitch *esw) esw_destroy_uplink_offloads_acl_tables() argument
2169 esw_offloads_steering_init(struct mlx5_eswitch *esw) esw_offloads_steering_init() argument
2212 esw_offloads_steering_cleanup(struct mlx5_eswitch *esw) esw_offloads_steering_cleanup() argument
2223 esw_vfs_changed_event_handler(struct mlx5_eswitch *esw, const u32 *out) esw_vfs_changed_event_handler() argument
2253 struct mlx5_eswitch *esw; esw_functions_changed_event_handler() local
2273 struct mlx5_eswitch *esw; mlx5_esw_funcs_changed_handler() local
2290 mlx5_esw_host_number_init(struct mlx5_eswitch *esw) mlx5_esw_host_number_init() argument
2308 esw_offloads_enable(struct mlx5_eswitch *esw) esw_offloads_enable() argument
2373 esw_offloads_stop(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_offloads_stop() argument
2394 esw_offloads_disable(struct mlx5_eswitch *esw) esw_offloads_disable() argument
2484 eswitch_devlink_esw_mode_check(const struct mlx5_eswitch *esw) eswitch_devlink_esw_mode_check() argument
2497 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_mode_set() local
2526 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_mode_get() local
2549 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_inline_mode_set() local
2614 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_inline_mode_get() local
2637 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_encap_mode_set() local
2697 struct mlx5_eswitch *esw; mlx5_devlink_eswitch_encap_mode_get() local
2717 mlx5_eswitch_vport_has_rep(const struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_vport_has_rep() argument
2731 mlx5_eswitch_register_vport_reps(struct mlx5_eswitch *esw, const struct mlx5_eswitch_rep_ops *ops, u8 rep_type) mlx5_eswitch_register_vport_reps() argument
2749 mlx5_eswitch_unregister_vport_reps(struct mlx5_eswitch *esw, u8 rep_type) mlx5_eswitch_unregister_vport_reps() argument
2762 mlx5_eswitch_get_uplink_priv(struct mlx5_eswitch *esw, u8 rep_type) mlx5_eswitch_get_uplink_priv() argument
2770 mlx5_eswitch_get_proto_dev(struct mlx5_eswitch *esw, u16 vport, u8 rep_type) mlx5_eswitch_get_proto_dev() argument
2785 mlx5_eswitch_uplink_get_proto_dev(struct mlx5_eswitch *esw, u8 rep_type) mlx5_eswitch_uplink_get_proto_dev() argument
2791 mlx5_eswitch_vport_rep(struct mlx5_eswitch *esw, u16 vport) mlx5_eswitch_vport_rep() argument
2798 mlx5_eswitch_is_vf_vport(const struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_is_vf_vport() argument
2804 mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_reg_c1_loopback_enabled() argument
2810 mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_vport_match_metadata_enabled() argument
2816 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_get_vport_metadata_for_match() argument
[all...]
H A Deswitch.c39 #include "esw/acl/lgcy.h"
65 static void esw_destroy_legacy_fdb_table(struct mlx5_eswitch *esw);
66 static void esw_cleanup_vepa_rules(struct mlx5_eswitch *esw);
92 mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num) in mlx5_eswitch_get_vport() argument
96 if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager)) in mlx5_eswitch_get_vport()
99 idx = mlx5_eswitch_vport_num_to_index(esw, vport_num); in mlx5_eswitch_get_vport()
101 if (idx > esw->total_vports - 1) { in mlx5_eswitch_get_vport()
102 esw_debug(esw->dev, "vport out of range: num(0x%x), idx(0x%x)\n", in mlx5_eswitch_get_vport()
107 return &esw in mlx5_eswitch_get_vport()
187 __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u16 vport, bool rx_rule, u8 mac_c[ETH_ALEN], u8 mac_v[ETH_ALEN]) __esw_fdb_set_vport_rule() argument
250 esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u16 vport) esw_fdb_set_vport_rule() argument
259 esw_fdb_set_vport_allmulti_rule(struct mlx5_eswitch *esw, u16 vport) esw_fdb_set_vport_allmulti_rule() argument
272 esw_fdb_set_vport_promisc_rule(struct mlx5_eswitch *esw, u16 vport) esw_fdb_set_vport_promisc_rule() argument
287 esw_create_legacy_vepa_table(struct mlx5_eswitch *esw) esw_create_legacy_vepa_table() argument
316 esw_create_legacy_fdb_table(struct mlx5_eswitch *esw) esw_create_legacy_fdb_table() argument
411 esw_destroy_legacy_vepa_table(struct mlx5_eswitch *esw) esw_destroy_legacy_vepa_table() argument
421 esw_destroy_legacy_fdb_table(struct mlx5_eswitch *esw) esw_destroy_legacy_fdb_table() argument
441 esw_create_legacy_table(struct mlx5_eswitch *esw) esw_create_legacy_table() argument
458 esw_destroy_legacy_table(struct mlx5_eswitch *esw) esw_destroy_legacy_table() argument
469 esw_legacy_enable(struct mlx5_eswitch *esw) esw_legacy_enable() argument
487 esw_legacy_disable(struct mlx5_eswitch *esw) esw_legacy_disable() argument
504 esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_add_uc_addr() argument
536 esw_del_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_del_uc_addr() argument
563 update_allmulti_vports(struct mlx5_eswitch *esw, struct vport_addr *vaddr, struct esw_mc_addr *esw_mc) update_allmulti_vports() argument
611 esw_add_mc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_add_mc_addr() argument
651 esw_del_mc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) esw_del_mc_addr() argument
694 esw_apply_vport_addr_list(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int list_type) esw_apply_vport_addr_list() argument
728 esw_update_vport_addr_list(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int list_type) esw_update_vport_addr_list() argument
815 esw_update_vport_mc_promisc(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_update_vport_mc_promisc() argument
850 esw_apply_vport_rx_mode(struct mlx5_eswitch *esw, struct mlx5_vport *vport, bool promisc, bool mc_promisc) esw_apply_vport_rx_mode() argument
893 esw_update_vport_rx_mode(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_update_vport_rx_mode() argument
924 struct mlx5_eswitch *esw = dev->priv.eswitch; esw_vport_change_handle_locked() local
958 struct mlx5_eswitch *esw = vport->dev->priv.eswitch; esw_vport_change_handler() local
965 element_type_supported(struct mlx5_eswitch *esw, int type) element_type_supported() argument
987 esw_create_tsar(struct mlx5_eswitch *esw) esw_create_tsar() argument
1021 esw_destroy_tsar(struct mlx5_eswitch *esw) esw_destroy_tsar() argument
1037 esw_vport_enable_qos(struct mlx5_eswitch *esw, struct mlx5_vport *vport, u32 initial_max_rate, u32 initial_bw_share) esw_vport_enable_qos() argument
1078 esw_vport_disable_qos(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_disable_qos() argument
1096 esw_vport_qos_config(struct mlx5_eswitch *esw, struct mlx5_vport *vport, u32 max_rate, u32 bw_share) esw_vport_qos_config() argument
1139 mlx5_esw_modify_vport_rate(struct mlx5_eswitch *esw, u16 vport_num, u32 rate_mbps) mlx5_esw_modify_vport_rate() argument
1171 esw_vport_create_legacy_acl_tables(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_create_legacy_acl_tables() argument
1196 esw_vport_setup_acl(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_setup_acl() argument
1205 esw_vport_destroy_legacy_acl_tables(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_destroy_legacy_acl_tables() argument
1216 esw_vport_cleanup_acl(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_cleanup_acl() argument
1225 esw_vport_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_setup() argument
1263 esw_vport_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_vport_cleanup() argument
1277 esw_enable_vport(struct mlx5_eswitch *esw, u16 vport_num, enum mlx5_eswitch_vport_event enabled_events) esw_enable_vport() argument
1320 esw_disable_vport(struct mlx5_eswitch *esw, u16 vport_num) esw_disable_vport() argument
1353 struct mlx5_eswitch *esw = mlx5_nb_cof(nb, struct mlx5_eswitch, nb); eswitch_vport_event() local
1395 mlx5_eswitch_event_handlers_register(struct mlx5_eswitch *esw) mlx5_eswitch_event_handlers_register() argument
1407 mlx5_eswitch_event_handlers_unregister(struct mlx5_eswitch *esw) mlx5_eswitch_event_handlers_unregister() argument
1417 mlx5_eswitch_clear_vf_vports_info(struct mlx5_eswitch *esw) mlx5_eswitch_clear_vf_vports_info() argument
1432 mlx5_eswitch_load_vport(struct mlx5_eswitch *esw, u16 vport_num, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_load_vport() argument
1452 mlx5_eswitch_unload_vport(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_unload_vport() argument
1458 mlx5_eswitch_unload_vf_vports(struct mlx5_eswitch *esw, u16 num_vfs) mlx5_eswitch_unload_vf_vports() argument
1466 mlx5_eswitch_load_vf_vports(struct mlx5_eswitch *esw, u16 num_vfs, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_load_vf_vports() argument
1489 mlx5_eswitch_enable_pf_vf_vports(struct mlx5_eswitch *esw, enum mlx5_eswitch_vport_event enabled_events) mlx5_eswitch_enable_pf_vf_vports() argument
1525 mlx5_eswitch_disable_pf_vf_vports(struct mlx5_eswitch *esw) mlx5_eswitch_disable_pf_vf_vports() argument
1535 mlx5_eswitch_get_devlink_param(struct mlx5_eswitch *esw) mlx5_eswitch_get_devlink_param() argument
1555 mlx5_eswitch_update_num_of_vfs(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_update_num_of_vfs() argument
1595 mlx5_eswitch_enable_locked(struct mlx5_eswitch *esw, int mode, int num_vfs) mlx5_eswitch_enable_locked() argument
1660 mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_enable() argument
1683 mlx5_eswitch_disable_locked(struct mlx5_eswitch *esw, bool clear_vf) mlx5_eswitch_disable_locked() argument
1718 mlx5_eswitch_disable(struct mlx5_eswitch *esw, bool clear_vf) mlx5_eswitch_disable() argument
1731 struct mlx5_eswitch *esw; mlx5_eswitch_init() local
1807 mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) mlx5_eswitch_cleanup() argument
1828 mlx5_esw_set_vport_mac_locked(struct mlx5_eswitch *esw, struct mlx5_vport *evport, const u8 *mac) mlx5_esw_set_vport_mac_locked() argument
1866 mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw, u16 vport, const u8 *mac) mlx5_eswitch_set_vport_mac() argument
1882 is_port_function_supported(const struct mlx5_eswitch *esw, u16 vport_num) is_port_function_supported() argument
1893 struct mlx5_eswitch *esw; mlx5_devlink_port_function_hw_addr_get() local
1927 struct mlx5_eswitch *esw; mlx5_devlink_port_function_hw_addr_set() local
1958 mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw, u16 vport, int link_state) mlx5_eswitch_set_vport_state() argument
1992 mlx5_eswitch_get_vport_config(struct mlx5_eswitch *esw, u16 vport, struct ifla_vf_info *ivi) mlx5_eswitch_get_vport_config() argument
2017 __mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw, u16 vport, u16 vlan, u8 qos, u8 set_flags) __mlx5_eswitch_set_vport_vlan() argument
2044 mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw, u16 vport, u16 vlan, u8 qos) mlx5_eswitch_set_vport_vlan() argument
2063 mlx5_eswitch_set_vport_spoofchk(struct mlx5_eswitch *esw, u16 vport, bool spoofchk) mlx5_eswitch_set_vport_spoofchk() argument
2091 esw_cleanup_vepa_rules(struct mlx5_eswitch *esw) esw_cleanup_vepa_rules() argument
2103 _mlx5_eswitch_set_vepa_locked(struct mlx5_eswitch *esw, u8 setting) _mlx5_eswitch_set_vepa_locked() argument
2166 mlx5_eswitch_set_vepa(struct mlx5_eswitch *esw, u8 setting) mlx5_eswitch_set_vepa() argument
2189 mlx5_eswitch_get_vepa(struct mlx5_eswitch *esw, u8 *setting) mlx5_eswitch_get_vepa() argument
2204 mlx5_eswitch_set_vport_trust(struct mlx5_eswitch *esw, u16 vport, bool setting) mlx5_eswitch_set_vport_trust() argument
2223 calculate_vports_min_rate_divider(struct mlx5_eswitch *esw) calculate_vports_min_rate_divider() argument
2241 normalize_vports_min_rate(struct mlx5_eswitch *esw) normalize_vports_min_rate() argument
2278 mlx5_eswitch_set_vport_rate(struct mlx5_eswitch *esw, u16 vport, u32 max_rate, u32 min_rate) mlx5_eswitch_set_vport_rate() argument
2331 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_eswitch_query_vport_drop_stats() local
2371 mlx5_eswitch_get_vport_stats(struct mlx5_eswitch *esw, u16 vport_num, struct ifla_vf_stats *vf_stats) mlx5_eswitch_get_vport_stats() argument
2449 mlx5_eswitch_mode(struct mlx5_eswitch *esw) mlx5_eswitch_mode() argument
2458 struct mlx5_eswitch *esw; mlx5_eswitch_get_encap_mode() local
[all...]
H A Deswitch.h66 #define esw_chains(esw) \
67 ((esw)->fdb_table.offloads.esw_chains_priv)
231 struct mlx5_eswitch *esw; member
282 void esw_offloads_disable(struct mlx5_eswitch *esw);
283 int esw_offloads_enable(struct mlx5_eswitch *esw);
284 void esw_offloads_cleanup_reps(struct mlx5_eswitch *esw);
285 int esw_offloads_init_reps(struct mlx5_eswitch *esw);
287 u32 mlx5_esw_match_metadata_alloc(struct mlx5_eswitch *esw);
288 void mlx5_esw_match_metadata_free(struct mlx5_eswitch *esw, u32 metadata);
290 int mlx5_esw_modify_vport_rate(struct mlx5_eswitch *esw, u1
447 mlx5_esw_qos_enabled(struct mlx5_eswitch *esw) mlx5_esw_qos_enabled() argument
491 mlx5_esw_is_manager_vport(const struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_is_manager_vport() argument
507 mlx5_eswitch_uplink_idx(struct mlx5_eswitch *esw) mlx5_eswitch_uplink_idx() argument
513 mlx5_eswitch_ecpf_idx(struct mlx5_eswitch *esw) mlx5_eswitch_ecpf_idx() argument
518 mlx5_eswitch_vport_num_to_index(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_vport_num_to_index() argument
533 mlx5_eswitch_index_to_vport_num(struct mlx5_eswitch *esw, int index) mlx5_eswitch_index_to_vport_num() argument
673 mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) mlx5_eswitch_cleanup() argument
674 mlx5_eswitch_enable(struct mlx5_eswitch *esw, int num_vfs) mlx5_eswitch_enable() argument
675 mlx5_eswitch_disable(struct mlx5_eswitch *esw, bool clear_vf) mlx5_eswitch_disable() argument
679 mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw, u16 vport, int link_state) mlx5_eswitch_set_vport_state() argument
686 esw_add_restore_rule(struct mlx5_eswitch *esw, u32 tag) esw_add_restore_rule() argument
[all...]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/
H A Dlegacy.c9 #include "esw/acl/lgcy.h"
10 #include "esw/legacy.h"
15 #include "esw/qos.h"
22 static int esw_create_legacy_vepa_table(struct mlx5_eswitch *esw) in esw_create_legacy_vepa_table() argument
25 struct mlx5_core_dev *dev = esw->dev; in esw_create_legacy_vepa_table()
46 esw->fdb_table.legacy.vepa_fdb = fdb; in esw_create_legacy_vepa_table()
51 static void esw_destroy_legacy_fdb_table(struct mlx5_eswitch *esw) in esw_destroy_legacy_fdb_table() argument
53 esw_debug(esw->dev, "Destroy FDB Table\n"); in esw_destroy_legacy_fdb_table()
54 if (!esw->fdb_table.legacy.fdb) in esw_destroy_legacy_fdb_table()
57 if (esw in esw_destroy_legacy_fdb_table()
72 esw_create_legacy_fdb_table(struct mlx5_eswitch *esw) esw_create_legacy_fdb_table() argument
167 esw_destroy_legacy_vepa_table(struct mlx5_eswitch *esw) esw_destroy_legacy_vepa_table() argument
177 esw_create_legacy_table(struct mlx5_eswitch *esw) esw_create_legacy_table() argument
195 esw_cleanup_vepa_rules(struct mlx5_eswitch *esw) esw_cleanup_vepa_rules() argument
207 esw_destroy_legacy_table(struct mlx5_eswitch *esw) esw_destroy_legacy_table() argument
218 esw_legacy_enable(struct mlx5_eswitch *esw) esw_legacy_enable() argument
237 esw_legacy_disable(struct mlx5_eswitch *esw) esw_legacy_disable() argument
250 _mlx5_eswitch_set_vepa_locked(struct mlx5_eswitch *esw, u8 setting) _mlx5_eswitch_set_vepa_locked() argument
311 mlx5_eswitch_set_vepa(struct mlx5_eswitch *esw, u8 setting) mlx5_eswitch_set_vepa() argument
334 mlx5_eswitch_get_vepa(struct mlx5_eswitch *esw, u8 *setting) mlx5_eswitch_get_vepa() argument
349 esw_legacy_vport_acl_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_legacy_vport_acl_setup() argument
373 esw_legacy_vport_acl_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_legacy_vport_acl_cleanup() argument
387 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_esw_query_vport_drop_stats() local
426 mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw, u16 vport, u16 vlan, u8 qos) mlx5_eswitch_set_vport_vlan() argument
454 mlx5_eswitch_set_vport_spoofchk(struct mlx5_eswitch *esw, u16 vport, bool spoofchk) mlx5_eswitch_set_vport_spoofchk() argument
487 mlx5_eswitch_set_vport_trust(struct mlx5_eswitch *esw, u16 vport, bool setting) mlx5_eswitch_set_vport_trust() argument
512 mlx5_eswitch_set_vport_rate(struct mlx5_eswitch *esw, u16 vport, u32 max_rate, u32 min_rate) mlx5_eswitch_set_vport_rate() argument
[all...]
H A Dqos.c5 #include "esw/qos.h"
44 static int esw_qos_group_config(struct mlx5_eswitch *esw, struct mlx5_esw_rate_group *group, in esw_qos_group_config() argument
48 struct mlx5_core_dev *dev = esw->dev; in esw_qos_group_config()
62 static int esw_qos_vport_config(struct mlx5_eswitch *esw, in esw_qos_vport_config() argument
68 struct mlx5_core_dev *dev = esw->dev; in esw_qos_vport_config()
77 esw_warn(esw->dev, in esw_qos_vport_config()
89 static u32 esw_qos_calculate_min_rate_divider(struct mlx5_eswitch *esw, in esw_qos_calculate_min_rate_divider() argument
93 u32 fw_max_bw_share = MLX5_CAP_QOS(esw->dev, max_tsar_bw_share); in esw_qos_calculate_min_rate_divider()
101 list_for_each_entry(group, &esw->qos.groups, list) { in esw_qos_calculate_min_rate_divider()
107 mlx5_esw_for_each_vport(esw, in esw_qos_calculate_min_rate_divider()
134 esw_qos_normalize_vports_min_rate(struct mlx5_eswitch *esw, struct mlx5_esw_rate_group *group, struct netlink_ext_ack *extack) esw_qos_normalize_vports_min_rate() argument
163 esw_qos_normalize_groups_min_rate(struct mlx5_eswitch *esw, u32 divider, struct netlink_ext_ack *extack) esw_qos_normalize_groups_min_rate() argument
195 esw_qos_set_vport_min_rate(struct mlx5_eswitch *esw, struct mlx5_vport *evport, u32 min_rate, struct netlink_ext_ack *extack) esw_qos_set_vport_min_rate() argument
220 esw_qos_set_vport_max_rate(struct mlx5_eswitch *esw, struct mlx5_vport *evport, u32 max_rate, struct netlink_ext_ack *extack) esw_qos_set_vport_max_rate() argument
249 esw_qos_set_group_min_rate(struct mlx5_eswitch *esw, struct mlx5_esw_rate_group *group, u32 min_rate, struct netlink_ext_ack *extack) esw_qos_set_group_min_rate() argument
280 esw_qos_set_group_max_rate(struct mlx5_eswitch *esw, struct mlx5_esw_rate_group *group, u32 max_rate, struct netlink_ext_ack *extack) esw_qos_set_group_max_rate() argument
314 esw_qos_vport_create_sched_element(struct mlx5_eswitch *esw, struct mlx5_vport *vport, u32 max_rate, u32 bw_share) esw_qos_vport_create_sched_element() argument
347 esw_qos_update_group_scheduling_element(struct mlx5_eswitch *esw, struct mlx5_vport *vport, struct mlx5_esw_rate_group *curr_group, struct mlx5_esw_rate_group *new_group, struct netlink_ext_ack *extack) esw_qos_update_group_scheduling_element() argument
389 esw_qos_vport_update_group(struct mlx5_eswitch *esw, struct mlx5_vport *vport, struct mlx5_esw_rate_group *group, struct netlink_ext_ack *extack) esw_qos_vport_update_group() argument
419 __esw_qos_create_rate_group(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) __esw_qos_create_rate_group() argument
470 esw_qos_create_rate_group(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_qos_create_rate_group() argument
489 __esw_qos_destroy_rate_group(struct mlx5_eswitch *esw, struct mlx5_esw_rate_group *group, struct netlink_ext_ack *extack) __esw_qos_destroy_rate_group() argument
516 esw_qos_destroy_rate_group(struct mlx5_eswitch *esw, struct mlx5_esw_rate_group *group, struct netlink_ext_ack *extack) esw_qos_destroy_rate_group() argument
547 esw_qos_create(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_qos_create() argument
597 esw_qos_destroy(struct mlx5_eswitch *esw) esw_qos_destroy() argument
611 esw_qos_get(struct mlx5_eswitch *esw, struct netlink_ext_ack *extack) esw_qos_get() argument
627 esw_qos_put(struct mlx5_eswitch *esw) esw_qos_put() argument
634 esw_qos_vport_enable(struct mlx5_eswitch *esw, struct mlx5_vport *vport, u32 max_rate, u32 bw_share, struct netlink_ext_ack *extack) esw_qos_vport_enable() argument
664 mlx5_esw_qos_vport_disable(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_qos_vport_disable() argument
687 mlx5_esw_qos_set_vport_rate(struct mlx5_eswitch *esw, struct mlx5_vport *vport, u32 max_rate, u32 min_rate) mlx5_esw_qos_set_vport_rate() argument
704 mlx5_esw_qos_modify_vport_rate(struct mlx5_eswitch *esw, u16 vport_num, u32 rate_mbps) mlx5_esw_qos_modify_vport_rate() argument
778 struct mlx5_eswitch *esw; mlx5_esw_devlink_rate_leaf_tx_share_set() local
804 struct mlx5_eswitch *esw; mlx5_esw_devlink_rate_leaf_tx_max_set() local
830 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_esw_devlink_rate_node_tx_share_set() local
848 struct mlx5_eswitch *esw = dev->priv.eswitch; mlx5_esw_devlink_rate_node_tx_max_set() local
866 struct mlx5_eswitch *esw; mlx5_esw_devlink_rate_node_new() local
897 struct mlx5_eswitch *esw; mlx5_esw_devlink_rate_node_del() local
910 mlx5_esw_qos_vport_update_group(struct mlx5_eswitch *esw, struct mlx5_vport *vport, struct mlx5_esw_rate_group *group, struct netlink_ext_ack *extack) mlx5_esw_qos_vport_update_group() argument
[all...]
H A Dvporttbl.c25 esw_vport_tbl_init(struct mlx5_eswitch *esw, struct esw_vport_tbl_namespace *ns) in esw_vport_tbl_init() argument
27 if (esw->offloads.encap != DEVLINK_ESWITCH_ENCAP_MODE_NONE) in esw_vport_tbl_init()
33 esw_vport_tbl_create(struct mlx5_eswitch *esw, struct mlx5_flow_namespace *ns, in esw_vport_tbl_create() argument
42 ft_attr.autogroup.max_num_groups = esw->params.large_group_num; in esw_vport_tbl_create()
48 esw_warn(esw->dev, "Failed to create per vport FDB Table err %ld\n", in esw_vport_tbl_create()
55 static u32 flow_attr_to_vport_key(struct mlx5_eswitch *esw, in flow_attr_to_vport_key() argument
62 key->vhca_id = MLX5_CAP_GEN(esw->dev, vhca_id); in flow_attr_to_vport_key()
69 esw_vport_tbl_lookup(struct mlx5_eswitch *esw, struct mlx5_vport_key *skey, u32 key) in esw_vport_tbl_lookup() argument
73 hash_for_each_possible(esw->fdb_table.offloads.vports.table, e, hlist, key) in esw_vport_tbl_lookup()
81 mlx5_esw_vporttbl_get(struct mlx5_eswitch *esw, struc argument
132 mlx5_esw_vporttbl_put(struct mlx5_eswitch *esw, struct mlx5_vport_tbl_attr *attr) mlx5_esw_vporttbl_put() argument
[all...]
H A Ddevlink_port.c17 static bool mlx5_esw_devlink_port_supported(struct mlx5_eswitch *esw, u16 vport_num) in mlx5_esw_devlink_port_supported() argument
19 return (mlx5_core_is_ecpf(esw->dev) && vport_num == MLX5_VPORT_PF) || in mlx5_esw_devlink_port_supported()
20 mlx5_eswitch_is_vf_vport(esw, vport_num) || in mlx5_esw_devlink_port_supported()
21 mlx5_core_is_ec_vf_vport(esw->dev, vport_num); in mlx5_esw_devlink_port_supported()
24 static void mlx5_esw_offloads_pf_vf_devlink_port_attrs_set(struct mlx5_eswitch *esw, in mlx5_esw_offloads_pf_vf_devlink_port_attrs_set() argument
28 struct mlx5_core_dev *dev = esw->dev; in mlx5_esw_offloads_pf_vf_devlink_port_attrs_set()
44 } else if (mlx5_eswitch_is_vf_vport(esw, vport_num)) { in mlx5_esw_offloads_pf_vf_devlink_port_attrs_set()
49 } else if (mlx5_core_is_ec_vf_vport(esw->dev, vport_num)) { in mlx5_esw_offloads_pf_vf_devlink_port_attrs_set()
57 int mlx5_esw_offloads_pf_vf_devlink_port_init(struct mlx5_eswitch *esw, in mlx5_esw_offloads_pf_vf_devlink_port_init() argument
63 if (!mlx5_esw_devlink_port_supported(esw, vport_nu in mlx5_esw_offloads_pf_vf_devlink_port_init()
78 mlx5_esw_offloads_pf_vf_devlink_port_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_pf_vf_devlink_port_cleanup() argument
103 mlx5_esw_offloads_sf_devlink_port_attrs_set(struct mlx5_eswitch *esw, struct devlink_port *dl_port, u32 controller, u32 sfnum) mlx5_esw_offloads_sf_devlink_port_attrs_set() argument
118 mlx5_esw_offloads_sf_devlink_port_init(struct mlx5_eswitch *esw, struct mlx5_vport *vport, struct mlx5_devlink_port *dl_port, u32 controller, u32 sfnum) mlx5_esw_offloads_sf_devlink_port_init() argument
129 mlx5_esw_offloads_sf_devlink_port_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_sf_devlink_port_cleanup() argument
148 mlx5_esw_offloads_devlink_port_register(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_devlink_port_register() argument
186 mlx5_esw_offloads_devlink_port_unregister(struct mlx5_eswitch *esw, struct mlx5_vport *vport) mlx5_esw_offloads_devlink_port_unregister() argument
200 mlx5_esw_offloads_devlink_port(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_devlink_port() argument
[all...]
H A Dbridge.c44 static bool mlx5_esw_bridge_pkt_reformat_vlan_pop_supported(struct mlx5_eswitch *esw) in mlx5_esw_bridge_pkt_reformat_vlan_pop_supported() argument
46 return BIT(MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, reformat_remove)) && in mlx5_esw_bridge_pkt_reformat_vlan_pop_supported()
47 MLX5_CAP_GEN_2(esw->dev, max_reformat_remove_size) >= sizeof(struct vlan_hdr) && in mlx5_esw_bridge_pkt_reformat_vlan_pop_supported()
48 MLX5_CAP_GEN_2(esw->dev, max_reformat_remove_offset) >= in mlx5_esw_bridge_pkt_reformat_vlan_pop_supported()
53 mlx5_esw_bridge_pkt_reformat_vlan_pop_create(struct mlx5_eswitch *esw) in mlx5_esw_bridge_pkt_reformat_vlan_pop_create() argument
61 return mlx5_packet_reformat_alloc(esw->dev, &reformat_params, MLX5_FLOW_NAMESPACE_FDB); in mlx5_esw_bridge_pkt_reformat_vlan_pop_create()
65 mlx5_esw_bridge_table_create(int max_fte, u32 level, struct mlx5_eswitch *esw) in mlx5_esw_bridge_table_create() argument
68 struct mlx5_core_dev *dev = esw->dev; in mlx5_esw_bridge_table_create()
91 struct mlx5_eswitch *esw, in mlx5_esw_bridge_ingress_vlan_proto_fg_create()
123 esw_warn(esw in mlx5_esw_bridge_ingress_vlan_proto_fg_create()
90 mlx5_esw_bridge_ingress_vlan_proto_fg_create(unsigned int from, unsigned int to, u16 vlan_proto, struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_vlan_proto_fg_create() argument
131 mlx5_esw_bridge_ingress_vlan_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_vlan_fg_create() argument
141 mlx5_esw_bridge_ingress_qinq_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_qinq_fg_create() argument
152 mlx5_esw_bridge_ingress_vlan_proto_filter_fg_create(unsigned int from, unsigned int to, u16 vlan_proto, struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_vlan_proto_filter_fg_create() argument
190 mlx5_esw_bridge_ingress_vlan_filter_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_vlan_filter_fg_create() argument
201 mlx5_esw_bridge_ingress_qinq_filter_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_qinq_filter_fg_create() argument
212 mlx5_esw_bridge_ingress_mac_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *ingress_ft) mlx5_esw_bridge_ingress_mac_fg_create() argument
248 mlx5_esw_bridge_egress_vlan_proto_fg_create(unsigned int from, unsigned int to, u16 vlan_proto, struct mlx5_eswitch *esw, struct mlx5_flow_table *egress_ft) mlx5_esw_bridge_egress_vlan_proto_fg_create() argument
284 mlx5_esw_bridge_egress_vlan_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *egress_ft) mlx5_esw_bridge_egress_vlan_fg_create() argument
293 mlx5_esw_bridge_egress_qinq_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *egress_ft) mlx5_esw_bridge_egress_qinq_fg_create() argument
303 mlx5_esw_bridge_egress_mac_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *egress_ft) mlx5_esw_bridge_egress_mac_fg_create() argument
334 mlx5_esw_bridge_egress_miss_fg_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *egress_ft) mlx5_esw_bridge_egress_miss_fg_create() argument
368 struct mlx5_eswitch *esw = br_offloads->esw; mlx5_esw_bridge_ingress_table_init() local
473 struct mlx5_eswitch *esw = br_offloads->esw; mlx5_esw_bridge_egress_table_init() local
572 mlx5_esw_bridge_ingress_flow_with_esw_create(u16 vport_num, const unsigned char *addr, struct mlx5_esw_bridge_vlan *vlan, u32 counter_id, struct mlx5_esw_bridge *bridge, struct mlx5_eswitch *esw) mlx5_esw_bridge_ingress_flow_with_esw_create() argument
1021 mlx5_esw_bridge_vlan_push_create(u16 vlan_proto, struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_push_create() argument
1058 mlx5_esw_bridge_vlan_push_cleanup(struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_push_cleanup() argument
1065 mlx5_esw_bridge_vlan_pop_create(struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_pop_create() argument
1086 mlx5_esw_bridge_vlan_pop_cleanup(struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_pop_cleanup() argument
1093 mlx5_esw_bridge_vlan_push_mark_create(struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_push_mark_create() argument
1113 mlx5_esw_bridge_vlan_push_mark_cleanup(struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_push_mark_cleanup() argument
1133 mlx5_esw_bridge_vlan_push_pop_create(u16 vlan_proto, u16 flags, struct mlx5_esw_bridge_port *port, struct mlx5_esw_bridge_vlan *vlan, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_push_pop_create() argument
1172 mlx5_esw_bridge_vlan_create(u16 vlan_proto, u16 vid, u16 flags, struct mlx5_esw_bridge_port *port, struct mlx5_eswitch *esw) mlx5_esw_bridge_vlan_create() argument
1221 struct mlx5_eswitch *esw = bridge->br_offloads->esw; mlx5_esw_bridge_vlan_flush() local
1303 mlx5_esw_bridge_port_vlan_lookup(u16 vid, u16 vport_num, u16 esw_owner_vhca_id, struct mlx5_esw_bridge *bridge, struct mlx5_eswitch *esw) mlx5_esw_bridge_port_vlan_lookup() argument
1343 mlx5_esw_bridge_fdb_entry_init(struct net_device *dev, u16 vport_num, u16 esw_owner_vhca_id, const unsigned char *addr, u16 vid, bool added_by_user, bool peer, struct mlx5_eswitch *esw, struct mlx5_esw_bridge *bridge) mlx5_esw_bridge_fdb_entry_init() argument
1515 struct mlx5_eswitch *esw = br_offloads->esw; mlx5_esw_bridge_mcast_set() local
1546 struct mlx5_eswitch *esw = br_offloads->esw; mlx5_esw_bridge_vport_init() local
1806 struct mlx5_eswitch *esw = br_offloads->esw; mlx5_esw_bridge_fdb_remove() local
1918 mlx5_esw_bridge_init(struct mlx5_eswitch *esw) mlx5_esw_bridge_init() argument
1937 mlx5_esw_bridge_cleanup(struct mlx5_eswitch *esw) mlx5_esw_bridge_cleanup() argument
[all...]
H A Dindir_table.c15 #include "esw/indir_table.h"
67 mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw, in mlx5_esw_indir_table_needed() argument
75 vf_sf_vport = mlx5_eswitch_is_vf_vport(esw, vport_num) || in mlx5_esw_indir_table_needed()
76 mlx5_esw_is_sf_vport(esw, vport_num); in mlx5_esw_indir_table_needed()
83 esw->dev == dest_mdev && in mlx5_esw_indir_table_needed()
95 static int mlx5_esw_indir_table_rule_get(struct mlx5_eswitch *esw, in mlx5_esw_indir_table_rule_get() argument
100 struct mlx5_fs_chains *chains = esw_chains(esw); in mlx5_esw_indir_table_rule_get()
119 data = mlx5_eswitch_get_vport_metadata_for_set(esw, esw_attr->rx_tun_attr->decap_vport); in mlx5_esw_indir_table_rule_get()
120 err = mlx5e_tc_match_to_reg_set(esw->dev, &mod_acts, MLX5_FLOW_NAMESPACE_FDB, in mlx5_esw_indir_table_rule_get()
125 err = mlx5e_tc_match_to_reg_set(esw in mlx5_esw_indir_table_rule_get()
171 mlx5_esw_indir_table_rule_put(struct mlx5_eswitch *esw, struct mlx5_esw_indir_table_entry *e) mlx5_esw_indir_table_rule_put() argument
209 mlx5_create_indir_fwd_group(struct mlx5_eswitch *esw, struct mlx5_esw_indir_table_entry *e) mlx5_create_indir_fwd_group() argument
248 mlx5_esw_indir_table_entry_create(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr, u16 vport, bool decap) mlx5_esw_indir_table_entry_create() argument
311 mlx5_esw_indir_table_entry_lookup(struct mlx5_eswitch *esw, u16 vport) mlx5_esw_indir_table_entry_lookup() argument
323 mlx5_esw_indir_table_get(struct mlx5_eswitch *esw, struct mlx5_flow_attr *attr, u16 vport, bool decap) mlx5_esw_indir_table_get() argument
356 mlx5_esw_indir_table_put(struct mlx5_eswitch *esw, u16 vport, bool decap) mlx5_esw_indir_table_put() argument
[all...]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/
H A Dingress_ofld.c10 esw_acl_ingress_prio_tag_enabled(const struct mlx5_eswitch *esw, in esw_acl_ingress_prio_tag_enabled() argument
13 return (MLX5_CAP_GEN(esw->dev, prio_tag_required) && in esw_acl_ingress_prio_tag_enabled()
14 mlx5_eswitch_is_vf_vport(esw, vport->vport)); in esw_acl_ingress_prio_tag_enabled()
17 static int esw_acl_ingress_prio_tag_create(struct mlx5_eswitch *esw, in esw_acl_ingress_prio_tag_create() argument
52 esw_warn(esw->dev, in esw_acl_ingress_prio_tag_create()
62 static int esw_acl_ingress_mod_metadata_create(struct mlx5_eswitch *esw, in esw_acl_ingress_mod_metadata_create() argument
70 key = mlx5_eswitch_get_vport_metadata_for_match(esw, vport->vport); in esw_acl_ingress_mod_metadata_create()
83 mlx5_modify_header_alloc(esw->dev, MLX5_FLOW_NAMESPACE_ESW_INGRESS, in esw_acl_ingress_mod_metadata_create()
87 esw_warn(esw->dev, in esw_acl_ingress_mod_metadata_create()
100 esw_warn(esw in esw_acl_ingress_mod_metadata_create()
109 esw_acl_ingress_mod_metadata_destroy(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_mod_metadata_destroy() argument
120 esw_acl_ingress_ofld_rules_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_rules_create() argument
152 esw_acl_ingress_ofld_rules_destroy(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_rules_destroy() argument
159 esw_acl_ingress_ofld_groups_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_groups_create() argument
241 esw_acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_setup() argument
287 esw_acl_ingress_ofld_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_cleanup() argument
296 mlx5_esw_acl_ingress_vport_bond_update(struct mlx5_eswitch *esw, u16 vport_num, u32 metadata) mlx5_esw_acl_ingress_vport_bond_update() argument
[all...]
H A Degress_ofld.c18 static int esw_acl_egress_ofld_fwd2vport_create(struct mlx5_eswitch *esw, in esw_acl_egress_ofld_fwd2vport_create() argument
25 esw_debug(esw->dev, "vport(%d) configure egress acl rule fwd2vport(%d)\n", in esw_acl_egress_ofld_fwd2vport_create()
38 esw_warn(esw->dev, in esw_acl_egress_ofld_fwd2vport_create()
47 static int esw_acl_egress_ofld_rules_create(struct mlx5_eswitch *esw, in esw_acl_egress_ofld_rules_create() argument
54 if (MLX5_CAP_GEN(esw->dev, prio_tag_required)) { in esw_acl_egress_ofld_rules_create()
59 esw_debug(esw->dev, in esw_acl_egress_ofld_rules_create()
67 err = esw_egress_acl_vlan_create(esw, vport, fwd_dest, 0, action); in esw_acl_egress_ofld_rules_create()
73 err = esw_acl_egress_ofld_fwd2vport_create(esw, vport, fwd_dest); in esw_acl_egress_ofld_rules_create()
92 static int esw_acl_egress_ofld_groups_create(struct mlx5_eswitch *esw, in esw_acl_egress_ofld_groups_create() argument
101 if (MLX5_CAP_GEN(esw in esw_acl_egress_ofld_groups_create()
151 esw_acl_egress_needed(const struct mlx5_eswitch *esw, u16 vport_num) esw_acl_egress_needed() argument
156 esw_acl_egress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_egress_ofld_setup() argument
208 mlx5_esw_acl_egress_vport_bond(struct mlx5_eswitch *esw, u16 active_vport_num, u16 passive_vport_num) mlx5_esw_acl_egress_vport_bond() argument
234 mlx5_esw_acl_egress_vport_unbond(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_acl_egress_vport_unbond() argument
[all...]
H A Dofld.h10 int esw_acl_egress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
12 int mlx5_esw_acl_egress_vport_bond(struct mlx5_eswitch *esw, u16 active_vport_num,
14 int mlx5_esw_acl_egress_vport_unbond(struct mlx5_eswitch *esw, u16 vport_num);
16 static inline bool mlx5_esw_acl_egress_fwd2vport_supported(struct mlx5_eswitch *esw) in mlx5_esw_acl_egress_fwd2vport_supported() argument
18 return esw && esw->mode == MLX5_ESWITCH_OFFLOADS && in mlx5_esw_acl_egress_fwd2vport_supported()
19 mlx5_eswitch_vport_match_metadata_enabled(esw) && in mlx5_esw_acl_egress_fwd2vport_supported()
20 MLX5_CAP_ESW_FLOWTABLE(esw->dev, egress_acl_forward_to_vport); in mlx5_esw_acl_egress_fwd2vport_supported()
24 int esw_acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
25 void esw_acl_ingress_ofld_cleanup(struct mlx5_eswitch *esw, struc
[all...]
H A Degress_lgcy.c18 static int esw_acl_egress_lgcy_groups_create(struct mlx5_eswitch *esw, in esw_acl_egress_lgcy_groups_create() argument
22 struct mlx5_core_dev *dev = esw->dev; in esw_acl_egress_lgcy_groups_create()
27 err = esw_acl_egress_vlan_grp_create(esw, vport); in esw_acl_egress_lgcy_groups_create()
67 int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw, in esw_acl_egress_lgcy_setup() argument
84 } else if (MLX5_CAP_ESW_EGRESS_ACL(esw->dev, flow_counter)) { in esw_acl_egress_lgcy_setup()
85 drop_counter = mlx5_fc_create(esw->dev, false); in esw_acl_egress_lgcy_setup()
87 esw_warn(esw->dev, in esw_acl_egress_lgcy_setup()
98 esw_acl_egress_lgcy_cleanup(esw, vport); in esw_acl_egress_lgcy_setup()
103 vport->egress.acl = esw_acl_table_create(esw, vport->vport, in esw_acl_egress_lgcy_setup()
112 err = esw_acl_egress_lgcy_groups_create(esw, vpor in esw_acl_egress_lgcy_setup()
156 esw_acl_egress_lgcy_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_egress_lgcy_cleanup() argument
[all...]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/
H A Dofld.h11 int esw_acl_egress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
14 int mlx5_esw_acl_egress_vport_bond(struct mlx5_eswitch *esw, u16 active_vport_num,
16 int mlx5_esw_acl_egress_vport_unbond(struct mlx5_eswitch *esw, u16 vport_num);
18 static inline bool mlx5_esw_acl_egress_fwd2vport_supported(struct mlx5_eswitch *esw) in mlx5_esw_acl_egress_fwd2vport_supported() argument
20 return esw && esw->mode == MLX5_ESWITCH_OFFLOADS && in mlx5_esw_acl_egress_fwd2vport_supported()
21 mlx5_eswitch_vport_match_metadata_enabled(esw) && in mlx5_esw_acl_egress_fwd2vport_supported()
22 MLX5_CAP_ESW_FLOWTABLE(esw->dev, egress_acl_forward_to_vport); in mlx5_esw_acl_egress_fwd2vport_supported()
26 int esw_acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
27 void esw_acl_ingress_ofld_cleanup(struct mlx5_eswitch *esw, struc
35 mlx5_esw_acl_ingress_vport_drop_rule_destroy(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_acl_ingress_vport_drop_rule_destroy() argument
39 mlx5_esw_acl_ingress_vport_drop_rule_create(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_acl_ingress_vport_drop_rule_create() argument
[all...]
H A Dingress_ofld.c10 esw_acl_ingress_prio_tag_enabled(struct mlx5_eswitch *esw, in esw_acl_ingress_prio_tag_enabled() argument
13 return (MLX5_CAP_GEN(esw->dev, prio_tag_required) && in esw_acl_ingress_prio_tag_enabled()
14 mlx5_eswitch_is_vf_vport(esw, vport->vport)); in esw_acl_ingress_prio_tag_enabled()
17 static int esw_acl_ingress_prio_tag_create(struct mlx5_eswitch *esw, in esw_acl_ingress_prio_tag_create() argument
52 esw_warn(esw->dev, in esw_acl_ingress_prio_tag_create()
62 static int esw_acl_ingress_mod_metadata_create(struct mlx5_eswitch *esw, in esw_acl_ingress_mod_metadata_create() argument
70 key = mlx5_eswitch_get_vport_metadata_for_match(esw, vport->vport); in esw_acl_ingress_mod_metadata_create()
83 mlx5_modify_header_alloc(esw->dev, MLX5_FLOW_NAMESPACE_ESW_INGRESS, in esw_acl_ingress_mod_metadata_create()
87 esw_warn(esw->dev, in esw_acl_ingress_mod_metadata_create()
101 esw_warn(esw in esw_acl_ingress_mod_metadata_create()
110 esw_acl_ingress_mod_metadata_destroy(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_mod_metadata_destroy() argument
121 esw_acl_ingress_src_port_drop_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_src_port_drop_create() argument
141 esw_acl_ingress_src_port_drop_destroy(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_src_port_drop_destroy() argument
151 esw_acl_ingress_ofld_rules_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_rules_create() argument
183 esw_acl_ingress_ofld_rules_destroy(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_rules_destroy() argument
191 esw_acl_ingress_ofld_groups_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_groups_create() argument
302 esw_acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_setup() argument
350 esw_acl_ingress_ofld_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_ingress_ofld_cleanup() argument
359 mlx5_esw_acl_ingress_vport_metadata_update(struct mlx5_eswitch *esw, u16 vport_num, u32 metadata) mlx5_esw_acl_ingress_vport_metadata_update() argument
386 mlx5_esw_acl_ingress_vport_drop_rule_create(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_acl_ingress_vport_drop_rule_create() argument
398 mlx5_esw_acl_ingress_vport_drop_rule_destroy(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_acl_ingress_vport_drop_rule_destroy() argument
[all...]
H A Degress_ofld.c41 static int esw_acl_egress_ofld_fwd2vport_create(struct mlx5_eswitch *esw, in esw_acl_egress_ofld_fwd2vport_create() argument
48 esw_debug(esw->dev, "vport(%d) configure egress acl rule fwd2vport(%d)\n", in esw_acl_egress_ofld_fwd2vport_create()
61 esw_warn(esw->dev, in esw_acl_egress_ofld_fwd2vport_create()
70 static int esw_acl_egress_ofld_rules_create(struct mlx5_eswitch *esw, in esw_acl_egress_ofld_rules_create() argument
77 if (MLX5_CAP_GEN(esw->dev, prio_tag_required)) { in esw_acl_egress_ofld_rules_create()
82 esw_debug(esw->dev, in esw_acl_egress_ofld_rules_create()
90 err = esw_egress_acl_vlan_create(esw, vport, fwd_dest, 0, action); in esw_acl_egress_ofld_rules_create()
96 err = esw_acl_egress_ofld_fwd2vport_create(esw, vport, fwd_dest); in esw_acl_egress_ofld_rules_create()
116 static int esw_acl_egress_ofld_groups_create(struct mlx5_eswitch *esw, in esw_acl_egress_ofld_groups_create() argument
125 if (MLX5_CAP_GEN(esw in esw_acl_egress_ofld_groups_create()
181 esw_acl_egress_needed(struct mlx5_eswitch *esw, u16 vport_num) esw_acl_egress_needed() argument
186 esw_acl_egress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_egress_ofld_setup() argument
239 mlx5_esw_acl_egress_vport_bond(struct mlx5_eswitch *esw, u16 active_vport_num, u16 passive_vport_num) mlx5_esw_acl_egress_vport_bond() argument
265 mlx5_esw_acl_egress_vport_unbond(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_acl_egress_vport_unbond() argument
[all...]
H A Degress_lgcy.c18 static int esw_acl_egress_lgcy_groups_create(struct mlx5_eswitch *esw, in esw_acl_egress_lgcy_groups_create() argument
22 struct mlx5_core_dev *dev = esw->dev; in esw_acl_egress_lgcy_groups_create()
27 err = esw_acl_egress_vlan_grp_create(esw, vport); in esw_acl_egress_lgcy_groups_create()
67 int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw, in esw_acl_egress_lgcy_setup() argument
70 bool vst_mode_steering = esw_vst_mode_is_steering(esw); in esw_acl_egress_lgcy_setup()
86 } else if (MLX5_CAP_ESW_EGRESS_ACL(esw->dev, flow_counter)) { in esw_acl_egress_lgcy_setup()
87 drop_counter = mlx5_fc_create(esw->dev, false); in esw_acl_egress_lgcy_setup()
89 esw_warn(esw->dev, in esw_acl_egress_lgcy_setup()
100 esw_acl_egress_lgcy_cleanup(esw, vport); in esw_acl_egress_lgcy_setup()
105 vport->egress.acl = esw_acl_table_create(esw, vpor in esw_acl_egress_lgcy_setup()
161 esw_acl_egress_lgcy_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport) esw_acl_egress_lgcy_cleanup() argument
[all...]
/kernel/linux/linux-5.10/include/linux/mlx5/
H A Deswitch.h53 void mlx5_eswitch_register_vport_reps(struct mlx5_eswitch *esw,
56 void mlx5_eswitch_unregister_vport_reps(struct mlx5_eswitch *esw, u8 rep_type);
57 void *mlx5_eswitch_get_proto_dev(struct mlx5_eswitch *esw,
60 struct mlx5_eswitch_rep *mlx5_eswitch_vport_rep(struct mlx5_eswitch *esw,
62 void *mlx5_eswitch_uplink_get_proto_dev(struct mlx5_eswitch *esw, u8 rep_type);
64 mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw,
73 bool mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw);
74 bool mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw);
97 u32 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw,
99 u8 mlx5_eswitch_mode(struct mlx5_eswitch *esw);
102 mlx5_eswitch_mode(struct mlx5_eswitch *esw) mlx5_eswitch_mode() argument
114 mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_reg_c1_loopback_enabled() argument
120 mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_vport_match_metadata_enabled() argument
126 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw, int vport_num) mlx5_eswitch_get_vport_metadata_for_match() argument
[all...]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/esw/
H A Ddevlink_port.c18 mlx5_esw_devlink_port_supported(const struct mlx5_eswitch *esw, u16 vport_num) in mlx5_esw_devlink_port_supported() argument
21 (mlx5_core_is_ecpf(esw->dev) && vport_num == MLX5_VPORT_PF) || in mlx5_esw_devlink_port_supported()
22 mlx5_eswitch_is_vf_vport(esw, vport_num); in mlx5_esw_devlink_port_supported()
25 static struct devlink_port *mlx5_esw_dl_port_alloc(struct mlx5_eswitch *esw, u16 vport_num) in mlx5_esw_dl_port_alloc() argument
27 struct mlx5_core_dev *dev = esw->dev; in mlx5_esw_dl_port_alloc()
55 } else if (mlx5_eswitch_is_vf_vport(esw, vport_num)) { in mlx5_esw_dl_port_alloc()
69 int mlx5_esw_offloads_devlink_port_register(struct mlx5_eswitch *esw, u16 vport_num) in mlx5_esw_offloads_devlink_port_register() argument
71 struct mlx5_core_dev *dev = esw->dev; in mlx5_esw_offloads_devlink_port_register()
78 if (!mlx5_esw_devlink_port_supported(esw, vport_num)) in mlx5_esw_offloads_devlink_port_register()
81 vport = mlx5_eswitch_get_vport(esw, vport_nu in mlx5_esw_offloads_devlink_port_register()
103 mlx5_esw_offloads_devlink_port_unregister(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_devlink_port_unregister() argument
118 mlx5_esw_offloads_devlink_port(struct mlx5_eswitch *esw, u16 vport_num) mlx5_esw_offloads_devlink_port() argument
[all...]
/kernel/linux/linux-6.6/include/linux/mlx5/
H A Deswitch.h41 int (*event)(struct mlx5_eswitch *esw,
59 struct mlx5_eswitch *esw; member
62 void mlx5_eswitch_register_vport_reps(struct mlx5_eswitch *esw,
65 void mlx5_eswitch_unregister_vport_reps(struct mlx5_eswitch *esw, u8 rep_type);
66 void *mlx5_eswitch_get_proto_dev(struct mlx5_eswitch *esw,
69 struct mlx5_eswitch_rep *mlx5_eswitch_vport_rep(struct mlx5_eswitch *esw,
71 void *mlx5_eswitch_uplink_get_proto_dev(struct mlx5_eswitch *esw, u8 rep_type);
81 bool mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw);
82 bool mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw);
104 u32 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw,
168 mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_reg_c1_loopback_enabled() argument
174 mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw) mlx5_eswitch_vport_match_metadata_enabled() argument
180 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw, u16 vport_num) mlx5_eswitch_get_vport_metadata_for_match() argument
196 mlx5_eswitch_get_core_dev(struct mlx5_eswitch *esw) mlx5_eswitch_get_core_dev() argument
[all...]
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx5/
H A Dib_rep.c99 struct mlx5_eswitch *esw = mdev->priv.eswitch; in mlx5_ib_register_vport_reps() local
101 mlx5_eswitch_register_vport_reps(esw, &rep_ops, REP_IB); in mlx5_ib_register_vport_reps()
106 struct mlx5_eswitch *esw = mdev->priv.eswitch; in mlx5_ib_unregister_vport_reps() local
108 mlx5_eswitch_unregister_vport_reps(esw, REP_IB); in mlx5_ib_unregister_vport_reps()
111 u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw) in mlx5_ib_eswitch_mode() argument
113 return mlx5_eswitch_mode(esw); in mlx5_ib_eswitch_mode()
116 struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw, in mlx5_ib_get_rep_ibdev() argument
119 return mlx5_eswitch_get_proto_dev(esw, vport_num, REP_IB); in mlx5_ib_get_rep_ibdev()
122 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw, in mlx5_ib_get_rep_netdev() argument
125 return mlx5_eswitch_get_proto_dev(esw, vport_nu in mlx5_ib_get_rep_netdev()
128 mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw) mlx5_ib_get_uplink_ibdev() argument
133 mlx5_ib_vport_rep(struct mlx5_eswitch *esw, u16 vport_num) mlx5_ib_vport_rep() argument
143 struct mlx5_eswitch *esw = dev->mdev->priv.eswitch; create_flow_rule_vport_sq() local
[all...]
H A Dib_rep.h15 u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw);
16 struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
18 struct mlx5_ib_dev *mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw);
19 struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
26 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
29 static inline u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw) in mlx5_ib_eswitch_mode() argument
35 struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw, in mlx5_ib_get_rep_ibdev() argument
42 struct mlx5_ib_dev *mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw) in mlx5_ib_get_uplink_ibdev() argument
48 struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw, in mlx5_ib_vport_rep() argument
65 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw, in mlx5_ib_get_rep_netdev() argument
[all...]

Completed in 21 milliseconds

12345