Home
last modified time | relevance | path

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

/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.c107 err = parse_tc_vlan_action(priv, &vlan_act, attr->esw_attr, in mlx5e_tc_act_vlan_add_push_action()
136 err = parse_tc_vlan_action(priv, &vlan_act, attr->esw_attr, &attr->action, in mlx5e_tc_act_vlan_add_pop_action()
151 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in tc_act_parse_vlan() local
162 err = parse_tc_vlan_action(priv, act, esw_attr, &attr->action, in tc_act_parse_vlan()
169 esw_attr->split_count = esw_attr->out_count; in tc_act_parse_vlan()
H A Dpedit.c88 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in tc_act_parse_pedit() local
103 esw_attr->split_count = esw_attr->out_count; in tc_act_parse_pedit()
H A Dct.c31 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()
/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()
85 struct mlx5_esw_flow_attr *esw_attr = flow->attr->esw_attr; in mlx5e_tc_set_attr_rx_tun() local
94 esw_attr->rx_tun_attr = tun_attr; in mlx5e_tc_set_attr_rx_tun()
130 static bool mlx5e_tc_flow_all_encaps_valid(struct mlx5_esw_flow_attr *esw_attr) in mlx5e_tc_flow_all_encaps_valid() argument
140 if (!(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP)) in mlx5e_tc_flow_all_encaps_valid()
142 if (!(esw_attr->dests[i].flags & MLX5_ESW_DEST_ENCAP_VALID)) { in mlx5e_tc_flow_all_encaps_valid()
157 struct mlx5_esw_flow_attr *esw_attr; in mlx5e_tc_encap_flows_add() local
189 esw_attr = attr->esw_attr; in mlx5e_tc_encap_flows_add()
190 esw_attr->dests[flow->tmp_entry_index].pkt_reformat = e->pkt_reformat; in mlx5e_tc_encap_flows_add()
191 esw_attr->dests[flow->tmp_entry_index].flags |= MLX5_ESW_DEST_ENCAP_VALID; in mlx5e_tc_encap_flows_add()
[all …]
H A Dtc_tun.c717 struct mlx5_esw_flow_attr *esw_attr = flow_attr->esw_attr; in mlx5e_tc_tun_route_lookup() local
726 attr.fl.fl4.saddr = esw_attr->rx_tun_attr->dst_ip.v4; in mlx5e_tc_tun_route_lookup()
727 attr.fl.fl4.daddr = esw_attr->rx_tun_attr->src_ip.v4; in mlx5e_tc_tun_route_lookup()
733 attr.fl.fl6.saddr = esw_attr->rx_tun_attr->dst_ip.v6; in mlx5e_tc_tun_route_lookup()
734 attr.fl.fl6.daddr = esw_attr->rx_tun_attr->src_ip.v6; in mlx5e_tc_tun_route_lookup()
750 esw_attr->rx_tun_attr->decap_vport = vport_num; in mlx5e_tc_tun_route_lookup()
759 esw_attr->int_port = int_port; in mlx5e_tc_tun_route_lookup()
H A Dtc_ct.c849 attr->esw_attr->in_mdev = priv->mdev; in mlx5_tc_ct_entry_add_rule()
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Deswitch_offloads.c129 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in mlx5_eswitch_set_rule_source_port() local
141 if (!attr->chain && esw_attr && esw_attr->int_port) in mlx5_eswitch_set_rule_source_port()
143 mlx5e_tc_int_port_get_metadata_for_match(esw_attr->int_port); in mlx5_eswitch_set_rule_source_port()
285 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in esw_put_dest_tables_loop() local
290 if (esw_attr->dests[i].flags & MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE) in esw_put_dest_tables_loop()
292 else if (mlx5_esw_indir_table_needed(esw, attr, esw_attr->dests[i].vport, in esw_put_dest_tables_loop()
293 esw_attr->dests[i].mdev)) in esw_put_dest_tables_loop()
294 mlx5_esw_indir_table_put(esw, esw_attr->dests[i].vport, false); in esw_put_dest_tables_loop()
298 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
302 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.c645 return mlx5e_is_eswitch_flow(flow) ? flow->attr->esw_attr->counter_dev : flow->priv->mdev; in get_flow_counter_dev()
1472 if (attr->esw_attr->split_count) { in mlx5e_tc_offload_fdb_rules()
1494 if (attr->esw_attr->split_count) in mlx5e_tc_unoffload_fdb_rules()
1519 slow_attr->esw_attr->split_count = 0; in mlx5e_tc_offload_to_slow_path()
1588 slow_attr->esw_attr->split_count = 0; in mlx5e_tc_unoffload_from_slow_path()
1736 struct mlx5_esw_flow_attr *esw_attr = attr->esw_attr; in has_encap_dests() local
1740 if (esw_attr->dests[out_index].flags & MLX5_ESW_DEST_ENCAP) in has_encap_dests()
1750 struct mlx5_esw_flow_attr *esw_attr; in extra_split_attr_dests_needed() local
1757 esw_attr = attr->esw_attr; in extra_split_attr_dests_needed()
1758 if (!esw_attr->split_count || in extra_split_attr_dests_needed()
[all …]
H A Den_tc.h104 DECLARE_FLEX_ARRAY(struct mlx5_esw_flow_attr, esw_attr);
H A Deswitch.h929 struct mlx5_esw_flow_attr *esw_attr, int attr_idx);
/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/
H A Dipsec_fs.c139 struct mlx5_esw_flow_attr *esw_attr; in mlx5_esw_ipsec_modify_flow_dests() local
144 esw_attr = attr->esw_attr; in mlx5_esw_ipsec_modify_flow_dests()
145 if (esw_attr->out_count - esw_attr->split_count > 1) in mlx5_esw_ipsec_modify_flow_dests()
148 err = mlx5_eswitch_restore_ipsec_rule(esw, flow->rule[0], esw_attr, in mlx5_esw_ipsec_modify_flow_dests()
149 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()
/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()