Skip to content

Commit 081abca

Browse files
w1ldptrSaeed Mahameed
authored andcommitted
Revert "net/mlx5e: Don't use termination table when redundant"
This reverts commit 14624d7. The termination table usage is requires for DMFS steering mode as firmware doesn't support mixed table destinations list which causes following syndrome with hairpin rules: [81922.283225] mlx5_core 0000:08:00.0: mlx5_cmd_out_err:803:(pid 25977): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0xaca205), err(-22) Fixes: 14624d7 ("net/mlx5e: Don't use termination table when redundant") Signed-off-by: Vlad Buslov <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Reviewed-by: Maor Dickman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 1b540de commit 081abca

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,6 @@ static bool mlx5_eswitch_offload_is_uplink_port(const struct mlx5_eswitch *esw,
210210
return (port_mask & port_value) == MLX5_VPORT_UPLINK;
211211
}
212212

213-
static bool
214-
mlx5_eswitch_is_push_vlan_no_cap(struct mlx5_eswitch *esw,
215-
struct mlx5_flow_act *flow_act)
216-
{
217-
if (flow_act->action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH &&
218-
!(mlx5_fs_get_capabilities(esw->dev, MLX5_FLOW_NAMESPACE_FDB) &
219-
MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX))
220-
return true;
221-
222-
return false;
223-
}
224-
225213
bool
226214
mlx5_eswitch_termtbl_required(struct mlx5_eswitch *esw,
227215
struct mlx5_flow_attr *attr,
@@ -237,7 +225,10 @@ mlx5_eswitch_termtbl_required(struct mlx5_eswitch *esw,
237225
(!mlx5_eswitch_offload_is_uplink_port(esw, spec) && !esw_attr->int_port))
238226
return false;
239227

240-
if (mlx5_eswitch_is_push_vlan_no_cap(esw, flow_act))
228+
/* push vlan on RX */
229+
if (flow_act->action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH &&
230+
!(mlx5_fs_get_capabilities(esw->dev, MLX5_FLOW_NAMESPACE_FDB) &
231+
MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX))
241232
return true;
242233

243234
/* hairpin */
@@ -261,31 +252,19 @@ mlx5_eswitch_add_termtbl_rule(struct mlx5_eswitch *esw,
261252
struct mlx5_flow_act term_tbl_act = {};
262253
struct mlx5_flow_handle *rule = NULL;
263254
bool term_table_created = false;
264-
bool is_push_vlan_on_rx;
265255
int num_vport_dests = 0;
266256
int i, curr_dest;
267257

268-
is_push_vlan_on_rx = mlx5_eswitch_is_push_vlan_no_cap(esw, flow_act);
269258
mlx5_eswitch_termtbl_actions_move(flow_act, &term_tbl_act);
270259
term_tbl_act.action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
271260

272261
for (i = 0; i < num_dest; i++) {
273262
struct mlx5_termtbl_handle *tt;
274-
bool hairpin = false;
275263

276264
/* only vport destinations can be terminated */
277265
if (dest[i].type != MLX5_FLOW_DESTINATION_TYPE_VPORT)
278266
continue;
279267

280-
if (attr->dests[num_vport_dests].rep &&
281-
attr->dests[num_vport_dests].rep->vport == MLX5_VPORT_UPLINK)
282-
hairpin = true;
283-
284-
if (!is_push_vlan_on_rx && !hairpin) {
285-
num_vport_dests++;
286-
continue;
287-
}
288-
289268
if (attr->dests[num_vport_dests].flags & MLX5_ESW_DEST_ENCAP) {
290269
term_tbl_act.action |= MLX5_FLOW_CONTEXT_ACTION_PACKET_REFORMAT;
291270
term_tbl_act.pkt_reformat = attr->dests[num_vport_dests].pkt_reformat;
@@ -333,9 +312,6 @@ mlx5_eswitch_add_termtbl_rule(struct mlx5_eswitch *esw,
333312
for (curr_dest = 0; curr_dest < num_vport_dests; curr_dest++) {
334313
struct mlx5_termtbl_handle *tt = attr->dests[curr_dest].termtbl;
335314

336-
if (!tt)
337-
continue;
338-
339315
attr->dests[curr_dest].termtbl = NULL;
340316

341317
/* search for the destination associated with the

0 commit comments

Comments
 (0)