Home
last modified time | relevance | path

Searched refs:esw (Results 1 – 25 of 84) sorted by relevance

1234

/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/
Deswitch.c107 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()
259 esw_warn(esw->dev, in __esw_fdb_set_vport_rule()
270 esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u16 vport) in esw_fdb_set_vport_rule() argument
275 return __esw_fdb_set_vport_rule(esw, vport, false, mac_c, mac); in esw_fdb_set_vport_rule()
[all …]
Deswitch_offloads.c55 #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()
121 mlx5_eswitch_set_rule_source_port(struct mlx5_eswitch *esw, in mlx5_eswitch_set_rule_source_port() argument
135 if (mlx5_eswitch_vport_match_metadata_enabled(esw)) { in mlx5_eswitch_set_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
388 void esw_offloads_disable(struct mlx5_eswitch *esw);
389 int esw_offloads_enable(struct mlx5_eswitch *esw);
390 void esw_offloads_cleanup(struct mlx5_eswitch *esw);
391 int esw_offloads_init(struct mlx5_eswitch *esw);
394 mlx5_eswitch_add_send_to_vport_meta_rule(struct mlx5_eswitch *esw, u16 vport_num);
397 bool mlx5_esw_vport_match_metadata_supported(const struct mlx5_eswitch *esw);
398 u32 mlx5_esw_match_metadata_alloc(struct mlx5_eswitch *esw);
[all …]
Deswitch_offloads_termtbl.c112 mlx5_eswitch_termtbl_get_create(struct mlx5_eswitch *esw, in mlx5_eswitch_termtbl_get_create() argument
122 mutex_lock(&esw->offloads.termtbl_mutex); in mlx5_eswitch_termtbl_get_create()
124 hash_for_each_possible(esw->offloads.termtbl_tbl, tt, in mlx5_eswitch_termtbl_get_create()
147 err = mlx5_eswitch_termtbl_create(esw->dev, tt, flow_act); in mlx5_eswitch_termtbl_get_create()
151 hash_add(esw->offloads.termtbl_tbl, &tt->termtbl_hlist, hash_key); in mlx5_eswitch_termtbl_get_create()
154 mutex_unlock(&esw->offloads.termtbl_mutex); in mlx5_eswitch_termtbl_get_create()
158 mutex_unlock(&esw->offloads.termtbl_mutex); in mlx5_eswitch_termtbl_get_create()
163 mlx5_eswitch_termtbl_put(struct mlx5_eswitch *esw, in mlx5_eswitch_termtbl_put() argument
166 mutex_lock(&esw->offloads.termtbl_mutex); in mlx5_eswitch_termtbl_put()
169 mutex_unlock(&esw->offloads.termtbl_mutex); in mlx5_eswitch_termtbl_put()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/
Dlegacy.c22 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()
58 mlx5_destroy_flow_group(esw->fdb_table.legacy.promisc_grp); in esw_destroy_legacy_fdb_table()
59 if (esw->fdb_table.legacy.allmulti_grp) in esw_destroy_legacy_fdb_table()
60 mlx5_destroy_flow_group(esw->fdb_table.legacy.allmulti_grp); in esw_destroy_legacy_fdb_table()
[all …]
Dqos.c44 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()
134 static int esw_qos_normalize_vports_min_rate(struct mlx5_eswitch *esw, in esw_qos_normalize_vports_min_rate() argument
[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 …]
Dindir_table.c67 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()
130 flow_act.modify_hdr = mlx5_modify_header_alloc(esw->dev, MLX5_FLOW_NAMESPACE_FDB, in mlx5_esw_indir_table_rule_get()
[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 …]
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 …]
Dbridge_mcast.c197 …esw_warn(bridge->br_offloads->esw->dev, "MDB attach entry is already attached to port (MAC=%pM,vid… in mlx5_esw_bridge_port_mdb_attach()
205 …esw_warn(bridge->br_offloads->esw->dev, "MDB attach failed to init entry (MAC=%pM,vid=%u,vport=%u,… in mlx5_esw_bridge_port_mdb_attach()
215 esw_warn(bridge->br_offloads->esw->dev, in mlx5_esw_bridge_port_mdb_attach()
226 …esw_warn(bridge->br_offloads->esw->dev, "MDB attach failed to offload (MAC=%pM,vid=%u,vport=%u,err… in mlx5_esw_bridge_port_mdb_attach()
250 …esw_warn(bridge->br_offloads->esw->dev, "MDB detach failed to offload (MAC=%pM,vid=%u,vport=%u)\n", in mlx5_esw_bridge_port_mdb_entry_detach()
262 esw_debug(bridge->br_offloads->esw->dev, in mlx5_esw_bridge_port_mdb_detach()
269 esw_debug(bridge->br_offloads->esw->dev, in mlx5_esw_bridge_port_mdb_detach()
310 struct mlx5_eswitch *esw = bridge->br_offloads->esw; in mlx5_esw_bridge_port_mcast_fts_init() local
315 esw); in mlx5_esw_bridge_port_mcast_fts_init()
331 mlx5_esw_bridge_mcast_filter_fg_create(struct mlx5_eswitch *esw, in mlx5_esw_bridge_mcast_filter_fg_create() argument
[all …]
Dindir_table.h14 struct mlx5_flow_table *mlx5_esw_indir_table_get(struct mlx5_eswitch *esw,
17 void mlx5_esw_indir_table_put(struct mlx5_eswitch *esw,
21 mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw,
43 mlx5_esw_indir_table_get(struct mlx5_eswitch *esw, in mlx5_esw_indir_table_get() argument
51 mlx5_esw_indir_table_put(struct mlx5_eswitch *esw, in mlx5_esw_indir_table_put() argument
57 mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw, in mlx5_esw_indir_table_needed() argument
/Linux-v6.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 …]
Dingress_lgcy.c18 static int esw_acl_ingress_lgcy_groups_create(struct mlx5_eswitch *esw, in esw_acl_ingress_lgcy_groups_create() argument
22 struct mlx5_core_dev *dev = esw->dev; in esw_acl_ingress_lgcy_groups_create()
139 int esw_acl_ingress_lgcy_setup(struct mlx5_eswitch *esw, in esw_acl_ingress_lgcy_setup() argument
142 bool vst_mode_steering = esw_vst_mode_is_steering(esw); in esw_acl_ingress_lgcy_setup()
168 } else if (MLX5_CAP_ESW_INGRESS_ACL(esw->dev, flow_counter)) { in esw_acl_ingress_lgcy_setup()
169 counter = mlx5_fc_create(esw->dev, false); in esw_acl_ingress_lgcy_setup()
171 esw_warn(esw->dev, in esw_acl_ingress_lgcy_setup()
180 esw_acl_ingress_lgcy_cleanup(esw, vport); in esw_acl_ingress_lgcy_setup()
185 vport->ingress.acl = esw_acl_table_create(esw, vport, in esw_acl_ingress_lgcy_setup()
194 err = esw_acl_ingress_lgcy_groups_create(esw, vport); in esw_acl_ingress_lgcy_setup()
[all …]
/Linux-v6.6/include/linux/mlx5/
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,
[all …]
/Linux-v6.6/drivers/s390/cio/
Ddevice_status.c125 cdev_irb->esw.esw1.lpum = irb->esw.esw1.lpum; 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()
170 cdev_irb->esw.esw0.erw.scavf = irb->esw.esw0.erw.scavf; in ccw_device_accumulate_esw()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
Dsample.c24 struct mlx5_eswitch *esw; member
63 struct mlx5_eswitch *esw = tc_psample->esw; in sampler_termtbl_create() local
66 struct mlx5_core_dev *dev = esw->dev; in sampler_termtbl_create()
95 dest.vport.num = esw->manager_vport; in sampler_termtbl_create()
196 err = sampler_obj_create(tc_psample->esw->dev, sampler); in sampler_get()
220 sampler_obj_destroy(tc_psample->esw->dev, sampler->sampler_id); in sampler_put()
265 struct mlx5_eswitch *esw = tc_psample->esw; in sample_restore_get() local
266 struct mlx5_core_dev *mdev = esw->dev; in sample_restore_get()
290 restore->rule = esw_add_restore_rule(esw, obj_id); in sample_restore_get()
321 mlx5_modify_header_dealloc(tc_psample->esw->dev, restore->modify_hdr); in sample_restore_put()
[all …]
Dint_port.c31 bool mlx5e_tc_int_port_supported(const struct mlx5_eswitch *esw) in mlx5e_tc_int_port_supported() argument
33 return mlx5_eswitch_vport_match_metadata_enabled(esw) && in mlx5e_tc_int_port_supported()
34 MLX5_CAP_GEN(esw->dev, reg_c_preserve); in mlx5e_tc_int_port_supported()
61 mlx5e_int_port_create_rx_rule(struct mlx5_eswitch *esw, in mlx5e_int_port_create_rx_rule() argument
93 flow_rule = mlx5_add_flow_rules(esw->offloads.ft_offloads, spec, in mlx5e_int_port_create_rx_rule()
96 mlx5_core_warn(esw->dev, "ft offloads: Failed to add internal vport rx rule err %ld\n", in mlx5e_int_port_create_rx_rule()
154 struct mlx5_eswitch *esw = priv->dev->priv.eswitch; in mlx5e_int_port_add() local
176 …mlx5_core_warn(esw->dev, "Cannot add a new internal port, metadata allocation failed for ifindex %… in mlx5e_int_port_add()
182 ctx = esw->offloads.reg_c0_obj_pool; in mlx5e_int_port_add()
195 uplink_rpriv = mlx5_eswitch_get_uplink_priv(esw, REP_ETH); in mlx5e_int_port_add()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en/rep/
Dbridge.c22 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()
91 mlx5_esw_bridge_lower_rep_vport_num_vhca_id_get(struct net_device *dev, struct mlx5_eswitch *esw, in mlx5_esw_bridge_lower_rep_vport_num_vhca_id_get() argument
[all …]
Dtc.c95 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; in mlx5e_rep_update_flows() local
101 mutex_lock(&esw->offloads.encap_tbl_lock); in mlx5e_rep_update_flows()
127 mutex_unlock(&esw->offloads.encap_tbl_lock); in mlx5e_rep_update_flows()
191 struct mlx5_eswitch *esw; in mlx5e_rep_setup_ft_cb() local
198 esw = priv->mdev->priv.eswitch; in mlx5e_rep_setup_ft_cb()
204 if (!mlx5_chains_prios_supported(esw_chains(esw))) in mlx5e_rep_setup_ft_cb()
216 if (tmp.common.prio >= mlx5_chains_get_prio_range(esw_chains(esw))) in mlx5e_rep_setup_ft_cb()
221 tmp.common.chain_index = mlx5_chains_get_nf_ft_chain(esw_chains(esw)); in mlx5e_rep_setup_ft_cb()
373 struct mlx5_eswitch *esw; in mlx5e_rep_indr_setup_ft_cb() local
378 esw = mpriv->mdev->priv.eswitch; in mlx5e_rep_indr_setup_ft_cb()
[all …]
/Linux-v6.6/drivers/infiniband/hw/mlx5/
Dib_rep.c25 mlx5_ib_get_rep_netdev(rep->esw, rep->vport); in mlx5_ib_set_vport_rep()
137 struct mlx5_core_dev *mdev = mlx5_eswitch_get_core_dev(rep->esw); in mlx5_ib_vport_rep_unload()
176 struct mlx5_eswitch *esw; in mlx5_ib_vport_rep_unload() local
179 esw = peer_mdev->priv.eswitch; in mlx5_ib_vport_rep_unload()
180 mlx5_eswitch_unregister_vport_reps(esw, REP_IB); in mlx5_ib_vport_rep_unload()
196 struct mlx5_eswitch *esw; in mlx5_ib_register_peer_vport_reps() local
200 esw = peer_mdev->priv.eswitch; in mlx5_ib_register_peer_vport_reps()
201 mlx5_eswitch_register_vport_reps(esw, &rep_ops, REP_IB); in mlx5_ib_register_peer_vport_reps()
205 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw, in mlx5_ib_get_rep_netdev() argument
208 return mlx5_eswitch_get_proto_dev(esw, vport_num, REP_ETH); in mlx5_ib_get_rep_netdev()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun_encap.c147 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; in mlx5e_tc_encap_flows_add() local
197 rule = mlx5e_tc_offload_fdb_rules(esw, flow, spec, flow->attr); in mlx5e_tc_encap_flows_add()
206 mlx5e_tc_unoffload_from_slow_path(esw, flow); in mlx5e_tc_encap_flows_add()
217 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; in mlx5e_tc_encap_flows_del() local
244 rule = mlx5e_tc_offload_to_slow_path(esw, flow, spec); in mlx5e_tc_encap_flows_del()
253 mlx5e_tc_unoffload_fdb_rules(esw, flow, flow->attr); in mlx5e_tc_encap_flows_del()
408 struct mlx5_eswitch *esw; in mlx5e_tc_update_neigh_used_value() local
411 esw = priv->mdev->priv.eswitch; in mlx5e_tc_update_neigh_used_value()
412 mutex_lock(&esw->offloads.encap_tbl_lock); in mlx5e_tc_update_neigh_used_value()
429 mutex_unlock(&esw->offloads.encap_tbl_lock); in mlx5e_tc_update_neigh_used_value()
[all …]

1234