Skip to content

Commit

Permalink
net/mlx5e: Avoid overriding the user provided priority for offloaded …
Browse files Browse the repository at this point in the history
…tc rules

Just a leftover which was wrongly left there, remove it while spawning
a message to suggest firmware upgrade.

Fixes: bf07aa7 ('net/mlx5e: Support offloading tc priorities and chains for eswitch flows')
Signed-off-by: Or Gerlitz <[email protected]>
Reviewed-by: Paul Blakey <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
  • Loading branch information
ogerlitz authored and Saeed Mahameed committed Dec 13, 2018
1 parent e88afe7 commit d14f6f2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,11 +907,10 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
struct mlx5e_priv *out_priv;
int err = 0, encap_err = 0;

/* if prios are not supported, keep the old behaviour of using same prio
* for all offloaded rules.
*/
if (!mlx5_eswitch_prios_supported(esw))
attr->prio = 1;
if (!mlx5_eswitch_prios_supported(esw) && attr->prio != 1) {
NL_SET_ERR_MSG(extack, "E-switch priorities unsupported, upgrade FW");
return -EOPNOTSUPP;
}

if (attr->chain > max_chain) {
NL_SET_ERR_MSG(extack, "Requested chain is out of supported range");
Expand Down

0 comments on commit d14f6f2

Please sign in to comment.