/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | eswitch.c | 40 #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 …]
|
H A D | eswitch_offloads.c | 41 #include "esw/indir_table.h" 42 #include "esw/acl/ofld.h" 76 static struct mlx5_eswitch_rep *mlx5_eswitch_get_rep(struct mlx5_eswitch *esw, in mlx5_eswitch_get_rep() argument 79 return xa_load(&esw->offloads.vport_reps, vport_num); in mlx5_eswitch_get_rep() 83 mlx5_eswitch_set_rule_flow_source(struct mlx5_eswitch *esw, in mlx5_eswitch_set_rule_flow_source() argument 87 if (!MLX5_CAP_ESW_FLOWTABLE(esw->dev, flow_source) || !attr || !attr->in_rep) in mlx5_eswitch_set_rule_flow_source() 105 mlx5_eswitch_clear_rule_source_port(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec) in mlx5_eswitch_clear_rule_source_port() argument 107 if (mlx5_eswitch_vport_match_metadata_enabled(esw)) { in mlx5_eswitch_clear_rule_source_port() 122 mlx5_eswitch_set_rule_source_port(struct mlx5_eswitch *esw, in mlx5_eswitch_set_rule_source_port() argument 136 if (mlx5_eswitch_vport_match_metadata_enabled(esw)) { in mlx5_eswitch_set_rule_source_port() [all …]
|
H A D | eswitch.h | 86 #define esw_chains(esw) \ argument 87 ((esw)->fdb_table.offloads.esw_chains_priv) 311 struct mlx5_eswitch *esw; member 368 * referencing the root TSAR if the esw doesn't support nodes. 390 void esw_offloads_disable(struct mlx5_eswitch *esw); 391 int esw_offloads_enable(struct mlx5_eswitch *esw); 392 void esw_offloads_cleanup(struct mlx5_eswitch *esw); 393 int esw_offloads_init(struct mlx5_eswitch *esw); 396 mlx5_eswitch_add_send_to_vport_meta_rule(struct mlx5_eswitch *esw, u16 vport_num); 399 bool mlx5_esw_vport_match_metadata_supported(const struct mlx5_eswitch *esw); [all …]
|
H A D | eswitch_offloads_termtbl.c | 112 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 …]
|
H A D | en_rep.c | 203 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; in MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS() local 213 err = mlx5_core_query_vport_counter(esw->dev, 1, rep->vport - 1, 0, out); in MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS() 437 static void mlx5e_sqs2vport_stop(struct mlx5_eswitch *esw, in mlx5e_sqs2vport_stop() argument 445 if (esw->mode != MLX5_ESWITCH_OFFLOADS) in mlx5e_sqs2vport_stop() 465 static int mlx5e_sqs2vport_add_peers_rules(struct mlx5_eswitch *esw, struct mlx5_eswitch_rep *rep, in mlx5e_sqs2vport_add_peers_rules() argument 472 mlx5_devcom_for_each_peer_entry(esw->devcom, peer_esw, tmp) { in mlx5e_sqs2vport_add_peers_rules() 481 flow_rule = mlx5_eswitch_add_send_to_vport_rule(peer_esw, esw, in mlx5e_sqs2vport_add_peers_rules() 501 static int mlx5e_sqs2vport_start(struct mlx5_eswitch *esw, in mlx5e_sqs2vport_start() argument 512 if (esw->mode != MLX5_ESWITCH_OFFLOADS) in mlx5e_sqs2vport_start() 517 if (mlx5_devcom_comp_is_ready(esw->devcom) && in mlx5e_sqs2vport_start() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
H A D | legacy.c | 9 #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 …]
|
H A D | qos.c | 6 #include "esw/qos.h" 22 static void esw_qos_lock(struct mlx5_eswitch *esw) in esw_qos_lock() argument 24 mutex_lock(&esw->qos.domain->lock); in esw_qos_lock() 27 static void esw_qos_unlock(struct mlx5_eswitch *esw) in esw_qos_unlock() argument 29 mutex_unlock(&esw->qos.domain->lock); in esw_qos_unlock() 32 static void esw_assert_qos_lock_held(struct mlx5_eswitch *esw) in esw_assert_qos_lock_held() argument 34 lockdep_assert_held(&esw->qos.domain->lock); in esw_assert_qos_lock_held() 51 static int esw_qos_domain_init(struct mlx5_eswitch *esw) in esw_qos_domain_init() argument 53 esw->qos.domain = esw_qos_domain_alloc(); in esw_qos_domain_init() 55 return esw->qos.domain ? 0 : -ENOMEM; in esw_qos_domain_init() [all …]
|
H A D | vporttbl.c | 25 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 …]
|
H A D | indir_table.c | 15 #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 …]
|
H A D | bridge_mcast.c | 200 …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() 208 …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() 218 esw_warn(bridge->br_offloads->esw->dev, in mlx5_esw_bridge_port_mdb_attach() 229 …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() 253 …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() 265 esw_debug(bridge->br_offloads->esw->dev, in mlx5_esw_bridge_port_mdb_detach() 272 esw_debug(bridge->br_offloads->esw->dev, in mlx5_esw_bridge_port_mdb_detach() 313 struct mlx5_eswitch *esw = bridge->br_offloads->esw; in mlx5_esw_bridge_port_mcast_fts_init() local 318 esw); in mlx5_esw_bridge_port_mcast_fts_init() 334 mlx5_esw_bridge_mcast_filter_fg_create(struct mlx5_eswitch *esw, in mlx5_esw_bridge_mcast_filter_fg_create() argument [all …]
|
H A D | indir_table.h | 14 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/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ |
H A D | ingress_ofld.c | 10 acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport); 13 esw_acl_ingress_prio_tag_enabled(struct mlx5_eswitch *esw, in esw_acl_ingress_prio_tag_enabled() argument 16 return (MLX5_CAP_GEN(esw->dev, prio_tag_required) && in esw_acl_ingress_prio_tag_enabled() 17 mlx5_eswitch_is_vf_vport(esw, vport->vport)); in esw_acl_ingress_prio_tag_enabled() 20 static int esw_acl_ingress_prio_tag_create(struct mlx5_eswitch *esw, in esw_acl_ingress_prio_tag_create() argument 55 esw_warn(esw->dev, in esw_acl_ingress_prio_tag_create() 65 static int esw_acl_ingress_mod_metadata_create(struct mlx5_eswitch *esw, in esw_acl_ingress_mod_metadata_create() argument 73 key = mlx5_eswitch_get_vport_metadata_for_match(esw, vport->vport); in esw_acl_ingress_mod_metadata_create() 86 mlx5_modify_header_alloc(esw->dev, MLX5_FLOW_NAMESPACE_ESW_INGRESS, in esw_acl_ingress_mod_metadata_create() 90 esw_warn(esw->dev, in esw_acl_ingress_mod_metadata_create() [all …]
|
H A D | egress_ofld.c | 41 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 …]
|
H A D | ofld.h | 11 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 …]
|
H A D | helper.c | 9 esw_acl_table_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int ns, int size) in esw_acl_table_create() argument 12 struct mlx5_core_dev *dev = esw->dev; in esw_acl_table_create() 38 if (vport_num || mlx5_core_is_ecpf(esw->dev)) in esw_acl_table_create() 49 int esw_egress_acl_vlan_create(struct mlx5_eswitch *esw, in esw_egress_acl_vlan_create() argument 77 esw_warn(esw->dev, in esw_egress_acl_vlan_create() 95 int esw_acl_egress_vlan_grp_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport) in esw_acl_egress_vlan_grp_create() argument 119 esw_warn(esw->dev, in esw_acl_egress_vlan_grp_create()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/rep/ |
H A D | bridge.c | 9 #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 54 if (mlx5_esw_bridge_dev_same_esw(lower, esw)) in mlx5_esw_bridge_lag_rep_get() 62 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 69 dev = mlx5_esw_bridge_lag_rep_get(dev, esw); in mlx5_esw_bridge_rep_vport_num_vhca_id_get() 71 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 …]
|
H A D | tc.c | 95 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() 205 struct mlx5_eswitch *esw; in mlx5e_rep_setup_ft_cb() local 212 esw = priv->mdev->priv.eswitch; in mlx5e_rep_setup_ft_cb() 218 if (!mlx5_chains_prios_supported(esw_chains(esw))) in mlx5e_rep_setup_ft_cb() 225 * it to range [1, mlx5_esw_chains_get_prio_range(esw)] in mlx5e_rep_setup_ft_cb() 230 if (tmp.common.prio >= mlx5_chains_get_prio_range(esw_chains(esw))) in mlx5e_rep_setup_ft_cb() 235 tmp.common.chain_index = mlx5_chains_get_nf_ft_chain(esw_chains(esw)); in mlx5e_rep_setup_ft_cb() 387 struct mlx5_eswitch *esw; in mlx5e_rep_indr_setup_ft_cb() local [all …]
|
H A D | bond.c | 10 #include "esw/acl/ofld.h" 26 struct mlx5_eswitch *esw; member 74 mlx5_esw_match_metadata_free(mdata->esw, mdata->metadata_reg_c_0); in mlx5e_rep_bond_metadata_release() 80 int mlx5e_rep_bond_enslave(struct mlx5_eswitch *esw, struct net_device *netdev, in mlx5e_rep_bond_enslave() argument 91 rpriv = mlx5_eswitch_get_uplink_priv(esw, REP_ETH); in mlx5e_rep_bond_enslave() 100 mdata->esw = esw; in mlx5e_rep_bond_enslave() 102 mdata->metadata_reg_c_0 = mlx5_esw_match_metadata_alloc(esw); in mlx5e_rep_bond_enslave() 123 err = mlx5_esw_acl_ingress_vport_metadata_update(esw, rpriv->rep->vport, in mlx5e_rep_bond_enslave() 144 void mlx5e_rep_bond_unslave(struct mlx5_eswitch *esw, in mlx5e_rep_bond_unslave() argument 155 rpriv = mlx5_eswitch_get_uplink_priv(esw, REP_ETH); in mlx5e_rep_bond_unslave() [all …]
|
/linux/drivers/s390/cio/ |
H A D | device_status.c | 125 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 …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
H A D | tc_tun_encap.c | 156 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; in mlx5e_tc_encap_flows_add() local 206 rule = mlx5e_tc_offload_fdb_rules(esw, flow, spec, flow->attr); in mlx5e_tc_encap_flows_add() 215 mlx5e_tc_unoffload_from_slow_path(esw, flow); in mlx5e_tc_encap_flows_add() 226 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; in mlx5e_tc_encap_flows_del() local 253 rule = mlx5e_tc_offload_to_slow_path(esw, flow, spec); in mlx5e_tc_encap_flows_del() 262 mlx5e_tc_unoffload_fdb_rules(esw, flow, flow->attr); in mlx5e_tc_encap_flows_del() 417 struct mlx5_eswitch *esw; in mlx5e_tc_update_neigh_used_value() local 420 esw = priv->mdev->priv.eswitch; in mlx5e_tc_update_neigh_used_value() 421 mutex_lock(&esw->offloads.encap_tbl_lock); in mlx5e_tc_update_neigh_used_value() 438 mutex_unlock(&esw->offloads.encap_tbl_lock); in mlx5e_tc_update_neigh_used_value() [all …]
|
/linux/drivers/infiniband/hw/mlx5/ |
H A D | ib_rep.c | 24 ndev = mlx5_ib_get_rep_netdev(rep->esw, rep->vport); in mlx5_ib_set_vport_rep() 140 struct mlx5_core_dev *mdev = mlx5_eswitch_get_core_dev(rep->esw); in mlx5_ib_vport_rep_unload() 178 struct mlx5_eswitch *esw; in mlx5_ib_vport_rep_unload() local 181 esw = peer_mdev->priv.eswitch; in mlx5_ib_vport_rep_unload() 182 mlx5_eswitch_unregister_vport_reps(esw, REP_IB); in mlx5_ib_vport_rep_unload() 198 struct mlx5_eswitch *esw; in mlx5_ib_register_peer_vport_reps() local 202 esw = peer_mdev->priv.eswitch; in mlx5_ib_register_peer_vport_reps() 203 mlx5_eswitch_register_vport_reps(esw, &rep_ops, REP_IB); in mlx5_ib_register_peer_vport_reps() 207 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw, in mlx5_ib_get_rep_netdev() argument 210 return mlx5_eswitch_get_proto_dev(esw, vport_num, REP_ETH); in mlx5_ib_get_rep_netdev() [all …]
|
/linux/include/linux/mlx5/ |
H A D | eswitch.h | 42 int (*event)(struct mlx5_eswitch *esw, 60 struct mlx5_eswitch *esw; member 63 void mlx5_eswitch_register_vport_reps(struct mlx5_eswitch *esw, 66 void mlx5_eswitch_unregister_vport_reps(struct mlx5_eswitch *esw, u8 rep_type); 67 void *mlx5_eswitch_get_proto_dev(struct mlx5_eswitch *esw, 70 struct mlx5_eswitch_rep *mlx5_eswitch_vport_rep(struct mlx5_eswitch *esw, 72 void *mlx5_eswitch_uplink_get_proto_dev(struct mlx5_eswitch *esw, u8 rep_type); 82 bool mlx5_eswitch_reg_c1_loopback_enabled(const struct mlx5_eswitch *esw); 83 bool mlx5_eswitch_vport_match_metadata_enabled(const struct mlx5_eswitch *esw); 105 u32 mlx5_eswitch_get_vport_metadata_for_match(struct mlx5_eswitch *esw, [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ |
H A D | sample.c | 24 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 …]
|
H A D | int_port.c | 31 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/drivers/net/ethernet/mellanox/mlx5/core/lag/ |
H A D | mpesw.c | 8 #include "esw/acl/ofld.h" 14 struct mlx5_eswitch *esw; in mlx5_mpesw_metadata_cleanup() local 20 esw = dev->priv.eswitch; in mlx5_mpesw_metadata_cleanup() 24 mlx5_esw_acl_ingress_vport_metadata_update(esw, MLX5_VPORT_UPLINK, 0); in mlx5_mpesw_metadata_cleanup() 27 mlx5_esw_match_metadata_free(esw, pf_metadata); in mlx5_mpesw_metadata_cleanup() 35 struct mlx5_eswitch *esw; in mlx5_mpesw_metadata_set() local 41 esw = dev->priv.eswitch; in mlx5_mpesw_metadata_set() 42 pf_metadata = mlx5_esw_match_metadata_alloc(esw); in mlx5_mpesw_metadata_set() 49 err = mlx5_esw_acl_ingress_vport_metadata_update(esw, MLX5_VPORT_UPLINK, in mlx5_mpesw_metadata_set()
|