mlxsw: spectrum_acl: Ignore always-zeroed bits in tp->prio
authorJiri Pirko <jiri@mellanox.com>
Sun, 8 Jul 2018 07:00:16 +0000 (10:00 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Jul 2018 08:05:19 +0000 (17:05 +0900)
The lowest 16 bits of tp->prio are always zero, so ignore them with a
shift.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c

index da93b7f..b40569c 100644 (file)
@@ -487,7 +487,7 @@ int mlxsw_sp_acl_rulei_commit(struct mlxsw_sp_acl_rule_info *rulei)
 void mlxsw_sp_acl_rulei_priority(struct mlxsw_sp_acl_rule_info *rulei,
                                 unsigned int priority)
 {
-       rulei->priority = priority;
+       rulei->priority = priority >> 16;
 }
 
 void mlxsw_sp_acl_rulei_keymask_u32(struct mlxsw_sp_acl_rule_info *rulei,