OSDN Git Service

mlxsw: spectrum_matchall: Perform priority checks earlier
authorIdo Schimmel <idosch@nvidia.com>
Mon, 29 Mar 2021 10:09:45 +0000 (13:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2021 20:37:25 +0000 (13:37 -0700)
commitb24303048a6b23d27c4c12b9843265c0eef80ffd
tree436f2c79696f4317ea87d4a3a0caff2155ed41cc
parent50401f292434d5fb99f3f0c9b861f8a84c151ecc
mlxsw: spectrum_matchall: Perform priority checks earlier

Perform the priority check earlier in the function instead of repeating
it for every action. This fixes a bug that allowed matchall rules with
sample action to be added in front of flower rules on egress.

Fixes: 54d0e963f683 ("mlxsw: spectrum_matchall: Add support for egress sampling")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c