Home
last modified time | relevance | path

Searched refs:esw_attr (Results 1 – 19 of 19) sorted by relevance

/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/
H A Dmirred.c39 rep_priv = mlx5e_rep_to_rep_priv(attr->esw_attr->in_rep); in verify_uplink_forwarding()
111 struct mlx5_esw_flow_attr *esw_attr; in tc_act_can_offload_mirred() local
114 esw_attr = attr->esw_attr; in tc_act_can_offload_mirred()
147 if (esw_attr->out_count >= MLX5_MAX_FLOW_FWD_VPORTS) { in tc_act_can_offload_mirred()
152 esw_attr->out_count); in tc_act_can_offload_mirred()
181 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in parse_mirred_encap() local
184 parse_attr->mirred_ifindex[esw_attr->out_count] = out_dev->ifindex; in parse_mirred_encap()
185 parse_attr->tun_info[esw_attr->out_count] = in parse_mirred_encap()
188 if (!parse_attr->tun_info[esw_attr->out_count]) in parse_mirred_encap()
194 memcpy(&parse_attr->mpls_info[esw_attr->out_count], in parse_mirred_encap()
[all …]
H A Dredirect_ingress.c16 struct mlx5_esw_flow_attr *esw_attr; in tc_act_can_offload_redirect_ingress() local
19 esw_attr = attr->esw_attr; in tc_act_can_offload_redirect_ingress()
42 if (esw_attr->out_count) { in tc_act_can_offload_redirect_ingress()
57 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in tc_act_parse_redirect_ingress() local
65 &attr->action, esw_attr->out_count); in tc_act_parse_redirect_ingress()
70 esw_attr->out_count++; in tc_act_parse_redirect_ingress()
H A Dvlan.c106 err = parse_tc_vlan_action(priv, &vlan_act, attr->esw_attr, &attr->action, extack, NULL); in mlx5e_tc_act_vlan_add_push_action()
135 err = parse_tc_vlan_action(priv, &vlan_act, attr->esw_attr, &attr->action, in mlx5e_tc_act_vlan_add_pop_action()
150 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in tc_act_parse_vlan() local
161 err = parse_tc_vlan_action(priv, act, esw_attr, &attr->action, in tc_act_parse_vlan()
168 esw_attr->split_count = esw_attr->out_count; in tc_act_parse_vlan()
H A Dpedit.c87 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in tc_act_parse_pedit() local
102 esw_attr->split_count = esw_attr->out_count; in tc_act_parse_pedit()
H A Dct.c21 attr->esw_attr->split_count = attr->esw_attr->out_count; in tc_act_parse_ct()
H A Dvlan_mangle.c69 attr->esw_attr->split_count = attr->esw_attr->out_count; in tc_act_parse_vlan_mangle()
H A Dmpls.c84 attr->esw_attr->eth.h_proto = act->mpls_pop.proto; in tc_act_parse_mpls_pop()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dtc_tun_encap.c33 (attr->esw_attr->dests[out_index].flags & MLX5_ESW_DEST_ENCAP)) { in mlx5e_set_int_port_tunnel()
86 struct mlx5_esw_flow_attr *esw_attr = flow->attr->esw_attr; in mlx5e_tc_set_attr_rx_tun() local
95 esw_attr->rx_tun_attr = tun_attr; in mlx5e_tc_set_attr_rx_tun()
131 static bool mlx5e_tc_flow_all_encaps_valid(struct mlx5_esw_flow_attr *esw_attr) in mlx5e_tc_flow_all_encaps_valid() argument
141 if (!(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP)) in mlx5e_tc_flow_all_encaps_valid()
143 if (!(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP_VALID)) { in mlx5e_tc_flow_all_encaps_valid()
158 struct mlx5_esw_flow_attr *esw_attr; in mlx5e_tc_encap_flows_add() local
190 esw_attr = attr->esw_attr; in mlx5e_tc_encap_flows_add()
191 esw_attr->dests[flow->tmp_entry_index].pkt_reformat = e->pkt_reformat; in mlx5e_tc_encap_flows_add()
192 esw_attr->dests[flow->tmp_entry_index].flags |= MLX5_ESW_DEST_ENCAP_VALID; in mlx5e_tc_encap_flows_add()
[all …]
H A Dtc_tun.c715 struct mlx5_esw_flow_attr *esw_attr = flow_attr->esw_attr; in mlx5e_tc_tun_route_lookup() local
724 attr.fl.fl4.saddr = esw_attr->rx_tun_attr->dst_ip.v4; in mlx5e_tc_tun_route_lookup()
725 attr.fl.fl4.daddr = esw_attr->rx_tun_attr->src_ip.v4; in mlx5e_tc_tun_route_lookup()
731 attr.fl.fl6.saddr = esw_attr->rx_tun_attr->dst_ip.v6; in mlx5e_tc_tun_route_lookup()
732 attr.fl.fl6.daddr = esw_attr->rx_tun_attr->src_ip.v6; in mlx5e_tc_tun_route_lookup()
748 esw_attr->rx_tun_attr->decap_vport = vport_num; in mlx5e_tc_tun_route_lookup()
757 esw_attr->int_port = int_port; in mlx5e_tc_tun_route_lookup()
H A Dtc_ct.c837 attr->esw_attr->in_mdev = priv->mdev; in mlx5_tc_ct_entry_add_rule()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Deswitch_offloads.c124 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5_eswitch_set_rule_source_port() local
136 if (!attr->chain && esw_attr && esw_attr->int_port) in mlx5_eswitch_set_rule_source_port()
138 mlx5e_tc_int_port_get_metadata_for_match(esw_attr->int_port); in mlx5_eswitch_set_rule_source_port()
280 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in esw_put_dest_tables_loop() local
285 if (esw_attr->dests[i].flags & MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE) in esw_put_dest_tables_loop()
287 else if (mlx5_esw_indir_table_needed(esw, attr, esw_attr->dests[i].vport, in esw_put_dest_tables_loop()
288 esw_attr->dests[i].mdev)) in esw_put_dest_tables_loop()
289 mlx5_esw_indir_table_put(esw, esw_attr->dests[i].vport, false); in esw_put_dest_tables_loop()
293 esw_is_chain_src_port_rewrite(struct mlx5_eswitch *esw, struct mlx5_esw_flow_attr *esw_attr) in esw_is_chain_src_port_rewrite() argument
297 for (i = esw_attr->split_count; i < esw_attr->out_count; i++) in esw_is_chain_src_port_rewrite()
[all …]
H A Deswitch_offloads_termtbl.c219 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5_eswitch_termtbl_required() local
225 (!mlx5_eswitch_offload_is_uplink_port(esw, spec) && !esw_attr->int_port)) in mlx5_eswitch_termtbl_required()
235 for (i = esw_attr->split_count; i < esw_attr->out_count; i++) in mlx5_eswitch_termtbl_required()
236 if (!esw_attr->dest_int_port && esw_attr->dests[i].vport_valid && in mlx5_eswitch_termtbl_required()
237 esw_attr->dests[i].vport == MLX5_VPORT_UPLINK) in mlx5_eswitch_termtbl_required()
H A Den_tc.c644 return mlx5e_is_eswitch_flow(flow) ? flow->attr->esw_attr->counter_dev : flow->priv->mdev; in get_flow_counter_dev()
1467 if (attr->esw_attr->split_count) { in mlx5e_tc_offload_fdb_rules()
1489 if (attr->esw_attr->split_count) in mlx5e_tc_unoffload_fdb_rules()
1514 slow_attr->esw_attr->split_count = 0; in mlx5e_tc_offload_to_slow_path()
1583 slow_attr->esw_attr->split_count = 0; in mlx5e_tc_unoffload_from_slow_path()
1731 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in has_encap_dests() local
1735 if (esw_attr->dests[out_index].flags & MLX5_ESW_DEST_ENCAP) in has_encap_dests()
1797 struct mlx5_esw_flow_attr *esw_attr; in mlx5e_tc_add_fdb_flow() local
1802 esw_attr = attr->esw_attr; in mlx5e_tc_add_fdb_flow()
1830 if (!attr->chain && esw_attr->int_port && in mlx5e_tc_add_fdb_flow()
[all …]
H A Den_tc.h103 DECLARE_FLEX_ARRAY(struct mlx5_esw_flow_attr, esw_attr);
H A Deswitch.h876 struct mlx5_esw_flow_attr *esw_attr, int attr_idx);
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/
H A Dipsec_fs.c126 struct mlx5_esw_flow_attr *esw_attr; in mlx5_esw_ipsec_modify_flow_dests() local
131 esw_attr = attr->esw_attr; in mlx5_esw_ipsec_modify_flow_dests()
132 if (esw_attr->out_count - esw_attr->split_count > 1) in mlx5_esw_ipsec_modify_flow_dests()
135 err = mlx5_eswitch_restore_ipsec_rule(esw, flow->rule[0], esw_attr, in mlx5_esw_ipsec_modify_flow_dests()
136 esw_attr->out_count - 1); in mlx5_esw_ipsec_modify_flow_dests()
H A Dindir_table.c72 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5_esw_indir_table_needed() local
81 return esw_attr->in_rep->vport == MLX5_VPORT_UPLINK && in mlx5_esw_indir_table_needed()
90 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5_esw_indir_table_decap_vport() local
92 return esw_attr->rx_tun_attr ? esw_attr->rx_tun_attr->decap_vport : 0; in mlx5_esw_indir_table_decap_vport()
99 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5_esw_indir_table_rule_get() local
119 data = mlx5_eswitch_get_vport_metadata_for_set(esw, esw_attr->rx_tun_attr->decap_vport); in mlx5_esw_indir_table_rule_get()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
H A Dsample.c346 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in add_post_rule() local
360 per_vport_tbl_attr.vport = esw_attr->in_rep->vport; in add_post_rule()
410 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in del_post_rule() local
417 tbl_attr.vport = esw_attr->in_rep->vport; in del_post_rule()
473 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5e_tc_sample_offload() local
560 pre_esw_attr = pre_attr->esw_attr; in mlx5e_tc_sample_offload()
561 pre_esw_attr->in_mdev = esw_attr->in_mdev; in mlx5e_tc_sample_offload()
562 pre_esw_attr->in_rep = esw_attr->in_rep; in mlx5e_tc_sample_offload()
H A Dpost_act.c135 post_attr->esw_attr->split_count = 0; in mlx5e_tc_post_act_add()