Home
last modified time | relevance | path

Searched full:esw (Results 1 – 25 of 158) sorted by relevance

1234567

/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/
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->fdb_table.legacy.fdb, spec, in __esw_fdb_set_vport_rule()
[all …]
Deswitch_offloads.c41 #include "esw/indir_table.h"
42 #include "esw/acl/ofld.h"
55 #define mlx5_esw_for_each_rep(esw, i, rep) \ argument
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()
[all …]
Deswitch.h86 #define esw_chains(esw) \ argument
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, u16 vport_num);
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/
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->vports[idx]; in mlx5_eswitch_get_vport()
187 __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u16 vport, bool rx_rule, in __esw_fdb_set_vport_rule() argument
[all …]
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, attr, &key); in esw_vport_tbl_put()
[all …]
Deswitch.h66 #define esw_chains(esw) \ argument
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, u16 vport_num,
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/
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->fdb_table.legacy.promisc_grp) in esw_destroy_legacy_fdb_table()
[all …]
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, i, evport) { in esw_qos_calculate_min_rate_divider()
[all …]
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, struct mlx5_vport_tbl_attr *attr) in mlx5_esw_vporttbl_get() argument
[all …]
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_num)) in mlx5_esw_offloads_pf_vf_devlink_port_init()
[all …]
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->dev, &mod_acts, MLX5_FLOW_NAMESPACE_FDB, in mlx5_esw_indir_table_rule_get()
[all …]
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() argument
123 esw_warn(esw->dev, in mlx5_esw_bridge_ingress_vlan_proto_fg_create()
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/
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->dev, in esw_acl_ingress_mod_metadata_create()
[all …]
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->dev, prio_tag_required)) { in esw_acl_egress_ofld_groups_create()
[all …]
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, struct mlx5_vport *vport);
28 int mlx5_esw_acl_ingress_vport_metadata_update(struct mlx5_eswitch *esw, u16 vport_num,
[all …]
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, vport, in esw_acl_egress_lgcy_setup()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/
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->dev, in esw_acl_ingress_mod_metadata_create()
[all …]
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->dev, prio_tag_required)) { in esw_acl_egress_ofld_groups_create()
[all …]
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, struct mlx5_vport *vport);
26 int mlx5_esw_acl_ingress_vport_bond_update(struct mlx5_eswitch *esw, u16 vport_num,
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, vport); in esw_acl_egress_lgcy_setup()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/esw/
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_num); in mlx5_esw_offloads_devlink_port_register()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx5/
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_num, REP_ETH); in mlx5_ib_get_rep_netdev()
[all …]
/kernel/linux/linux-5.10/include/linux/mlx5/
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);
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/en/rep/
Dbridge.c9 #include "esw/bridge.h"
22 static bool mlx5_esw_bridge_dev_same_esw(struct net_device *dev, struct mlx5_eswitch *esw) in mlx5_esw_bridge_dev_same_esw() argument
26 return esw == priv->mdev->priv.eswitch; in mlx5_esw_bridge_dev_same_esw()
29 static bool mlx5_esw_bridge_dev_same_hw(struct net_device *dev, struct mlx5_eswitch *esw) in mlx5_esw_bridge_dev_same_hw() argument
36 esw_mdev = esw->dev; in mlx5_esw_bridge_dev_same_hw()
45 mlx5_esw_bridge_lag_rep_get(struct net_device *dev, struct mlx5_eswitch *esw) in mlx5_esw_bridge_lag_rep_get() argument
59 if (mlx5_lag_is_shared_fdb(mdev) && mlx5_esw_bridge_dev_same_esw(lower, esw)) in mlx5_esw_bridge_lag_rep_get()
67 mlx5_esw_bridge_rep_vport_num_vhca_id_get(struct net_device *dev, struct mlx5_eswitch *esw, in mlx5_esw_bridge_rep_vport_num_vhca_id_get() argument
74 dev = mlx5_esw_bridge_lag_rep_get(dev, esw); in mlx5_esw_bridge_rep_vport_num_vhca_id_get()
76 if (!dev || !mlx5e_eswitch_rep(dev) || !mlx5_esw_bridge_dev_same_hw(dev, esw)) in mlx5_esw_bridge_rep_vport_num_vhca_id_get()
[all …]
/kernel/linux/linux-6.6/drivers/s390/cio/
Ddevice_status.c125 cdev_irb->esw.esw1.lpum = irb->esw.esw1.lpum; in ccw_device_accumulate_esw()
127 /* Copy subchannel logout information if esw is of format 0. */ in ccw_device_accumulate_esw()
129 cdev_sublog = &cdev_irb->esw.esw0.sublog; in ccw_device_accumulate_esw()
130 sublog = &irb->esw.esw0.sublog; in ccw_device_accumulate_esw()
159 cdev_irb->esw.esw0.erw.cpt = irb->esw.esw0.erw.cpt; in ccw_device_accumulate_esw()
161 cdev_irb->esw.esw0.erw.fsavf = irb->esw.esw0.erw.fsavf; in ccw_device_accumulate_esw()
162 if (cdev_irb->esw.esw0.erw.fsavf) { in ccw_device_accumulate_esw()
164 memcpy(cdev_irb->esw.esw0.faddr, irb->esw.esw0.faddr, in ccw_device_accumulate_esw()
165 sizeof (irb->esw.esw0.faddr)); in ccw_device_accumulate_esw()
167 cdev_irb->esw.esw0.erw.fsaf = irb->esw.esw0.erw.fsaf; in ccw_device_accumulate_esw()
[all …]

1234567